Introducing the Instana Python REST API Client

 

UPDATE AUG 2021: Hey Everyone! Our API has gone through a lot of changes since this post was written and we’ve unfortunately had to deprecate the Python API Client. For the most up to date information on our API and its usage please refer to OpenAPI.

At Instana we continuously extract and collect huge amounts of infrastructure, application, and tracing data (billions upon billions of metrics & traces every day across our customer base). We then analyze, transform, and apply advanced machine learning algorithms to this data to provide the industries best solution for application performance monitoring of modern applications. We do this for many infrastructure and application technologies, including languages like Python, Java, .NET, Go, and more.

In the end, this is your data. We believe you should be able to access it how you want, either through our advanced dashboards and visualizations, in Grafana, or even in raw form through our REST API.

Based on this philosophy, we continue our efforts to make your data available to you where and when you need it. Today we are pleased to announce that we have released a new Python REST API client. With this client you can now access all of your Instana data programmatically using Python.

Getting Started with the Python REST API Client

You can find the Python REST API Client files on Pypi as part of the Instana Python sensor package.

To instantiate the Python client you can do the following:

from instana.api import APIClient
c = APIClient(base_url="https://yourdashboard.instana.io", api_token=‘yourAPItoken’)

or alternatively you can configure your base URL and API token via environment variables:

export INSTANA_API_TOKEN=yourAPItoken
export INSTANA_BASE_URL=https://yourdashboard.instana.io
from instana.api import APIClient
c = APIClient()

From here, you have access to the full extent of the REST API. For example:

# Retrieve the current application view
x = c.application_view()

# Retrieve snapshots results from a query
y = c.snapshots("entity.selfType:webService entity.service.name:\”instana.com\””)

# Retrieve all recent changes & events
z = c.events()

# Get a specific trace by ID
aa = c.trace(1234567890)

With the Python REST API client, you have access to the entire REST API.

Here are just some of the things you can do with the Instana REST API:

  • Download Audit logs
  • Add/Delete End User Monitoring (EUM) applications
  • Retrieve events for a specific timeframe
  • Download any/all of the large number of metrics we support
  • Configure custom alerts
  • Remotely configure Service Extraction
  • Get the state of your infrastructure and applications at any point in time (up to 2 months back by default)
  • Download your generated traces
  • Manage users of the Instana dashboard; add/edit/remove accounts

At Instana we believe that interoperability within your entire software ecosystem is critical to success. The Instana Python REST API is a great way for you to programatically interact with Instana and the data contained within.

If you’re not an Instana user yet, you should take a look at the value Instana delivers by monitoring your modern, dynamic, containerized applications.

Sign up for a free trial of Instana Application Performance Monitoring today.

Play with Instana’s APM Observability Sandbox

Announcement, Developer
We are excited to announce that Lightrun had partnered with Instana to enrich existing telemetry with real-time, code-level observability data and provide full-cycle Observability. Understanding everything that happens inside a production environment...
|
Announcement
Customer satisfaction is the most important metric we have. To serve you well, it's critical that we respond when you request changes. We heard you loud and clear when you expressed dissatisfaction...
|
Engineering, Product
At Instana, we believe that Observability should be as automated as possible. We often joke with each other about automagic. From the birth of Instana, we relentlessly invested in the creation of...
|

Start your FREE TRIAL today!

Instana, an IBM company, provides an Enterprise Observability Platform with automated application monitoring capabilities to businesses operating complex, modern, cloud-native applications no matter where they reside – on-premises or in public and private clouds, including mobile devices or IBM Z.

Control hybrid modern applications with Instana’s AI-powered discovery of deep contextual dependencies inside hybrid applications. Instana also gives visibility into development pipelines to help enable closed-loop DevOps automation.

This provides actionable feedback needed for clients as they to optimize application performance, enable innovation and mitigate risk, helping Dev+Ops add value and efficiency to software delivery pipelines while meeting their service and business level objectives.

For further information, please visit instana.com.