Ingesting data from the API

I need some help getting a working API request to ingest data into Dynatrace

Here is the CURL command.   I just need to modify this so I can code it in Python.

curl --silent -kX “POST” https://apm-qa.pncint.net/e/xxxxx/api/v2/metrics/ingest -H “accept: */*” -H “Authorization: Api-Token dt0c01.____” -H “Content-Type: text/plain; charset=utf-8” -d ‘BDP.Service_BDP_GF1.Spark_VIP_P3.Duration,mnemonic=MNE 0.00’

This is new to me, so this could be a really stupid question, but I’m totally lost.

Hi,

Which output are you getting when you execute it?

Best regards

I suggest looking at our Python API client: GitHub - dynatrace-oss/api-client-python: Dynatrace API Python client · GitHub

It already implements the details of interacting with the API and includes support for metric ingestion.

As it turns out, my API token doesn’t have access to the ingest API’s.
thanks for your feedback.  And thank for that link to the repo.

As it turns out, my API-Token doesn’t have access to the ingest API.

Thanks for your response.