Administration API (Self-Managed)
Number of APIs: 2
🚀 Overview
The Administration API for Self-Managed is a REST API and provides endpoints to get cluster data including installed apps and usage metrics.
API Explorer​
See the interactive Administration API Explorer for specifications, example requests and responses, and code samples of interacting with the Administration Self-Managed API.
Open API​
An Open API UI is also available within a running instance of the Administration API for Self-Managed at https://${base-url}/admin-api/openapi/docs
.
💪 What do you need to make it work?
To authenticate for the API, generate a JWT token and pass it in each request:
Add permissions to this application for Administration API (Self-Managed).
Generate a token to access the REST API. You will need the
client_id
andclient_secret
from the Identity application you created:curl --location --request POST 'http://localhost:18080/auth/realms/camunda-platform/protocol/openid-connect/token' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'client_id=<client id>' \ --data-urlencode 'client_secret=<client_secret>' \ --data-urlencode 'grant_type=client_credentials'
You will get something like the following:
{ "access_token": "eyJhbG...", "expires_in": 300, "refresh_expires_in": 0, "token_type": "Bearer", "not-before-policy": 0 }
Example usage
Take the access_token value from the response object and store it as your token.
Send the token as an authorization header in each request.
curl -o - 'http://localhost:8080/admin-api/clusters' -H 'Authorization: Bearer eyJhb...'
-
Usage metrics - Get usage metrics for clusters GET {{baseUrl}}/admin-api/usage-metrics?id=string&start=double&end=double
-
Clusters - Get current clusters GET {{baseUrl}}/admin-api/clusters