Difference between revisions of "MOR API v2 Calls"
(→API) |
|||
| Line 32: | Line 32: | ||
* '''s_uniqueid''' | * '''s_uniqueid''' | ||
* '''s_user''' | * '''s_user''' | ||
<br/> | |||
==Authentication== | |||
The '''Calls''' API requires user authentication - basic authentication (username/password) and JWT token authentication. | |||
<br/> | |||
===Basic authentication=== | |||
Basic authentication uses the User's username and password to access API endpoints. | |||
Username and password must be provided in HTTP '''Authorization''' header, "username:password" string encoded in Base64. For example: | |||
POST http://x.x.x.x/billing/api/v2/authentication/login HTTP/1.1 | |||
Authorization: Basic cmljYXJkYxM6OWtBWFpadT9yak1iayRSaA== | |||
<br/> | |||
=== JWT authentication=== | |||
JWT authentication uses a token (generated by MOR) with each request to endpoints. The API client must obtain a JWT token by calling the '''/authentication/login''' endpoint and then use this token in other endpoints for authentication until the token expires. The authentication token is valid for 15 minutes. Once the token has expired, a new token must be obtained from '''/authentication/refresh''' endpoint. Therefore, you need to run the refresh method every 15 minutes. The refresh token is valid for 7 days. | |||
JWT token must be provided in HTTP Authorization header when requesting '''calls''' parameters. For example: | |||
get http://x.x.x.x/billing/api/v2/calls?limit=500&period_end=1768549495&period_start=948008695 | |||
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhc3NpZ25lZF9kZXZpY2VzIjoiMiw4LDEwLDEyLDE4LDI2LDM2IiwiZXhwIjoxNzUyNTU1Njk4LCJpYXQiOjE3NTI0NjkyOTgsImlzcyI6IkZsYXNoIENhbGxzIEFQSSIsInN1YiI6InJpY2FyZGFzIn0.I3Sy1zrJx0mAsTLthitY8dyZfythsWzJ4V1CVfNJmYU | |||
<br/> | <br/> | ||
Revision as of 11:21, 16 January 2026
Documentation
Full MOR REST API Documentation is available in /billing/api/v2/api-docs.
Description
The Calls API retrieves the list of calls in the selected time period for the specified User/Device.
Availability: This API is available from MOR X19 onwards.
API
The Calls API accepts parameters in JSON format. Responses are also returned in JSON format.
Parameters:
- limit
- only_did
- order_by
- order_desc
- page
- period_end
- period_start
- s_call_type
- s_callback_uniqueid
- s_destination
- s_device
- s_did
- s_hgc
- s_provider
- s_reseller
- s_uniqueid
- s_user
Authentication
The Calls API requires user authentication - basic authentication (username/password) and JWT token authentication.
Basic authentication
Basic authentication uses the User's username and password to access API endpoints.
Username and password must be provided in HTTP Authorization header, "username:password" string encoded in Base64. For example:
POST http://x.x.x.x/billing/api/v2/authentication/login HTTP/1.1 Authorization: Basic cmljYXJkYxM6OWtBWFpadT9yak1iayRSaA==
JWT authentication
JWT authentication uses a token (generated by MOR) with each request to endpoints. The API client must obtain a JWT token by calling the /authentication/login endpoint and then use this token in other endpoints for authentication until the token expires. The authentication token is valid for 15 minutes. Once the token has expired, a new token must be obtained from /authentication/refresh endpoint. Therefore, you need to run the refresh method every 15 minutes. The refresh token is valid for 7 days.
JWT token must be provided in HTTP Authorization header when requesting calls parameters. For example:
get http://x.x.x.x/billing/api/v2/calls?limit=500&period_end=1768549495&period_start=948008695 Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhc3NpZ25lZF9kZXZpY2VzIjoiMiw4LDEwLDEyLDE4LDI2LDM2IiwiZXhwIjoxNzUyNTU1Njk4LCJpYXQiOjE3NTI0NjkyOTgsImlzcyI6IkZsYXNoIENhbGxzIEFQSSIsInN1YiI6InJpY2FyZGFzIn0.I3Sy1zrJx0mAsTLthitY8dyZfythsWzJ4V1CVfNJmYU