Zum Inhalt springen

Interacting with the Observability API

Zuletzt aktualisiert am

When managing your STACKIT Observability instance programmatically, you interact with the Observability API.

We recommend using the STACKIT CLI to execute your requests. As explained in our Authentication Overview, the CLI automatically leverages your active session for authentication.

There are two primary ways to interact with the API using the CLI:

For many standard operations, the STACKIT CLI provides native commands. These commands abstract the API URL completely. You only need to provide your specific project-id and instance-id.

For a complete list of all available native commands, refer to the official STACKIT CLI Observability Documentation .

Example:

Terminal window
stackit observability credentials list --project-id <YOUR_PROJECT_ID> --instance-id <YOUR_INSTANCE_ID>

For operations that do not have a dedicated CLI command, use the stackit curl wrapper. This command functions like a standard HTTP request but automatically handles authentication for you. To use it, you must provide the full API URL for your specific instance.

For a complete list of all available functions, endpoints, and configuration possibilities, refer to the STACKIT Observability API Specification.

General Syntax:

Terminal window
stackit curl -X <METHOD> "<API_URL>/v1/projects/<YOUR_PROJECT_ID>/instances/<YOUR_INSTANCE_ID>/<ENDPOINT>" \
-H "accept: application/json" \
--data '<PAYLOAD>'

For comprehensive syntax details, refer to the official STACKIT CLI Curl Documentation .


Locating Your Identifiers and Endpoint URLs

Section titled “Locating Your Identifiers and Endpoint URLs”

To execute API commands or configure your telemetry agents, you need your unique identifiers and specific endpoint URLs (such as the API base URL or OTLP ingest URLs). You can find all of these in the STACKIT Portal.

  1. Navigate to the left-hand navigation panel and select Overview.
  2. Click the Dashboard link.
  3. Copy the project ID directly from the Project Information panel.