Publishers - List
Get a list of publishers.
GET https://dev.azure.com/{organization}/_apis/hooks/publishers?api-version=5.0
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
organization
|
path | True |
|
The name of the Azure DevOps organization. |
|
api-version
|
query | True |
|
Version of the API to use. This should be set to '5.0' to use this version of the api. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
successful operation |
Security
accessToken
Personal access token. Use any value for the user name and the token as the password.
Type:
basic
Examples
Sample Request
GET https://dev.azure.com/fabrikam/_apis/hooks/publishers?api-version=5.0
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
|
Event |
Describes a type of event |
|
Input |
|
|
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 |
|
A localized description of the event type |
| id |
|
A unique id for the event type |
| inputDescriptors |
Event-specific inputs |
|
| name |
|
A localized friendly name for the event type |
| publisherId |
|
A unique id for the publisher of this event type |
| supportedResourceVersions |
|
Supported versions for the event's resource payloads. |
| url |
|
The url for this resource |
InputDataType
| Name | Type | Description |
|---|---|---|
| boolean |
|
Represents a value of true or false. |
| guid |
|
Represents a Guid. |
| none |
|
No data type is specified. |
| number |
|
Represents a numberic value. |
| string |
|
Represents a textual value. |
| uri |
|
Represents a URI. |
InputDescriptor
Describes an input for subscriptions.
| Name | Type | Description |
|---|---|---|
| dependencyInputIds |
|
The ids of all inputs that the value of this input is dependent on. |
| description |
|
Description of what this input is used for |
| groupName |
|
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 |
|
If true, the value information for this input is dynamic and should be fetched when the value of dependency inputs change. |
| id |
|
Identifier for the subscription input |
| inputMode |
Mode in which the value of this input should be entered |
|
| isConfidential |
|
Gets whether this input is confidential, such as for a password or application key |
| name |
|
Localized name which can be shown as a label for the subscription input |
| properties |
|
Custom properties for the input which can be used by the service provider |
| type |
|
Underlying data type for the input value. When this value is specified, InputMode, Validation and Values are optional. |
| useInDefaultDescription |
|
Gets whether this input is included in the default generated action description. |
| validation |
Information to use to validate this input's value |
|
| valueHint |
|
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 |
|
Checkbox should be shown(for true/false values) |
| combo |
|
A select/combo control should be shown |
| none |
|
This input should not be shown in the UI |
| passwordBox |
|
An password input box should be shown |
| radioButtons |
|
Radio buttons should be shown |
| textArea |
|
A multi-line text area should be shown |
| textBox |
|
An input text box should be shown |
InputValidation
Describes what values are valid for a subscription input
| Name | Type | Description |
|---|---|---|
| dataType | ||
| isRequired |
|
|
| maxLength |
|
|
| maxValue |
|
|
| minLength |
|
|
| minValue |
|
|
| pattern |
|
|
| patternMismatchErrorMessage |
|
InputValue
Information about a single value for an input
| Name | Type | Description |
|---|---|---|
| data |
|
Any other data about this input |
| displayValue |
|
The text to show for the display of this value |
| value |
|
The value to store for this input |
InputValues
Information about the possible/allowed values for a given subscription input
| Name | Type | Description |
|---|---|---|
| defaultValue |
|
The default value to use for this input |
| error |
Errors encountered while computing dynamic values. |
|
| inputId |
|
The id of the input |
| isDisabled |
|
Should this input be disabled |
| isLimitedToPossibleValues |
|
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 |
|
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 |
|
The error message. |
Publisher
Defines the data contract of an event publisher.
| Name | Type | Description |
|---|---|---|
| _links |
Reference Links |
|
| description |
|
Gets this publisher's localized description. |
| id |
|
Gets this publisher's identifier. |
| inputDescriptors |
Publisher-specific inputs |
|
| name |
|
Gets this publisher's localized name. |
| serviceInstanceType |
|
The service instance type of the first party publisher. |
| supportedEvents |
Gets this publisher's supported event types. |
|
| url |
|
The url for this resource |
ReferenceLinks
The class to represent a collection of REST reference links.
| Name | Type | Description |
|---|---|---|
| links |
|
The readonly view of the links. Because Reference links are readonly, we only want to expose them as read only. |