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 | JSON 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" : "49c5a333-b7f5-47b9-8459-1732b294b6d3",
"created" : "2025-03-10T20:15:59.582132",
"lastModified" : "2025-03-10T20:15:59.582132",
"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://app.matatika.com/api/subscriptions/49c5a333-b7f5-47b9-8459-1732b294b6d3"
},
"delete subscription" : {
"href" : "https://app.matatika.com/api/subscriptions/49c5a333-b7f5-47b9-8459-1732b294b6d3",
"type" : "DELETE"
},
"update subscription" : {
"href" : "https://app.matatika.com/api/subscriptions/49c5a333-b7f5-47b9-8459-1732b294b6d3",
"type" : "PUT"
},
"channel" : {
"href" : "https://app.matatika.com/api/channels/8ff6c1d4-a848-46dd-b013-2c7712d13e2e"
}
}
}
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://app.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://app.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" : "35221bea-0efc-4696-b669-4d62a9caae78",
"created" : "2025-03-10T20:16:00.079607",
"lastModified" : "2025-03-10T20:16:00.079607",
"type" : "ALL",
"_embedded" : {
"subscriberProfile" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"dataset" : {
"id" : "75bfad81-a2df-408e-9b6f-fdfbcfcbb872",
"published" : "2025-03-10T20:15:54.133718",
"alias" : "simple-bar-chart",
"workspaceId" : "393abd0c-b273-4b38-84db-cfd0b9a9aefa",
"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" : "2025-03-10T20:15:54.133718",
"score" : 1.0
}
},
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/subscriptions/35221bea-0efc-4696-b669-4d62a9caae78"
},
"delete subscription" : {
"href" : "https://app.matatika.com/api/subscriptions/35221bea-0efc-4696-b669-4d62a9caae78",
"type" : "DELETE"
},
"update subscription" : {
"href" : "https://app.matatika.com/api/subscriptions/35221bea-0efc-4696-b669-4d62a9caae78",
"type" : "PUT"
},
"dataset" : {
"href" : "https://app.matatika.com/api/datasets/75bfad81-a2df-408e-9b6f-fdfbcfcbb872"
}
}
}, {
"id" : "3d3daa84-d7bd-40d0-ab6f-9e6a3ed01e7c",
"created" : "2025-03-10T20:16:05.640122",
"lastModified" : "2025-03-10T20:16:05.640122",
"type" : "ALL",
"_embedded" : {
"subscriberProfile" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"pipeline" : {
"id" : "cbc04b4f-23b3-4d59-ad3d-58afa9929525",
"name" : "SIT-generated pipeline",
"lastModified" : "2025-03-10T20:16:00.431316"
}
},
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/subscriptions/3d3daa84-d7bd-40d0-ab6f-9e6a3ed01e7c"
},
"delete subscription" : {
"href" : "https://app.matatika.com/api/subscriptions/3d3daa84-d7bd-40d0-ab6f-9e6a3ed01e7c",
"type" : "DELETE"
},
"update subscription" : {
"href" : "https://app.matatika.com/api/subscriptions/3d3daa84-d7bd-40d0-ab6f-9e6a3ed01e7c",
"type" : "PUT"
},
"pipeline" : {
"href" : "https://app.matatika.com/api/pipelines/cbc04b4f-23b3-4d59-ad3d-58afa9929525"
}
}
}, {
"id" : "49c5a333-b7f5-47b9-8459-1732b294b6d3",
"created" : "2025-03-10T20:15:59.582132",
"lastModified" : "2025-03-10T20:15:59.77609",
"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://app.matatika.com/api/subscriptions/49c5a333-b7f5-47b9-8459-1732b294b6d3"
},
"delete subscription" : {
"href" : "https://app.matatika.com/api/subscriptions/49c5a333-b7f5-47b9-8459-1732b294b6d3",
"type" : "DELETE"
},
"update subscription" : {
"href" : "https://app.matatika.com/api/subscriptions/49c5a333-b7f5-47b9-8459-1732b294b6d3",
"type" : "PUT"
},
"channel" : {
"href" : "https://app.matatika.com/api/channels/8ff6c1d4-a848-46dd-b013-2c7712d13e2e"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "https://app.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://app.matatika.com:443/api/workspaces/393abd0c-b273-4b38-84db-cfd0b9a9aefa/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://app.matatika.com:443/api/workspaces/393abd0c-b273-4b38-84db-cfd0b9a9aefa/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" : "62534e0a-0f6a-465c-b4f2-a6dbe989f70a",
"created" : "2025-03-10T20:16:05.848644",
"lastModified" : "2025-03-10T20:16:05.848644",
"type" : "ALL",
"_embedded" : {
"subscriberWorkspace" : {
"id" : "393abd0c-b273-4b38-84db-cfd0b9a9aefa",
"name" : "Test Workspace [2025-03-10T20:15:53.818641829]"
},
"workspace" : {
"id" : "393abd0c-b273-4b38-84db-cfd0b9a9aefa",
"name" : "Test Workspace [2025-03-10T20:15:53.818641829]"
}
},
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/subscriptions/62534e0a-0f6a-465c-b4f2-a6dbe989f70a"
},
"update subscription" : {
"href" : "https://app.matatika.com/api/subscriptions/62534e0a-0f6a-465c-b4f2-a6dbe989f70a",
"type" : "PUT"
},
"delete subscription" : {
"href" : "https://app.matatika.com/api/subscriptions/62534e0a-0f6a-465c-b4f2-a6dbe989f70a",
"type" : "DELETE"
},
"workspace" : {
"href" : "https://app.matatika.com/api/workspaces/393abd0c-b273-4b38-84db-cfd0b9a9aefa"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/workspaces/393abd0c-b273-4b38-84db-cfd0b9a9aefa/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://app.matatika.com:443/api/subscriptions/49c5a333-b7f5-47b9-8459-1732b294b6d3' -i -X GET \
-H 'Accept: application/json, application/javascript, text/javascript, text/json' \
-H 'Content-Type: application/json'
Python (requests
)
import requests
url = "https://app.matatika.com:443/api/subscriptions/49c5a333-b7f5-47b9-8459-1732b294b6d3"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("GET", url, headers=headers)
print(response.text.encode('utf8'))
Response
200 OK
Subscription with HAL links.
{
"id" : "49c5a333-b7f5-47b9-8459-1732b294b6d3",
"created" : "2025-03-10T20:15:59.582132",
"lastModified" : "2025-03-10T20:15:59.582132",
"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://app.matatika.com/api/subscriptions/49c5a333-b7f5-47b9-8459-1732b294b6d3"
},
"delete subscription" : {
"href" : "https://app.matatika.com/api/subscriptions/49c5a333-b7f5-47b9-8459-1732b294b6d3",
"type" : "DELETE"
},
"update subscription" : {
"href" : "https://app.matatika.com/api/subscriptions/49c5a333-b7f5-47b9-8459-1732b294b6d3",
"type" : "PUT"
},
"channel" : {
"href" : "https://app.matatika.com/api/channels/8ff6c1d4-a848-46dd-b013-2c7712d13e2e"
}
}
}
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://app.matatika.com:443/api/workspaces/393abd0c-b273-4b38-84db-cfd0b9a9aefa/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://app.matatika.com:443/api/workspaces/393abd0c-b273-4b38-84db-cfd0b9a9aefa/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" : "62534e0a-0f6a-465c-b4f2-a6dbe989f70a",
"created" : "2025-03-10T20:16:05.848644059",
"lastModified" : "2025-03-10T20:16:05.848644359",
"type" : "ALL",
"_embedded" : {
"subscriberWorkspace" : {
"id" : "393abd0c-b273-4b38-84db-cfd0b9a9aefa",
"name" : "Test Workspace [2025-03-10T20:15:53.818641829]"
},
"workspace" : {
"id" : "393abd0c-b273-4b38-84db-cfd0b9a9aefa",
"name" : "Test Workspace [2025-03-10T20:15:53.818641829]"
}
},
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/subscriptions/62534e0a-0f6a-465c-b4f2-a6dbe989f70a"
},
"update subscription" : {
"href" : "https://app.matatika.com/api/subscriptions/62534e0a-0f6a-465c-b4f2-a6dbe989f70a",
"type" : "PUT"
},
"delete subscription" : {
"href" : "https://app.matatika.com/api/subscriptions/62534e0a-0f6a-465c-b4f2-a6dbe989f70a",
"type" : "DELETE"
},
"workspace" : {
"href" : "https://app.matatika.com/api/workspaces/393abd0c-b273-4b38-84db-cfd0b9a9aefa"
}
}
}
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://app.matatika.com:443/api/channels/8ff6c1d4-a848-46dd-b013-2c7712d13e2e/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://app.matatika.com:443/api/channels/8ff6c1d4-a848-46dd-b013-2c7712d13e2e/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" : "49c5a333-b7f5-47b9-8459-1732b294b6d3",
"created" : "2025-03-10T20:15:59.582131592",
"lastModified" : "2025-03-10T20:15:59.582131892",
"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://app.matatika.com/api/subscriptions/49c5a333-b7f5-47b9-8459-1732b294b6d3"
},
"delete subscription" : {
"href" : "https://app.matatika.com/api/subscriptions/49c5a333-b7f5-47b9-8459-1732b294b6d3",
"type" : "DELETE"
},
"update subscription" : {
"href" : "https://app.matatika.com/api/subscriptions/49c5a333-b7f5-47b9-8459-1732b294b6d3",
"type" : "PUT"
},
"channel" : {
"href" : "https://app.matatika.com/api/channels/8ff6c1d4-a848-46dd-b013-2c7712d13e2e"
}
}
}
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://app.matatika.com:443/api/datasets/75bfad81-a2df-408e-9b6f-fdfbcfcbb872/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://app.matatika.com:443/api/datasets/75bfad81-a2df-408e-9b6f-fdfbcfcbb872/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" : "35221bea-0efc-4696-b669-4d62a9caae78",
"created" : "2025-03-10T20:16:00.079606879",
"lastModified" : "2025-03-10T20:16:00.079607379",
"type" : "ALL",
"_embedded" : {
"subscriberProfile" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"dataset" : {
"id" : "75bfad81-a2df-408e-9b6f-fdfbcfcbb872",
"published" : "2025-03-10T20:15:54.133718",
"alias" : "simple-bar-chart",
"workspaceId" : "393abd0c-b273-4b38-84db-cfd0b9a9aefa",
"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" : "2025-03-10T20:15:54.133718",
"score" : 1.0
}
},
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/subscriptions/35221bea-0efc-4696-b669-4d62a9caae78"
},
"delete subscription" : {
"href" : "https://app.matatika.com/api/subscriptions/35221bea-0efc-4696-b669-4d62a9caae78",
"type" : "DELETE"
},
"update subscription" : {
"href" : "https://app.matatika.com/api/subscriptions/35221bea-0efc-4696-b669-4d62a9caae78",
"type" : "PUT"
},
"dataset" : {
"href" : "https://app.matatika.com/api/datasets/75bfad81-a2df-408e-9b6f-fdfbcfcbb872"
}
}
}
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://app.matatika.com:443/api/pipelines/cbc04b4f-23b3-4d59-ad3d-58afa9929525/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://app.matatika.com:443/api/pipelines/cbc04b4f-23b3-4d59-ad3d-58afa9929525/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" : "3d3daa84-d7bd-40d0-ab6f-9e6a3ed01e7c",
"created" : "2025-03-10T20:16:05.640121978",
"lastModified" : "2025-03-10T20:16:05.640122378",
"type" : "ALL",
"_embedded" : {
"subscriberProfile" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"pipeline" : {
"id" : "cbc04b4f-23b3-4d59-ad3d-58afa9929525",
"name" : "SIT-generated pipeline",
"lastModified" : "2025-03-10T20:16:00.431316"
}
},
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/subscriptions/3d3daa84-d7bd-40d0-ab6f-9e6a3ed01e7c"
},
"delete subscription" : {
"href" : "https://app.matatika.com/api/subscriptions/3d3daa84-d7bd-40d0-ab6f-9e6a3ed01e7c",
"type" : "DELETE"
},
"update subscription" : {
"href" : "https://app.matatika.com/api/subscriptions/3d3daa84-d7bd-40d0-ab6f-9e6a3ed01e7c",
"type" : "PUT"
},
"pipeline" : {
"href" : "https://app.matatika.com/api/pipelines/cbc04b4f-23b3-4d59-ad3d-58afa9929525"
}
}
}
Update a subscription
PUT
/api/subscriptions/{subscription-id}
Updates the subscription {subscription-id}
.
Prerequisites
- Subscription
{subscription-id}
must exist
Request
Body
Path | JSON Type | Format | Description |
---|---|---|---|
type |
string |
Subscription Type | The type of subscription |
{
"type" : "ALERTS"
}
Example Snippets
cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.matatika.com:443/api/subscriptions/49c5a333-b7f5-47b9-8459-1732b294b6d3' -i -X PUT \
-H 'Accept: application/json, application/javascript, text/javascript, text/json' \
-H 'Content-Type: application/json' \
-d '{
"type" : "ALERTS"
}'
Python (requests
)
import requests
url = "https://app.matatika.com:443/api/subscriptions/49c5a333-b7f5-47b9-8459-1732b294b6d3"
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" : "49c5a333-b7f5-47b9-8459-1732b294b6d3",
"created" : "2025-03-10T20:15:59.582132",
"lastModified" : "2025-03-10T20:15:59.776090033",
"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://app.matatika.com/api/subscriptions/49c5a333-b7f5-47b9-8459-1732b294b6d3"
},
"delete subscription" : {
"href" : "https://app.matatika.com/api/subscriptions/49c5a333-b7f5-47b9-8459-1732b294b6d3",
"type" : "DELETE"
},
"update subscription" : {
"href" : "https://app.matatika.com/api/subscriptions/49c5a333-b7f5-47b9-8459-1732b294b6d3",
"type" : "PUT"
},
"channel" : {
"href" : "https://app.matatika.com/api/channels/8ff6c1d4-a848-46dd-b013-2c7712d13e2e"
}
}
}
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://app.matatika.com:443/api/subscriptions/49c5a333-b7f5-47b9-8459-1732b294b6d3' -i -X DELETE \
-H 'Accept: application/json, application/javascript, text/javascript, text/json' \
-H 'Content-Type: application/json'
Python (requests
)
import requests
url = "https://app.matatika.com:443/api/subscriptions/49c5a333-b7f5-47b9-8459-1732b294b6d3"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("DELETE", url, headers=headers)
print(response.text.encode('utf8'))
Response
204 No Content
No response body provided.