Get your copy backlog programatically.
https://console-api.atom-data.io/api/external/v1/copybacklog/:target_id/:schema_name/:table_name/?key=<api key>
- target_id (path): the id (hash) of the target that contains that table you wish to get backlog metrics on.
- schema_name (path): the name of the Redshift schema containing the table to get backlog metrics on.
- table_name (path): the name of the table to get backlog metrics on.
- key (query string): api key for the operation
curl:
curl -X GET -H "Content-Type: application/json" "https://console-api.atom-data.io/api/external/v1/copybacklog/<target_id>/public/contact_key?key=<api key>"
response:
{
"ApproxNumberOfMessages": "266", // number of messages in the queue
"ApproximateNumberOfMessagesNotVisible": "0" // number of messages "in flight", currently working on
}
python:
import requests
url = "https://console-api.atom-data.io/api/external/v1/copybacklog/<target id>/public/contact_key"
querystring = {"key":"<key>"}
headers = {
'content-type': "application/json",
}
response = requests.request("GET", url, headers=headers, params=querystring)
print(response.text)