• Home
  • Dynatrace API
  • Environment
  • Log Monitoring v1
  • Hosts
  • DELETE analysis job

Host logs API v1 - DELETE analysis job

Deletes or cancels the specified log analysis job.

The request produces an application/json payload.

DELETEManagedDynatrace for Governmenthttps://{your-domain}/e/{your-environment-id}/api/v1/entity/infrastructure/hosts/{hostId}/logs/jobs/{jobId}
SaaShttps://{your-environment-id}.live.dynatrace.com/api/v1/entity/infrastructure/hosts/{hostId}/logs/jobs/{jobId}
Environment ActiveGatehttps://{your-activegate-domain}/e/{your-environment-id}/api/v1/entity/infrastructure/hosts/{hostId}/logs/jobs/{jobId}

Authentication

To execute this request, you need an access token with LogExport scope.

To learn how to obtain and use it, see Tokens and authentication.

Parameters

ParameterTypeDescriptionInRequired
hostIdstring

The Dynatrace entity ID of the required host.

pathrequired
jobIdstring

The ID of the log analysis job to be deleted.

You can retrieve it from the response of the POST analysis job request.

pathrequired

Response

Response codes

CodeTypeDescription
200LogJobDeleteResult

Success. The job has been deleted.

400ErrorEnvelope

Failed. See the response body for details

404ErrorEnvelope

Not found. See the response body for details.

Response body objects

The LogJobDeleteResult object

ElementTypeDescription
messagestring-

Response body JSON model

json
{ "message": "string" }

Example

In this example the request deletes the log analysis job with the ID 32502e45-ed3d-47b9-b150-23e787ee285e.

The API token is passed in the Authorization header.

The response confirms job deletion.

Curl

bash
curl -X DELETE \ https://mySampleEnv.live.dynatrace.com/api/v1/entity/infrastructure/hosts/HOST-FE05D86A03025CAA/logs/jobs/32502e45-ed3d-47b9-b150-23e787ee285e \ -H 'Authorization: Api-Token dt0c01.abc123.abcdefjhij1234567890'

Request URL

plaintext
https://mySampleEnv.live.dynatrace.com/api/v1/entity/infrastructure/hosts/HOST-FE05D86A03025CAA/logs/jobs/32502e45-ed3d-47b9-b150-23e787ee285e

Response content

json
{ "message": "Job has been deleted successfully" }

Response code

200

Related topics
  • Log Monitoring Classic

    Learn how to enable Log Monitoring, the insights that Log Monitoring can provide, and more.