Frame Admin API

Getting Started

The Frame Admin API service is based on standard REST HTTPS calls. All API endpoints require signed authentication via HTTP headers.

The typical workflow for an API call is as follows:

  1. Authenticate with the Frame REST API to sign the HTTPS API request. You’ll need to create a signature with the client_id, the client_secret, and a timestamp. The client_id and client_secret can be acquired by any Admin on Frame.

  2. Make the HTTPS REST call to the Admin API endpoint using the client_id, timestamp, and the signature in the HTTP header (Created in step 1a).

  3. The Frame REST API verifies the signature of the HTTPS request and will then send the response of the previous call.

Your Frame Admin API endpoint will be unique to your environment and in the following format:

https://api.[frame-environment-domain].com/v1

For Frame’s public environment, this URI is:

https://api.console.nutanix.com/v1

In the next section, we will review how to properly authenticate to be able to use the Frame Admin API.

API Authentication

All REST API calls require authentication for each 3rd party service (individual users are not currently supported) and all API calls require signed requests for authentication.

Each API request must be signed and include the necessary information for proper signature verification. To sign an API request call, a client_id and client_secret are required to generate a signature and are also used for signature verification.

How to Provision API Credentials

  1. Navigate to the admin view of your Frame account.

  2. Locate the desired Account/Organization/Customer entity using the menu on the left. Click ellipsis listed to the right of the entity name and click “Users.”

../../_images/generic_usersnav1.png
  1. Enable the “API” option and click “Save.” This will create a new tab entitled “API.”

../../_images/overview_1.png
  1. Go to the newly created API Authorizations tab and click “Add API.”

../../_images/overview_2.png
  1. Enter a name for the API Authorization and choose the role(s) you would like to grant the API key at the bottom. Roles determine the permission level of the API. Click “Add.”

../../_images/overview_3.png
  1. Click the ellipsis next to the API Authorization you just created and select “Manage.”

../../_images/overview_4.png
  1. Name the API Key and then click the plus symbol to create it.

../../_images/overview_5.png
  1. Record the client_Id and client_Secret to be used by your API calls.

    Warning

    Make sure to record this information, as it will only appear once. You will not be able to retrieve these details again.

../../_images/overview_6.png

How to Make API Calls

In the last section, you generated a client_id and a client_secret.

The client_id is a unique string that Frame’s Admin API uses for client/service identification. It is used by the authentication system to identify the proper account and API client permissions.

The client_secret is an HMAC-SHA256 key used to generate the signature and is required by the signature verification process.

A signature is created by applying the HMAC-SHA256 algorithm to a string that is constructed from the client_id and a timestamp. The timestamp is the current time in seconds since epoch.

The proper steps for creating a signature are as follows:

  1. Get the current timestamp.

  2. Create a string by concatenating the timestamp with the client_id (timestamp + client_id).

  3. Apply HMAC-SHA256 on the newly created string using the client_secret

In order to verify the signature, our API requires the newly created signature, the client_id, and the timestamp. The client_secret should NOT be included. This information should be sent in the HTTP request headers.