• Home
  • Dynatrace API
  • Configuration
  • Reports
  • POST unsubscribe

Reports API - POST unsubscribe from a report

Unsubscribes the specified users from the specified report.

The request consumes and produces an application/json payload.

POSTManagedDynatrace for Governmenthttps://{your-domain}/e/{your-environment-id}/api/config/v1/reports/{id}/unsubscribe
SaaShttps://{your-environment-id}.live.dynatrace.com/api/config/v1/reports/{id}/unsubscribe
Environment ActiveGatehttps://{your-activegate-domain}/e/{your-environment-id}/api/config/v1/reports/{id}/unsubscribe

Authentication

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

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

Parameters

ParameterTypeDescriptionInRequired
idstring

The ID of the report to unsubscribe from.

pathrequired
bodyReportSubscriptions

The JSON body of the request. Contains a list of recipients to be unsubscribed.

bodyoptional

Request body objects

The ReportSubscriptions object

Configuration of a report subscription.

ElementTypeDescriptionRequired
schedulestring

The schedule of the subscription.

  • Weekly subscribers receive the report every Monday at midnight.
  • Monthly subscribers receive the report on the first Monday of the month at midnight.
The element can hold these values
  • MONTH
  • WEEK
required
recipientsstring[]

A list of the recipients.

You can specify email addresses or Dynatrace user IDs here.

required

Request body JSON model

This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.

json
{ "schedule": "WEEK", "recipients": [ "demo@email.com", "demo2@email.com" ] }

Response

Response codes

CodeTypeDescription
201EntityShortRepresentation

Success. The subscriptions have been revoked. The response body contains the report ID.

400ErrorEnvelope

Failed. The input is invalid.

Response body objects

The EntityShortRepresentation object

The short representation of a Dynatrace entity.

ElementTypeDescription
idstring

The ID of the Dynatrace entity.

namestring

The name of the Dynatrace entity.

descriptionstring

A short description of the Dynatrace entity.

Response body JSON model

json
{ "id": "6a98d7bc-abb9-44f8-ae6a-73e68e71812a", "name": "Dynatrace entity", "description": "Dynatrace entity for the REST API example" }

Example

In this example, the request updates the report from the POST request example. It removes the monthly subscriptions for the marketing.office@organization.com email address.

The API token is passed in the Authorization header.

Curl

bash
curl -X POST \ https://mySampleEnv.live.dynatrace.com/api/config/v1/reports/f78f78f5-00bd-4cc1-9e8b-ecfd1e379a73/unsubscribe \ -H 'Accept: application/json' \ -H 'Authorization: Api-Token dt0c01.abc123.abcdefjhij1234567890' \ -H 'Content-Type: application/json' \ -d '{ "schedule": "MONTH", "recipients": [ "marketing.office@organization.com" ] } '

Request URL

plaintext
https://mySampleEnv.live.dynatrace.com/api/config/v1/reports/f78f78f5-00bd-4cc1-9e8b-ecfd1e379a73/unsubscribe

Request body

json
{ "schedule": "MONTH", "recipients": [ "marketing.office@organization.com" ] }

Response body

json
{ "id": "f78f78f5-00bd-4cc1-9e8b-ecfd1e379a73" }

Response code

201

Related topics
  • Subscribe to Dynatrace dashboard reports

    Learn how to subscribe to reports generated from Dynatrace dashboards.