Interacting with the Observability API
Last updated on
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:
1. Dedicated CLI Commands
Section titled “1. Dedicated CLI Commands”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:
stackit observability credentials list --project-id <YOUR_PROJECT_ID> --instance-id <YOUR_INSTANCE_ID>2. Universal API Wrapper (stackit curl)
Section titled “2. Universal API Wrapper (stackit curl)”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:
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.
- Navigate to the left-hand navigation panel and select Overview.
- Click the Dashboard link.
- Copy the project ID directly from the Project Information panel.
- Navigate to the left-hand navigation panel and find Logging & Monitoring.
- Select Observability and click on your specific instance.
- Under the Overview section on the left, copy the instance ID from the General Information panel.
- Navigate to the left-hand navigation panel and find Logging & Monitoring.
- Select Observability and click on your specific instance.
- In the left-hand instance menu, navigate to API and select Info.
- Here you will find all relevant endpoint URLs for your instance. They are grouped logically:
- API: The base URL used for instance management (e.g., when using
stackit curl). - Metrics / Logs / Traces: The specific ingestion and query URLs (including OTLP endpoints) used to configure your telemetry agents.
- API: The base URL used for instance management (e.g., when using
- Copy the specific URL required for your current configuration task.