Notifications - Get
Get a specific notification for a subscription.
GET https://dev.azure.com/{organization}/_apis/hooks/subscriptions/{subscriptionId}/notifications/{notificationId}?api-version=7.1
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
notification
|
path | True |
integer (int32) |
|
organization
|
path | True |
string |
The name of the Azure DevOps organization. |
subscription
|
path | True |
string (uuid) |
ID for a subscription. |
api-version
|
query | True |
string |
Version of the API to use. This should be set to '7.1' to use this version of the api. |
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.work | Grants the ability to read work items, queries, boards, area and iterations paths, and other work item tracking related metadata. Also grants the ability to execute queries, search work items and to receive notifications about work item events via service hooks. |
vso.build | Grants the ability to access build artifacts, including build results, definitions, and requests, and the ability to receive notifications about build events via service hooks. |
vso.code | Grants the ability to read source code and metadata about commits, changesets, branches, and other version control artifacts. Also grants the ability to search code and get notified about version control events via service hooks. |
Definitions
Name | Description |
---|---|
Event |
Encapsulates the properties of an event. |
Formatted |
Provides different formats of an event message |
Notification |
Defines the data contract of the result of processing an event for a subscription. |
Notification |
Defines the data contract of notification details. |
Notification |
Result of the notification |
Notification |
Status of the notification |
Resource |
The base class for all resource containers, i.e. Account, Collection, Project |
Session |
Represents a session token to be attached in Events for Consumer actions that need it. |
Event
Encapsulates the properties of an event.
Name | Type | Description |
---|---|---|
createdDate |
string (date-time) |
Gets or sets the UTC-based date and time that this event was created. |
detailedMessage |
Gets or sets the detailed message associated with this event. |
|
eventType |
string |
Gets or sets the type of this event. |
id |
string (uuid) |
Gets or sets the unique identifier of this event. |
message |
Gets or sets the (brief) message associated with this event. |
|
publisherId |
string |
Gets or sets the identifier of the publisher that raised this event. |
resource |
object |
Gets or sets the data associated with this event. |
resourceContainers |
<string,
Resource |
Gets or sets the resource containers. |
resourceVersion |
string |
Gets or sets the version of the data associated with this event. |
sessionToken |
Gets or sets the Session Token that can be used in further interactions |
FormattedEventMessage
Provides different formats of an event message
Name | Type | Description |
---|---|---|
html |
string |
Gets or sets the html format of the message |
markdown |
string |
Gets or sets the markdown format of the message |
text |
string |
Gets or sets the raw text of the message |
Notification
Defines the data contract of the result of processing an event for a subscription.
Name | Type | Description |
---|---|---|
createdDate |
string (date-time) |
Gets or sets date and time that this result was created. |
details |
Details about this notification (if available) |
|
eventId |
string (uuid) |
The event id associated with this notification |
id |
integer (int32) |
The notification id |
modifiedDate |
string (date-time) |
Gets or sets date and time that this result was last modified. |
result |
Result of the notification |
|
status |
Status of the notification |
|
subscriberId |
string (uuid) |
The subscriber Id associated with this notification. This is the last identity who touched in the subscription. In case of test notifications it can be the tester if the subscription is not created yet. |
subscriptionId |
string (uuid) |
The subscription id associated with this notification |
NotificationDetails
Defines the data contract of notification details.
Name | Type | Description |
---|---|---|
completedDate |
string (date-time) |
Gets or sets the time that this notification was completed (response received from the consumer) |
consumerActionId |
string |
Gets or sets this notification detail's consumer action identifier. |
consumerId |
string |
Gets or sets this notification detail's consumer identifier. |
consumerInputs |
object |
Gets or sets this notification detail's consumer inputs. |
dequeuedDate |
string (date-time) |
Gets or sets the time that this notification was dequeued for processing |
errorDetail |
string |
Gets or sets this notification detail's error detail. |
errorMessage |
string |
Gets or sets this notification detail's error message. |
event |
Gets or sets this notification detail's event content. |
|
eventType |
string |
Gets or sets this notification detail's event type. |
processedDate |
string (date-time) |
Gets or sets the time that this notification was finished processing (just before the request is sent to the consumer) |
publisherId |
string |
Gets or sets this notification detail's publisher identifier. |
publisherInputs |
object |
Gets or sets this notification detail's publisher inputs. |
queuedDate |
string (date-time) |
Gets or sets the time that this notification was queued (created) |
request |
string |
Gets or sets this notification detail's request. |
requestAttempts |
integer (int32) |
Number of requests attempted to be sent to the consumer |
requestDuration |
number (double) |
Duration of the request to the consumer in seconds |
response |
string |
Gets or sets this notification detail's response. |
NotificationResult
Result of the notification
Value | Description |
---|---|
failed |
The notification failed to be sent successfully to the consumer |
filtered |
The notification was filtered by the Delivery Job |
pending |
The notification has not yet completed |
succeeded |
The notification was sent successfully |
NotificationStatus
Status of the notification
Value | Description |
---|---|
completed |
The request completed |
processing |
The notification has been dequeued and has begun processing. |
queued |
The notification has been queued |
requestInProgress |
The consumer action has processed the notification. The request is in progress. |
ResourceContainer
The base class for all resource containers, i.e. Account, Collection, Project
Name | Type | Description |
---|---|---|
baseUrl |
string |
Gets or sets the container's base URL, i.e. the URL of the host (collection, application, or deployment) containing the container resource. |
id |
string (uuid) |
Gets or sets the container's specific Id. |
name |
string |
Gets or sets the container's name. |
url |
string |
Gets or sets the container's REST API URL. |
SessionToken
Represents a session token to be attached in Events for Consumer actions that need it.
Name | Type | Description |
---|---|---|
error |
string |
The error message in case of error |
token |
string |
The access token |
validTo |
string (date-time) |
The expiration date in UTC |