Getting Started
The following sections introduce you to the standard EI REST API and provide information on how to access the API product to get you started.
It includes the standard API to fetch the list of EI agents onboarded on Edge Intelligence. This API will follow the Role Based Access Control (RBAC) which we follow in our Edge Intelligence. A user can access the API he/she is allowed to access.
For example, if a user tries to use the GET agents API without the necessary permission, they will receive an Unauthorized error as a response.
You must know the following to successfully invoke the API:
Server Name/URL/Cluster name must be known.
The main API path —
…/nbapi/ei/v1.- Example:
URL for the US cluster:
https://us.ciscoiot.com/URL for the EU cluster:
https://eu.ciscoiot.comFull PATH/URL for the US cluster :
https://us.ciscoiot.com/nbapi/ei/v1Full PATH/URL for the EU cluster :
https://eu.ciscoiot.com/nbapi/ei/v1
- Example:
Once you obtain the access token and
x-tenant-id, include them in the headers as follows:
x-tenant-id {{x-tenant-id}}
Authorization Bearer {{access_token}}
Base URI
Every API request begins with a Base URI. Use the URI for your organization's location (US or EU):
https://us.ciscoiot.com/ for the US cluster
https://eu.ciscoiot.com for the EU cluster
Authorization
An access token is necessary for authentication. To generate an access token, refer to Steps to Generate Access Token.
To authorize a user, you need the
x-tenant-id. Thex-tenant-idrepresents the organization's ID for invoking the API. For example, theGET/agentswill only fetch the EI agents present in the organization whose ID was passed in the header. To fetch thex-tenant-id, refer to Steps to fetch x-tenant-id.
Northbound (NB) API
EI Northbound (NB) API has the URI path {{SERVER_URL}}/nbapi/ei/v1.
EI supports the following Northbound (NB) API:
- Get Agents API
- Get Asset Types API
- Post Asset Types API
- Get Asset Type API
- Update Asset Type API
- Delete Asset Type API
Additional APIs will be added in a phased manner.