Event Types - Get
Get a specific event type.
GET https://{service}dev.azure.com/{organization}/_apis/notification/eventtypes/{eventType}?api-version=7.1
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
event
|
path | True |
string |
The ID of the event type. |
organization
|
path |
string |
The name of the Azure DevOps organization. |
|
service
|
path |
string |
The service to which this request is directed. |
|
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.notification | Provides read access to subscriptions and event metadata, including filterable field values. |
Examples
Sample request
GET https://dev.azure.com/fabrikam/_apis/notification/eventtypes/{eventType}?api-version=7.1
Sample response
{
"id": "ms.vss-build.build-completed-event",
"name": "Build completed",
"url": null,
"eventPublisher": {
"id": "ms.vss-build.build-event-publisher",
"subscriptionManagementInfo": {
"serviceInstanceType": "00025394-6065-48ca-87d9-7f5672854ef7"
}
},
"category": {
"id": "ms.vss-build.build-and-release-event-category",
"name": "Build"
},
"fields": {
"ms.vss-build.build-controller-event-field": {
"id": "ms.vss-build.build-controller-event-field",
"name": "Build controller",
"fieldType": {
"id": "ms.vss-build.build-controller-field-type",
"operators": [
"=",
"<>"
],
"operatorConstraints": []
},
"path": "tb1:Controller/@Name",
"supportedScopes": [
"project",
"collection"
]
},
"ms.vss-build.build-reason-event-field": {
"id": "ms.vss-build.build-reason-event-field",
"name": "Build reason",
"fieldType": {
"id": "ms.vss-build.build-reason-field-type",
"operators": [
"=",
"<>",
"Contains",
"Does not contain"
],
"operatorConstraints": []
},
"path": "tb1:Build/@Reason",
"supportedScopes": [
"project",
"collection"
]
},
"ms.vss-build.compilation-status-event-field": {
"id": "ms.vss-build.compilation-status-event-field",
"name": "Compilation status",
"fieldType": {
"id": "ms.vss-build.phase-status-field-type",
"operators": [
"=",
"<>",
"Contains",
"Does not contain"
],
"operatorConstraints": []
},
"path": "tb1:Build/@CompilationStatus",
"supportedScopes": [
"project",
"collection"
]
},
"ms.vss-build.definition-name-event-field": {
"id": "ms.vss-build.definition-name-event-field",
"name": "Definition name",
"fieldType": {
"id": "ms.vss-build.definition-name-field-type",
"operators": [
"=",
"<>",
"Contains"
],
"operatorConstraints": []
},
"path": "tb1:Definition/@FullPath",
"supportedScopes": [
"project"
]
},
"ms.vss-build.requested-by-event-field": {
"id": "ms.vss-build.requested-by-event-field",
"name": "Requested by",
"fieldType": {
"id": "ms.vss-notifications.identity-array-field-type",
"operators": [
"Contains",
"Does not contain"
],
"operatorConstraints": []
},
"path": "RequestedBy",
"supportedScopes": [
"project",
"collection"
]
},
"ms.vss-build.requested-for-event-field": {
"id": "ms.vss-build.requested-for-event-field",
"name": "Requested for",
"fieldType": {
"id": "ms.vss-notifications.identity-array-field-type",
"operators": [
"Contains",
"Does not contain"
],
"operatorConstraints": []
},
"path": "RequestedFor",
"supportedScopes": [
"project",
"collection"
]
},
"ms.vss-build.status-event-field": {
"id": "ms.vss-build.status-event-field",
"name": "Status",
"fieldType": {
"id": "ms.vss-build.status-field-type",
"operators": [
"=",
"<>"
],
"operatorConstraints": []
},
"path": "tb1:Build/@Status",
"supportedScopes": [
"project",
"collection"
]
},
"ms.vss-build.team-project-event-field": {
"id": "ms.vss-build.team-project-event-field",
"name": "Team project",
"fieldType": {
"id": "ms.vss-tfs.project-field-type",
"operators": [
"=",
"<>"
],
"operatorConstraints": []
},
"path": "tb1:Build/@TeamProject",
"supportedScopes": [
"collection"
]
},
"ms.vss-build.test-status-event-field": {
"id": "ms.vss-build.test-status-event-field",
"name": "Test status",
"fieldType": {
"id": "ms.vss-build.phase-status-field-type",
"operators": [
"=",
"<>",
"Contains",
"Does not contain"
],
"operatorConstraints": []
},
"path": "tb1:Build/@TestStatus",
"supportedScopes": [
"project",
"collection"
]
}
},
"roles": [
{
"id": "lastChangedBy",
"name": "Last changed by"
},
{
"id": "requestedBy",
"name": "Requested by"
},
{
"id": "requestedFor",
"name": "Requested for"
}
],
"supportedScopes": [
"project",
"collection"
],
"hasInitiator": false,
"customSubscriptionsAllowed": true,
"icon": "css://bowtie-icon bowtie-build",
"color": "#748189"
}
Definitions
Name | Description |
---|---|
Input |
Information about a single value for an input |
Notification |
Encapsulates the properties of a filterable field. A filterable field is a field in an event that can used to filter notifications for a certain event type. |
Notification |
Encapsulates the properties of a field type. It includes a unique id for the operator and a localized string for display name |
Notification |
Encapsulates the properties of a field type. It describes the data type of a field, the operators it support and how to populate it in the UI |
Notification |
Encapsulates the properties of a notification event publisher. |
Notification |
Encapsulates the properties of an event role. An event Role is used for role based subscription for example for a buildCompletedEvent, one role is request by field |
Notification |
Encapsulates the properties of an event type. It defines the fields, that can be used for filtering, for that event type. |
Notification |
Encapsulates the properties of a category. A category will be used by the UI to group event types |
Operator |
Encapsulates the properties of an operator constraint. An operator constraint defines if some operator is available only for specific scope like a project scope. |
Subscription |
|
Subscription |
Encapsulates the properties needed to manage subscriptions, opt in and out of subscriptions. |
Value |
Encapsulates the properties of a field value definition. It has the information needed to retrieve the list of possible values for a certain field and how to handle that field values in the UI. This information includes what type of object this value represents, which property to use for UI display and which property to use for saving the subscription |
InputValue
Information about a single value for an input
Name | Type | Description |
---|---|---|
data |
object |
Any other data about this input |
displayValue |
string |
The text to show for the display of this value |
value |
string |
The value to store for this input |
NotificationEventField
Encapsulates the properties of a filterable field. A filterable field is a field in an event that can used to filter notifications for a certain event type.
Name | Type | Description |
---|---|---|
fieldType |
Gets or sets the type of this field. |
|
id |
string |
Gets or sets the unique identifier of this field. |
name |
string |
Gets or sets the name of this field. |
path |
string |
Gets or sets the path to the field in the event object. This path can be either Json Path or XPath, depending on if the event will be serialized into Json or XML |
supportedScopes |
string[] |
Gets or sets the scopes that this field supports. If not specified then the event type scopes apply. |
NotificationEventFieldOperator
Encapsulates the properties of a field type. It includes a unique id for the operator and a localized string for display name
Name | Type | Description |
---|---|---|
displayName |
string |
Gets or sets the display name of an operator |
id |
string |
Gets or sets the id of an operator |
NotificationEventFieldType
Encapsulates the properties of a field type. It describes the data type of a field, the operators it support and how to populate it in the UI
Name | Type | Description |
---|---|---|
id |
string |
Gets or sets the unique identifier of this field type. |
operatorConstraints |
Encapsulates the properties of an operator constraint. An operator constraint defines if some operator is available only for specific scope like a project scope. |
|
operators |
Gets or sets the list of operators that this type supports. |
|
subscriptionFieldType | ||
value |
Gets or sets the value definition of this field like the getValuesMethod and template to display in the UI |
NotificationEventPublisher
Encapsulates the properties of a notification event publisher.
Name | Type | Description |
---|---|---|
id |
string |
|
subscriptionManagementInfo |
Encapsulates the properties needed to manage subscriptions, opt in and out of subscriptions. |
|
url |
string |
NotificationEventRole
Encapsulates the properties of an event role. An event Role is used for role based subscription for example for a buildCompletedEvent, one role is request by field
Name | Type | Description |
---|---|---|
id |
string |
Gets or sets an Id for that role, this id is used by the event. |
name |
string |
Gets or sets the Name for that role, this name is used for UI display. |
supportsGroups |
boolean |
Gets or sets whether this role can be a group or just an individual user |
NotificationEventType
Encapsulates the properties of an event type. It defines the fields, that can be used for filtering, for that event type.
Name | Type | Description |
---|---|---|
category |
Encapsulates the properties of a category. A category will be used by the UI to group event types |
|
color |
string |
Gets or sets the color representing this event type. Example: rgb(128,245,211) or #fafafa |
customSubscriptionsAllowed |
boolean |
|
eventPublisher |
Encapsulates the properties of a notification event publisher. |
|
fields |
<string,
Notification |
|
hasInitiator |
boolean |
|
icon |
string |
Gets or sets the icon representing this event type. Can be a URL or a CSS class. Example: css://some-css-class |
id |
string |
Gets or sets the unique identifier of this event definition. |
name |
string |
Gets or sets the name of this event definition. |
roles |
Encapsulates the properties of an event role. An event Role is used for role based subscription for example for a buildCompletedEvent, one role is request by field |
|
supportedScopes |
string[] |
Gets or sets the scopes that this event type supports |
url |
string |
Gets or sets the rest end point to get this event type details (fields, fields types) |
NotificationEventTypeCategory
Encapsulates the properties of a category. A category will be used by the UI to group event types
Name | Type | Description |
---|---|---|
id |
string |
Gets or sets the unique identifier of this category. |
name |
string |
Gets or sets the friendly name of this category. |
OperatorConstraint
Encapsulates the properties of an operator constraint. An operator constraint defines if some operator is available only for specific scope like a project scope.
Name | Type | Description |
---|---|---|
operator |
string |
|
supportedScopes |
string[] |
Gets or sets the list of scopes that this type supports. |
SubscriptionFieldType
Value | Description |
---|---|
boolean | |
dateTime | |
double | |
guid | |
history | |
html | |
identity | |
integer | |
picklistDouble | |
picklistInteger | |
picklistString | |
plainText | |
string | |
teamProject | |
treePath |
SubscriptionManagement
Encapsulates the properties needed to manage subscriptions, opt in and out of subscriptions.
Name | Type | Description |
---|---|---|
serviceInstanceType |
string (uuid) |
|
url |
string |
ValueDefinition
Encapsulates the properties of a field value definition. It has the information needed to retrieve the list of possible values for a certain field and how to handle that field values in the UI. This information includes what type of object this value represents, which property to use for UI display and which property to use for saving the subscription
Name | Type | Description |
---|---|---|
dataSource |
Gets or sets the data source. |
|
endPoint |
string |
Gets or sets the rest end point. |
resultTemplate |
string |
Gets or sets the result template. |