Service Account
Service Account is a special type of account that belongs to your workspace, instead of to an individual end user account. Your application uses the service account to call the Seer API of a service, so that the users aren't directly involved.
Create Service Account
To create a service account, follow these steps:
- Log in as system admin.
- Call POST
\{\{base_url\}\}/iam/v1/auth/createServiceAccount - Provide following data for the service account in the request body.
{
"name":"some acc name",
"permission": 5,
"workspaces": ["5dd78515-0d24-4100-9a57-12dbf7d0ad31"]
}
- Save the "apikey" in response body, this is the token for the account.also copy the "id" for the next step.
- Call Patch {{base_url}}/api/apikey/{{id}} with the following data in the request body, to assign routes to the service account.
{
"allowedRoutes": ["/device/v1", "/task/v1"]//// example routes
}
Usage
To use the API key, include it in the header of your request as "Authorization" with the value "Bearer {{apikey}}". This allows you to call the routes assigned to the service account.
i.e. call GET \{\{base_url\}\}/api/call/device/v1/health