PATCH
/api/v1/agents/{entityPublicId}/schedules/{scheduleId}Runtime_UpdateAgentSchedule
- Authentication
- required-user
- Cache policy
- none
- Success and errors
- 200, 400, 401, 403, 404, 409, 422, 500
- Stability
- v1 stable contract
OpenAPI operation
{
"operationId": "Runtime_UpdateAgentSchedule",
"summary": "PATCH /api/v1/agents/{entityPublicId}/schedules/{scheduleId}",
"tags": [
"Runtime"
],
"parameters": [
{
"name": "entityPublicId",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
{
"name": "scheduleId",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
{
"name": "Idempotency-Key",
"in": "header",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"cronExpression": {
"type": "string",
"minLength": 5,
"maxLength": 200
},
"timezone": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"misfirePolicy": {
"default": "SKIP",
"type": "string",
"enum": [
"SKIP",
"RUN_ONCE",
"CATCH_UP_BOUNDED"
]
},
"maximumCatchUpRuns": {
"default": 1,
"type": "integer",
"minimum": 1,
"maximum": 100
},
"maxConcurrentRuns": {
"default": 1,
"type": "integer",
"minimum": 1,
"maximum": 20
},
"startAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
},
{
"type": "null"
}
]
},
"endAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
},
{
"type": "null"
}
]
},
"modelRoutingProfileId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"state": {
"default": "DRAFT",
"type": "string",
"enum": [
"DRAFT",
"ACTIVE",
"PAUSED"
]
},
"version": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"kind": {
"type": "string",
"const": "PROMPT"
},
"prompt": {
"type": "string",
"minLength": 1,
"maxLength": 100000
}
},
"required": [
"cronExpression",
"timezone",
"kind",
"prompt"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"cronExpression": {
"type": "string",
"minLength": 5,
"maxLength": 200
},
"timezone": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"misfirePolicy": {
"default": "SKIP",
"type": "string",
"enum": [
"SKIP",
"RUN_ONCE",
"CATCH_UP_BOUNDED"
]
},
"maximumCatchUpRuns": {
"default": 1,
"type": "integer",
"minimum": 1,
"maximum": 100
},
"maxConcurrentRuns": {
"default": 1,
"type": "integer",
"minimum": 1,
"maximum": 20
},
"startAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
},
{
"type": "null"
}
]
},
"endAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
},
{
"type": "null"
}
]
},
"modelRoutingProfileId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"state": {
"default": "DRAFT",
"type": "string",
"enum": [
"DRAFT",
"ACTIVE",
"PAUSED"
]
},
"version": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"kind": {
"type": "string",
"const": "REPORT"
},
"prompt": {
"type": "string",
"minLength": 1,
"maxLength": 100000
},
"delivery": {
"default": "ARTIFACT_ONLY",
"type": "string",
"enum": [
"ARTIFACT_ONLY",
"ARTIFACT_AND_NOTIFICATION"
]
}
},
"required": [
"cronExpression",
"timezone",
"kind",
"prompt"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"cronExpression": {
"type": "string",
"minLength": 5,
"maxLength": 200
},
"timezone": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"misfirePolicy": {
"default": "SKIP",
"type": "string",
"enum": [
"SKIP",
"RUN_ONCE",
"CATCH_UP_BOUNDED"
]
},
"maximumCatchUpRuns": {
"default": 1,
"type": "integer",
"minimum": 1,
"maximum": 100
},
"maxConcurrentRuns": {
"default": 1,
"type": "integer",
"minimum": 1,
"maximum": 20
},
"startAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
},
{
"type": "null"
}
]
},
"endAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
},
{
"type": "null"
}
]
},
"modelRoutingProfileId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"state": {
"default": "DRAFT",
"type": "string",
"enum": [
"DRAFT",
"ACTIVE",
"PAUSED"
]
},
"version": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"kind": {
"type": "string",
"const": "TRADE"
},
"walletPublicId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"sellAssetPublicId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"buyAssetPublicId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"venueCode": {
"type": "string",
"enum": [
"JUPITER_SWAP_V2",
"ZEROX_ALLOWANCE_HOLDER"
]
},
"sellUnits": {
"type": "string",
"pattern": "^(?:0|[1-9][0-9]{0,77})$"
},
"maxTotalSellUnits": {
"type": "string",
"pattern": "^(?:0|[1-9][0-9]{0,77})$"
},
"slippageBps": {
"default": 100,
"type": "integer",
"minimum": 1,
"maximum": 2000
},
"maxPriceImpactPpm": {
"default": 20000,
"type": "integer",
"minimum": 0,
"maximum": 250000
},
"quoteTtlSeconds": {
"default": 30,
"type": "integer",
"minimum": 10,
"maximum": 120
},
"approvalMode": {
"default": "EACH_OCCURRENCE",
"type": "string",
"enum": [
"EACH_OCCURRENCE",
"PREAUTHORIZED_BOUNDED"
]
},
"maxConsecutiveFailures": {
"default": 3,
"type": "integer",
"minimum": 1,
"maximum": 20
}
},
"required": [
"cronExpression",
"timezone",
"kind",
"walletPublicId",
"sellAssetPublicId",
"buyAssetPublicId",
"venueCode",
"sellUnits",
"maxTotalSellUnits"
],
"additionalProperties": false
}
]
}
}
}
},
"security": [
{
"cookieAuth": []
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": false,
"required": [
"data",
"meta"
],
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"kind": {
"type": "string"
},
"state": {
"type": "string"
},
"cronExpression": {
"type": "string"
},
"timezone": {
"type": "string"
},
"misfirePolicy": {
"type": "string"
},
"maximumCatchUpRuns": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"maxConcurrentRuns": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"displayOrder": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"startAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
},
{
"type": "null"
}
]
},
"endAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
},
{
"type": "null"
}
]
},
"configuration": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "PROMPT"
},
"prompt": {
"type": "string"
}
},
"required": [
"kind",
"prompt"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "REPORT"
},
"prompt": {
"type": "string"
},
"delivery": {
"type": "string",
"enum": [
"ARTIFACT_ONLY",
"ARTIFACT_AND_NOTIFICATION"
]
}
},
"required": [
"kind",
"prompt",
"delivery"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "TRADE"
},
"walletPublicId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"sellAssetPublicId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"buyAssetPublicId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"venueCode": {
"type": "string",
"enum": [
"JUPITER_SWAP_V2",
"ZEROX_ALLOWANCE_HOLDER"
]
},
"sellUnits": {
"type": "string",
"pattern": "^(?:0|[1-9][0-9]{0,77})$"
},
"maxTotalSellUnits": {
"type": "string",
"pattern": "^(?:0|[1-9][0-9]{0,77})$"
},
"consumedSellUnits": {
"type": "string",
"pattern": "^(?:0|[1-9][0-9]{0,77})$"
},
"slippageBps": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"maxPriceImpactPpm": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"quoteTtlSeconds": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"approvalMode": {
"type": "string",
"enum": [
"EACH_OCCURRENCE",
"PREAUTHORIZED_BOUNDED"
]
},
"maxConsecutiveFailures": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"consecutiveFailures": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"lastFailureCode": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"kind",
"walletPublicId",
"sellAssetPublicId",
"buyAssetPublicId",
"venueCode",
"sellUnits",
"maxTotalSellUnits",
"consumedSellUnits",
"slippageBps",
"maxPriceImpactPpm",
"quoteTtlSeconds",
"approvalMode",
"maxConsecutiveFailures",
"consecutiveFailures",
"lastFailureCode"
],
"additionalProperties": false
}
]
},
"nextRunAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
},
{
"type": "null"
}
]
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"id",
"kind",
"state",
"cronExpression",
"timezone",
"misfirePolicy",
"maximumCatchUpRuns",
"maxConcurrentRuns",
"displayOrder",
"startAt",
"endAt",
"configuration",
"nextRunAt",
"version"
],
"additionalProperties": false
},
"meta": {
"type": "object",
"additionalProperties": true,
"required": [
"requestId",
"schemaVersion",
"buildVersion",
"generatedAt",
"freshness"
],
"properties": {
"requestId": {
"type": "string",
"format": "uuid"
},
"schemaVersion": {
"type": "string"
},
"buildVersion": {
"type": "string"
},
"generatedAt": {
"type": "string",
"format": "date-time"
},
"freshness": {
"type": "object",
"additionalProperties": false,
"required": [
"projectedAt",
"sourceWatermark"
],
"properties": {
"projectedAt": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"sourceWatermark": {
"type": [
"string",
"null"
]
}
}
}
}
}
}
}
}
}
},
"400": {
"description": "invalid request",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
},
"401": {
"description": "unauthenticated",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
},
"403": {
"description": "forbidden",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
},
"404": {
"description": "not found",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
},
"409": {
"description": "conflict",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
},
"422": {
"description": "configuration missing",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
},
"500": {
"description": "internal error",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
},
"x-auth-mode": "required-user",
"x-cache-policy": "none",
"x-required-scopes": [],
"x-rate-cost": 1,
"x-stability": "STABLE"
}