v3

latestOpenAPI 3.1.2Apache 2.02026-07-31231237972.0 KB
Schedules

Create schedule

Creates a new schedule with settings provided by the schedule object passed as JSON in the payload. The response is the created schedule object.

The request needs to specify the Content-Type: application/json HTTP header!

When providing your API authentication token, we recommend using the request's Authorization header, rather than the URL. (More info).

post/v2/schedules

Request body

namestring nullable
isEnabledboolean nullable
isExclusiveboolean nullable
cronExpressionstring nullable
timezonestring nullable
descriptionstring nullable
titlestring nullable

Example request

{
  "name": "my-schedule",
  "isEnabled": true,
  "isExclusive": true,
  "cronExpression": "* * * * *",
  "timezone": "UTC",
  "description": "Schedule of actor ...",
  "actions": [
    {
      "actorId": "jF8GGEvbEg4Au3NLA",
      "runInput": {
        "body": "{\\n   \"foo\": \"actor\"\\n}",
        "contentType": "application/json; charset=utf-8"
      },
      "runOptions": {
        "build": "latest",
        "timeoutSecs": 300,
        "memoryMbytes": 1024,
        "maxItems": 1000,
        "maxTotalChargeUsd": 5
      }
    }
  ]
}

Response

Example response

{
  "data": {
    "id": "asdLZtadYvn4mBZmm",
    "userId": "wRsJZtadYvn4mBZmm",
    "name": "my-schedule",
    "cronExpression": "* * * * *",
    "timezone": "UTC",
    "isEnabled": true,
    "isExclusive": true,
    "createdAt": "2019-12-12T07:34:14.202Z",
    "modifiedAt": "2019-12-20T06:33:11.202Z",
    "nextRunAt": "2019-04-12T07:34:10.202Z",
    "lastRunAt": "2019-04-12T07:33:10.202Z",
    "description": "Schedule of actor ...",
    "notifications": {
      "email": true
    },
    "actions": [
      {
        "id": "c6KfSgoQzFhMk3etc",
        "actorId": "jF8GGEvbEg4Au3NLA",
        "runInput": {
          "body": "{\\n   \"foo\": \"actor\"\\n}",
          "contentType": "application/json; charset=utf-8"
        },
        "runOptions": {
          "build": "latest",
          "timeoutSecs": 300,
          "memoryMbytes": 1024,
          "maxItems": 1000,
          "maxTotalChargeUsd": 5
        }
      }
    ]
  }
}