18 Apr 2025 09:40 PM
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.
Solved! Go to Solution.
21 Apr 2025 07:49 AM
Hi,
Which output are you getting when you execute it?
Best regards
21 Apr 2025 05:02 PM
As it turns out, my API-Token doesn't have access to the ingest API.
Thanks for your response.
21 Apr 2025 04:55 PM
I suggest looking at our Python API client: https://github.com/dynatrace-oss/api-client-python
It already implements the details of interacting with the API and includes support for metric ingestion.
21 Apr 2025 05:01 PM
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.