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:

  1. Add an M2M application in Identity.

  2. Add permissions to this application for Administration API (Self-Managed).

  3. Generate a token to access the REST API. You will need the client_id and client_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 &#x27;client_id=<client id>&#x27; \
     --data-urlencode &#x27;client_secret=<client_secret>&#x27; \
     --data-urlencode 'grant_type=client_credentials'
    
    
  4. 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

  1. Take the access_token value from the response object and store it as your token.

  2. Send the token as an authorization header in each request.

     curl -o - 'http://localhost:8080/admin-api/clusters' -H 'Authorization: Bearer eyJhb...'
    
    
  1. Usage metrics - Get usage metrics for clusters GET {{baseUrl}}/admin-api/usage-metrics?id=string&start=double&end=double

  2. Clusters - Get current clusters GET {{baseUrl}}/admin-api/clusters