Diagnostics - Update

Update the diagnostics settings for a subscription.

PUT https://{service}.dev.azure.com/{organization}/_apis/notification/subscriptions/{subscriptionId}/diagnostics?api-version=5.1

URI Parameters

Name In Required Type Description
service
path
  • string

The service to which this request is directed.

organization
path
  • string

The name of the Azure DevOps organization.

subscriptionId
path True
  • string

The id of the notifications subscription.

api-version
query True
  • string

Version of the API to use. This should be set to '5.1' to use this version of the api.

Request Body

Name Type Description
deliveryResults

Diagnostics settings for retaining delivery results. Used for Service Hooks subscriptions.

deliveryTracing

Diagnostics settings for troubleshooting notification delivery.

evaluationTracing

Diagnostics settings for troubleshooting event matching.

Responses

Name Type Description
200 OK

successful operation

Security

oauth2

Type: oauth2
Flow: accessCode
Authorization URL: https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
Token URL: https://app.vssps.visualstudio.com/oauth2/token?client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer&grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer

Scopes

Name Description
vso.notification_write Provides read/write access to subscriptions and read access to event metadata, including filterable field values.
vso.notification_diagnostics Provides access to notification-related diagnostic logs and provides the ability to enable diagnostics for individual subscriptions.

Examples

Sample Request

PUT https:/.dev.azure.com/_apis/notification/subscriptions/{subscriptionId}/diagnostics?api-version=5.1
{
  "evaluationTracing": {
    "enabled": true
  }
}

Sample Response

{
  "evaluationTracing": {
    "enabled": true,
    "endDate": "2019-08-08T16:01:47.3259794Z",
    "startDate": "2019-08-08T15:01:47.3259794Z",
    "maxTracedEntries": 25
  }
}

Definitions

SubscriptionDiagnostics

Contains all the diagonstics settings for a subscription.

SubscriptionTracing

Data controlling a single diagnostic setting for a subscription.

UpdateSubscripitonDiagnosticsParameters

Parameters to update diagnostics settings for a subscription.

UpdateSubscripitonTracingParameters

Parameters to update a specific diagnostic setting.

SubscriptionDiagnostics

Contains all the diagonstics settings for a subscription.

Name Type Description
deliveryResults

Diagnostics settings for retaining delivery results. Used for Service Hooks subscriptions.

deliveryTracing

Diagnostics settings for troubleshooting notification delivery.

evaluationTracing

Diagnostics settings for troubleshooting event matching.

SubscriptionTracing

Data controlling a single diagnostic setting for a subscription.

Name Type Description
enabled
  • boolean

Indicates whether the diagnostic tracing is enabled or not.

endDate
  • string

Trace until the specified end date.

maxTracedEntries
  • integer

The maximum number of result details to trace.

startDate
  • string

The date and time tracing started.

tracedEntries
  • integer

Trace until remaining count reaches 0.

UpdateSubscripitonDiagnosticsParameters

Parameters to update diagnostics settings for a subscription.

Name Type Description
deliveryResults

Diagnostics settings for retaining delivery results. Used for Service Hooks subscriptions.

deliveryTracing

Diagnostics settings for troubleshooting notification delivery.

evaluationTracing

Diagnostics settings for troubleshooting event matching.

UpdateSubscripitonTracingParameters

Parameters to update a specific diagnostic setting.

Name Type Description
enabled
  • boolean

Indicates whether to enable to disable the diagnostic tracing.