REST API usage - Platform - BlueCat Gateway - 21.11.2

Gateway Administration Guide

Locale
English
Product name
BlueCat Gateway
Version
21.11.2

REST API users must login through the rest_login endpoint in order to obtain their session token:

<bluecat_gateway_address>/rest_login

Users must include the username and password of their account in the login request in JSON format:

{
    "username" : "exampleUser",
    "password" : "examplePassword"
}

Optionally, users may include the address of the BAM to which they wish to connect. If this parameter is not provided then BlueCat Gateway will connect to the default BAM address set in the file config.py. If there is a list of addresses set for api_url then BlueCat Gateway will connect to the first address in the list by default. The BAM URL given in the request must be exactly as specified in the config file.

{
    "username" : "exampleUser",
    "password" : "examplePassword"
    "bam_url" : "http://example.bam.url/Services/API?wsdl"
}

The session token is returned in the following JSON format:

{
    "access_token": "<token>"
}

The user must extract the <token> from the JSON and insert it in the header of all subsequent requests in the following format:

auth: Basic <token>