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
Path | Type | Format | Description |
---|---|---|---|
id |
String |
Version 4 UUID | The subscription ID |
created |
String |
ISO 8601 timestamp | The instant the subscription was created at |
lastModified |
String |
ISO 8601 timestamp | The instant the subscription was last modified at |
type |
String |
Subscription Type | The type of subscription |
{
"id" : "12c9b853-2774-40c6-9fc2-b58b90448208",
"created" : "2024-05-11T08:36:40.976693",
"lastModified" : "2024-05-11T08:36:40.976693",
"type" : "ALL",
"_embedded" : {
"channel" : {
"name" : "matatika-limited",
"description" : "Matatika Limited",
"picture" : "https://cdn.auth0.com/avatars/ml.png?ssl=1"
},
"subscriberProfile" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
}
},
"_links" : {
"self" : {
"href" : "https://catalog.matatika.com/api/subscriptions/12c9b853-2774-40c6-9fc2-b58b90448208"
},
"delete subscription" : {
"href" : "https://catalog.matatika.com/api/subscriptions/12c9b853-2774-40c6-9fc2-b58b90448208",
"type" : "DELETE"
},
"update subscription" : {
"href" : "https://catalog.matatika.com/api/subscriptions/12c9b853-2774-40c6-9fc2-b58b90448208",
"type" : "PUT"
},
"channel" : {
"href" : "https://catalog.matatika.com/api/channels/93e165aa-d657-41e0-8a8f-78f5c5b77841"
}
}
}
Formats
Subscription Type
String
Value | Description |
---|---|
ALL |
Triggers notifications for all resource events |
ALERTS |
Triggers notifications for resource alert events only |
NONE |
Does not trigger any notifications |
Requests
- View all subscriptions
- View all member subscriptions to a workspace
- View a subscription
- Subscribe to a workspace
- Subscribe to a channel
- Subscribe to a dataset
- Subscribe to a pipeline
- Update a subscription
- Remove a subscription
View all subscriptions
GET
/api/subscriptions
Returns all subscriptions for the authenticated user profile.
Request
Example Snippets
cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com:443/api/subscriptions' -i -X GET \
-H 'Accept: application/json, application/javascript, text/javascript, text/json' \
-H 'Content-Type: application/json'
Python (requests
)
import requests
url = "https://catalog.matatika.com:443/api/subscriptions"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("GET", url, headers=headers)
print(response.text.encode('utf8'))
Response
200 OK
Subscription collection with HAL links.
{
"_embedded" : {
"subscriptions" : [ {
"id" : "12c9b853-2774-40c6-9fc2-b58b90448208",
"created" : "2024-05-11T08:36:40.976693",
"lastModified" : "2024-05-11T08:36:41.309239",
"type" : "ALERTS",
"_embedded" : {
"channel" : {
"name" : "matatika-limited",
"description" : "Matatika Limited",
"picture" : "https://cdn.auth0.com/avatars/ml.png?ssl=1"
},
"subscriberProfile" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
}
},
"_links" : {
"self" : {
"href" : "https://catalog.matatika.com/api/subscriptions/12c9b853-2774-40c6-9fc2-b58b90448208"
},
"delete subscription" : {
"href" : "https://catalog.matatika.com/api/subscriptions/12c9b853-2774-40c6-9fc2-b58b90448208",
"type" : "DELETE"
},
"update subscription" : {
"href" : "https://catalog.matatika.com/api/subscriptions/12c9b853-2774-40c6-9fc2-b58b90448208",
"type" : "PUT"
},
"channel" : {
"href" : "https://catalog.matatika.com/api/channels/93e165aa-d657-41e0-8a8f-78f5c5b77841"
}
}
}, {
"id" : "5ccc2d3e-27a3-47a1-8573-a9922f063dee",
"created" : "2024-05-11T08:36:41.962984",
"lastModified" : "2024-05-11T08:36:41.962985",
"type" : "ALL",
"_embedded" : {
"subscriberProfile" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"dataset" : {
"id" : "c3ea688e-8003-4960-a0ef-2663644742f2",
"published" : "2024-05-11T08:36:40.197072",
"alias" : "simple-bar-chart",
"workspaceId" : "ed996c35-9503-4722-ae0e-66979ea7193f",
"source" : "matatika-limited",
"title" : "How many people have visited our website?",
"description" : "# Some Markdown\n- point 1\n- point 2\n- point 3\n",
"questions" : "[''This is my question'', ''this is second question'']",
"visualisation" : "{\"google-chart\": {\"chartType\": \"BarChart\",\"options\": {\"title\": \"Website visitors\"}}}",
"query" : "SELECT to_char(date(report_date),'YYYYMM') as year_month, SUM(sessions) \n FROM\n \"google_analytics_website_overview\"\n WHERE\n \"google_analytics_website_overview\".\"report_date\" >= DATE(NOW()) - INTERVAL '365 DAY'\n GROUP BY year_month\n ORDER BY year_month ASC;",
"likeCount" : 0,
"likedByProfiles" : [ ],
"commentCount" : 0,
"viewCount" : 0,
"created" : "2024-05-11T08:36:40.197072",
"score" : 1.0
}
},
"_links" : {
"self" : {
"href" : "https://catalog.matatika.com/api/subscriptions/5ccc2d3e-27a3-47a1-8573-a9922f063dee"
},
"delete subscription" : {
"href" : "https://catalog.matatika.com/api/subscriptions/5ccc2d3e-27a3-47a1-8573-a9922f063dee",
"type" : "DELETE"
},
"update subscription" : {
"href" : "https://catalog.matatika.com/api/subscriptions/5ccc2d3e-27a3-47a1-8573-a9922f063dee",
"type" : "PUT"
},
"dataset" : {
"href" : "https://catalog.matatika.com/api/datasets/c3ea688e-8003-4960-a0ef-2663644742f2"
}
}
}, {
"id" : "2f01b7c5-0d7e-444f-a96b-471de4c0c911",
"created" : "2024-05-11T08:36:47.895477",
"lastModified" : "2024-05-11T08:36:47.895477",
"type" : "ALL",
"_embedded" : {
"subscriberProfile" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"pipeline" : {
"id" : "ace8ef50-4c32-4eb5-b83a-043644daf588",
"name" : "SIT-generated pipeline",
"lastModified" : "2024-05-11T08:36:42.573785"
}
},
"_links" : {
"self" : {
"href" : "https://catalog.matatika.com/api/subscriptions/2f01b7c5-0d7e-444f-a96b-471de4c0c911"
},
"delete subscription" : {
"href" : "https://catalog.matatika.com/api/subscriptions/2f01b7c5-0d7e-444f-a96b-471de4c0c911",
"type" : "DELETE"
},
"update subscription" : {
"href" : "https://catalog.matatika.com/api/subscriptions/2f01b7c5-0d7e-444f-a96b-471de4c0c911",
"type" : "PUT"
},
"pipeline" : {
"href" : "https://catalog.matatika.com/api/pipelines/ace8ef50-4c32-4eb5-b83a-043644daf588"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "https://catalog.matatika.com/api/subscriptions?page=0&size=20"
}
},
"page" : {
"size" : 20,
"totalElements" : 3,
"totalPages" : 1,
"number" : 0
}
}
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
Request
Example Snippets
cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com:443/api/workspaces/ed996c35-9503-4722-ae0e-66979ea7193f/members/subscriptions' -i -X GET \
-H 'Accept: application/json, application/javascript, text/javascript, text/json' \
-H 'Content-Type: application/json'
Python (requests
)
import requests
url = "https://catalog.matatika.com:443/api/workspaces/ed996c35-9503-4722-ae0e-66979ea7193f/members/subscriptions"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("GET", url, headers=headers)
print(response.text.encode('utf8'))
Response
200 OK
Subscription collection with HAL links.
{
"_embedded" : {
"subscriptions" : [ {
"id" : "b11ddd65-a669-405a-9bff-d345476cc262",
"created" : "2024-05-11T08:36:48.247611",
"lastModified" : "2024-05-11T08:36:48.247612",
"type" : "ALL",
"_embedded" : {
"subscriberWorkspace" : {
"id" : "ed996c35-9503-4722-ae0e-66979ea7193f",
"name" : "Test Workspace [2024-05-11T08:36:39.801692930]"
},
"workspace" : {
"id" : "ed996c35-9503-4722-ae0e-66979ea7193f",
"name" : "Test Workspace [2024-05-11T08:36:39.801692930]"
}
},
"_links" : {
"self" : {
"href" : "https://catalog.matatika.com/api/subscriptions/b11ddd65-a669-405a-9bff-d345476cc262"
},
"update subscription" : {
"href" : "https://catalog.matatika.com/api/subscriptions/b11ddd65-a669-405a-9bff-d345476cc262",
"type" : "PUT"
},
"delete subscription" : {
"href" : "https://catalog.matatika.com/api/subscriptions/b11ddd65-a669-405a-9bff-d345476cc262",
"type" : "DELETE"
},
"workspace" : {
"href" : "https://catalog.matatika.com/api/workspaces/ed996c35-9503-4722-ae0e-66979ea7193f"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "https://catalog.matatika.com/api/workspaces/ed996c35-9503-4722-ae0e-66979ea7193f/members/subscriptions?page=0&size=20"
}
},
"page" : {
"size" : 20,
"totalElements" : 1,
"totalPages" : 1,
"number" : 0
}
}
View a subscription
GET
/api/subscriptions/{subscription-id}
Returns the subscription {subscription-id}
.
Prerequisites
- Subscription
{subscription-id}
must exist
Request
Example Snippets
cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com:443/api/subscriptions/12c9b853-2774-40c6-9fc2-b58b90448208' -i -X GET \
-H 'Accept: application/json, application/javascript, text/javascript, text/json' \
-H 'Content-Type: application/json'
Python (requests
)
import requests
url = "https://catalog.matatika.com:443/api/subscriptions/12c9b853-2774-40c6-9fc2-b58b90448208"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("GET", url, headers=headers)
print(response.text.encode('utf8'))
Response
200 OK
Subscription with HAL links.
{
"id" : "12c9b853-2774-40c6-9fc2-b58b90448208",
"created" : "2024-05-11T08:36:40.976693",
"lastModified" : "2024-05-11T08:36:40.976693",
"type" : "ALL",
"_embedded" : {
"channel" : {
"name" : "matatika-limited",
"description" : "Matatika Limited",
"picture" : "https://cdn.auth0.com/avatars/ml.png?ssl=1"
},
"subscriberProfile" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
}
},
"_links" : {
"self" : {
"href" : "https://catalog.matatika.com/api/subscriptions/12c9b853-2774-40c6-9fc2-b58b90448208"
},
"delete subscription" : {
"href" : "https://catalog.matatika.com/api/subscriptions/12c9b853-2774-40c6-9fc2-b58b90448208",
"type" : "DELETE"
},
"update subscription" : {
"href" : "https://catalog.matatika.com/api/subscriptions/12c9b853-2774-40c6-9fc2-b58b90448208",
"type" : "PUT"
},
"channel" : {
"href" : "https://catalog.matatika.com/api/channels/93e165aa-d657-41e0-8a8f-78f5c5b77841"
}
}
}
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
Request
Query Parameters
Parameter | Required | Format | Default Value | Description |
---|---|---|---|---|
allMembers |
No | Boolean | false |
Whether 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) |
Example Snippets
cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com:443/api/workspaces/ed996c35-9503-4722-ae0e-66979ea7193f/subscriptions?allMembers=true' -i -X POST \
-H 'Accept: application/json, application/javascript, text/javascript, text/json' \
-H 'Content-Type: application/json'
Python (requests
)
import requests
url = "https://catalog.matatika.com:443/api/workspaces/ed996c35-9503-4722-ae0e-66979ea7193f/subscriptions?allMembers=true"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("POST", url, headers=headers)
print(response.text.encode('utf8'))
Response
200 OK
Subscription with HAL links.
{
"id" : "b11ddd65-a669-405a-9bff-d345476cc262",
"created" : "2024-05-11T08:36:48.247611305",
"lastModified" : "2024-05-11T08:36:48.247611505",
"type" : "ALL",
"_embedded" : {
"subscriberWorkspace" : {
"id" : "ed996c35-9503-4722-ae0e-66979ea7193f",
"name" : "Test Workspace [2024-05-11T08:36:39.801692930]"
},
"workspace" : {
"id" : "ed996c35-9503-4722-ae0e-66979ea7193f",
"name" : "Test Workspace [2024-05-11T08:36:39.801692930]"
}
},
"_links" : {
"self" : {
"href" : "https://catalog.matatika.com/api/subscriptions/b11ddd65-a669-405a-9bff-d345476cc262"
},
"update subscription" : {
"href" : "https://catalog.matatika.com/api/subscriptions/b11ddd65-a669-405a-9bff-d345476cc262",
"type" : "PUT"
},
"delete subscription" : {
"href" : "https://catalog.matatika.com/api/subscriptions/b11ddd65-a669-405a-9bff-d345476cc262",
"type" : "DELETE"
},
"workspace" : {
"href" : "https://catalog.matatika.com/api/workspaces/ed996c35-9503-4722-ae0e-66979ea7193f"
}
}
}
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
Request
Query Parameters
Parameter | Required | Format | Default Value | Description |
---|---|---|---|---|
allMembers |
No | Boolean | false |
Whether or not to subscribe the workspace to channel events, enabling notifications for all members by default (applicable for the workspace owner only) |
Example Snippets
cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com:443/api/channels/93e165aa-d657-41e0-8a8f-78f5c5b77841/subscriptions' -i -X POST \
-H 'Accept: application/json, application/javascript, text/javascript, text/json' \
-H 'Content-Type: application/json'
Python (requests
)
import requests
url = "https://catalog.matatika.com:443/api/channels/93e165aa-d657-41e0-8a8f-78f5c5b77841/subscriptions"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("POST", url, headers=headers)
print(response.text.encode('utf8'))
Response
200 OK
Subscription with HAL links.
{
"id" : "12c9b853-2774-40c6-9fc2-b58b90448208",
"created" : "2024-05-11T08:36:40.976693143",
"lastModified" : "2024-05-11T08:36:40.976693443",
"type" : "ALL",
"_embedded" : {
"channel" : {
"name" : "matatika-limited",
"description" : "Matatika Limited",
"picture" : "https://cdn.auth0.com/avatars/ml.png?ssl=1"
},
"subscriberProfile" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
}
},
"_links" : {
"self" : {
"href" : "https://catalog.matatika.com/api/subscriptions/12c9b853-2774-40c6-9fc2-b58b90448208"
},
"delete subscription" : {
"href" : "https://catalog.matatika.com/api/subscriptions/12c9b853-2774-40c6-9fc2-b58b90448208",
"type" : "DELETE"
},
"update subscription" : {
"href" : "https://catalog.matatika.com/api/subscriptions/12c9b853-2774-40c6-9fc2-b58b90448208",
"type" : "PUT"
},
"channel" : {
"href" : "https://catalog.matatika.com/api/channels/93e165aa-d657-41e0-8a8f-78f5c5b77841"
}
}
}
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
Request
Query Parameters
Parameter | Required | Format | Default Value | Description |
---|---|---|---|---|
allMembers |
No | Boolean | false |
Whether or not to subscribe the workspace to dataset events, enabling notifications for all members by default (applicable for the workspace owner only) |
Example Snippets
cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com:443/api/datasets/c3ea688e-8003-4960-a0ef-2663644742f2/subscriptions' -i -X POST \
-H 'Accept: application/json, application/javascript, text/javascript, text/json' \
-H 'Content-Type: application/json'
Python (requests
)
import requests
url = "https://catalog.matatika.com:443/api/datasets/c3ea688e-8003-4960-a0ef-2663644742f2/subscriptions"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("POST", url, headers=headers)
print(response.text.encode('utf8'))
Response
200 OK
Subscription with HAL links.
{
"id" : "5ccc2d3e-27a3-47a1-8573-a9922f063dee",
"created" : "2024-05-11T08:36:41.96298448",
"lastModified" : "2024-05-11T08:36:41.96298488",
"type" : "ALL",
"_embedded" : {
"subscriberProfile" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"dataset" : {
"id" : "c3ea688e-8003-4960-a0ef-2663644742f2",
"published" : "2024-05-11T08:36:40.197072",
"alias" : "simple-bar-chart",
"workspaceId" : "ed996c35-9503-4722-ae0e-66979ea7193f",
"source" : "matatika-limited",
"title" : "How many people have visited our website?",
"description" : "# Some Markdown\n- point 1\n- point 2\n- point 3\n",
"questions" : "[''This is my question'', ''this is second question'']",
"visualisation" : "{\"google-chart\": {\"chartType\": \"BarChart\",\"options\": {\"title\": \"Website visitors\"}}}",
"query" : "SELECT to_char(date(report_date),'YYYYMM') as year_month, SUM(sessions) \n FROM\n \"google_analytics_website_overview\"\n WHERE\n \"google_analytics_website_overview\".\"report_date\" >= DATE(NOW()) - INTERVAL '365 DAY'\n GROUP BY year_month\n ORDER BY year_month ASC;",
"likeCount" : 0,
"likedByProfiles" : [ ],
"commentCount" : 0,
"viewCount" : 0,
"created" : "2024-05-11T08:36:40.197072",
"score" : 1.0
}
},
"_links" : {
"self" : {
"href" : "https://catalog.matatika.com/api/subscriptions/5ccc2d3e-27a3-47a1-8573-a9922f063dee"
},
"delete subscription" : {
"href" : "https://catalog.matatika.com/api/subscriptions/5ccc2d3e-27a3-47a1-8573-a9922f063dee",
"type" : "DELETE"
},
"update subscription" : {
"href" : "https://catalog.matatika.com/api/subscriptions/5ccc2d3e-27a3-47a1-8573-a9922f063dee",
"type" : "PUT"
},
"dataset" : {
"href" : "https://catalog.matatika.com/api/datasets/c3ea688e-8003-4960-a0ef-2663644742f2"
}
}
}
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
Request
Query Parameters
Parameter | Required | Format | Default Value | Description |
---|---|---|---|---|
allMembers |
No | Boolean | false |
Whether or not to subscribe the workspace to pipeline events, enabling notifications for all members by default (applicable for the workspace owner only) |
Example Snippets
cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com:443/api/pipelines/ace8ef50-4c32-4eb5-b83a-043644daf588/subscriptions' -i -X POST \
-H 'Accept: application/json, application/javascript, text/javascript, text/json' \
-H 'Content-Type: application/json'
Python (requests
)
import requests
url = "https://catalog.matatika.com:443/api/pipelines/ace8ef50-4c32-4eb5-b83a-043644daf588/subscriptions"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("POST", url, headers=headers)
print(response.text.encode('utf8'))
Response
200 OK
Subscription with HAL links.
{
"id" : "2f01b7c5-0d7e-444f-a96b-471de4c0c911",
"created" : "2024-05-11T08:36:47.895476562",
"lastModified" : "2024-05-11T08:36:47.895476962",
"type" : "ALL",
"_embedded" : {
"subscriberProfile" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"pipeline" : {
"id" : "ace8ef50-4c32-4eb5-b83a-043644daf588",
"name" : "SIT-generated pipeline",
"lastModified" : "2024-05-11T08:36:42.573785"
}
},
"_links" : {
"self" : {
"href" : "https://catalog.matatika.com/api/subscriptions/2f01b7c5-0d7e-444f-a96b-471de4c0c911"
},
"delete subscription" : {
"href" : "https://catalog.matatika.com/api/subscriptions/2f01b7c5-0d7e-444f-a96b-471de4c0c911",
"type" : "DELETE"
},
"update subscription" : {
"href" : "https://catalog.matatika.com/api/subscriptions/2f01b7c5-0d7e-444f-a96b-471de4c0c911",
"type" : "PUT"
},
"pipeline" : {
"href" : "https://catalog.matatika.com/api/pipelines/ace8ef50-4c32-4eb5-b83a-043644daf588"
}
}
}
Update a subscription
PUT
/api/subscriptions/{subscription-id}
Updates the subscription {subscription-id}
.
Prerequisites
- Subscription
{subscription-id}
must exist
Request
Body
Path | Type | Format | Description |
---|---|---|---|
type |
String |
Subscription Type | The type of subscription |
{
"type" : "ALERTS"
}
Example Snippets
cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com:443/api/subscriptions/12c9b853-2774-40c6-9fc2-b58b90448208' -i -X PUT \
-H 'Accept: application/json, application/javascript, text/javascript, text/json' \
-H 'Content-Type: application/hal+json; charset=ISO-8859-1' \
-d '{
"type" : "ALERTS"
}'
Python (requests
)
import requests
url = "https://catalog.matatika.com:443/api/subscriptions/12c9b853-2774-40c6-9fc2-b58b90448208"
data = {
"type" : "ALERTS"
}
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("PUT", url, headers=headers, data=data)
print(response.text.encode('utf8'))
Response
200 OK
Subscription with HAL links.
{
"id" : "12c9b853-2774-40c6-9fc2-b58b90448208",
"created" : "2024-05-11T08:36:40.976693",
"lastModified" : "2024-05-11T08:36:41.309239",
"type" : "ALERTS",
"_embedded" : {
"channel" : {
"name" : "matatika-limited",
"description" : "Matatika Limited",
"picture" : "https://cdn.auth0.com/avatars/ml.png?ssl=1"
},
"subscriberProfile" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
}
},
"_links" : {
"self" : {
"href" : "https://catalog.matatika.com/api/subscriptions/12c9b853-2774-40c6-9fc2-b58b90448208"
},
"delete subscription" : {
"href" : "https://catalog.matatika.com/api/subscriptions/12c9b853-2774-40c6-9fc2-b58b90448208",
"type" : "DELETE"
},
"update subscription" : {
"href" : "https://catalog.matatika.com/api/subscriptions/12c9b853-2774-40c6-9fc2-b58b90448208",
"type" : "PUT"
},
"channel" : {
"href" : "https://catalog.matatika.com/api/channels/93e165aa-d657-41e0-8a8f-78f5c5b77841"
}
}
}
Remove a subscription
DELETE
/api/subscriptions/{subscription-id}
Removes the subscription {subscription-id}
.
Prerequisites
- Subscription
{subscription-id}
must exist
Request
Example Snippets
cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com:443/api/subscriptions/12c9b853-2774-40c6-9fc2-b58b90448208' -i -X DELETE \
-H 'Accept: application/json, application/javascript, text/javascript, text/json' \
-H 'Content-Type: application/json'
Python (requests
)
import requests
url = "https://catalog.matatika.com:443/api/subscriptions/12c9b853-2774-40c6-9fc2-b58b90448208"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("DELETE", url, headers=headers)
print(response.text.encode('utf8'))
Response
204 No Content
No response body provided.