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:
Code Snippet
Copyhttps://us.ciscoiot.com/
URL for the EU cluster:
Code Snippet
Copyhttps://eu.ciscoiot.com
Full PATH/URL for the US cluster :
Code Snippet
Copyhttps://us.ciscoiot.com/nbapi/ei/v1
Full PATH/URL for the EU cluster :
Code Snippet
Copyhttps://eu.ciscoiot.com/nbapi/ei/v1
Once you obtain the access token and x-tenant-id, include them in the headers as follows:
To authorize a user, you need the x-tenant-id. The x-tenant-id represents the organization's ID for invoking the API. For example, the GET/agents will only fetch the EI agents present in the organization whose ID was passed in the header. To fetch the x-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.