Mission Control API: Message detail usage report

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:

  • Get your MDR usage reports
  • Create MDR usage report
  • Delete MDR usage report
  • Get MDR usage report

Get your MDR usage reports:

This endpoint returns all the mdr_reports the user has generated on their account. There are 2 parameters, simply fill these in with the amount 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 mdr_requests associated with your account.

Create MDR usage report:

We can use the create a new mdr_report endpoint to add a new mdr_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" & end_time is mandatory. Edit your message body with your new mdr_report details. Below we can see an example of generating a mdr report 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:

*MDRs are available for 30 days

Delete MDR usage report:

We can use the delete a MDR Report endpoint to delete a MDR Report from our profile. In order to delete a MDR Request, we will need to pass CDR Request ID as the parameter. If you do not have your MDR Request ID, you can acquire it by using the "Return all mdr_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 MDR request:

We can use the Get the status of a MDR Report endpoint to get the status of a MDR Report on our profile. In order to get the status of a MDR Report, we will need to pass the MDR Report ID as the parameter. If you do not have your MDR Request ID, you can acquire it by using the "Return all mdr_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

 

Can't find what you're looking for? Click the chat bubble at your lower right-hand corner and start a chat!

Did this answer your question?