Reports API - POST unsubscribe from a report

Unsubscribes the specified users from the specified report.

The request consumes and produces an application/json payload.

Early Adopter

This request is an Early Adopter release and may be changed in non-compatible way.

POST
  • Managed https://{your-domain}/e/{your-environment-id}/api/config/v1/reports/{id}/unsubscribe
  • SaaS https://{your-environment-id}.live.dynatrace.com/api/config/v1/reports/{id}/unsubscribe

Authentication

To execute this request, you need the Write configuration (WriteConfig) permission assigned to your API token. To learn how to obtain and use it, see Tokens and authentication.

Parameters

Parameter Type Description In Required
id string

The ID of the report to unsubscribe from.

path required
body ReportSubscriptions

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

body optional

The ReportSubscriptions object

Configuration of a report subscription.

Element Type Description Required
schedule string

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 schedule element can hold these values.
required
recipients string[]

A list of the recipients.

You can specify email addresses or Dynatrace user IDs here.

required

Possible values

Possible values for the schedule element in the ReportSubscriptions object:

  • MONTH
  • WEEK

Response format

The EntityShortRepresentation object

The short representation of a Dynatrace entity.

Element Type Description
id string

The ID of the Dynatrace entity.

name string

The name of the Dynatrace entity.

description string

A short description of the Dynatrace entity.

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

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 abcdefjhij1234567890' \
  -H 'Content-Type: application/json' \
  -d '{
    "schedule": "MONTH",
    "recipients": [
      "marketing.office@organization.com"
    ]
  }
'

Request URL

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

Request body

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

Response body

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

Response code

201