Exports API
Data Compliance
Omilia OCP® Data Warehouse and Exports API comply with General Data Protection Regulation (GDPR) requirements. For any data type exported from OCP through Exports API, the OCP users are responsible to ensure that their exported data is handled accordingly and meets necessary regulations.
Overview
Export Service is a dedicated service that allows OCP users to gain access to their raw application data. The Export API provides two distinct functionalities: Batch Export and Streaming Export.
For availability and billing details of Audios functionality (Batch and Streaming), please contact your Account Manager, as additional charges may apply.
Read more about the Export Service features in the Export Service User Guide.
Export API is crucial for OCP users who want to retrieve, export, and manage their raw application data within the specified constraints and authentication mechanisms. Here is a brief overview of what Export API could assist with:
Access to Raw Application Data: The Export Service allows users to access their raw application data.
Exporting Call Detail Records (CDRs): The API supports the export of Call Detail Records (CDRs) for a specific time range. The API allows users to request CDRs for specific types of data, such as Dialog Data or ALL, which include Dialog Step, Dialog Start, Dialog End, dialog_step, dialog_start, dialog_end, vb_enrolment, vb_verification, Audit and Audio.
Dialog Data, Dialog Step, Dialog Start, and Dialog End are planned for deprecation in future versions of the Exports API. They will be replaced as follows:
Dialog Data → All
Dialog Step → dialog_step
Dialog Start → dialog_start
Dialog End → dialog_end
Export Creation: Users can create exports using the API by making a request to the specific endpoint.
Export Status and Expiry: After a successful export creation, the exported data is stored for one day. The data is deleted from the API after this period, and the status of the export is updated to expired.
Export Metadata and Data Retrieval: Users can retrieve metadata of a specific export and list export data using the respective GET endpoints. The export data retrieval process is paginated, involving multiple requests to access all files.
Rate Limiting: The API has a rate limiting mechanism to control the number of requests per group within a specific time window. Rate limiting can be configured using parameters such as the number of requests permitted, the length of the fixed window, and the TTL for cache entries.
Exports API is organized around HTTP REST. Our API allows you to request CDRs as exports for specific time range. The maximum date range supported is two days. The smallest requested date range is one hour (for example, 2023-01-12T12:00:00.000Z to 2023-01-12T13:00:00.000Z).
Minutes/seconds/milliseconds will not change the export (example, 2023-01-12T12:00:00.000Z to 2023-01-12T13:00:00.000Z is equal to 2023-01-12T12:10:00.000Z to 2023-01-12T13:20:00.000Z).
Here are the key reasons for exporting data:
Retention Policy: Omilia enforces a 60-day retention policy; to prevent data loss, it is imperative to export and store the data in your individual database.
Flexible Data Transfer: Seamlessly transfer data to a library of your choice, ensuring immediate and unrestricted access for your specific requirements.
Custom Metric Development: Empower your analytics by creating personalized metrics tailored to your unique business needs, leveraging the exported data for comprehensive insights and reporting capabilities.
Each group can run one export at a time. After the successful creation of the export, the exported data is stored for one day, after this period the data is deleted from the API and the status of the export is updated to expired.
We use built-in HTTP authentication to validate users based on groups/roles stored in IAM.
Authentication
Navigate to the API Authentication to learn more about Authorization Token Endpoint and Authentication process.
Erros Codes
Omilia's HTTP response codes can be found on the HTTP Code Responses page.
API Reference
Endpoints from the organization-controller
are not available in all environments. Different collection endpoints are tied to specific environments, which may be accessible to different customers. For more information, please contact your Account Manager.
Batch Export API Reference
.png?inst-v=373dadd8-2d50-4f50-9e03-c92546b7bfe8)
Batch Export API sequence diagram
Streaming Export (Subscriptions) API Reference
Subscription functionality within the Export Service of Omilia OCP® empowers users to subscribe to message channels, facilitating the receipt of near real-time data streams. Read more about how to use subscriptions in the Export Service User Guide.
To get access to Export Subscriptions, please contact your Account Manager.
Streaming Exports API allows clients to subscribe to message channels and receive streams of data in a near real-time manner. Message channels are organized by data type (see Data Types for more information).
Streaming Exports API is organized around HTTP REST for the management of the subscriptions. Although it aims to support multiple delivery methods, currently the streams are delivered via HTTP requests sent to the client’s public API gateway.
Each group is allowed to have only one running streaming export at a time for each message type (for example, dialog_step
, dialog_start
). After the successful creation of the export, the data starts streaming in the clients provided callback path.
We use built-in HTTP authentication to validate users based on groups/roles stored in IAM.
Audit_events may currently be available in specific environments. Please contact your Account Manager for more details.
Streaming Export API sequence diagram
Examples of Streaming Export JSON Object Provided to Clients
Here are some examples of the data that the client will start receiving after successfully creating a streaming exports subscription.
The events have the corresponding subscription type inside messages. In this example, the type is the start of the CDRs JSON files, whilst "my_ocp_start_cdrs"
is the name selected for the export subscription.
{
"schemaName": "my_ocp_start_cdrs",
"sessionId": "5c2b9dc1-899a-4124-97f5-b7e3e02a0660",
"sessionStartingSequenceNumber": "0",
"messages": [
{
"app":
...
"message_type": "dialog_start",
...
},
{
...
},...
]
}
The API expects a valid JSON Object response from the client API.
In the second example containing VB data, the type is the start of the CDRs JSON files, whilst "my_ocp_vb_verification"
is the name selected for the export subscription.
{
"schemaName": "my_ocp_vb_verification",
"sessionId": "5c2b9dc1-899a-4124-97f5-b7e3e02a0660",
"sessionStartingSequenceNumber": "0",
"messages": [
{
"app":
...
"message_type": "vb_verification",
...
},
{
...
},...
]
}
The API expects a valid JSON Object response from the client API.
Reconciliation Process
Exports API offers a reconciliation process for messages that were dropped due to customer's API unavailability or other kind of failures.
Reconciliation process can fetch up to 24 hours of data, meaning it can run even if the client’s API is down for up to 24 hours. The reconciliation mechanism is being triggered automatically, approximately within 10 minutes, after the clients API is back online.
The reconciliation process will run on the background to fetch older data, while the stream continues to send newly generated data. Newly generated data is handled with priority over older data, but the streams of old and new data run in parallel. The reconciliation time may vary depending on both the current stream load and the amount of older data that needs to process, bounded by client’s API rate limiting requirements.
For cases when the client's API was down more than 24 hours, we recommend using the batch process to fetch older data.
Rate Limiting
Exports API has a rate limiting mechanism configured by its configuration file, which applies a threshold of requests per group for a specific time window. The algorithm used is a token-bucket applied over a fixed window of time. This means that for a specific window, a certain amount of tokens are produced for each group and they’re consumed as requests are landing on each endpoint.
One limit per group applies for all endpoints. If the limit is exceeded, the API will respond with an error response of Status Code 429
(Too many requests). The API will again allow requests for this group after the bucket refills with tokens in the next fixed request window.
For the Batch Export, it’s possible to download a maximum of 5 ZIP files within a minute. Otherwise, the downloading process will hit rate limiting.
The status of the buckets is kept in a memory cache. In order to prevent the cache from growing indefinitely, there is a Time To Live (TTL) for each entry. Entries will be evicted if the TTL of the entry is exceeded (the configured TTL value should be more than the request window).
After eviction, a new cache entry will be created if a new request arrives.