Quick Start
Set up your environment and use the BRM REST Services Manager API to make your first API call by performing these tasks:
Prerequisites
Prerequisite | More Information |
---|---|
Install BRM REST Services Manager | "Installing BRM REST Services Manager" in BRM Installation Guide |
Install cURL | Use cURL |
Set up authentication | Authenticate |
Task 1: Obtain Account Information
From your account administrator, obtain the appropriate account credentials to enable you to call the BRM REST Services Manager API. Specifically, you will need an OAuth 2.0 access token.
Task 2: Send a Request
After you set up your REST client, you can send a request to ensure that your connection works. For example, if you want to get a list of bucket balances in your system, you can use the following request:
curl -i -H 'Authorization: Bearer accessToken' -X GET https://host:port/brm/prepayBalanceManagement/version/bucket/
where:
- accessToken is the OAuth access token for your BRM REST Services Manager account.
- host is the URL for the BRM REST Services Manager server.
- port is the SSL port for the BRM REST Services Manager server.
- version is the version of the API.
If the request is successful, you should receive a 200 response with a body such as the following:
Note:
The IDs in this example and others in this document use BRM Portal Object IDs (POIDs) with the following format:databaseNumber+-objectType+objectId
The examples all use 0.0.0.1 for databaseNumber, but this will differ depending on your database.
See "Portal Object ID (POID)" in BRM Developer's Guide for more information about POIDs.
[
{
"id": "0.0.0.1+-balance_group+378169",
"href": "https://host:port/brm/prepayBalanceManagement/version/bucket/0.0.0.1+-balance_group+378169",
"confirmationDate": null,
"description": null,
"isShared": null,
"name": "Balance Group<Account>",
"remainingValueName": null,
"requestedDate": null,
"logicalResource": null,
"partyAccount": {
"id": "0.0.0.1+-account+377913",
"href": null, "description": null,
"name": "Carol Parker",
"status": "active",
"@baseType": null,
"@schemaLocation": null,
"@type": "PartyAccountRef",
"@referredType": null
},
"product": [
{
"id": "0.0.0.1+-service-MobileText+377529",
"href": null,
"name": "ServiceMobileText",
"@baseType": null,
"@schemaLocation": null,
"@type": "ProductRef",
"@referredType": null
},
{
"id": "0.0.0.1+-service-MobileVoice+377785",
"href": null,
"name": "ServiceMobileVoice",
"@baseType": null,
"@schemaLocation": null,
"@type": "ProductRef",
"@referredType": null
},
{
"id": "0.0.0.1+-service-MobileData+377465",
"href": null,
"name": "ServiceMobileData",
"@baseType": null,
"@schemaLocation": null,
"@type": "ProductRef",
"@referredType": null
}
],
"relatedParty": null,
"remainingValue": {
"amount": 59.989998,
"units": "USD",
"@baseType": null,
"@schemaLocation": null,
"@type": "Quantity"
},
"reservedValue": {
"amount": 0,
"units": "USD",
"@baseType": null,
"@schemaLocation": null,
"@type": "Quantity"
},
"status": "ACTIVE",
"usageType": null,
"validFor": {
"endDateTime": null,
"startDateTime": "2020-12-01T00:00:00-08:00"
},
"@baseType": "Bucket",
"@schemaLocation": null,
"@type": "Bucket"
}
]