Mission Control API: Call Detail Record (CDR) request
Telnyx Sales avatar
Written by Telnyx Sales
Updated over a week ago

This article is for API V1, please use the Developer Center for API V2 guides.

Mission Control API: Call detail record(CDR) request

Using the API is an alternative way to configure and use your Mission Control account. This can be useful if you are interested in writing programs to explore and automate the use of our features.

In this guide we will give you an example of using our API docs GUI. Hopefully this will give you a base for writing programs to interact with our API.

Before we begin, we must tell the API our credentials so the API knows which portal account we will be using it with(and who we are).

For how to do this, please refer to our article on "Authentication and Tokens" after updating your credentials you can follow on from here.

 In this article you will learn how to:

  • Return all cdr_requests that the user has access to

  • Create a new cdr_request

  • Delete a CDR Request

  • Get the status of a CDR request

Return all cdr_requests that the user has access to:

This endpoint returns all the cdr's the user has generated on their account. There are 2 parameters, simply fill these in with a number of pages you would like returned & the amount of result per page. Once you've done that, hit "Try It Out".

You will receive a JSON response similar to the below with the details of all your generated cdr_requests associated with your account.

Create a new cdr_request:

We can use the create a new cdr_request endpoint to add a new cdr_request to one of our IP connections. If we navigate to the endpoint there will be an example of the JSON body on the right hand side. Click this to copy it into your parameters box. The field "start_time" is mandatory. Edit your message body with your new cdr_request details. Below we can see an example of generating a cdr request for the 7th of July 017.

The 'filters' field specifies a list of query criteria as follows:

Note: The first object in the filter list must specify a filter_type of "and". You can not follow an "or" with another "and". Other than that, you can specify as many filters as you like in any order.

Once your ready hit "TRY IT OUT", you should get a response similar to the one below:

*CDRs are available for 30 days

Delete a CDR Request:

We can use the delete a CDR Request endpoint to delete a CDR Request from our profile. In order to delete a CDR Request, we will need to pass CDR Request ID as the parameter. If you do not have your CDR Request ID, you can acquire it by using the "Return all cdr_requests" endpoint above. Once you have you ID, enter it into the "id" box and click "TRY IT NOW".

You will get a response similar to the one below letting you know if your request was successful or not.

Get the status of a CDR request:

We can use the Get the status of a CDR Request endpoint to get the status of a CDR Request on our profile. In order to get the status of a CDR Request, we will need to pass the CDR Request ID as the parameter. If you do not have your CDR Request ID, you can acquire it by using the "Return all cdr_requests" endpoint above. Once you have you ID, enter it into the "id" box and click "TRY IT NOW".

You will get a response similar to the one below letting you know you the status of your CDR request.

Status 1 : Generating

Status 2 : Active

Status 3 :Failed

Status 4 :Expired

Did this answer your question?