Scheduler Admin API
Introduction
This is the admin client API specification for the Unity Scheduler service. The Scheduler service is responsible for scheduling events to be sent to the Triggers service.
Rate Limits
The API has rate limiting in place. Request are limited on a per-user basis to 600 requests per minute which would allow for a sustained 10 requests per second.
The List endpoint is limited to 120 requests per minute, which allows for sustained 2 requests per second.
The API responds with a HTTP status code if the rate limit is exceeded.
It will also respond with a header to be used in conjunction with a client's retry logic. The value is the number of seconds until a request for the given player will be accepted.
429Retry-AfterDownload OpenAPI specification:
List Scheduler Configs
Get list of schedules for the given project and environment
Authorizations
ServiceAccount (scheduler.configs.list)
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
Required scopes: scheduler.configs.list
Path parameters for "{title}"
The project's Project ID
Code samples for "{title}":
Request example
curl -X GET \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ "https://services.api.unity.com/scheduler/v1/projects/{projectId}/environments/{environmentId}/configs"
Response example
{ "after": "eyJTZWFyY2hBZnRlciI6WzAsMSwyMl0sIlNjcm9sbElEIjoiIiwiUG9pbnRJblRpbWVJRCI6IjAwMCJ9=", "configs": [ { "id": "00000000-0000-0000-0000-000000000001", "name": "Example Recurring", "eventName": "example-event", "type": "recurring", "schedule": "0 * * * *", "payloadVersion": 1, "payload": "{}" }, { "id": "00000000-0000-0000-0000-000000000002", "name": "Example One Time", "eventName": "example-event", "type": "one-time", "schedule": "2023-10-02T15:00:00Z", "payloadVersion": 1, "payload": "{}" } ]}
Create Schedule Config
Add schedule to project environment
Authorizations
ServiceAccount (scheduler.configs.create)
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
Required scopes: scheduler.configs.create
Path parameters for "{title}"
The project's Project ID
Request body for "{title}"
Media Type:
application/jsonThe schedule event name is passed through to the triggers service as part of the event type so that the trigger event is defined as
The triggers service uses this to identify incoming events and execute the configured action.
For a trigger configuration to action an incoming event with type , it would require a value of to be passed in here.
com.unity.services.scheduler.{scheduleEventName}.v1com.unity.services.scheduler.example-event.v1example-eventAny of
ScheduleTypeRecurring
Defines when the planned event should occur.
If the schedule config has a type of this field must have a valid RFC3339 timestamp.
If the schedule config has a type of this field must have a valid cron expression as per below:
one-timerecurringField name | Allowed values | Allowed special characters |
|---|---|---|
| Minutes | 0-59 | * / , - |
| Hours | 0-23 | * / , - |
| Day of month | 1-31 | * / , - |
| Month | 1-12 or JAN-DEC | * / , - |
| Day of week | 0-6 or SUN-SAT | * / , - |
Recurring schedules have a minimum scheduled frequency of once per hour.
Code samples for "{title}":
Request example
curl -X POST \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "eventName": "string", "type": "string", "schedule": "string", "payloadVersion": 0, "payload": "string"}' \ "https://services.api.unity.com/scheduler/v1/projects/{projectId}/environments/{environmentId}/configs"
Response example
{ "id": "string"}
Delete Schedule Configs
Deletes multiple schedule configurations
Authorizations
ServiceAccount (scheduler.configs.delete)
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
Required scopes: scheduler.configs.delete
Path parameters for "{title}"
The project's Project ID
Code samples for "{title}":
Request example
curl -X POST \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ -H "Content-Type: application/json" \ -d '[ "string"]' \ "https://services.api.unity.com/scheduler/v1/projects/{projectId}/environments/{environmentId}/configs:batch-delete"
Response example
{ "errors": { "00000000-0000-0000-0000-000000000001": { "type": "problems/basic", "title": "Error", "status": 400, "detail": "Bad request", "instance": null, "code": 55 }, "00000000-0000-0000-0000-000000000002": { "type": "problems/basic", "title": "Error", "status": 503, "detail": "Temporary Service Error", "instance": null, "code": 3 } }}
Get Schedule Config
Retrieves the configuration for a specific schedule
Authorizations
ServiceAccount (scheduler.configs.get)
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
Required scopes: scheduler.configs.get
Path parameters for "{title}"
The project's Project ID
Code samples for "{title}":
Request example
curl -X GET \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ "https://services.api.unity.com/scheduler/v1/projects/{projectId}/environments/{environmentId}/configs/{configId}"
Response example
{ "id": "00000000-0000-0000-0000-000000000001", "name": "Example Recurring Event", "eventName": "example-event", "type": "recurring", "schedule": "0 * * * *", "payloadVersion": 1, "payload": "{}"}
Delete Schedule Config
Deletes the configuration for a specific schedule
Authorizations
ServiceAccount (scheduler.configs.delete)
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
Required scopes: scheduler.configs.delete
Path parameters for "{title}"
The project's Project ID
Code samples for "{title}":
Request example
curl -X DELETE \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ "https://services.api.unity.com/scheduler/v1/projects/{projectId}/environments/{environmentId}/configs/{configId}"
Response example
{ "type": "problems/basic", "title": "Unauthorized", "status": 401, "code": 53, "detail": "Unauthorized"}