Authentication
The Cisco Spaces Location Cloud API requires a header parameter of Authorization
to provide authorization for each request.
The API supports Bearer
authentication using the standard Authorization header parameter. The value will be a string that begins with the word Bearer
followed by the token.
A cURL example request is given below. The corresponding Base URI are US(https://dnaspaces.io), EU(https://dnaspaces.eu) and Singapore(https://ciscospaces.sg).
curl --location --request GET 'https://dnaspaces.io/api/location/v2/devices' \
--header 'Authorization: Bearer {BEARER_TOKEN}' \
Obtaining token
- You must generate an API Key. An API key can be a JSON Web Token(JWT) which is required in each HTTP request header to authenticate and authorize the user.
- You can generate this API Key from the Detect and Locate App by navigating to Notifications>API Keys and then click Add. This App can be accessed through dashboard (US: dnaspaces.io, EU: dnaspaces.eu, SG: ciscospaces.sg) URL and select Detect & Locate App on main page.
- This API key is used as
{BEARER_TOKEN}
in API request. - You can manage API Keys on related pages:
Scope/Role requirement
Direct API users are not checked for role based access. Admin permissions are granted by default for direct API users where the user gets access to all locations.
Note: The Detect and Locate App can be accessed from respective region through US(dnaspaces.io), EU(dnaspaces.eu) and Singapore(ciscospaces.sg).
API key expiration time is configurable
Note: Once the key is generated, ensure it is stored safely. The API key expiration time is configurable, Minimum 7 days, Maximum 365 Days.
Once the key is generated, ensure that it is stored safely.
Note: that the API key is visible only at creation time, and hence must be stored securely. The Detect and Locate App does not save the API keys values.
Each authenticated user can have up to ten keys, out of which only five can be active.
Below is an example from the POSTMAN client, where the API key has been used as an Authorization header.