Alerts
Alerts can be created by users on datasets. These alerts can then be used to inform users of information related to that dataset.
Requests
Initialise an alert on a dataset
POST /datasets/{dataset-id}/alerts
Initialises a new alert on a dataset.
Prerequisites
- The authenticated user must own a Meltano Cloud account
Examples
- cURL
- Python (requests)
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.meltano.com:443/api/datasets/f9417138-034a-4b61-80c2-dea88a46eb2f/alerts' -i -X POST \
-H 'Content-Type: application/json'
import requests
url = "https://app.meltano.com:443/api/datasets/f9417138-034a-4b61-80c2-dea88a46eb2f/alerts"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("POST", url, headers=headers)
print(response.text.encode('utf8'))
Response
200 OK
Example response body
Create an alert on a dataset
PUT /datasets/{dataset-id}/alerts/{alert-id}
Create a new alert on a dataset.
Prerequisites
- The authenticated user must own a Meltano Cloud account
Examples
- cURL
- Python (requests)
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.meltano.com:443/api/datasets/f9417138-034a-4b61-80c2-dea88a46eb2f/alerts/727fba7a-cebe-40f3-abe9-db9a04a16e91' -i -X PUT \
-H 'Content-Type: application/json' \
-d '{
"detail" : "New dataset alert"
}'
import requests
url = "https://app.meltano.com:443/api/datasets/f9417138-034a-4b61-80c2-dea88a46eb2f/alerts/727fba7a-cebe-40f3-abe9-db9a04a16e91"
data = {
"detail" : "New dataset alert"
}
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("PUT", url, headers=headers, data=data)
print(response.text.encode('utf8'))
Response
201 Created
Example response body
View alerts on a dataset
GET /datasets/{dataset-id}/alerts
View alerts on a dataset.
Prerequisites
- The authenticated user must own a Meltano Cloud account
Examples
- cURL
- Python (requests)
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.meltano.com:443/api/datasets/f9417138-034a-4b61-80c2-dea88a46eb2f/alerts' -i -X GET
import requests
url = "https://app.meltano.com:443/api/datasets/f9417138-034a-4b61-80c2-dea88a46eb2f/alerts"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("GET", url, headers=headers)
print(response.text.encode('utf8'))
Response
200 OK
Example response body
View an alert
GET /alerts/{alert-id}
View an alert.
Prerequisites
- The authenticated user must own a Meltano Cloud account
Examples
- cURL
- Python (requests)
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.meltano.com:443/api/alerts/727fba7a-cebe-40f3-abe9-db9a04a16e91' -i -X GET
import requests
url = "https://app.meltano.com:443/api/alerts/727fba7a-cebe-40f3-abe9-db9a04a16e91"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("GET", url, headers=headers)
print(response.text.encode('utf8'))
Response
200 OK