Providers
For information on installing and using the SDK, please begin by reading the getting started guide.
List All Providers
Get the list of all providers that are applicable to the organization.
Method
getAllProviders(consumerOrgId) ⇒ Promise.<object>`
Sample Response
Returns a list of all providers. This response has been truncated to show only the first provider returned.
{
"_links": {
"self": {
"href": "https://api.adobe.io/events/<consumerOrgId>/providers"
}
},
"_embedded": {
"providers": [
{
"_links": {
"rel:event_metadata": {
"href": "https://api.adobe.io/events/providers/<providerId>/eventmetadata"
},
"rel:update": {
"href": "https://api.adobe.io/events/<consumerId>/<projectId>/<workspaceId>/providers/<provider_id>"
},
"self": {
"href": "https://api.adobe.io/events/providers/<providerId>"
}
},
"id": "<providerId>",
"label": "<label>",
"source": "<providerId>",
"publisher": "<Publisher_Org>"
},
...
]
}
}
Create a Provider
Create a new provider based on the given provider details.
Method
createProvider(consumerOrgId, projectId, workspaceId, body) ⇒ Promise.<object>
providerId
Sample Request Body
Creating a provider requires a unique label for the provider which will be the name that appears in Adobe Developer Console.
{
"label": "<Label for provider>",
"docs_url": "<link to documentation if present>",
"description": "<description>"
}
Response
Returns the details of the newly created provider.
Get Provider Details
Get the details of the provider with the specified provider Id. The "source" is the URI to be used while publishing events to the event receiver. There is an optional boolean event metadata parameter that can be set to true
or false
. By default it is false
. If set to true
, it fetches all the event metadata for the provider.
Method
getProvider(providerId, fetchEventMetadata? :false) ⇒ Promise.<object>
providerId
false
true
if you want to fetch the associated event metadata of the provider.Sample Response without Metadata
Returns the details of the provider specified by the provider ID. The "source" value is the URI to be used while publishing events to I/O Events.
{
"_links":
{
"rel:eventmetadata": {
"href": "https://api.adobe.io/events/providers/<providerId>/eventmetadata"
},
"rel:update": {
"href": "https://api.adobe.io/events/<consumerId>/<projectId>/<workspaceId>/providers/<provider_id>"
},
"self": {
"href": "https://api.adobe.io/events/providers/<providerId>"
}
},
"id": "<provider_id>",
"label": "<label>",
"description": "A Custom IO Events Provider",
"source": "urn:uuid:<provider_id>",
"publisher": "<Publisher_Org>"
}
Sample Response with Metadata
Returns the details of the provider specified by the provider ID along with event metadata. The "source" value is the URI to be used while publishing events to I/O Events.
{
"_links": {
"rel:eventmetadata": {
"href": "https://api.adobe.io/events/providers/<provider_id>/eventmetadata"
},
"rel:update": {
"href": "https://api.adobe.io/events/<consumerId>/<projectId>/<workspaceId>/providers/<provider_id>"
},
"self": {
"href": "https://api.adobe.io/events/providers/<provider_id>"
}
},
"_embedded": {
"eventmetadata": [
{
"_links": {
"rel:sample_event": {
"href": "https://api.adobe.io/events/providers/<provider_id>/eventmetadata/<event_code>/sample_event"
},
"rel:update": {
"href": "https://api.adobe.io/events/<consumerId>/<projectId>/<workspaceId>/providers/<provider_id>/eventmetadata/<event_code>"
},
"self": {
"href": "https://api.adobe.io/events/providers/<provider_id>/eventmetadata/<event_code>"
}
},
"description": "<description of the event code>",
"label": "<event code label>",
"event_code": "<event_code>"
}, ...
]
},
"id": "<provider_id>",
"label": "<label>",
"description": "A custom events provider.",
"source": "urn:uuid:<provider_id>",
"publisher": "<Publisher_Org>"
}
Update Provider
Update the label of a provider based on its ID.
Method
updateProvider(consumerOrgId, projectId, workspaceId, providerId, body) ⇒ Promise.<object>
providerId
Response
Returns the details of the updated provider.
Delete a Provider
You can delete a provider by specifying a provider ID.
Method
deleteProvider(consumerOrgId, projectId, workspaceId, providerId) ⇒ Promise.<object>
providerId
Response
Returns HTTP Status 204 (No Content) once the deletion is successful. If the provider does not exist, HTTP Status 404 (Not Found) is returned.