Events - Publish Event
Publish an event.
POST https://dev.azure.com/{organization}/_apis/notification/events?api-version=5.0-preview.1
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
organization
|
path |
string |
The name of the Azure DevOps organization. |
|
api-version
|
query | True |
string |
Version of the API to use. This should be set to '5.0-preview.1' to use this version of the api. |
Request Body
Name | Type | Description |
---|---|---|
actors |
Optional: A list of actors which are additional identities with corresponding roles that are relevant to the event. |
|
artifactUris |
string[] |
Optional: A list of artifacts referenced or impacted by this event. |
data |
object |
Required: The event payload. If Data is a string, it must be in Json or XML format. Otherwise it must have a serialization format attribute. |
eventType |
string |
Required: The name of the event. This event must be registered in the context it is being fired. |
expiresIn |
string (TimeSpan) |
How long before the event expires and will be cleaned up. The default is to use the system default. |
itemId |
string |
The id of the item, artifact, extension, project, etc. |
processDelay |
string (TimeSpan) |
How long to wait before processing this event. The default is to process immediately. |
scopes |
Optional: A list of scopes which are are relevant to the event. |
|
sourceEventCreatedTime |
string (date-time) |
This is the time the original source event for this VssNotificationEvent was created. For example, for something like a build completion notification SourceEventCreatedTime should be the time the build finished not the time this event was raised. |
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
Definitions
Name | Description |
---|---|
Event |
Defines an "actor" for an event. |
Event |
Defines a scope for an event. |
Vss |
This is the type used for firing notifications intended for the subsystem in the Notifications SDK. For components that can't take a dependency on the Notifications SDK directly, they can use ITeamFoundationEventService.PublishNotification and the Notifications SDK ISubscriber implementation will get it. |
EventActor
Defines an "actor" for an event.
Name | Type | Description |
---|---|---|
id |
string (uuid) |
Required: This is the identity of the user for the specified role. |
role |
string |
Required: The event specific name of a role. |
EventScope
Defines a scope for an event.
Name | Type | Description |
---|---|---|
id |
string (uuid) |
Required: This is the identity of the scope for the type. |
name |
string |
Optional: The display name of the scope |
type |
string |
Required: The event specific type of a scope. |
VssNotificationEvent
This is the type used for firing notifications intended for the subsystem in the Notifications SDK. For components that can't take a dependency on the Notifications SDK directly, they can use ITeamFoundationEventService.PublishNotification and the Notifications SDK ISubscriber implementation will get it.
Name | Type | Description |
---|---|---|
actors |
Optional: A list of actors which are additional identities with corresponding roles that are relevant to the event. |
|
artifactUris |
string[] |
Optional: A list of artifacts referenced or impacted by this event. |
data |
object |
Required: The event payload. If Data is a string, it must be in Json or XML format. Otherwise it must have a serialization format attribute. |
eventType |
string |
Required: The name of the event. This event must be registered in the context it is being fired. |
expiresIn |
string (TimeSpan) |
How long before the event expires and will be cleaned up. The default is to use the system default. |
itemId |
string |
The id of the item, artifact, extension, project, etc. |
processDelay |
string (TimeSpan) |
How long to wait before processing this event. The default is to process immediately. |
scopes |
Optional: A list of scopes which are are relevant to the event. |
|
sourceEventCreatedTime |
string (date-time) |
This is the time the original source event for this VssNotificationEvent was created. For example, for something like a build completion notification SourceEventCreatedTime should be the time the build finished not the time this event was raised. |