Skip to main content

CreatePlayerAutomationInput

Create a grid-confined player automation. Trigger and action are strict JSON shapes; owner/app/grid selectors cannot be supplied.

input CreatePlayerAutomationInput {
appId: BigInt!
gridId: BigInt!
name: String!
description: String
triggerJson: String!
actionJson: String!
maxRunsPerMinute: Int
failureThreshold: Int
cooldownMs: Int
}

Fields

CreatePlayerAutomationInput.appId ● BigInt! non-null scalar

App containing the owned grid.

CreatePlayerAutomationInput.gridId ● BigInt! non-null scalar

Grid that confines the automation.

CreatePlayerAutomationInput.name ● String! non-null scalar

Name unique for the current owner in this grid.

CreatePlayerAutomationInput.description ● String scalar

Optional description.

CreatePlayerAutomationInput.triggerJson ● String! non-null scalar

Strict trigger JSON. Schedule: {"kind":"schedule","scheduleKind":"interval","intervalMs":2000} or cron with cronExpr. Event: {"kind":"event","eventKind":"owner_container_changed|grid_actor_changed|grid_voxel_changed|compute_event"}; compute_event may include eventName.

CreatePlayerAutomationInput.actionJson ● String! non-null scalar

Strict action JSON. Use {"kind":"studio_model_invoke","functionName":"...","selfContainerId":"...","params":{}} or {"kind":"player_compute_invoke","moduleName":"...","exportName":"...","params":{}}. Selectors and caller identity are forbidden.

CreatePlayerAutomationInput.maxRunsPerMinute ● Int scalar

Per-automation run limit per rolling minute. Default 60; minimum 1.

CreatePlayerAutomationInput.failureThreshold ● Int scalar

Consecutive failures before the circuit opens. Default 5; minimum 1.

CreatePlayerAutomationInput.cooldownMs ● Int scalar

Circuit cooldown in milliseconds. Default 60000; minimum 1.

Member Of

playerAutomationCreate mutation