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" : "53fe38f4-327f-4ebd-a860-033732bde929",
"created" : "2024-12-16T10:01:38.832179",
"lastModified" : "2024-12-16T10:01:38.832179",
"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/53fe38f4-327f-4ebd-a860-033732bde929"
},
"delete subscription" : {
"href" : "https://app.matatika.com/api/subscriptions/53fe38f4-327f-4ebd-a860-033732bde929",
"type" : "DELETE"
},
"update subscription" : {
"href" : "https://app.matatika.com/api/subscriptions/53fe38f4-327f-4ebd-a860-033732bde929",
"type" : "PUT"
},
"channel" : {
"href" : "https://app.matatika.com/api/channels/c4515512-c6fc-4ed3-81c0-0df2a989f444"
}
}
}
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/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/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" : "53fe38f4-327f-4ebd-a860-033732bde929",
"created" : "2024-12-16T10:01:38.832179",
"lastModified" : "2024-12-16T10:01:39.165555",
"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/53fe38f4-327f-4ebd-a860-033732bde929"
},
"delete subscription" : {
"href" : "https://app.matatika.com/api/subscriptions/53fe38f4-327f-4ebd-a860-033732bde929",
"type" : "DELETE"
},
"update subscription" : {
"href" : "https://app.matatika.com/api/subscriptions/53fe38f4-327f-4ebd-a860-033732bde929",
"type" : "PUT"
},
"channel" : {
"href" : "https://app.matatika.com/api/channels/c4515512-c6fc-4ed3-81c0-0df2a989f444"
}
}
}, {
"id" : "4ab239c1-c63d-438e-b8ca-b5b366c38372",
"created" : "2024-12-16T10:01:45.784025",
"lastModified" : "2024-12-16T10:01:45.784026",
"type" : "ALL",
"_embedded" : {
"subscriberProfile" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"pipeline" : {
"id" : "dbcfec47-0b90-47fc-9ec9-e50c5fcdffca",
"name" : "SIT-generated pipeline",
"lastModified" : "2024-12-16T10:01:40.469144"
}
},
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/subscriptions/4ab239c1-c63d-438e-b8ca-b5b366c38372"
},
"delete subscription" : {
"href" : "https://app.matatika.com/api/subscriptions/4ab239c1-c63d-438e-b8ca-b5b366c38372",
"type" : "DELETE"
},
"update subscription" : {
"href" : "https://app.matatika.com/api/subscriptions/4ab239c1-c63d-438e-b8ca-b5b366c38372",
"type" : "PUT"
},
"pipeline" : {
"href" : "https://app.matatika.com/api/pipelines/dbcfec47-0b90-47fc-9ec9-e50c5fcdffca"
}
}
}, {
"id" : "70f53d07-21ea-4159-ae80-2192f6deb433",
"created" : "2024-12-16T10:01:39.855702",
"lastModified" : "2024-12-16T10:01:39.855702",
"type" : "ALL",
"_embedded" : {
"subscriberProfile" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"dataset" : {
"id" : "b3ba8199-74ea-4763-8a4a-6b7199a34b39",
"published" : "2024-12-16T10:01:32.905855",
"alias" : "simple-bar-chart",
"workspaceId" : "dc027c9a-9693-4fd7-af68-16b8396ccbe0",
"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-12-16T10:01:32.905855",
"score" : 1.0
}
},
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/subscriptions/70f53d07-21ea-4159-ae80-2192f6deb433"
},
"delete subscription" : {
"href" : "https://app.matatika.com/api/subscriptions/70f53d07-21ea-4159-ae80-2192f6deb433",
"type" : "DELETE"
},
"update subscription" : {
"href" : "https://app.matatika.com/api/subscriptions/70f53d07-21ea-4159-ae80-2192f6deb433",
"type" : "PUT"
},
"dataset" : {
"href" : "https://app.matatika.com/api/datasets/b3ba8199-74ea-4763-8a4a-6b7199a34b39"
}
}
} ]
},
"_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/api/workspaces/dc027c9a-9693-4fd7-af68-16b8396ccbe0/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/api/workspaces/dc027c9a-9693-4fd7-af68-16b8396ccbe0/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" : "70e8f7bf-b021-4afd-a0ec-bc931e9862ed",
"created" : "2024-12-16T10:01:46.134878",
"lastModified" : "2024-12-16T10:01:46.134878",
"type" : "ALL",
"_embedded" : {
"subscriberWorkspace" : {
"id" : "dc027c9a-9693-4fd7-af68-16b8396ccbe0",
"name" : "Test Workspace [2024-12-16T10:01:32.582399177]"
},
"workspace" : {
"id" : "dc027c9a-9693-4fd7-af68-16b8396ccbe0",
"name" : "Test Workspace [2024-12-16T10:01:32.582399177]"
}
},
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/subscriptions/70e8f7bf-b021-4afd-a0ec-bc931e9862ed"
},
"update subscription" : {
"href" : "https://app.matatika.com/api/subscriptions/70e8f7bf-b021-4afd-a0ec-bc931e9862ed",
"type" : "PUT"
},
"delete subscription" : {
"href" : "https://app.matatika.com/api/subscriptions/70e8f7bf-b021-4afd-a0ec-bc931e9862ed",
"type" : "DELETE"
},
"workspace" : {
"href" : "https://app.matatika.com/api/workspaces/dc027c9a-9693-4fd7-af68-16b8396ccbe0"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/workspaces/dc027c9a-9693-4fd7-af68-16b8396ccbe0/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/api/subscriptions/53fe38f4-327f-4ebd-a860-033732bde929' -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/api/subscriptions/53fe38f4-327f-4ebd-a860-033732bde929"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("GET", url, headers=headers)
print(response.text.encode('utf8'))
Response
200 OK
Subscription with HAL links.
{
"id" : "53fe38f4-327f-4ebd-a860-033732bde929",
"created" : "2024-12-16T10:01:38.832179",
"lastModified" : "2024-12-16T10:01:38.832179",
"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/53fe38f4-327f-4ebd-a860-033732bde929"
},
"delete subscription" : {
"href" : "https://app.matatika.com/api/subscriptions/53fe38f4-327f-4ebd-a860-033732bde929",
"type" : "DELETE"
},
"update subscription" : {
"href" : "https://app.matatika.com/api/subscriptions/53fe38f4-327f-4ebd-a860-033732bde929",
"type" : "PUT"
},
"channel" : {
"href" : "https://app.matatika.com/api/channels/c4515512-c6fc-4ed3-81c0-0df2a989f444"
}
}
}
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/api/workspaces/dc027c9a-9693-4fd7-af68-16b8396ccbe0/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/api/workspaces/dc027c9a-9693-4fd7-af68-16b8396ccbe0/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" : "70e8f7bf-b021-4afd-a0ec-bc931e9862ed",
"created" : "2024-12-16T10:01:46.134877898",
"lastModified" : "2024-12-16T10:01:46.134878198",
"type" : "ALL",
"_embedded" : {
"subscriberWorkspace" : {
"id" : "dc027c9a-9693-4fd7-af68-16b8396ccbe0",
"name" : "Test Workspace [2024-12-16T10:01:32.582399177]"
},
"workspace" : {
"id" : "dc027c9a-9693-4fd7-af68-16b8396ccbe0",
"name" : "Test Workspace [2024-12-16T10:01:32.582399177]"
}
},
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/subscriptions/70e8f7bf-b021-4afd-a0ec-bc931e9862ed"
},
"update subscription" : {
"href" : "https://app.matatika.com/api/subscriptions/70e8f7bf-b021-4afd-a0ec-bc931e9862ed",
"type" : "PUT"
},
"delete subscription" : {
"href" : "https://app.matatika.com/api/subscriptions/70e8f7bf-b021-4afd-a0ec-bc931e9862ed",
"type" : "DELETE"
},
"workspace" : {
"href" : "https://app.matatika.com/api/workspaces/dc027c9a-9693-4fd7-af68-16b8396ccbe0"
}
}
}
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/api/channels/c4515512-c6fc-4ed3-81c0-0df2a989f444/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/api/channels/c4515512-c6fc-4ed3-81c0-0df2a989f444/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" : "53fe38f4-327f-4ebd-a860-033732bde929",
"created" : "2024-12-16T10:01:38.832178861",
"lastModified" : "2024-12-16T10:01:38.832179161",
"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/53fe38f4-327f-4ebd-a860-033732bde929"
},
"delete subscription" : {
"href" : "https://app.matatika.com/api/subscriptions/53fe38f4-327f-4ebd-a860-033732bde929",
"type" : "DELETE"
},
"update subscription" : {
"href" : "https://app.matatika.com/api/subscriptions/53fe38f4-327f-4ebd-a860-033732bde929",
"type" : "PUT"
},
"channel" : {
"href" : "https://app.matatika.com/api/channels/c4515512-c6fc-4ed3-81c0-0df2a989f444"
}
}
}
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/api/datasets/b3ba8199-74ea-4763-8a4a-6b7199a34b39/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/api/datasets/b3ba8199-74ea-4763-8a4a-6b7199a34b39/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" : "70f53d07-21ea-4159-ae80-2192f6deb433",
"created" : "2024-12-16T10:01:39.855701914",
"lastModified" : "2024-12-16T10:01:39.855702214",
"type" : "ALL",
"_embedded" : {
"subscriberProfile" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"dataset" : {
"id" : "b3ba8199-74ea-4763-8a4a-6b7199a34b39",
"published" : "2024-12-16T10:01:32.905855",
"alias" : "simple-bar-chart",
"workspaceId" : "dc027c9a-9693-4fd7-af68-16b8396ccbe0",
"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-12-16T10:01:32.905855",
"score" : 1.0
}
},
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/subscriptions/70f53d07-21ea-4159-ae80-2192f6deb433"
},
"delete subscription" : {
"href" : "https://app.matatika.com/api/subscriptions/70f53d07-21ea-4159-ae80-2192f6deb433",
"type" : "DELETE"
},
"update subscription" : {
"href" : "https://app.matatika.com/api/subscriptions/70f53d07-21ea-4159-ae80-2192f6deb433",
"type" : "PUT"
},
"dataset" : {
"href" : "https://app.matatika.com/api/datasets/b3ba8199-74ea-4763-8a4a-6b7199a34b39"
}
}
}
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/api/pipelines/dbcfec47-0b90-47fc-9ec9-e50c5fcdffca/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/api/pipelines/dbcfec47-0b90-47fc-9ec9-e50c5fcdffca/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" : "4ab239c1-c63d-438e-b8ca-b5b366c38372",
"created" : "2024-12-16T10:01:45.784025363",
"lastModified" : "2024-12-16T10:01:45.784025663",
"type" : "ALL",
"_embedded" : {
"subscriberProfile" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"pipeline" : {
"id" : "dbcfec47-0b90-47fc-9ec9-e50c5fcdffca",
"name" : "SIT-generated pipeline",
"lastModified" : "2024-12-16T10:01:40.469144"
}
},
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/subscriptions/4ab239c1-c63d-438e-b8ca-b5b366c38372"
},
"delete subscription" : {
"href" : "https://app.matatika.com/api/subscriptions/4ab239c1-c63d-438e-b8ca-b5b366c38372",
"type" : "DELETE"
},
"update subscription" : {
"href" : "https://app.matatika.com/api/subscriptions/4ab239c1-c63d-438e-b8ca-b5b366c38372",
"type" : "PUT"
},
"pipeline" : {
"href" : "https://app.matatika.com/api/pipelines/dbcfec47-0b90-47fc-9ec9-e50c5fcdffca"
}
}
}
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://app.matatika.com/api/subscriptions/53fe38f4-327f-4ebd-a860-033732bde929' -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/api/subscriptions/53fe38f4-327f-4ebd-a860-033732bde929"
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" : "53fe38f4-327f-4ebd-a860-033732bde929",
"created" : "2024-12-16T10:01:38.832179",
"lastModified" : "2024-12-16T10:01:39.165555278",
"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/53fe38f4-327f-4ebd-a860-033732bde929"
},
"delete subscription" : {
"href" : "https://app.matatika.com/api/subscriptions/53fe38f4-327f-4ebd-a860-033732bde929",
"type" : "DELETE"
},
"update subscription" : {
"href" : "https://app.matatika.com/api/subscriptions/53fe38f4-327f-4ebd-a860-033732bde929",
"type" : "PUT"
},
"channel" : {
"href" : "https://app.matatika.com/api/channels/c4515512-c6fc-4ed3-81c0-0df2a989f444"
}
}
}
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/api/subscriptions/53fe38f4-327f-4ebd-a860-033732bde929' -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/api/subscriptions/53fe38f4-327f-4ebd-a860-033732bde929"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("DELETE", url, headers=headers)
print(response.text.encode('utf8'))
Response
204 No Content
No response body provided.