You can configure external tools to send software development lifecycle (SDLC) events to Dynatrace via API.
This guide shows you how to ingest JSON data into Dynatrace using either the built-in or a custom API endpoint.
To start ingesting data, select an ingest option and create an access token.
Copy the endpoint path of the chosen ingest option.
The sample commands below indicate a JSON content type and provide the JSON event data using the -d parameter. Make sure to substitute
<your-endpoint-URL> with the URL of the endpoint you copied.<your-API-token> with the token you generated.Run the following sample command to send an event to your endpoint via POST request.
curl -i -X POST "<your-endpoint-URL>" \-H "Content-Type: application/json" \-H "Authorization: Api-Token <your-API-token>" \-d "{\"event.type\":\"test\", \"event.status\":\"finished\"}"
Your request is successful if the output contains the 202 response code, for example
HTTP/2 202
Run the following sample command to send two events in a batch to your endpoint via POST request.
curl -i -X POST "<your-endpoint-URL>" \-H "Content-Type: application/json" \-H "Authorization: Api-Token <your-API-token>" \-d "[ {\"event.type\":\"test\", \"event.status\":\"finished\", \"test.id\":\"1\"}, {\"event.type\":\"test\", \"event.status\":\"finished\", \"test.id\":\"2\"} ]"
Your request is successful if the output contains the 202 response code, for example
HTTP/2 202
To verify that your SDLC event has been ingested successfully, query it via DQL, for example, in Notebooks.
Go to Notebooks.
Choose or create a notebook.
Select > DQL to add a new section with a DQL query input field.
Enter the following DQL query:
fetch events| filter event.kind == "SDLC_EVENT"| filter event.type == "test"| filter event.status == "finished"