Adobe I/O Events Registration API

Prerequisites

Test Drive

Once the above are defined (and stuffed as environment variables), you are ready to use our registration API.

To help you further and document the typical Webhook Registration Payload, here is a sample POST curl query that will create a new Webhook Registration against https://your.webhook.

curl -v --request POST \
  --url https://api.adobe.io/events/${consumer_id}/${project_id}/${workspace_id}/registrations \
  --header "x-api-key: $api_key" \
  --header "Authorization: Bearer $oauth_s2s_token" \
  --header 'content-type: application/json' \
  --header 'Accept: application/hal+json' \
  --data '{
            "client_id": "${api_key}",
            "webhook_url": "https://your.webhook",
            "name": "a user friendly name",
            "description": "description for the registration",
            "delivery_type": "webhook",
            "events_of_interest": [{
              "provider_id": "some_provider",
              "event_code": "some_event_code"
            }]
          }'

Or, this curl query to create Webhook Registration with a runtime_action

curl -v --request POST \
  --url https://api.adobe.io/events/${consumer_id}/${project_id}/${workspace_id}/registrations \
  --header "x-api-key: $api_key" \
  --header "Authorization: Bearer $oauth_s2s_token" \
  --header 'content-type: application/json' \
  --header 'Accept: application/hal+json' \
  --data '{
            "client_id": "${api_key}",
            "runtime_action": "your_app/your-runtime-action",
            "name": "a user friendly name",
            "description": "description for the registration",
            "delivery_type": "webhook",
            "events_of_interest": [{
              "provider_id": "some_provider",
              "event_code": "some_event_code"
            }]
          }'

Once the request is successfully completed with a status of 200, your specified webhook or runtime action will start receiving events with the specified event code as and when it is published by the specified event provider via HTTP POST requests.

Below is a sample POST curl query that will create a new Journal Registration:

curl -v --request POST \
  --url https://api.adobe.io/events/${consumer_id}/${project_id}/${workspace_id}/registrations \
  --header "x-api-key: $api_key" \
  --header "Authorization: Bearer $oauth_s2s_token" \
  --header 'content-type: application/json' \
  --header 'Accept: application/hal+json' \
  --data '{
            "client_id": "${api_key}",
            "name": "a user friendly name",
            "description": "description for the registration",
            "delivery_type": "journal",
            "events_of_interest": [{
              "provider_id": "some_provider",
              "event_code": "some_event_code"
            }]
          }'

Once successfully registered, events from the journal can then be retrieved using the Journaling API.

If you wonder how to fetch the valid provider ids and event codes, look at our Provider API.