Create a scheduled agentic automation
import requests
url = "https://api.datagrid.com/v1/agentic-automations/scheduled"
payload = {
"agent_id": "<string>",
"name": "<string>",
"cron": "0 9 * * 1",
"description": "<string>",
"enabled": True,
"timezone": "America/New_York"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent_id: '<string>',
name: '<string>',
cron: '0 9 * * 1',
description: '<string>',
enabled: true,
timezone: 'America/New_York'
})
};
fetch('https://api.datagrid.com/v1/agentic-automations/scheduled', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.datagrid.com/v1/agentic-automations/scheduled \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agent_id": "<string>",
"name": "<string>",
"cron": "0 9 * * 1",
"description": "<string>",
"enabled": true,
"timezone": "America/New_York"
}
'{
"object": "agentic_automation",
"id": "<string>",
"kind": "scheduled",
"agent_id": "<string>",
"name": "<string>",
"description": "<string>",
"enabled": true,
"output_channel_type": "<string>",
"output_channel_id": "<string>",
"creator_user_id": "<string>",
"last_updated_by_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"last_run_at": "2023-11-07T05:31:56Z",
"scheduled": {
"cron": "0 9 * * 1",
"cron_description": "<string>",
"timezone": "UTC",
"thread_mode": "<string>",
"destination_type": "<string>",
"destination_id": "<string>"
},
"app_event": {}
}{
"status_code": 123,
"error": "rate_limit_exceeded",
"message": "<string>",
"retryable": true,
"statusCode": 123,
"mitigation": "<string>",
"details": {
"reason": "<string>"
}
}Agentic Automations
Create a scheduled agentic automation
Create a scheduled automation for an agent. The automation fires on the given cron schedule and runs the agent. agent_id is in the body. Schedules must fire at most once every 15 minutes.
POST
/
agentic-automations
/
scheduled
Create a scheduled agentic automation
import requests
url = "https://api.datagrid.com/v1/agentic-automations/scheduled"
payload = {
"agent_id": "<string>",
"name": "<string>",
"cron": "0 9 * * 1",
"description": "<string>",
"enabled": True,
"timezone": "America/New_York"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent_id: '<string>',
name: '<string>',
cron: '0 9 * * 1',
description: '<string>',
enabled: true,
timezone: 'America/New_York'
})
};
fetch('https://api.datagrid.com/v1/agentic-automations/scheduled', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.datagrid.com/v1/agentic-automations/scheduled \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agent_id": "<string>",
"name": "<string>",
"cron": "0 9 * * 1",
"description": "<string>",
"enabled": true,
"timezone": "America/New_York"
}
'{
"object": "agentic_automation",
"id": "<string>",
"kind": "scheduled",
"agent_id": "<string>",
"name": "<string>",
"description": "<string>",
"enabled": true,
"output_channel_type": "<string>",
"output_channel_id": "<string>",
"creator_user_id": "<string>",
"last_updated_by_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"last_run_at": "2023-11-07T05:31:56Z",
"scheduled": {
"cron": "0 9 * * 1",
"cron_description": "<string>",
"timezone": "UTC",
"thread_mode": "<string>",
"destination_type": "<string>",
"destination_id": "<string>"
},
"app_event": {}
}{
"status_code": 123,
"error": "rate_limit_exceeded",
"message": "<string>",
"retryable": true,
"statusCode": 123,
"mitigation": "<string>",
"details": {
"reason": "<string>"
}
}Authorizations
Body
application/json
Response
Created automation