Overview
Role
The public_api
role is required to use this feature.
ZEM provides an API that can be used for various operations. It is available at the same
URL as the application itself, but under the /api
path prefix. For example, the URL to
add a new device in the production environment would be https://app.zem.com/api/device
.
API access
Roles required to perform operations via the web interface also apply to the API. For example, to add a
new group, the API user must have both the public_api
and the
manage_groups
roles.
The roles required to perform these actions can be found on the individual network device pages.
Authentication
Authorization works using simple HTTP Basic Authentication, with the username and password of a regular user account that could also be used to log into the application. System administrators and superusers automatically have this role, but it is highly recommended, for security reasons, to create a designated service account (or multiple such accounts with different sets of permissions) for API interactions (see User Management for more information).
Headers (authentication)
Authorization: Basic ...
The HTTP Basic Authentication header.
Hint
To generate the value for this header:
echo -n "Basic $(echo -n "$username:$password" | base64)"
or use an online tool.
X-Tenant: your-tenant-token
This header is required for all requests, and carries a unique identifier for your site. See Obtaining a tenant token for more information.
See Interactive spec for available endpoints.