Authentication: Getting API Keys

Azure controls authentication for the Public APIs. DirectScale assigns you to particular clients. Once you've been added and authorized to your client product, your Ocp-Apim-Subscription-Key API Key will available in your API Gateway Profile.



Locating Your API Key

To locate your Ocp-Apim-Subscription-Key API Key:

  1. Navigate to https://apigateway.directscale.com/developer.
  2. Click your name at the top-right corner and select PROFILE.
  3. On your Profile page, under Your subscriptions, you'll find your API Subscription Keys.

The DirectScale Platform has both Live and Stage environments. The Public API has separate keys for these environments. The API Key links your calls to your specific back-end client. For those who service multiple back-end clients, you’ll have multiple unique keys.



Headers

For authentication, you'll pass your API Key in the header of your requests as shown in the following examples:

curl --request GET \
     --url https://dsapi.directscale.com/v1/customers/299/countries \
     --header 'Accept: application/json' \
     --header 'Ocp-Apim-Subscription-Key: dedfe8bc2c1448e7b2af7d1ad95a03c4'
var client = new RestClient("https://dsapi.directscale.com/v1/customers/299/countries");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "application/json");
request.AddHeader("Ocp-Apim-Subscription-Key", "dedfe8bc2c1448e7b2af7d1ad95a03c4");
IRestResponse response = client.Execute(request);
const options = {
  method: 'GET',
  headers: {
    Accept: 'application/json',
    'Ocp-Apim-Subscription-Key': 'dedfe8bc2c1448e7b2af7d1ad95a03c4'
  }
};

fetch('https://dsapi.directscale.com/v1/customers/299/countries', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));

Did this page help you?