Skip to main content

Subscriptions

Subscriptions are a declaration of interest in a particular resource, allowing a user to receive notifications when certain events occur. The events that trigger notifications are controlled by the type of subscription.


Objects​

Subscription​

PathJSON TypeFormatDescription
idstringVersion 4 UUIDThe subscription ID
createdstringISO 8601 timestampThe instant the subscription was created at
lastModifiedstringISO 8601 timestampThe instant the subscription was last modified at
typestringSubscription TypeThe type of subscription
Example response body

Formats​

Subscription Type​

string

ValueDescription
ALLTriggers notifications for all resource events
ALERTSTriggers notifications for resource alert events only
NONEDoes not trigger any notifications

Requests​

View all subscriptions​

GET /api/subscriptions

Returns all subscriptions for the authenticated user profile.

Examples
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.meltano.com:443/api/subscriptions' -i -X GET

Response​

200 OK

Subscription collection with HAL links.

Example response body

View all member subscriptions to a workspace​

GET /api/workspaces/{workspace-id}/members/subscriptions

Returns all member subscriptions to the workspace {workspace-id}.

Prerequisites​

  • Workspace {workspace-id} must exist
Examples
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.meltano.com:443/api/workspaces/4defec8f-ba14-4056-8385-fdfd9702a15b/members/subscriptions' -i -X GET

Response​

200 OK

Subscription collection with HAL links.

Example response body

View a subscription​

GET /api/subscriptions/{subscription-id}

Returns the subscription {subscription-id}.

Prerequisites​

  • Subscription {subscription-id} must exist
Examples
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.meltano.com:443/api/subscriptions/b590a418-c51e-4e69-95ba-6a18ad4cd633' -i -X GET

Response​

200 OK

Subscription with HAL links.

Example response body

Subscribe to a workspace​

POST /api/workspaces/{workspace-id}/subscriptions

Subscribes the authenticated user profile to the workspace {workspace-id}.

By default, the subscription is configured for all workspace events (see Subscription Type for more information).

Prerequisites​

  • Workspace {workspace-id} must exist

Query Parameters​

ParameterRequiredFormatDefault ValueDescription
allMembersNoBooleanfalseWhether or not to subscribe the workspace to workspace events, in order to enable workspace-wide notifications for all members by default (applicable for the workspace owner only)
Examples
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.meltano.com:443/api/workspaces/4defec8f-ba14-4056-8385-fdfd9702a15b/subscriptions?allMembers=true' -i -X POST \
-H 'Content-Type: application/json'

Response​

200 OK

Subscription with HAL links.

Example response body

Subscribe to a channel​

POST /api/channels/{channel-id}/subscriptions

Subscribes the authenticated user profile to the channel {channel-id}.

By default, the subscription is configured for all channel events (see Subscription Type for more information).

Prerequisites​

  • Channel {channel-id} must exist

Query Parameters​

ParameterRequiredFormatDefault ValueDescription
allMembersNoBooleanfalseWhether or not to subscribe the workspace to channel events, enabling notifications for all members by default (applicable for the workspace owner only)
Examples
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.meltano.com:443/api/channels/2b83e0c3-8b47-4f61-adda-0082db604559/subscriptions' -i -X POST \
-H 'Content-Type: application/json'

Response​

200 OK

Subscription with HAL links.

Example response body

Subscribe to a dataset​

POST /api/datasets/{dataset-id}/subscriptions

Subscribes the authenticated user profile to the dataset {dataset-id}.

By default, the subscription is configured for all dataset events (see Subscription Type for more information).

Prerequisites​

  • Dataset {dataset-id} must exist

Query Parameters​

ParameterRequiredFormatDefault ValueDescription
allMembersNoBooleanfalseWhether or not to subscribe the workspace to dataset events, enabling notifications for all members by default (applicable for the workspace owner only)
Examples
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.meltano.com:443/api/datasets/937e9358-96f1-433c-aa79-e346d8e5c2ec/subscriptions' -i -X POST \
-H 'Content-Type: application/json'

Response​

200 OK

Subscription with HAL links.

Example response body

Subscribe to a pipeline​

POST /api/pipelines/{pipeline-id}/subscriptions

Subscribes the authenticated user profile to the pipeline {pipeline-id}.

By default, the subscription is configured for all pipeline events (see Subscription Type for more information).

Prerequisites​

  • Pipeline {pipeline-id} must exist

Query Parameters​

ParameterRequiredFormatDefault ValueDescription
allMembersNoBooleanfalseWhether or not to subscribe the workspace to pipeline events, enabling notifications for all members by default (applicable for the workspace owner only)
Examples
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.meltano.com:443/api/pipelines/95b070ee-2b01-454d-bac0-997efce57e9e/subscriptions' -i -X POST \
-H 'Content-Type: application/json'

Response​

200 OK

Subscription with HAL links.

Example response body

Update a subscription​

PUT /api/subscriptions/{subscription-id}

Updates the subscription {subscription-id}.

Prerequisites​

  • Subscription {subscription-id} must exist

Body​

PathJSON TypeFormatDescription
typestringSubscription TypeThe type of subscription
{
"type" : "ALERTS"
}
Examples
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.meltano.com:443/api/subscriptions/b590a418-c51e-4e69-95ba-6a18ad4cd633' -i -X PUT \
-H 'Content-Type: application/json' \
-d '{
"type" : "ALERTS"
}'

Response​

200 OK

Subscription with HAL links.

Example response body

Remove a subscription​

DELETE /api/subscriptions/{subscription-id}

Removes the subscription {subscription-id}.

Prerequisites​

  • Subscription {subscription-id} must exist
Examples
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.meltano.com:443/api/subscriptions/b590a418-c51e-4e69-95ba-6a18ad4cd633' -i -X DELETE

Response​

204 No Content

No response body provided.