Publishers - List
Get a list of publishers.
GET https://dev.azure.com/{organization}/_apis/hooks/publishers?api-version=7.1-preview.1
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
organization
|
path | True |
string |
The name of the Azure DevOps organization. |
api-version
|
query | True |
string |
Version of the API to use. This should be set to '7.1-preview.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. |
Examples
Sample Request
GET https://dev.azure.com/fabrikam/_apis/hooks/publishers?api-version=7.1-preview.1
Sample Response
{
"count": 1,
"value": [
{
"id": "tfs",
"url": "https://dev.azure.com/fabrikam/_apis/hooks/publishers/tfs",
"name": "Azure DevOps Server",
"description": "Publishes Azure DevOps Server events",
"supportedEvents": [
{
"publisherId": "tfs",
"id": "build.complete",
"url": "https://dev.azure.com/fabrikam/_apis/hooks/publishers/tfs/eventTypes/build.complete",
"name": "Build completed",
"description": "A build completes",
"supportedResourceVersions": [
"1.0-preview.1"
],
"inputDescriptors": [
{
"id": "definitionName",
"name": "Build Definition",
"description": "Filter events to include only completed builds for the specified definition",
"inputMode": "combo",
"isConfidential": false,
"useInDefaultDescription": false,
"validation": {
"dataType": "string"
},
"values": {
"defaultValue": "",
"possibleValues": [
{
"value": "",
"displayValue": "[Any]"
}
],
"isLimitedToPossibleValues": true
},
"hasDynamicValueInformation": true
},
{
"id": "buildStatus",
"name": "Build Status",
"description": "Filter events to include only completed builds for the specified completion status",
"inputMode": "combo",
"isConfidential": false,
"useInDefaultDescription": false,
"values": {
"defaultValue": "",
"possibleValues": [
{
"value": "",
"displayValue": "[Any]"
},
{
"value": "Succeeded",
"displayValue": "Succeeded"
},
{
"value": "PartiallySucceeded",
"displayValue": "Partially Succeeded"
},
{
"value": "Failed",
"displayValue": "Failed"
},
{
"value": "Stopped",
"displayValue": "Stopped"
}
],
"isLimitedToPossibleValues": true
}
}
]
},
{
"publisherId": "tfs",
"id": "message.posted",
"url": "https://dev.azure.com/fabrikam/_apis/hooks/publishers/tfs/eventTypes/message.posted",
"name": "Team room message posted",
"description": "Triggers when a message is posted to a team room",
"supportedResourceVersions": [
"1.0-preview.1"
],
"inputDescriptors": [
{
"id": "roomId",
"name": "Team room",
"description": "Filter events to include only messages sent to the specified Team room",
"inputMode": "combo",
"isConfidential": false,
"useInDefaultDescription": false,
"validation": {
"dataType": "number",
"isRequired": true
},
"values": {
"defaultValue": "",
"possibleValues": []
},
"hasDynamicValueInformation": true
},
{
"id": "messagePattern",
"name": "Message contains string",
"description": "The string that must be found in the message",
"inputMode": "textBox",
"isConfidential": false,
"useInDefaultDescription": false,
"validation": {
"dataType": "string",
"pattern": "^[^&<>'\"]*$",
"patternMismatchErrorMessage": "Value cannot contain any of characters: &, <, >, ' (apostrophe), or \\\" (quote).",
"maxLength": 1024
},
"values": {
"defaultValue": "",
"possibleValues": []
}
}
]
},
{
"publisherId": "tfs",
"id": "git.pullrequest.created",
"url": "https://dev.azure.com/fabrikam/_apis/hooks/publishers/tfs/eventTypes/git.pullrequest.created",
"name": "Pull request created",
"description": "Pull request is created in a git repository",
"supportedResourceVersions": [
"1.0-preview.1"
],
"inputDescriptors": [
{
"id": "repository",
"name": "Repository",
"description": "The repository that code was pushed to",
"inputMode": "combo",
"isConfidential": false,
"useInDefaultDescription": false,
"validation": {
"dataType": "guid"
},
"values": {
"possibleValues": [
{
"value": "",
"displayValue": "[Any]"
}
],
"isLimitedToPossibleValues": true
},
"hasDynamicValueInformation": true
},
{
"id": "branch",
"name": "Target branch",
"description": "The target branch of the pull request",
"inputMode": "combo",
"isConfidential": false,
"useInDefaultDescription": false,
"values": {
"possibleValues": [
{
"value": "",
"displayValue": "[Any]"
}
],
"isLimitedToPossibleValues": true
},
"dependencyInputIds": [
"repository"
],
"hasDynamicValueInformation": true
}
]
},
{
"publisherId": "tfs",
"id": "git.pullrequest.updated",
"url": "https://dev.azure.com/fabrikam/_apis/hooks/publishers/tfs/eventTypes/git.pullrequest.updated",
"name": "Pull request updated",
"description": "Pull request is updated – status, review list, reviewer vote changed or the source branch is updated with a push",
"supportedResourceVersions": [
"1.0-preview.1"
],
"inputDescriptors": [
{
"id": "repository",
"name": "Repository",
"description": "The repository that code was pushed to",
"inputMode": "combo",
"isConfidential": false,
"useInDefaultDescription": false,
"validation": {
"dataType": "guid"
},
"values": {
"possibleValues": [
{
"value": "",
"displayValue": "[Any]"
}
],
"isLimitedToPossibleValues": true
},
"hasDynamicValueInformation": true
},
{
"id": "branch",
"name": "Target branch",
"description": "The target branch of the pull request",
"inputMode": "combo",
"isConfidential": false,
"useInDefaultDescription": false,
"values": {
"possibleValues": [
{
"value": "",
"displayValue": "[Any]"
}
],
"isLimitedToPossibleValues": true
},
"dependencyInputIds": [
"repository"
],
"hasDynamicValueInformation": true
},
{
"id": "notificationType",
"name": "Change",
"description": "The type of pull request change",
"inputMode": "combo",
"isConfidential": false,
"useInDefaultDescription": false,
"validation": {
"dataType": "string"
},
"values": {
"defaultValue": "",
"possibleValues": [
{
"value": "",
"displayValue": "[Any]"
},
{
"value": "PushNotification",
"displayValue": "Source branch updated"
},
{
"value": "ReviewersUpdateNotification",
"displayValue": "Reviewers changed"
},
{
"value": "StatusUpdateNotification",
"displayValue": "Status changed"
},
{
"value": "ReviewerVoteNotification",
"displayValue": "Votes score changed"
}
],
"isLimitedToPossibleValues": true,
"isReadOnly": true
}
}
]
},
{
"publisherId": "tfs",
"id": "git.push",
"url": "https://dev.azure.com/fabrikam/_apis/hooks/publishers/tfs/eventTypes/git.push",
"name": "Code pushed",
"description": "Code is pushed to a git repository",
"supportedResourceVersions": [
"1.0-preview.1"
],
"inputDescriptors": [
{
"id": "repository",
"name": "Repository",
"description": "The repository that code was pushed to",
"inputMode": "combo",
"isConfidential": false,
"useInDefaultDescription": false,
"validation": {
"dataType": "guid"
},
"values": {
"possibleValues": [
{
"value": "",
"displayValue": "[Any]"
}
],
"isLimitedToPossibleValues": true
},
"hasDynamicValueInformation": true
},
{
"id": "branch",
"name": "Branch",
"description": "The branch that code was pushed into",
"inputMode": "combo",
"isConfidential": false,
"useInDefaultDescription": false,
"values": {
"possibleValues": [
{
"value": "",
"displayValue": "[Any]"
}
],
"isLimitedToPossibleValues": true
},
"dependencyInputIds": [
"repository"
],
"hasDynamicValueInformation": true
}
]
},
{
"publisherId": "tfs",
"id": "tfvc.checkin",
"url": "https://dev.azure.com/fabrikam/_apis/hooks/publishers/tfs/eventTypes/tfvc.checkin",
"name": "Code checked in",
"description": "A changeset is checked into version control.",
"supportedResourceVersions": [
"1.0-preview.1"
],
"inputDescriptors": [
{
"id": "path",
"name": "Under path",
"description": "Filter to checkins that change one or more files under the specified path",
"inputMode": "textBox",
"isConfidential": false,
"useInDefaultDescription": false,
"validation": {
"dataType": "string",
"isRequired": true,
"pattern": "^\\$\\/[^&<>'\"]*$"
},
"values": {
"defaultValue": "$/"
}
}
]
},
{
"publisherId": "tfs",
"id": "workitem.created",
"url": "https://dev.azure.com/fabrikam/_apis/hooks/publishers/tfs/eventTypes/workitem.created",
"name": "Work item created",
"description": "Filter events to include only newly created work items.",
"supportedResourceVersions": [
"1.0-preview.2",
"1.0-preview.1"
],
"inputDescriptors": [
{
"id": "areaPath",
"name": "Area path",
"description": "Filter events to include only work items under the specified area path.",
"inputMode": "combo",
"isConfidential": false,
"useInDefaultDescription": false,
"validation": {
"dataType": "string"
},
"values": {
"defaultValue": "",
"possibleValues": [
{
"value": "",
"displayValue": "[Any]"
}
],
"isLimitedToPossibleValues": true,
"isReadOnly": true
},
"hasDynamicValueInformation": true
},
{
"id": "workItemType",
"name": "Work item type",
"description": "Filter events to include only work items of the specified type.",
"inputMode": "combo",
"isConfidential": false,
"useInDefaultDescription": false,
"validation": {
"dataType": "string"
},
"values": {
"defaultValue": "",
"possibleValues": [
{
"value": "",
"displayValue": "[Any]"
}
],
"isLimitedToPossibleValues": true,
"isReadOnly": true
},
"hasDynamicValueInformation": true
}
]
},
{
"publisherId": "tfs",
"id": "workitem.commented",
"url": "https://dev.azure.com/fabrikam/_apis/hooks/publishers/tfs/eventTypes/workitem.commented",
"name": "Work item commented on",
"description": "Filter events to include only work items commented on.",
"supportedResourceVersions": [
"1.0-preview.2",
"1.0-preview.1"
],
"inputDescriptors": [
{
"id": "areaPath",
"name": "Area path",
"description": "Filter events to include only work items under the specified area path.",
"inputMode": "combo",
"isConfidential": false,
"useInDefaultDescription": false,
"validation": {
"dataType": "string"
},
"values": {
"defaultValue": "",
"possibleValues": [
{
"value": "",
"displayValue": "[Any]"
}
],
"isLimitedToPossibleValues": true,
"isReadOnly": true
},
"hasDynamicValueInformation": true
},
{
"id": "workItemType",
"name": "Work item type",
"description": "Filter events to include only work items of the specified type.",
"inputMode": "combo",
"isConfidential": false,
"useInDefaultDescription": false,
"validation": {
"dataType": "string"
},
"values": {
"defaultValue": "",
"possibleValues": [
{
"value": "",
"displayValue": "[Any]"
}
],
"isLimitedToPossibleValues": true,
"isReadOnly": true
},
"hasDynamicValueInformation": true
},
{
"id": "commentPattern",
"name": "Contains string",
"description": "The string that must be found in the comment.",
"inputMode": "textBox",
"isConfidential": false,
"useInDefaultDescription": false,
"validation": {
"dataType": "string",
"pattern": "^\\s*[^\\s&<>'\"][^&<>'\"]*$",
"patternMismatchErrorMessage": "Value should contain at least one non whitespace character and cannot contain any of characters: &, <, >, ' (apostrophe), or \" (quote).",
"minLength": 1,
"maxLength": 1024
},
"values": {
"defaultValue": "",
"possibleValues": []
}
}
]
},
{
"publisherId": "tfs",
"id": "workitem.updated",
"url": "https://dev.azure.com/fabrikam/_apis/hooks/publishers/tfs/eventTypes/workitem.updated",
"name": "Work item updated",
"description": "Filter events to include only changed work items.",
"supportedResourceVersions": [
"1.0-preview.2",
"1.0-preview.1"
],
"inputDescriptors": [
{
"id": "areaPath",
"name": "Area path",
"description": "Filter events to include only work items under the specified area path.",
"inputMode": "combo",
"isConfidential": false,
"useInDefaultDescription": false,
"validation": {
"dataType": "string"
},
"values": {
"defaultValue": "",
"possibleValues": [
{
"value": "",
"displayValue": "[Any]"
}
],
"isLimitedToPossibleValues": true,
"isReadOnly": true
},
"hasDynamicValueInformation": true
},
{
"id": "workItemType",
"name": "Work item type",
"description": "Filter events to include only work items of the specified type.",
"inputMode": "combo",
"isConfidential": false,
"useInDefaultDescription": false,
"validation": {
"dataType": "string"
},
"values": {
"defaultValue": "",
"possibleValues": [
{
"value": "",
"displayValue": "[Any]"
}
],
"isLimitedToPossibleValues": true,
"isReadOnly": true
},
"hasDynamicValueInformation": true
},
{
"id": "changedFields",
"name": "Field",
"description": "Filter events to include only work items with the specified field(s) changed.",
"inputMode": "combo",
"isConfidential": false,
"useInDefaultDescription": false,
"validation": {
"dataType": "string"
},
"values": {
"defaultValue": "",
"possibleValues": [
{
"value": "",
"displayValue": "[Any]"
}
],
"isLimitedToPossibleValues": true,
"isReadOnly": true
},
"dependencyInputIds": [
"workItemType"
],
"hasDynamicValueInformation": true
}
]
}
],
"inputDescriptors": [
{
"id": "projectId",
"name": "Project",
"description": "Team Project to restrict events to",
"inputMode": "none",
"isConfidential": false,
"useInDefaultDescription": false,
"validation": {
"dataType": "guid"
}
},
{
"id": "teamId",
"name": "Team",
"description": "Team that the subscription is associated with",
"inputMode": "none",
"isConfidential": false,
"useInDefaultDescription": false,
"validation": {
"dataType": "guid"
}
}
]
}
]
}
Definitions
Name | Description |
---|---|
Event |
Describes a type of event |
Input |
Gets or sets the data type to validate. |
Input |
Describes an input for subscriptions. |
Input |
Mode in which the value of this input should be entered |
Input |
Describes what values are valid for a subscription input |
Input |
Information about a single value for an input |
Input |
Information about the possible/allowed values for a given subscription input |
Input |
Error information related to a subscription input value. |
Publisher |
Defines the data contract of an event publisher. |
Reference |
The class to represent a collection of REST reference links. |
EventTypeDescriptor
Describes a type of event
Name | Type | Description |
---|---|---|
description |
string |
A localized description of the event type |
id |
string |
A unique id for the event type |
inputDescriptors |
Event-specific inputs |
|
name |
string |
A localized friendly name for the event type |
publisherId |
string |
A unique id for the publisher of this event type |
supportedResourceVersions |
string[] |
Supported versions for the event's resource payloads. |
url |
string |
The url for this resource |
InputDataType
Gets or sets the data type to validate.
Name | Type | Description |
---|---|---|
boolean |
string |
Represents a value of true or false. |
guid |
string |
Represents a Guid. |
none |
string |
No data type is specified. |
number |
string |
Represents a numeric value. |
string |
string |
Represents a textual value. |
uri |
string |
Represents a URI. |
InputDescriptor
Describes an input for subscriptions.
Name | Type | Description |
---|---|---|
dependencyInputIds |
string[] |
The ids of all inputs that the value of this input is dependent on. |
description |
string |
Description of what this input is used for |
groupName |
string |
The group localized name to which this input belongs and can be shown as a header for the container that will include all the inputs in the group. |
hasDynamicValueInformation |
boolean |
If true, the value information for this input is dynamic and should be fetched when the value of dependency inputs change. |
id |
string |
Identifier for the subscription input |
inputMode |
Mode in which the value of this input should be entered |
|
isConfidential |
boolean |
Gets whether this input is confidential, such as for a password or application key |
name |
string |
Localized name which can be shown as a label for the subscription input |
properties |
object |
Custom properties for the input which can be used by the service provider |
type |
string |
Underlying data type for the input value. When this value is specified, InputMode, Validation and Values are optional. |
useInDefaultDescription |
boolean |
Gets whether this input is included in the default generated action description. |
validation |
Information to use to validate this input's value |
|
valueHint |
string |
A hint for input value. It can be used in the UI as the input placeholder. |
values |
Information about possible values for this input |
InputMode
Mode in which the value of this input should be entered
Name | Type | Description |
---|---|---|
checkBox |
string |
Checkbox should be shown(for true/false values) |
combo |
string |
A select/combo control should be shown |
none |
string |
This input should not be shown in the UI |
passwordBox |
string |
An password input box should be shown |
radioButtons |
string |
Radio buttons should be shown |
textArea |
string |
A multi-line text area should be shown |
textBox |
string |
An input text box should be shown |
InputValidation
Describes what values are valid for a subscription input
Name | Type | Description |
---|---|---|
dataType |
Gets or sets the data type to validate. |
|
isRequired |
boolean |
Gets or sets if this is a required field. |
maxLength |
integer |
Gets or sets the maximum length of this descriptor. |
maxValue |
string |
Gets or sets the minimum value for this descriptor. |
minLength |
integer |
Gets or sets the minimum length of this descriptor. |
minValue |
string |
Gets or sets the minimum value for this descriptor. |
pattern |
string |
Gets or sets the pattern to validate. |
patternMismatchErrorMessage |
string |
Gets or sets the error on pattern mismatch. |
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 |
InputValues
Information about the possible/allowed values for a given subscription input
Name | Type | Description |
---|---|---|
defaultValue |
string |
The default value to use for this input |
error |
Errors encountered while computing dynamic values. |
|
inputId |
string |
The id of the input |
isDisabled |
boolean |
Should this input be disabled |
isLimitedToPossibleValues |
boolean |
Should the value be restricted to one of the values in the PossibleValues (True) or are the values in PossibleValues just a suggestion (False) |
isReadOnly |
boolean |
Should this input be made read-only |
possibleValues |
Possible values that this input can take |
InputValuesError
Error information related to a subscription input value.
Name | Type | Description |
---|---|---|
message |
string |
The error message. |
Publisher
Defines the data contract of an event publisher.
Name | Type | Description |
---|---|---|
_links |
Reference Links |
|
description |
string |
Gets this publisher's localized description. |
id |
string |
Gets this publisher's identifier. |
inputDescriptors |
Publisher-specific inputs |
|
name |
string |
Gets this publisher's localized name. |
serviceInstanceType |
string |
The service instance type of the first party publisher. |
supportedEvents |
Gets this publisher's supported event types. |
|
url |
string |
The url for this resource |
ReferenceLinks
The class to represent a collection of REST reference links.
Name | Type | Description |
---|---|---|
links |
object |
The readonly view of the links. Because Reference links are readonly, we only want to expose them as read only. |
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for