10 Apr 2024 11:59 AM
I am unable to use POST request using event ingest API
curl --request POST \
--url https://{environmentid}.apps.dynatrace.com/api/v2/events/ingest \
--header 'Authorization: Api-Token dt0c01.XXXX.XXXXX' \
--data '{
"eventType": "MARKED_FOR_TERMINATION",
"title": "Planned host downscale",
"entitySelector": "type(HOST),fromRelationship.isInstanceOf(type(HOST_GROUP),entityName(cloud-burst-hosts))",
"properties": {
"job.number": "21234346"
}
}'
Solved! Go to Solution.
10 Apr 2024 01:06 PM
you need to make sure the token you use has the required scope: events.ingest
AND
One of the following permissions is required for personal access tokens:
Regards,
28 Apr 2024 02:53 PM
Hi @gdp-d
Please try to replace the url string:
--url https://{environmentid}.apps.dynatrace.com/api/v2/events/ingest \
with:
--url https://{environmentid}.live.dynatrace.com/api/v2/events/ingest \
HTH
Yos