Channels
Channels enable datasets to be categorised or grouped together. A single workspace can have multiple channels.
Objects
Channel
| Path | JSON Type | Format | Description |
|---|---|---|---|
id | string | Version 4 UUID | The channel ID |
creator | object | Member | The channel creator |
workspace | object | Workspace | The channel workspace |
created | string | ISO 8601 timestamp | The channel created at timestamp |
lastModified | string | ISO 8601 timestamp | The channel last modified timestamp |
name | string | The channel name | |
description | string | The channel description | |
picture | string | URL | The channel picture metadata |
Example response body
Requests
Initialise a channel
POST /api/channels/{channel-id}
Initialise a channel.
Examples
- cURL
- Python (requests)
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.meltano.com:443/api/workspaces/057bbf32-eaf4-4120-9579-367ab8ff4c3e/channels' -i -X POST \
-H 'Content-Type: application/json' \
-d '{ }'
import requests
url = "https://app.meltano.com:443/api/workspaces/057bbf32-eaf4-4120-9579-367ab8ff4c3e/channels"
data = { }
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("POST", url, headers=headers, data=data)
print(response.text.encode('utf8'))
Response
200 OK
Channel with HAL links.
Example response body
View a channel
GET /api/channels/{channel-id}
Returns the channel {channel-id}.
Prerequisites
- Channel
{channel-id}must exist
Examples
- cURL
- Python (requests)
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.meltano.com:443/api/channels/838278e4-abbd-44ed-8f9b-7ef5d8193e8e' -i -X GET
import requests
url = "https://app.meltano.com:443/api/channels/838278e4-abbd-44ed-8f9b-7ef5d8193e8e"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("GET", url, headers=headers)
print(response.text.encode('utf8'))
Response
200 OK
Channel with HAL links.
Example response body
View a channel in a workspace
GET /api/workspaces/{workspace-id}/channels/{channel-id}
Returns a channel in the workspace {workspace-id}.
Prerequisites
- Workspace
{workspace-id}must exist - The user must be a member of the workspace
{workspace-id}
Examples
- cURL
- Python (requests)
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.meltano.com:443/api/channels/838278e4-abbd-44ed-8f9b-7ef5d8193e8e' -i -X GET
import requests
url = "https://app.meltano.com:443/api/channels/838278e4-abbd-44ed-8f9b-7ef5d8193e8e"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("GET", url, headers=headers)
print(response.text.encode('utf8'))
Response
200 OK
Channel with HAL links.
Example response body
View all channels in a workspace
GET /api/workspaces/{workspace-id}/channels/{channel-id}?type={type}&source={source}&containsDataset={datasetId}
Returns all channels in the workspace {workspace-id}.
Prerequisites
- Workspace
{workspace-id}must exist - The user must be a member of the workspace
{workspace-id}
Query Parameters
| Parameter | Required | Format | Default Value | Description |
|---|---|---|---|---|
type | No | string | None | Return channels by types: list or source |
source | No | string | None | Return channels by source: profile or workspace |
containsDataset | No | string | None | Adds a containsDataset boolean field to all channels returning if it contains the dataset |
Examples
- cURL
- Python (requests)
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.meltano.com:443/api/workspaces/057bbf32-eaf4-4120-9579-367ab8ff4c3e/channels' -i -X GET
import requests
url = "https://app.meltano.com:443/api/workspaces/057bbf32-eaf4-4120-9579-367ab8ff4c3e/channels"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("GET", url, headers=headers)
print(response.text.encode('utf8'))
Response
200 OK
Channel collection with HAL links.
Example response body
Create or Update a channel in a workspace
PUT /api/workspaces/{workspace-id}/channels/{channel-id}
Creates or Updates a channel in the workspace {workspace-id}.
This endpoint takes a {channel-id} (UUID) and based on the supplied value and the channels that already exist in the workspace, will update or create a channel accordingly.
Prerequisites
- Workspace
{workspace-id}must exist - The user must be a admin in the workspace
{workspace-id}
Examples
- cURL
- Python (requests)
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.meltano.com:443/api/workspaces/057bbf32-eaf4-4120-9579-367ab8ff4c3e/channels/838278e4-abbd-44ed-8f9b-7ef5d8193e8e' -i -X PUT \
-H 'Content-Type: application/json' \
-d '{
"name" : "SITChannel",
"description" : "SITChannel"
}'
import requests
url = "https://app.meltano.com:443/api/workspaces/057bbf32-eaf4-4120-9579-367ab8ff4c3e/channels/838278e4-abbd-44ed-8f9b-7ef5d8193e8e"
data = {
"name" : "SITChannel",
"description" : "SITChannel"
}
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("PUT", url, headers=headers, data=data)
print(response.text.encode('utf8'))
Response
200 OK / 201 Created
Channel with HAL links.
Example response body
Delete a channel
DELETE /api/channels/{channel-id}
Delete a channel.
Prerequisites
- The user must be a admin of the workspace the channel is in.
Examples
- cURL
- Python (requests)
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.meltano.com:443/api/channels/838278e4-abbd-44ed-8f9b-7ef5d8193e8e' -i -X DELETE
import requests
url = "https://app.meltano.com:443/api/channels/838278e4-abbd-44ed-8f9b-7ef5d8193e8e"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("DELETE", url, headers=headers)
print(response.text.encode('utf8'))
Response
204 No Content
No response body provided.
View all channels in your workspace news
GET /api/channels/{channel-id}
Returns all channels in your news for the workspace.
Examples
- cURL
- Python (requests)
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.meltano.com:443/api/workspaces/057bbf32-eaf4-4120-9579-367ab8ff4c3e/news/channels' -i -X GET
import requests
url = "https://app.meltano.com:443/api/workspaces/057bbf32-eaf4-4120-9579-367ab8ff4c3e/news/channels"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("GET", url, headers=headers)
print(response.text.encode('utf8'))
Response
200 OK
Channels in your workspace news.
Example response body
Add a dataset to a list channel
PUT /api/channels/{channel-id}/datasets/{dataset-id}
Adds a dataset to a channel with type list.
Examples
- cURL
- Python (requests)
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.meltano.com:443/api/channels/85d4a9eb-7b3d-4fbf-aea4-4df117b1ffac/datasets/ac8a4b4b-d019-4038-87c0-c3214b3978b1' -i -X PUT \
-H 'Content-Type: application/json'
import requests
url = "https://app.meltano.com:443/api/channels/85d4a9eb-7b3d-4fbf-aea4-4df117b1ffac/datasets/ac8a4b4b-d019-4038-87c0-c3214b3978b1"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("PUT", url, headers=headers)
print(response.text.encode('utf8'))
Response
201 Created
No response body provided.
Remove a dataset from a list channel
DELETE /api/channels/{channel-id}/datasets/{dataset-id}
Removes a dataset from a channel with type list.
Examples
- cURL
- Python (requests)
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.meltano.com:443/api/channels/85d4a9eb-7b3d-4fbf-aea4-4df117b1ffac/datasets/ac8a4b4b-d019-4038-87c0-c3214b3978b1' -i -X DELETE
import requests
url = "https://app.meltano.com:443/api/channels/85d4a9eb-7b3d-4fbf-aea4-4df117b1ffac/datasets/ac8a4b4b-d019-4038-87c0-c3214b3978b1"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("DELETE", url, headers=headers)
print(response.text.encode('utf8'))
Response
204 No Content
No response body provided.
Add workspace scope to a channel
PUT /api/channels/{channel-id}/scope/workspace
Add workspace scope to a channel.
Examples
- cURL
- Python (requests)
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.meltano.com:443/api/channels/85d4a9eb-7b3d-4fbf-aea4-4df117b1ffac/scope/workspace' -i -X PUT \
-H 'Content-Type: application/json'
import requests
url = "https://app.meltano.com:443/api/channels/85d4a9eb-7b3d-4fbf-aea4-4df117b1ffac/scope/workspace"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("PUT", url, headers=headers)
print(response.text.encode('utf8'))
Response
200 OK
Channel with HAL links.
Example response body
Withdraw workspace scope from a channel
PUT /api/channels/{channel-id}/scope/profile
Withdraw workspace scope from a channel.
Examples
- cURL
- Python (requests)
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.meltano.com:443/api/channels/85d4a9eb-7b3d-4fbf-aea4-4df117b1ffac/scope/profile' -i -X PUT \
-H 'Content-Type: application/json'
import requests
url = "https://app.meltano.com:443/api/channels/85d4a9eb-7b3d-4fbf-aea4-4df117b1ffac/scope/profile"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("PUT", url, headers=headers)
print(response.text.encode('utf8'))
Response
200 OK
Channel with HAL links.