Webhooks - List Events

Lists recent events for the specified webhook.

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/listEvents?api-version=2019-05-01

URI Parameters

Name In Required Type Description
registryName
path True
  • string

The name of the container registry.

Regex pattern: ^[a-zA-Z0-9]*$

resourceGroupName
path True
  • string

The name of the resource group to which the container registry belongs.

subscriptionId
path True
  • string

The Microsoft Azure subscription ID.

webhookName
path True
  • string

The name of the webhook.

Regex pattern: ^[a-zA-Z0-9]*$

api-version
query True
  • string

The client API version.

Responses

Name Type Description
200 OK

The request was successful; the request was well-formed and received properly.

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

WebhookListEvents

Sample Request

POST https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/webhooks/myWebhook/listEvents?api-version=2019-05-01

Sample Response

{
  "value": [
    {
      "id": "00000000-0000-0000-0000-000000000000",
      "eventRequestMessage": {
        "content": {
          "id": "00000000-0000-0000-0000-000000000000",
          "timestamp": "2017-03-01T23:14:37.0707808Z",
          "action": "push",
          "target": {
            "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
            "size": 708,
            "digest": "sha256:fea8895f450959fa676bcc1df0611ea93823a735a01205fd8622846041d0c7cf",
            "length": 708,
            "repository": "hello-world",
            "url": "http://192.168.100.227:5000/v2/hello-world/manifests/sha256:fea8895f450959fa676bcc1df0611ea93823a735a01205fd8622846041d0c7cf",
            "tag": "latest"
          },
          "request": {
            "id": "00000000-0000-0000-0000-000000000000",
            "addr": "192.168.64.11:42961",
            "host": "192.168.100.227:5000",
            "method": "GET",
            "useragent": "curl/7.38.0"
          },
          "actor": {},
          "source": {
            "addr": "xtal.local:5000",
            "instanceID": "00000000-0000-0000-0000-000000000000"
          }
        },
        "headers": {
          "Content-Type": "application/json",
          "Content-Length": "719",
          "Authorization": "******"
        },
        "method": "POST",
        "requestUri": "http://myservice.com",
        "version": "1.1"
      },
      "eventResponseMessage": {
        "headers": {
          "Content-Length": "0"
        },
        "statusCode": "200",
        "version": "1.1"
      }
    }
  ]
}

Definitions

Actor

The agent that initiated the event. For most situations, this could be from the authorization context of the request.

Event

The event for a webhook.

EventContent

The content of the event request message.

EventListResult

The result of a request to list events for a webhook.

EventRequestMessage

The event request message sent to the service URI.

EventResponseMessage

The event response message received from the service URI.

Request

The request that generated the event.

Source

The registry node that generated the event. Put differently, while the actor initiates the event, the source generates it.

Target

The target of the event.

Actor

The agent that initiated the event. For most situations, this could be from the authorization context of the request.

Name Type Description
name
  • string

The subject or username associated with the request context that generated the event.

Event

The event for a webhook.

Name Type Description
eventRequestMessage

The event request message sent to the service URI.

eventResponseMessage

The event response message received from the service URI.

id
  • string

The event ID.

EventContent

The content of the event request message.

Name Type Description
action
  • string

The action that encompasses the provided event.

actor

The agent that initiated the event. For most situations, this could be from the authorization context of the request.

id
  • string

The event ID.

request

The request that generated the event.

source

The registry node that generated the event. Put differently, while the actor initiates the event, the source generates it.

target

The target of the event.

timestamp
  • string

The time at which the event occurred.

EventListResult

The result of a request to list events for a webhook.

Name Type Description
nextLink
  • string

The URI that can be used to request the next list of events.

value

The list of events. Since this list may be incomplete, the nextLink field should be used to request the next list of events.

EventRequestMessage

The event request message sent to the service URI.

Name Type Description
content

The content of the event request message.

headers
  • object

The headers of the event request message.

method
  • string

The HTTP method used to send the event request message.

requestUri
  • string

The URI used to send the event request message.

version
  • string

The HTTP message version.

EventResponseMessage

The event response message received from the service URI.

Name Type Description
content
  • string

The content of the event response message.

headers
  • object

The headers of the event response message.

reasonPhrase
  • string

The reason phrase of the event response message.

statusCode
  • string

The status code of the event response message.

version
  • string

The HTTP message version.

Request

The request that generated the event.

Name Type Description
addr
  • string

The IP or hostname and possibly port of the client connection that initiated the event. This is the RemoteAddr from the standard http request.

host
  • string

The externally accessible hostname of the registry instance, as specified by the http host header on incoming requests.

id
  • string

The ID of the request that initiated the event.

method
  • string

The request method that generated the event.

useragent
  • string

The user agent header of the request.

Source

The registry node that generated the event. Put differently, while the actor initiates the event, the source generates it.

Name Type Description
addr
  • string

The IP or hostname and the port of the registry node that generated the event. Generally, this will be resolved by os.Hostname() along with the running port.

instanceID
  • string

The running instance of an application. Changes after each restart.

Target

The target of the event.

Name Type Description
digest
  • string

The digest of the content, as defined by the Registry V2 HTTP API Specification.

length
  • integer

The number of bytes of the content. Same as Size field.

mediaType
  • string

The MIME type of the referenced object.

name
  • string

The name of the artifact.

repository
  • string

The repository name.

size
  • integer

The number of bytes of the content. Same as Length field.

tag
  • string

The tag name.

url
  • string

The direct URL to the content.

version
  • string

The version of the artifact.