ElectroNeek Documentation

Diese Seite wurde noch nicht ins Deutsche übersetzt und wird daher auf Englisch angezeigt.

Update Schedule

This updates a schedule. Only the fields you send change, and the next run is recalculated. Requires permission to edit schedules.


patchhttps://api.{region}.electroneek.com/v1/orchestrator/schedule/{id}

Mögliche Werte für {region}: na, cis, apac, latam, emea

Ausprobieren

Wird direkt von Ihrem Browser an die API gesendet – nichts läuft über diese Website, und das API-Token bleibt nur in diesem Tab.
Pfadparameter
Füllen Sie id aus, um diese Anfrage zu senden.
cURL
curl --request PATCH \
  --url 'https://api.na.electroneek.com/v1/orchestrator/schedule/{id}' \
  --header 'Content-Type: application/json' \
  --data '{"type": "direct","timezoneLocation": "","params": {"directDateTime": "2099-10-07T09:30:00","period": "hourly","hours": 0,"minutes": 0,"seconds": 0,"dayOfWeek": [0],"dayNumber": [""],"restriction": {"excludeDays": {"isEnabled": false,"value": [0]},"rangeStart": {"isEnabled": false,"value": {"hours": 0,"minutes": 0}},"rangeEnd": {"isEnabled": false,"value": {"hours": 0,"minutes": 0}}}},"isActive": false,"botRunner": {"robotId": "","busyPolicy": "queue","offlinePolicy": "fallback","displayName": ""}}'

Authentifizierung

Verwenden Sie ein API-Token von der Seite Orchestrator → Integrationen. Senden Sie es als Bearer-Token: Authorization: Bearer <token>.

Pfadparameter

NameTypErforderlichBeschreibung
idstringjaSchedule ID

Request-Body

NameTypErforderlichBeschreibung
typestring (direct, repeatable)nein`direct` runs once, `repeatable` runs on a recurring period
timezoneLocationstringneinIANA time zone, such as `America/Sao_Paulo`
paramsobjectneinWhen the schedule runs. For a `direct` (one-time) schedule, send only `directDateTime`. For a `repeatable` schedule, send `period` and the fields that period uses: * `hourly`: `minutes`, optional `restriction` * `daily`: `hours`, `minutes`, optional `restriction` * `weekly`: `dayOfWeek`, `hours`, `minutes` * `monthly`: `dayNumber`, `hours`, `minutes` * `custom`: `hours` (0 to 1000), `minutes`, `seconds`, optional `restriction`. Repeats at this interval, counted from when the schedule was created.
isActivebooleanneinWhether the schedule is enabled
botRunnerobject · nullableneinThe Bot Runner that runs this schedule. `null` uses the workflow's Bot Runner selection.

Antwort

200OK
Response-Body
object
idstring

Schedule ID

workflow_idstring

ID of the workflow the schedule launches

typestring (direct, repeatable)

direct runs once, repeatable runs on a recurring period

timezoneLocationstring

IANA time zone, such as America/Sao_Paulo

paramsobject

When the schedule runs. For a direct (one-time) schedule, send only directDateTime. For a repeatable schedule, send period and the fields that period uses:

  • hourly: minutes, optional restriction
  • daily: hours, minutes, optional restriction
  • weekly: dayOfWeek, hours, minutes
  • monthly: dayNumber, hours, minutes
  • custom: hours (0 to 1000), minutes, seconds, optional restriction. Repeats at this interval, counted from when the schedule was created.
object
directDateTimestring

One-time schedules only. Local date and time in timezoneLocation, formatted YYYY-MM-DDTHH:mm:ss, without a UTC offset or Z.

periodstring (hourly, daily, weekly, monthly, custom)

Repeatable schedules only.

hoursinteger

0 to 23 (0 to 1000 for custom).

minutesinteger
secondsinteger

custom only.

dayOfWeekarray of integer

weekly only. One-element array, 0 = Sunday to 6 = Saturday.

integer
dayNumberarray of string

monthly only. One-element array with "1" to "31" or "last".

string
restrictionobject

Optional limits for hourly, daily and custom schedules. Disabled restrictions are ignored.

object
excludeDaysobject

Weekdays when the schedule doesn't run (0 = Sunday to 6 = Saturday). Excluding all seven days is rejected. Hourly, daily and custom schedules.

object
isEnabledboolean
valuearray of integer
integer
rangeStartobject

Start of the allowed daily time window. Hourly and custom schedules. Must be earlier than rangeEnd.

object
isEnabledboolean
valueobject
object
hoursinteger
minutesinteger
rangeEndobject

End of the allowed daily time window. Hourly and custom schedules.

object
isEnabledboolean
valueobject
object
hoursinteger
minutesinteger
isActiveboolean

Whether the schedule is enabled

botRunnerobject · nullable

The Bot Runner that runs this schedule. null uses the workflow's Bot Runner selection.

object
robotIdstringerforderlich

ID of a Bot Runner assigned to the workflow. An unassigned Bot Runner is rejected with 400.

busyPolicystring (queue, cancel)erforderlich

If the Bot Runner is busy: queue waits for it, cancel cancels this occurrence.

offlinePolicystring (fallback, cancel)erforderlich

If the Bot Runner is offline: fallback uses another assigned Bot Runner, cancel cancels this occurrence.

displayNamestring

Bot Runner name, set by the server.

accountEmailstring

Email of the account that created the schedule

statusstring (completed, completed-with-errors)

Result of the last execution. null before the first one.

nextRundate-time · nullable

Next occurrence, in UTC. Also calculated for disabled schedules, so check isActive.

lastRundate-time · nullable

Last execution, in UTC

lastErrorstring · nullable

Error of the last execution, if any

Beispielantwort
{
  "id": "663d9083ea1ba2debc1c410f",
  "workflow_id": "663d9083ea1ba2debc1c410d",
  "type": "direct",
  "timezoneLocation": "America/Sao_Paulo",
  "params": {
    "directDateTime": "2099-10-07T09:30:00"
  },
  "isActive": false,
  "botRunner": null,
  "accountEmail": "api-issuer@example.com",
  "status": null,
  "nextRun": "2099-10-07T12:30:00.000Z",
  "lastRun": null,
  "lastError": null
}
400Invalid ID or schedule parameters, or a Bot Runner that isn't assigned to the workflow

Kein Response-Body.

401Missing or invalid API key

Kein Response-Body.

403The API key's user lacks the required permission

Kein Response-Body.

404Workflow or schedule not found in this Orchestrator

Kein Response-Body.

Aktualisiert