VirtuousAI
Reference

Scheduling

Cron Preview

POST
/api/v1/scheduling/cron-preview

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Request Body

application/json

count?integer
Default5
cronExpression*string
timezone?string
Default"UTC"

Response Body

application/json

application/json

curl -X POST "https://loading/api/v1/scheduling/cron-preview" \  -H "Content-Type: application/json" \  -d '{    "cronExpression": "string"  }'
{
  "nextRuns": [
    "2019-08-24T14:15:22Z"
  ]
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

List Schedules

GET
/api/v1/scheduling/schedules

Query Parameters

task_id?|
enabled?|

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/scheduling/schedules"
{
  "schedules": [
    {
      "context": {},
      "createdAt": "2019-08-24T14:15:22Z",
      "createdBy": "25a02396-1048-48f9-bf93-102d2fb7895e",
      "cronExpression": "string",
      "enabled": true,
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "lastRunAt": "2019-08-24T14:15:22Z",
      "lastRunId": "729b3d52-1129-42f2-a449-e698e495bcd0",
      "missedRuns": 0,
      "name": "string",
      "nextRunAt": "2019-08-24T14:15:22Z",
      "runAsUserId": "a4510952-86a1-41ff-979e-1123a1fb433f",
      "taskId": "e6e9d88a-9b63-468a-aec3-b7a11de27af8",
      "tenantId": "f97df110-f4de-492e-8849-4a6af68026b0",
      "timezone": "string",
      "updatedAt": "2019-08-24T14:15:22Z"
    }
  ]
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Create Schedule

POST
/api/v1/scheduling/schedules

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Request Body

application/json

context?
Default{}
cronExpression*string
enabled?boolean
Defaulttrue
name*string
taskId*string
Formatuuid
timezone?string
Default"UTC"

Response Body

application/json

application/json

curl -X POST "https://loading/api/v1/scheduling/schedules" \  -H "Content-Type: application/json" \  -d '{    "cronExpression": "string",    "name": "string",    "taskId": "e6e9d88a-9b63-468a-aec3-b7a11de27af8"  }'
{
  "context": {},
  "createdAt": "2019-08-24T14:15:22Z",
  "createdBy": "25a02396-1048-48f9-bf93-102d2fb7895e",
  "cronExpression": "string",
  "enabled": true,
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "lastRunAt": "2019-08-24T14:15:22Z",
  "lastRunId": "729b3d52-1129-42f2-a449-e698e495bcd0",
  "missedRuns": 0,
  "name": "string",
  "nextRunAt": "2019-08-24T14:15:22Z",
  "runAsUserId": "a4510952-86a1-41ff-979e-1123a1fb433f",
  "taskId": "e6e9d88a-9b63-468a-aec3-b7a11de27af8",
  "tenantId": "f97df110-f4de-492e-8849-4a6af68026b0",
  "timezone": "string",
  "updatedAt": "2019-08-24T14:15:22Z"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Get Schedule

GET
/api/v1/scheduling/schedules/{schedule_id}

Path Parameters

schedule_id*string
Formatuuid

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/scheduling/schedules/497f6eca-6276-4993-bfeb-53cbbbba6f08"
{
  "context": {},
  "createdAt": "2019-08-24T14:15:22Z",
  "createdBy": "25a02396-1048-48f9-bf93-102d2fb7895e",
  "cronExpression": "string",
  "enabled": true,
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "lastRunAt": "2019-08-24T14:15:22Z",
  "lastRunId": "729b3d52-1129-42f2-a449-e698e495bcd0",
  "missedRuns": 0,
  "name": "string",
  "nextRunAt": "2019-08-24T14:15:22Z",
  "runAsUserId": "a4510952-86a1-41ff-979e-1123a1fb433f",
  "taskId": "e6e9d88a-9b63-468a-aec3-b7a11de27af8",
  "tenantId": "f97df110-f4de-492e-8849-4a6af68026b0",
  "timezone": "string",
  "updatedAt": "2019-08-24T14:15:22Z"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Update Schedule

PATCH
/api/v1/scheduling/schedules/{schedule_id}

Path Parameters

schedule_id*string
Formatuuid

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Request Body

application/json

context?|
cronExpression?|
enabled?|
name?|
timezone?|

Response Body

application/json

application/json

curl -X PATCH "https://loading/api/v1/scheduling/schedules/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{}'
{
  "context": {},
  "createdAt": "2019-08-24T14:15:22Z",
  "createdBy": "25a02396-1048-48f9-bf93-102d2fb7895e",
  "cronExpression": "string",
  "enabled": true,
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "lastRunAt": "2019-08-24T14:15:22Z",
  "lastRunId": "729b3d52-1129-42f2-a449-e698e495bcd0",
  "missedRuns": 0,
  "name": "string",
  "nextRunAt": "2019-08-24T14:15:22Z",
  "runAsUserId": "a4510952-86a1-41ff-979e-1123a1fb433f",
  "taskId": "e6e9d88a-9b63-468a-aec3-b7a11de27af8",
  "tenantId": "f97df110-f4de-492e-8849-4a6af68026b0",
  "timezone": "string",
  "updatedAt": "2019-08-24T14:15:22Z"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Delete Schedule

DELETE
/api/v1/scheduling/schedules/{schedule_id}

Path Parameters

schedule_id*string
Formatuuid

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Response Body

application/json

curl -X DELETE "https://loading/api/v1/scheduling/schedules/497f6eca-6276-4993-bfeb-53cbbbba6f08"
Empty
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Trigger Schedule

POST
/api/v1/scheduling/schedules/{schedule_id}/run

Path Parameters

schedule_id*string
Formatuuid

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Response Body

application/json

application/json

curl -X POST "https://loading/api/v1/scheduling/schedules/497f6eca-6276-4993-bfeb-53cbbbba6f08/run"
{
  "property1": "string",
  "property2": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}