Get log export job result
GET/api/v1/subaccounts/:subAccountId/messages/exports/:jobId
- Sending a GET request on this endpoint allows to check the status of an Voice Logs export job and to get a download link if its generation has succeeded.
URL
To define which Voice logs export you want to retrieve, you need to enter the Job ID generated by XXXXX in the path as well as the 8x8 subaccountid you used in the previous request.
https://voice.wavecell.com/api/v1/subaccounts/{subAccountID}/messages/exports/{jobId}
You must replace
{jobID}and{subAccountId}in the URL above with the jobID and subaccountid from the start logs export job request
Request
Responses
- 200
- 404
In case of successful request which comes with a 200 code, you will be presented with a status parameter value (string). Here are the possible cases and their meaning:
-
queued - request for report creation is waiting in the queue
-
running - report creation has started, but not finished yet
-
succeeded - report created and CSV file can be downloaded using the link in the data property
-
failed - the report creation failed
-
cancelled - the report job has been cancelled
-
empty - the report is empty
-
error - an internal server error occurred
Once the platform will have successfully generated an logs export ("status":"succeeded"), the links to the files will be contained in an array value of the parameter called data.
The files to the links have a default expiry date of 1 month from the moment the jobs succeeds and the files are made available for download. This expiration datetime is included in the response along with the data, as the value of a parameter called expires
Logs files format
The logs files generated are CSV files. The files contains the following columns of data about individual calls:
- SessionId: Unique identifier for the session; tracks the lifecycle of the call session.
- CallId: Unique identifier for the specific call; used for tracing and correlating logs or events.
- AccountId: Identifier of the customer account. Account name where the subaccount(s) are from.
- SubAccountId: Subaccount used to send/receive calls. Unique ID of account.
- Direction: Indicates whether the call is inbound or outbound.
- SourceCountryCode: The numeric country code of the call origin.
- SourceCountry: The originating country name.
- SourceOperator: The telecom operator handling the call origin.
- SourceMCC: Mobile Country Code of the source.
- SourceMNC: Mobile Network Code of the source, identifying the mobile network.
- SourceEndpoint: The originating endpoint or phone number.
- DestinationCountryCode: The numeric country code of the call destination number.
- DestinationCountry: The destination country name.
- DestinationOperator: The telecom operator handling the destination number.
- DestinationMCC: Mobile Country Code for the destination number.
- DestinationMNC: Mobile Network Code for the destination number.
- DestinationEndpoint: The called endpoint or phone number.
- InitiatedAt: Timestamp when the call was initiated (attempted).
- ConnectedAt: Timestamp when the call was successfully connected.
- DisconnectedAt: Timestamp when the call ended.
- DurationInSec: Total call duration in seconds (from when the call is connected to when call is disconnected).
- Product: Type of voice product.
- BillingUnit: Unit of billing.
- BillingIncrement: Billing increment (e.g. 1+1 means per second, 60+60 means per minute).
- BillableDurationInSec: Duration billed after taking into account billing unit and billing increment.
- UnitPrice: Price Per Billing Unit (e.g. Price Per minute).
- UnitPriceCurrency: Currency used for pricing (e.g. USD, EUR).
- TotalPriceOfCall: Total cost incurred for the call.
- CallType: Type of call.
- SipStatus: Final SIP Status code.
- SessionStatus: Status of the session (e.g. COMPLETED, NO_ANSWER, BUSY, CANCELED, FAILED, ERROR).
- CallStatus: Call status of the call leg. The values can be: COMPLETED, NO_ANSWER, BUSY, CANCELED, FAILED.
- TTSLength: Length of text-to-speech used during the call (Only applicable if text to speech service is used).
- MOS: Mean Opinion Score, a quality rating of the call voice (scale from 1 to 5). (Only applicable if the terminating telecom operator provides this score).
- Content: JSON of the call flows submitted (Only applicable if a voice campaign was sent via connect.8x8.com).