Events¶
Covage provides events in the form of documents, each with a unique identifier, a type, and some generic and specific data.
These events may be associated with either orders (order
) or services (service
), and can be retrieved as a whole, for an object type or for a specific object.
Event fields¶
Field name |
Type |
Description |
---|---|---|
model |
string |
|
event_uuid |
string |
Event identifier |
type |
string |
Event type |
object_type |
string |
Type of the object associated with the event |
object_uuid |
string |
Identifier of the object associated with the event |
creation_date |
ISO Datetime |
Date and time of object creation |
modification_date |
ISO Datetime |
Date and time of last object modification |
event_date |
ISO Datetime |
Date and time of the object event |
data |
dictionary |
Specific data associated with the event type |
Example:
{
"event_uuid": "3cpkp1f1",
"model": "event",
"type": "order-running",
"object_type": "order",
"object_uuid": "1i0cvu4c",
"event_date": "2017-05-09T16:01:06.196355",
"creation_date": "2017-05-09T15:59:55.669742",
"modification_date": "2017-05-09T15:59:55.669742",
"data": null
}
Listing the events¶
Listing the events can be useful for a number of reasons:
Updating your information system in near real time by regularly retrieving the new events, so that you are informed of your orders’ progress and of the events on your services
Triggering the intervention of your support team whenever necessary
Displaying the history of an order or a service on your back office
Note
The /api/events/
URL supports paging, which helps you retrieving the events one block at a time
Keeping updated on the events relevant to you¶
By default the /api/events/
URL sends you the events associated with you, ordered by descending event_date
.
By sorting the results with the parameter ?sort=creation_date
you make sure you receive the older events first.
You can then pick the sort_value
field of the last element on the list and call the same URL with the parameter after={sort_value}
; the API will return the events which creation date is later than the date of your last event. Should the result be an empty list, you can wait for a few minutes and then start again, in order to retrieve the events generated after your last call.
GET /api/events/?sort=event_date&direction=asc&size=2 HTTP/1.1
Host: extranet.kosc-telecom.fr
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"model": "event",
"creation_date": "2017-05-09T15:57:59.311887",
"modification_date": "2017-05-09T15:57:59.311887",
"sort_value": "WyIyMDE3LTA1LTA5VDE1OjU3OjU5LjU3MzM5MyJd",
"event_uuid": "109ao75u",
"type": "order-running",
"object_type": "order",
"object_uuid": "9h3gy2i9",
"event_date": "2017-05-09T15:57:59.573393",
"data": null
},
{
"model": "event",
"creation_date": "2017-05-09T15:58:59.011698",
"modification_date": "2017-05-09T15:58:59.011698",
"sort_value": "WyIyMDE3LTA1LTA5VDE2OjAxOjA0LjYzNzc2NiJd",
"event_uuid": "lrgecnfi",
"type": "order-running",
"object_type": "order",
"object_uuid": "1i0cvu4c",
"event_date": "2017-05-09T16:1:04 AM.637766",
"data": null
}
]
Note
WARNING! It is important to sort the results by creation_date
instead of event_date
. Providers could send events with some delay, which could result in your information system missing an event.
Listing the events on a specific object¶
You can filter events on an object type (order
or service
) by adding the parameter ?object_type={object_type}
to your request.
You can filter the results associated with a specific order or service by adding its identifier to the parameters: object_uuid={object_uuid}
.
Example:
GET /api/events/?object_type=order&object_uuid=e73cafe9-4785-441e-ab75-22ffa806a313&limit=2 HTTP/1.1
Host: extranet.kosc-telecom.fr
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"model": "event",
"creation_date": "2017-05-09T15:57:59.311887",
"modification_date": "2017-05-09T15:57:59.311887",
"sort_value": "WyIyMDE3LTA1LTA5VDE1OjU3OjU5LjMxMTg4NyJd",
"event_uuid": "109ao75u",
"type": "order-running",
"object_type": "order",
"object_uuid": "e73cafe9-4785-441e-ab75-22ffa806a313",
"event_date": "2017-05-09T15:57:59.573393",
"data": null
},
{
"model": "event",
"creation_date": "2017-05-09T13:51:16.972576",
"modification_date": "2017-05-09T13:51:16.972576",
"sort_value": "WyIyMDE3LTA1LTA5VDEzOjUxOjE2Ljk3MjU3NiJd",
"event_uuid": "zk5c0whk",
"type": "order-submitted",
"object_type": "order",
"object_uuid": "e73cafe9-4785-441e-ab75-22ffa806a313",
"event_date": "2017-05-09T13:51:16.400666",
"data": null
}
]
Retrieving an event¶
To retrieve an event, you need to do a GET
on the /api/events/{event_uuid}/
URL.
Example:
GET /api/events/3cpkp1f1/ HTTP/1.1
Host: extranet.kosc-telecom.fr
HTTP/1.1 200 OK
Content-Type: application/json
{
"model": "event",
"creation_date": "2017-05-09T15:59:55.669742",
"modification_date": "2017-05-09T15:59:55.669742",
"event_uuid": "3cpkp1f1",
"type": "order-running",
"object_type": "order",
"object_uuid": "1i0cvu4c",
"event_date": "2017-05-09T16:01:06.196355",
"data": null
}
List of events¶
order-dropped (*) |
order-info (stop deferred) |
Fiber Pro events¶
Events associated with an order
¶
order-submitted¶
The draft order has been successfully submitted.
{
"kosc_order_ref": "O170331_12004"
}
order-acknowledged¶
The order was validated by Kosc.
order-running¶
The order is being processed.
order-completed¶
The order was successfully completed.
The data available in the data
field are listed below:
Field name |
Type |
Description |
---|---|---|
endpoints |
dictionary list |
List of the |
service_uuid |
string |
Technical identifier of the created service |
service_alias |
string |
Alias of the cre service ( also known as |
order-on-site-intervention-succeeded¶
The on-site intervention is a success.
Following are the elements available in the field data
:
Field name |
Type |
Description |
---|---|---|
message |
string |
Provider message |
Example :
{
"message": "Lorem ipsum ..."
}
order-on-site-intervention-failed¶
The on-site intervention is a failure..
Following are the elements available in the field data
:
Field name |
Type |
Description |
---|---|---|
message |
string |
Provider message |
Example :
{
"message": "Lorem ipsum ..."
}
order-appointment-deferred¶
The on-site intervention got post-poned.
Following are the elements available in the field data
:
Field name |
Type |
Description |
---|---|---|
message |
string |
Provider Message |
Example :
{
"message": "Lorem ipsum ..."
}
order-rejected¶
The order was rejected by a supplier.
Following are the elements available in the field data
:
Field Name |
Type |
Description |
---|---|---|
reject_reason |
string |
Reject reason |
reject_code |
string |
Reject Code |
reject_subcode |
string |
Reject sub_code |
reject_description |
string |
Reject description |
Example :
{
"reject_reason": "ar_ko",
"reject_code": "CDE_ANNUL",
"reject_subcode": "CLI003",
"reject_description": null
}
order-cancelled¶
The order was cancelled at your request.
Following are the elements available in the field data
:
Field Name |
Type |
Description |
---|---|---|
reason |
string |
Reason why the order was cancelled. |
Example :
{
"reason": "sensible access"
}
order-appointment-agreed¶
The local loop operator and the end customer made an appointment.
The data available in the data
field are listed below:
Field name |
Type |
Description |
---|---|---|
start_date |
ISO Datetime |
Date and time of time slot start |
end_date |
ISO Datetime |
Date and time of time slot end (null on fiber) |
Example:
{
"start_date": "2017-04-22T10:12:00 AM.459593",
"end_date": "2017-04-22T12:12:00 AM.459593"
}
order-localloop-desaturation-planned¶
The desaturation of the local loop has been scheduled.
The data available in the data
field are listed below:
Field name |
Type |
Description |
---|---|---|
desaturation_type |
ISO Datetime |
Desaturation type ( |
Example:
{
"desaturation_type": "LL_FREE_DESAT"
}
order-info¶
Information message in text format.
The data available in the data
field are listed below:
Field name |
Type |
Description |
---|---|---|
message |
string |
Message from provider |
Example:
{
"message": "Lorem ipsum ..."
}
Example of creation of an event order-info
type for an order,
in order to perform the creation of the event, you need to be part of either the ‘admin’ either the ‘delivery’ group,
where {{order_uuid}} is the uuid of the order that you want to send the message to:
POST /api/v2/orders/{{order_uuid}}/events/info
Host: extranet.kosc-telecom.fr
Content-Type: application/json
{
"message":"Hello there"
}
Warning : You can only create a new message every 5 minutes on a given order. Otherwise, the request will be throttled
order-info (stop_deferred)¶
Information message in text format.
The data available in the data
field are listed below:
Field name |
Type |
Description |
---|---|---|
message |
string |
Message from provider |
stop_deferred |
bool |
Boolean allowing to end the deferred (conditionally) |
Example :
POST /api/v2/orders/{{order_uuid}}/events/info
Host: extranet.kosc-telecom.fr
Content-Type: application/json
{
"message": "You fix your ungoing problem",
"stop_deferred": true
}
Warning : You can only create a new message every 5 minutes on a given order. Otherwise, the request will be throttled
order-appointment-confirmed¶
The local loop operator confirmed the appointment with the end customer.
This event does not involve any additional data.
order-appointment-declined¶
The local loop operator declined the appointment with the end customer.
This event does not involve any additional data.
order-appointment-missed¶
This event does not involve any additional data.
order-localloop-saturation¶
Local loop saturated, the appointment is obsolete. Further delay in the delivery is foreseen.
This event does not involve any additional data.
order-localloop-desaturation-quote-emitted¶
This event does not involve any additional data.
order-localloop-desaturation-quote-accepted¶
This event does not involve any additional data.
order-network-saturation¶
Network resource saturation detected.
This event does not involve any additional data.
order-network-desaturation-planned¶
The desaturation of the network has been scheduled.
This event does not involve any additional data.
order-sensibleaccess¶
The order will suspend the service on a so-called “sensitive” access.
This event does not involve any additional data.
order-sensibleaccess-orderconfirmed¶
The order on the “sensitive” access was confirmed.
This event does not involve any additional data.
order-delayed¶
The order is delayed. Please proceed to confirming or canceling it.
This event does not involve any additional data.
order-delayed-orderconfirmed¶
The delay in the order was confirmed.
This event does not involve any additional data.
order-information-from-provider¶
Information message from provider in text format.
The data available in the data
field are listed below:
Field name |
Type |
Description |
---|---|---|
message |
string |
More information about the reason |
description |
string |
Information reason |
Exemple :
{
"message": "The order is awaiting the activation status report (OK or NOK)",
"description": "Activation Status Report"
}
order-requalified¶
Activate / create request requalified. The appointment is cancelled.
This event does not involve any additional data.
CRI¶
The Intervention Report was made available by the subcontractor.
The file is hosted on the azure blob storage solution.
Each file contains a URL to access it.
Each url ends with a token to access the file 30 minutes after its generation.
The token is generated as soon as the url is displayed through a request.
Urls are displayed in the “data” field.
{
"fichier 1": "https://covdevpvi.blob.core.windows.net/pvi/{{order_alias}}/{{work_order_alias}}/Public/file_name.pdf?se={{token}}
}
Events by type of order
¶
Event Type |
Activate Activate |
Activate Create |
Terminate |
---|---|---|---|
|
X |
X |
X |
|
X |
X |
X |
|
X |
X |
X |
|
X |
X |
X |
|
X |
X |
X |
|
X |
||
|
X |
||
|
X |
||
|
X |
||
|
X |
||
|
X |
||
|
X |
||
|
X |
||
|
X |
||
|
X |
||
|
X |
||
|
X |
||
|
X |
||
|
X |
X |
|
|
X |
X |
|
|
X |
X |
|
|
X |
X |
X |
Events on a service
¶
service-activated¶
The service had been activated.
This event does not offer any additional data.
service-terminated¶
Service has been terminated.
This event does not offer any additional data.
service-modified¶
This event does not offer any additional data.
service-slammed¶
The service was overidden by another line.
This event does not offer any additional data.
service-updated¶
This event does not offer any additional data.
service-info¶
This event does not offer any additional data.