Authentication

Cisco Edge Intelligence features a single default user role: the Admin role, which provides all users with read and write permissions to the API. To ensure secure access and proper authentication, API requests require a bearer token for authentication. To start using the Edge Intelligence API, generate a bearer token, which is valid for 30 minutes.

Generate a Bearer Token

Use cURL to generate a bearer token.

curl --location 'https://192.0.12.11:8008/api/v2/edge-intelligence/token' \
--header 'Content-Type: application/json' \
--data-raw '{
    "username":"<username>",
    "password":"<password>"
}' 

Authenticate with the Bearer Token

The bearer token allows you to authenticate API requests without needing to provide a username or password with each request. To use your bearer token for authentication, include it in the Authorization header of your requests. The header value should follow this format: Authorization: Bearer <your-bearer-token-here>.

The following example shows the bearer token in a request:

curl --location 'https://192.0.12.11:8008/api/v2/edge-intelligence/events' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwidG9rZW5fdmVyc2lvbiI6MSwic2VjcmV0IjoyLCJleHAiOjE3NDU1NTk1MjcsImlhdCI6MTc0NTU1OTIyN30.ngNwn6u1MDnU4kR9rF7sRPE-zG2PSHU-W4jHBH62tkY' \
--data '' 

Response

{
    "success": true,
    "data": {
        "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwidG9rZW5fdmVyc2lvbiI6MSwic2VjcmV0IjoyLCJleHAiOjE3NDU5MzQ3NjksImlhdCI6MTc0NTkzNDQ2OX0.mSwRPP6Bn3Lxrm9byofQgZT4sYEJ7Fk3jbLZ5NBFNoc",
        "expiresAt": "2025-04-29T13:52:49.927987303Z",
        "expirySeconds": 300
    },
    "message": "Login successful"
} 

To authenticate using Postman, check out the Postman Collection Guide.