Create an agent task (ai.manage and organisation admin)
import requests
url = "https://platform.ankra.app/api/v1/org/ai-tasks"
payload = {
"name": "<string>",
"goal_prompt": "<string>",
"trigger": {
"cron_expression": "<string>",
"timezone": "<string>",
"alert_id": "<string>",
"purpose": "<string>",
"application_id": "<string>",
"branch": "<string>"
}
}
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({
name: '<string>',
goal_prompt: '<string>',
trigger: {
cron_expression: '<string>',
timezone: '<string>',
alert_id: '<string>',
purpose: '<string>',
application_id: '<string>',
branch: '<string>'
}
})
};
fetch('https://platform.ankra.app/api/v1/org/ai-tasks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/ai-tasks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"goal_prompt": "<string>",
"trigger": {
"cron_expression": "<string>",
"timezone": "<string>",
"alert_id": "<string>",
"purpose": "<string>",
"application_id": "<string>",
"branch": "<string>"
}
}
'{
"name": "<string>",
"goal_prompt": "<string>",
"trigger": {
"kind": "mission",
"cron_expression": "<string>",
"timezone": "<string>",
"alert_id": "<string>",
"purpose": "<string>",
"application_id": "<string>",
"branch": "<string>"
},
"tool_profile": "read_only",
"autonomy_level": "read_only",
"enabled": true,
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"budget": {
"max_runs_per_day": 123,
"max_tool_calls": 123,
"max_write_actions": 123,
"max_turns": 123,
"max_runtime_minutes": 123,
"max_tokens_per_day": 123,
"tier_overrides": {}
},
"model_mode": "<string>",
"board_worker": true,
"acts_as_service_principal": true,
"capabilities": {},
"next_run_at": "2023-11-07T05:31:56Z",
"last_run_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"template_id": "<string>",
"template_version": 123,
"template_current_version": 123,
"template_customised": true,
"can_work_board": true,
"cannot_work_board_reason": "<string>",
"latest_run": {}
}AI Management
Create an agent task (ai.manage and organisation admin)
POST
/
api
/
v1
/
org
/
ai-tasks
Create an agent task (ai.manage and organisation admin)
import requests
url = "https://platform.ankra.app/api/v1/org/ai-tasks"
payload = {
"name": "<string>",
"goal_prompt": "<string>",
"trigger": {
"cron_expression": "<string>",
"timezone": "<string>",
"alert_id": "<string>",
"purpose": "<string>",
"application_id": "<string>",
"branch": "<string>"
}
}
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({
name: '<string>',
goal_prompt: '<string>',
trigger: {
cron_expression: '<string>',
timezone: '<string>',
alert_id: '<string>',
purpose: '<string>',
application_id: '<string>',
branch: '<string>'
}
})
};
fetch('https://platform.ankra.app/api/v1/org/ai-tasks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/ai-tasks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"goal_prompt": "<string>",
"trigger": {
"cron_expression": "<string>",
"timezone": "<string>",
"alert_id": "<string>",
"purpose": "<string>",
"application_id": "<string>",
"branch": "<string>"
}
}
'{
"name": "<string>",
"goal_prompt": "<string>",
"trigger": {
"kind": "mission",
"cron_expression": "<string>",
"timezone": "<string>",
"alert_id": "<string>",
"purpose": "<string>",
"application_id": "<string>",
"branch": "<string>"
},
"tool_profile": "read_only",
"autonomy_level": "read_only",
"enabled": true,
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"budget": {
"max_runs_per_day": 123,
"max_tool_calls": 123,
"max_write_actions": 123,
"max_turns": 123,
"max_runtime_minutes": 123,
"max_tokens_per_day": 123,
"tier_overrides": {}
},
"model_mode": "<string>",
"board_worker": true,
"acts_as_service_principal": true,
"capabilities": {},
"next_run_at": "2023-11-07T05:31:56Z",
"last_run_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"template_id": "<string>",
"template_version": 123,
"template_current_version": 123,
"template_customised": true,
"can_work_board": true,
"cannot_work_board_reason": "<string>",
"latest_run": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Show child attributes
Show child attributes
Available options:
read_only, standard, admin Available options:
read_only, propose, auto Show child attributes
Show child attributes
Response
Success
Show child attributes
Show child attributes
Available options:
read_only, standard, admin Available options:
read_only, propose, auto Show child attributes
Show child attributes