Quick Start
Set up your environment and then use the Offline Mediation Controller REST API to make your first API call by performing these tasks:
Prerequisites
Prerequisite | More Information |
---|---|
Install Offline Mediation Controller REST Services Manager | "Installing the Offline Mediation Controller Cloud Native Deployment Package" in Offline Mediation Controller Cloud Native Installation and Administration Guide |
Configure Offline Mediation Controller REST Services Manager | "About Integrating Offline Mediation Controller REST Services Manager with Cloud Native" in Offline Mediation Controller Cloud Native Installation and Administration 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 Offline Mediation Controller REST 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, to retrieve a list of all the node managers, submit the following request:
curl -i -H 'Authorization: Bearer accessToken' -X GET 'http://hostname:port/nodeManagers'
where:
-
accessToken is the OAuth access token for your Offline Mediation Controller REST API account.
-
hostname is the URL for the Offline Mediation Controller REST server.
-
port is the port for the Offline Mediation Controller REST server.
If the request is successful, you will receive response code 200 along with a response body similar to the following:
[
{
"host": "node-mgr-app",
"href": "/nodemanagers/NMGR-31eoeh-otm-ln3hrqc9",
"id": "NMGR-31eoeh-otm-ln3hrqc9",
"name": "nm1",
"nodes": [
{
"href": "/nodes/31eoef-otm-lna53s09",
"id": "31eoef-otm-lna53s09"
},
{
"href": "/nodes/31eoef-otm-lna51qht",
"id": "31eoef-otm-lna51qht"
},
{
"href": "/nodes/31eoef-otm-lna4vku4",
"id": "31eoef-otm-lna4vku4"
},
{
"href": "/nodes/31eoep-otm-lnbhn159",
"id": "31eoep-otm-lnbhn159"
}
],
"port": 32170,
"statusMessage": "Informational - "
}
]