REST API usage - Platform - BlueCat Gateway - 22.4.1

Gateway Administration Guide

Locale
English
Product name
BlueCat Gateway
Version
22.4.1

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"
}

Users may optionally include the address of the instance of BlueCat Address Manager (BAM) to which they want to connect. If this address is not provided, BlueCat Gateway connects to the default BAM address set in the file config.py. If the api_url setting contains a list of addresses, then Gateway connects 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"
}

The API returns the session token in the following JSON format:

{
    "access_token": "<token>"
}

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

auth: Basic <token>