Host logs API v1 - DELETE analysis job
Deletes or cancels the specified log analysis job.
The request produces an application/json
payload.
DELETE | ManagedDynatrace for Government | https://{your-domain}/e/{your-environment-id}/api/v1/entity/infrastructure/hosts/{hostId}/logs/jobs/{jobId} |
SaaS | https://{your-environment-id}.live.dynatrace.com/api/v1/entity/infrastructure/hosts/{hostId}/logs/jobs/{jobId} | |
Environment ActiveGate | https://{your-activegate-domain}:9999/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
Parameter | Type | Description | In | Required |
---|---|---|---|---|
hostId | string | The Dynatrace entity ID of the required host. | path | required |
jobId | string | The ID of the log analysis job to be deleted. You can retrieve it from the response of the POST analysis job request. | path | required |
Response
Response codes
Code | Type | Description |
---|---|---|
200 | LogJobDeleteResult | Success. The job has been deleted. |
400 | ErrorEnvelope | Failed. See the response body for details |
404 | ErrorEnvelope | Not found. See the response body for details. |
Response body objects
The LogJobDeleteResult
object
Element | Type | Description |
---|---|---|
message | string | - |
Response body JSON model
1{2 "message": "string"3}
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
1curl -X DELETE \2 https://mySampleEnv.live.dynatrace.com/api/v1/entity/infrastructure/hosts/HOST-FE05D86A03025CAA/logs/jobs/32502e45-ed3d-47b9-b150-23e787ee285e \3 -H 'Authorization: Api-Token dt0c01.abc123.abcdefjhij1234567890'
Request URL
1https://mySampleEnv.live.dynatrace.com/api/v1/entity/infrastructure/hosts/HOST-FE05D86A03025CAA/logs/jobs/32502e45-ed3d-47b9-b150-23e787ee285e
Response content
1{2 "message": "Job has been deleted successfully"3}
Response code
200