Overview
CCAB uses the 5G API which allows clients to send credit and charge control requests to be handled by the charging engine.
The 5G API is mainly used by the Diameter Adapter which translates all incoming Diameter requests and sends them to this API for processing. Moreover, this API can also be contacted directly through its endpoint, and below is a diagram showing its basic architecture.
This article covers the essential topics around the 5G API along with some examples.
API Authentication
In contrast with the Management API, there is only one type of user that can work with the 5G/Charging API at this time. The Infra/Charging User assigned to the provider is required for these requests.
In order to make any requests one first needs to Obtain an Access Token, and this is done through the AWS Cognito service using the credentials from the infra/charging user.
API Usage
To work with the 5G API one should use a tool of their preference that supports HTTP/2 such as cURL or Insomnia. Note that at this time Postman does not support HTTP/2 and cannot be used for requests to this API.
Besides an API client, one also needs to know the following details for any credit or charge requests.
Lastly, once the access token (IdToken) is obtained following the instructions in the previous section, one can proceed with making requests to the API with the following details.
Note that one would use regular JSON payloads for the 5G API as it doesn't require GraphQL queries/mutations like the Management API. See the example section for further details.
API Examples
As mentioned above, the main use of this API is to handle credit and charge control requests, and below are examples on how to generate direct requests to the 5G API.