Instana REST API examples
You can use Instana's API to orchestrate queries and retrieve meaningful data.
Overview
Each example is designed to demonstrate how to interact with the API for different tasks. For each scenario, the following components are included:
- List of API endpoints used: Identifies which API endpoints are used for the query.
- Sample curl request: Provides a curl command template that you can customize to make requests to the API.
- Sample Python function: Outlines a Python function that encapsulates the API call, handling parameters and the response.
- Sample response payload: Shows the expected structure and content of the response payload from the API call.
Getting started
Before you begin, make sure that you have the following requirements:
- An active Instana account with API access
- Curl and Python installed on your machine
General prerequisites
To use the identified Instana REST API endpoints in this tutorial, you need the following information:
Requirement | Description | Where to find it |
---|---|---|
API token | An API token with the appropriate permissions to query the data. In most cases, special permissions are not needed to access data. | For more information about how to create and access your API token, see the Getting Started guide. |
Base URL | The base URL is the URL you use to access the Instana UI (For more information, see this reference). The base URL consists of your tenant and unit. | The base URL must have the form https://{tenant}-{unit}.instana.io . |
Using the examples
To understand the capabilities of the Instana REST API and how to integrate it into your applications effectively, adhere to the following instructions:
- Refer to the specific API endpoint documentation linked in each section
- Customize the sample curl request and Python function with your specific parameters and API tokens
- Run the curl request or Python script to see the real-time response from the API
Additional resources
For more information about API usage and best practices, see API documentation.
You can also join the IBM TechXchange Community.