Agents: start with [Socra HQ for Agents](https://workspace.socra.com/solutions/agents.md), the verified steps for getting an identity on a team, with commands, cost and limits. Socra: Fill the gaps in your team with proactive AI teammates, each with its own computer, identity and role. # Run API Reference Source: `@socra/run-api@0.7.1` (RunContract). Build-provider-neutral workloads, deployments, and revisions. ## API surface Base URL: `https://run.socra.cloud` ## Workloads A stable runnable service or finite job. ### Resource schema - `id` custom, required - `project_id` custom, required - `name` string (min length: 1; max length: 63; pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$), required - `kind` "service" | "job", required - `port` integer | null, required - `variables` object (default: {}), required - `secrets` object (default: {}), required - `release_command` string[] | null, required - `schedule` object | null, optional - `cron` string (max length: 200; pattern: ^[\w*,/-]+(?:\s+[\w*,/-]+){4}$), required - `time_zone` string (default: "UTC"; max length: 100), required - `suspended` boolean (default: false), required - `timeout_seconds` integer (default: 300; min: 10; max: 86400), required - `max_retries` integer (default: 1; min: 0; max: 6), required - `active_revision_id` string | null, required - `url` string | null, required - `created_at` custom, required - `updated_at` custom, required JSON Schema: ```json { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": {}, "project_id": {}, "name": { "type": "string", "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" }, "kind": { "type": "string", "enum": [ "service", "job" ] }, "port": { "anyOf": [ { "type": "integer", "minimum": 1, "maximum": 65535 }, { "type": "null" } ] }, "variables": { "default": {}, "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "type": "string" } }, "secrets": { "default": {}, "type": "object", "propertyNames": { "type": "string", "pattern": "^[A-Z_][A-Z0-9_]*$" }, "additionalProperties": { "anyOf": [ { "anyOf": [ {}, {} ] }, { "anyOf": [ {}, {} ] } ] } }, "release_command": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ] }, "schedule": { "anyOf": [ { "type": "object", "properties": { "cron": { "type": "string", "maxLength": 200, "pattern": "^[\\w*,/-]+(?:\\s+[\\w*,/-]+){4}$" }, "time_zone": { "default": "UTC", "type": "string", "maxLength": 100 }, "suspended": { "default": false, "type": "boolean" }, "timeout_seconds": { "default": 300, "type": "integer", "minimum": 10, "maximum": 86400 }, "max_retries": { "default": 1, "type": "integer", "minimum": 0, "maximum": 6 } }, "required": [ "cron", "time_zone", "suspended", "timeout_seconds", "max_retries" ], "additionalProperties": false }, { "type": "null" } ], "properties": { "cron": { "type": "string", "maxLength": 200, "pattern": "^[\\w*,/-]+(?:\\s+[\\w*,/-]+){4}$" }, "time_zone": { "default": "UTC", "type": "string", "maxLength": 100 }, "suspended": { "default": false, "type": "boolean" }, "timeout_seconds": { "default": 300, "type": "integer", "minimum": 10, "maximum": 86400 }, "max_retries": { "default": 1, "type": "integer", "minimum": 0, "maximum": 6 } }, "required": [ "cron", "time_zone", "suspended", "timeout_seconds", "max_retries" ] }, "active_revision_id": { "anyOf": [ { "type": "string", "pattern": "^rev_[0-9a-z]+$" }, { "type": "null" } ] }, "url": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "created_at": {}, "updated_at": {} }, "required": [ "id", "project_id", "name", "kind", "port", "variables", "secrets", "release_command", "active_revision_id", "url", "created_at", "updated_at" ], "additionalProperties": false } ``` ### Create workload `POST /v1/workloads` #### Request body - `project_id` custom, required - `name` string (min length: 1; max length: 63; pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$), required - `kind` "service" | "job" (default: "service"), optional - `port` integer | null (default: 3000), optional - `variables` object (default: {}), optional - `secrets` object, optional - `release_command` string[] | null (default: null), optional - `schedule` object | null, optional - `cron` string (max length: 200; pattern: ^[\w*,/-]+(?:\s+[\w*,/-]+){4}$), required - `time_zone` string (default: "UTC"; max length: 100), optional - `suspended` boolean (default: false), optional - `timeout_seconds` integer (default: 300; min: 10; max: 86400), optional - `max_retries` integer (default: 1; min: 0; max: 6), optional JSON Schema: ```json { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "project_id": {}, "name": { "type": "string", "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" }, "kind": { "default": "service", "type": "string", "enum": [ "service", "job" ] }, "port": { "default": 3000, "anyOf": [ { "type": "integer", "minimum": 1, "maximum": 65535 }, { "type": "null" } ] }, "variables": { "default": {}, "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "type": "string" } }, "secrets": { "type": "object", "propertyNames": { "type": "string", "pattern": "^[A-Z_][A-Z0-9_]*$" }, "additionalProperties": { "anyOf": [ { "anyOf": [ {}, { "type": "string", "pattern": "^sec_[0-9a-hjkmnp-tv-z]{26}$" } ] }, { "anyOf": [ {}, { "type": "string", "pattern": "^sev_[0-9a-hjkmnp-tv-z]{26}$" } ] } ] } }, "release_command": { "default": null, "anyOf": [ { "minItems": 1, "type": "array", "items": { "type": "string" } }, { "type": "null" } ] }, "schedule": { "anyOf": [ { "type": "object", "properties": { "cron": { "type": "string", "maxLength": 200, "pattern": "^[\\w*,/-]+(?:\\s+[\\w*,/-]+){4}$" }, "time_zone": { "default": "UTC", "type": "string", "maxLength": 100 }, "suspended": { "default": false, "type": "boolean" }, "timeout_seconds": { "default": 300, "type": "integer", "minimum": 10, "maximum": 86400 }, "max_retries": { "default": 1, "type": "integer", "minimum": 0, "maximum": 6 } }, "required": [ "cron" ] }, { "type": "null" } ], "properties": { "cron": { "type": "string", "maxLength": 200, "pattern": "^[\\w*,/-]+(?:\\s+[\\w*,/-]+){4}$" }, "time_zone": { "default": "UTC", "type": "string", "maxLength": 100 }, "suspended": { "default": false, "type": "boolean" }, "timeout_seconds": { "default": 300, "type": "integer", "minimum": 10, "maximum": 86400 }, "max_retries": { "default": 1, "type": "integer", "minimum": 0, "maximum": 6 } }, "required": [ "cron" ] } }, "required": [ "project_id", "name" ] } ``` #### Response - `id` custom, required - `project_id` custom, required - `name` string (min length: 1; max length: 63; pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$), required - `kind` "service" | "job", required - `port` integer | null, required - `variables` object (default: {}), required - `secrets` object (default: {}), required - `release_command` string[] | null, required - `schedule` object | null, optional - `cron` string (max length: 200; pattern: ^[\w*,/-]+(?:\s+[\w*,/-]+){4}$), required - `time_zone` string (default: "UTC"; max length: 100), required - `suspended` boolean (default: false), required - `timeout_seconds` integer (default: 300; min: 10; max: 86400), required - `max_retries` integer (default: 1; min: 0; max: 6), required - `active_revision_id` string | null, required - `url` string | null, required - `created_at` custom, required - `updated_at` custom, required JSON Schema: ```json { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": {}, "project_id": {}, "name": { "type": "string", "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" }, "kind": { "type": "string", "enum": [ "service", "job" ] }, "port": { "anyOf": [ { "type": "integer", "minimum": 1, "maximum": 65535 }, { "type": "null" } ] }, "variables": { "default": {}, "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "type": "string" } }, "secrets": { "default": {}, "type": "object", "propertyNames": { "type": "string", "pattern": "^[A-Z_][A-Z0-9_]*$" }, "additionalProperties": { "anyOf": [ { "anyOf": [ {}, {} ] }, { "anyOf": [ {}, {} ] } ] } }, "release_command": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ] }, "schedule": { "anyOf": [ { "type": "object", "properties": { "cron": { "type": "string", "maxLength": 200, "pattern": "^[\\w*,/-]+(?:\\s+[\\w*,/-]+){4}$" }, "time_zone": { "default": "UTC", "type": "string", "maxLength": 100 }, "suspended": { "default": false, "type": "boolean" }, "timeout_seconds": { "default": 300, "type": "integer", "minimum": 10, "maximum": 86400 }, "max_retries": { "default": 1, "type": "integer", "minimum": 0, "maximum": 6 } }, "required": [ "cron", "time_zone", "suspended", "timeout_seconds", "max_retries" ], "additionalProperties": false }, { "type": "null" } ], "properties": { "cron": { "type": "string", "maxLength": 200, "pattern": "^[\\w*,/-]+(?:\\s+[\\w*,/-]+){4}$" }, "time_zone": { "default": "UTC", "type": "string", "maxLength": 100 }, "suspended": { "default": false, "type": "boolean" }, "timeout_seconds": { "default": 300, "type": "integer", "minimum": 10, "maximum": 86400 }, "max_retries": { "default": 1, "type": "integer", "minimum": 0, "maximum": 6 } }, "required": [ "cron", "time_zone", "suspended", "timeout_seconds", "max_retries" ] }, "active_revision_id": { "anyOf": [ { "type": "string", "pattern": "^rev_[0-9a-z]+$" }, { "type": "null" } ] }, "url": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "created_at": {}, "updated_at": {} }, "required": [ "id", "project_id", "name", "kind", "port", "variables", "secrets", "release_command", "active_revision_id", "url", "created_at", "updated_at" ], "additionalProperties": false } ``` ### List workloads `GET /v1/workloads` #### Query parameters - `limit` integer (min: 1; max: 100), optional - `after` string, optional - `project_id` custom, required JSON Schema: ```json { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "limit": { "type": "integer", "minimum": 1, "maximum": 100 }, "after": { "type": "string" }, "project_id": {} }, "required": [ "project_id" ] } ``` #### Response - `data` object[], required - `id` custom, required - `project_id` custom, required - `name` string (min length: 1; max length: 63; pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$), required - `kind` "service" | "job", required - `port` integer | null, required - `variables` object (default: {}), required - `secrets` object (default: {}), required - `release_command` string[] | null, required - `schedule` object | null, optional - `cron` string (max length: 200; pattern: ^[\w*,/-]+(?:\s+[\w*,/-]+){4}$), required - `time_zone` string (default: "UTC"; max length: 100), required - `suspended` boolean (default: false), required - `timeout_seconds` integer (default: 300; min: 10; max: 86400), required - `max_retries` integer (default: 1; min: 0; max: 6), required - `active_revision_id` string | null, required - `url` string | null, required - `created_at` custom, required - `updated_at` custom, required - `has_more` boolean, required JSON Schema: ```json { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": {}, "project_id": {}, "name": { "type": "string", "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" }, "kind": { "type": "string", "enum": [ "service", "job" ] }, "port": { "anyOf": [ { "type": "integer", "minimum": 1, "maximum": 65535 }, { "type": "null" } ] }, "variables": { "default": {}, "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "type": "string" } }, "secrets": { "default": {}, "type": "object", "propertyNames": { "type": "string", "pattern": "^[A-Z_][A-Z0-9_]*$" }, "additionalProperties": { "anyOf": [ { "anyOf": [ {}, {} ] }, { "anyOf": [ {}, {} ] } ] } }, "release_command": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ] }, "schedule": { "anyOf": [ { "type": "object", "properties": { "cron": { "type": "string", "maxLength": 200, "pattern": "^[\\w*,/-]+(?:\\s+[\\w*,/-]+){4}$" }, "time_zone": { "default": "UTC", "type": "string", "maxLength": 100 }, "suspended": { "default": false, "type": "boolean" }, "timeout_seconds": { "default": 300, "type": "integer", "minimum": 10, "maximum": 86400 }, "max_retries": { "default": 1, "type": "integer", "minimum": 0, "maximum": 6 } }, "required": [ "cron", "time_zone", "suspended", "timeout_seconds", "max_retries" ], "additionalProperties": false }, { "type": "null" } ], "properties": { "cron": { "type": "string", "maxLength": 200, "pattern": "^[\\w*,/-]+(?:\\s+[\\w*,/-]+){4}$" }, "time_zone": { "default": "UTC", "type": "string", "maxLength": 100 }, "suspended": { "default": false, "type": "boolean" }, "timeout_seconds": { "default": 300, "type": "integer", "minimum": 10, "maximum": 86400 }, "max_retries": { "default": 1, "type": "integer", "minimum": 0, "maximum": 6 } }, "required": [ "cron", "time_zone", "suspended", "timeout_seconds", "max_retries" ] }, "active_revision_id": { "anyOf": [ { "type": "string", "pattern": "^rev_[0-9a-z]+$" }, { "type": "null" } ] }, "url": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "created_at": {}, "updated_at": {} }, "required": [ "id", "project_id", "name", "kind", "port", "variables", "secrets", "release_command", "active_revision_id", "url", "created_at", "updated_at" ], "additionalProperties": false } }, "has_more": { "type": "boolean" } }, "required": [ "data", "has_more" ], "additionalProperties": false } ``` ### Get workload `GET /v1/workloads/{id}` #### Path parameters - `id` custom, required ```json { "$schema": "https://json-schema.org/draft/2020-12/schema" } ``` #### Response - `id` custom, required - `project_id` custom, required - `name` string (min length: 1; max length: 63; pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$), required - `kind` "service" | "job", required - `port` integer | null, required - `variables` object (default: {}), required - `secrets` object (default: {}), required - `release_command` string[] | null, required - `schedule` object | null, optional - `cron` string (max length: 200; pattern: ^[\w*,/-]+(?:\s+[\w*,/-]+){4}$), required - `time_zone` string (default: "UTC"; max length: 100), required - `suspended` boolean (default: false), required - `timeout_seconds` integer (default: 300; min: 10; max: 86400), required - `max_retries` integer (default: 1; min: 0; max: 6), required - `active_revision_id` string | null, required - `url` string | null, required - `created_at` custom, required - `updated_at` custom, required JSON Schema: ```json { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": {}, "project_id": {}, "name": { "type": "string", "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" }, "kind": { "type": "string", "enum": [ "service", "job" ] }, "port": { "anyOf": [ { "type": "integer", "minimum": 1, "maximum": 65535 }, { "type": "null" } ] }, "variables": { "default": {}, "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "type": "string" } }, "secrets": { "default": {}, "type": "object", "propertyNames": { "type": "string", "pattern": "^[A-Z_][A-Z0-9_]*$" }, "additionalProperties": { "anyOf": [ { "anyOf": [ {}, {} ] }, { "anyOf": [ {}, {} ] } ] } }, "release_command": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ] }, "schedule": { "anyOf": [ { "type": "object", "properties": { "cron": { "type": "string", "maxLength": 200, "pattern": "^[\\w*,/-]+(?:\\s+[\\w*,/-]+){4}$" }, "time_zone": { "default": "UTC", "type": "string", "maxLength": 100 }, "suspended": { "default": false, "type": "boolean" }, "timeout_seconds": { "default": 300, "type": "integer", "minimum": 10, "maximum": 86400 }, "max_retries": { "default": 1, "type": "integer", "minimum": 0, "maximum": 6 } }, "required": [ "cron", "time_zone", "suspended", "timeout_seconds", "max_retries" ], "additionalProperties": false }, { "type": "null" } ], "properties": { "cron": { "type": "string", "maxLength": 200, "pattern": "^[\\w*,/-]+(?:\\s+[\\w*,/-]+){4}$" }, "time_zone": { "default": "UTC", "type": "string", "maxLength": 100 }, "suspended": { "default": false, "type": "boolean" }, "timeout_seconds": { "default": 300, "type": "integer", "minimum": 10, "maximum": 86400 }, "max_retries": { "default": 1, "type": "integer", "minimum": 0, "maximum": 6 } }, "required": [ "cron", "time_zone", "suspended", "timeout_seconds", "max_retries" ] }, "active_revision_id": { "anyOf": [ { "type": "string", "pattern": "^rev_[0-9a-z]+$" }, { "type": "null" } ] }, "url": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "created_at": {}, "updated_at": {} }, "required": [ "id", "project_id", "name", "kind", "port", "variables", "secrets", "release_command", "active_revision_id", "url", "created_at", "updated_at" ], "additionalProperties": false } ``` ### Update workload `PATCH /v1/workloads/{id}` #### Path parameters - `id` custom, required ```json { "$schema": "https://json-schema.org/draft/2020-12/schema" } ``` #### Request body - `kind` "service" | "job", optional - `port` integer | null, optional - `variables` object, optional - `secrets` object, optional - `release_command` string[] | null, optional - `schedule` object | null, optional - `cron` string (max length: 200; pattern: ^[\w*,/-]+(?:\s+[\w*,/-]+){4}$), required - `time_zone` string (default: "UTC"; max length: 100), optional - `suspended` boolean (default: false), optional - `timeout_seconds` integer (default: 300; min: 10; max: 86400), optional - `max_retries` integer (default: 1; min: 0; max: 6), optional JSON Schema: ```json { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "kind": { "type": "string", "enum": [ "service", "job" ] }, "port": { "anyOf": [ { "type": "integer", "minimum": 1, "maximum": 65535 }, { "type": "null" } ] }, "variables": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "type": "string" } }, "secrets": { "type": "object", "propertyNames": { "type": "string", "pattern": "^[A-Z_][A-Z0-9_]*$" }, "additionalProperties": { "anyOf": [ { "anyOf": [ {}, { "type": "string", "pattern": "^sec_[0-9a-hjkmnp-tv-z]{26}$" } ] }, { "anyOf": [ {}, { "type": "string", "pattern": "^sev_[0-9a-hjkmnp-tv-z]{26}$" } ] } ] } }, "release_command": { "anyOf": [ { "minItems": 1, "type": "array", "items": { "type": "string" } }, { "type": "null" } ] }, "schedule": { "anyOf": [ { "type": "object", "properties": { "cron": { "type": "string", "maxLength": 200, "pattern": "^[\\w*,/-]+(?:\\s+[\\w*,/-]+){4}$" }, "time_zone": { "default": "UTC", "type": "string", "maxLength": 100 }, "suspended": { "default": false, "type": "boolean" }, "timeout_seconds": { "default": 300, "type": "integer", "minimum": 10, "maximum": 86400 }, "max_retries": { "default": 1, "type": "integer", "minimum": 0, "maximum": 6 } }, "required": [ "cron" ] }, { "type": "null" } ], "properties": { "cron": { "type": "string", "maxLength": 200, "pattern": "^[\\w*,/-]+(?:\\s+[\\w*,/-]+){4}$" }, "time_zone": { "default": "UTC", "type": "string", "maxLength": 100 }, "suspended": { "default": false, "type": "boolean" }, "timeout_seconds": { "default": 300, "type": "integer", "minimum": 10, "maximum": 86400 }, "max_retries": { "default": 1, "type": "integer", "minimum": 0, "maximum": 6 } }, "required": [ "cron" ] } } } ``` #### Response - `id` custom, required - `project_id` custom, required - `name` string (min length: 1; max length: 63; pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$), required - `kind` "service" | "job", required - `port` integer | null, required - `variables` object (default: {}), required - `secrets` object (default: {}), required - `release_command` string[] | null, required - `schedule` object | null, optional - `cron` string (max length: 200; pattern: ^[\w*,/-]+(?:\s+[\w*,/-]+){4}$), required - `time_zone` string (default: "UTC"; max length: 100), required - `suspended` boolean (default: false), required - `timeout_seconds` integer (default: 300; min: 10; max: 86400), required - `max_retries` integer (default: 1; min: 0; max: 6), required - `active_revision_id` string | null, required - `url` string | null, required - `created_at` custom, required - `updated_at` custom, required JSON Schema: ```json { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": {}, "project_id": {}, "name": { "type": "string", "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" }, "kind": { "type": "string", "enum": [ "service", "job" ] }, "port": { "anyOf": [ { "type": "integer", "minimum": 1, "maximum": 65535 }, { "type": "null" } ] }, "variables": { "default": {}, "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "type": "string" } }, "secrets": { "default": {}, "type": "object", "propertyNames": { "type": "string", "pattern": "^[A-Z_][A-Z0-9_]*$" }, "additionalProperties": { "anyOf": [ { "anyOf": [ {}, {} ] }, { "anyOf": [ {}, {} ] } ] } }, "release_command": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ] }, "schedule": { "anyOf": [ { "type": "object", "properties": { "cron": { "type": "string", "maxLength": 200, "pattern": "^[\\w*,/-]+(?:\\s+[\\w*,/-]+){4}$" }, "time_zone": { "default": "UTC", "type": "string", "maxLength": 100 }, "suspended": { "default": false, "type": "boolean" }, "timeout_seconds": { "default": 300, "type": "integer", "minimum": 10, "maximum": 86400 }, "max_retries": { "default": 1, "type": "integer", "minimum": 0, "maximum": 6 } }, "required": [ "cron", "time_zone", "suspended", "timeout_seconds", "max_retries" ], "additionalProperties": false }, { "type": "null" } ], "properties": { "cron": { "type": "string", "maxLength": 200, "pattern": "^[\\w*,/-]+(?:\\s+[\\w*,/-]+){4}$" }, "time_zone": { "default": "UTC", "type": "string", "maxLength": 100 }, "suspended": { "default": false, "type": "boolean" }, "timeout_seconds": { "default": 300, "type": "integer", "minimum": 10, "maximum": 86400 }, "max_retries": { "default": 1, "type": "integer", "minimum": 0, "maximum": 6 } }, "required": [ "cron", "time_zone", "suspended", "timeout_seconds", "max_retries" ] }, "active_revision_id": { "anyOf": [ { "type": "string", "pattern": "^rev_[0-9a-z]+$" }, { "type": "null" } ] }, "url": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "created_at": {}, "updated_at": {} }, "required": [ "id", "project_id", "name", "kind", "port", "variables", "secrets", "release_command", "active_revision_id", "url", "created_at", "updated_at" ], "additionalProperties": false } ``` ### List recent job executions `GET /v1/workloads/{id}/executions` #### Path parameters - `id` custom, required ```json { "$schema": "https://json-schema.org/draft/2020-12/schema" } ``` #### Response - `data` object[], required - `name` string, required - `deployment_id` string | null, required - `status` "pending" | "running" | "succeeded" | "failed", required - `created_at` custom, required - `started_at` custom | null, required - `finished_at` custom | null, required - `reason` string | null, required JSON Schema: ```json { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "deployment_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "status": { "type": "string", "enum": [ "pending", "running", "succeeded", "failed" ] }, "created_at": {}, "started_at": { "anyOf": [ {}, { "type": "null" } ] }, "finished_at": { "anyOf": [ {}, { "type": "null" } ] }, "reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "name", "deployment_id", "status", "created_at", "started_at", "finished_at", "reason" ], "additionalProperties": false } } }, "required": [ "data" ], "additionalProperties": false } ``` ### Read workload logs `GET /v1/workloads/{id}/logs` #### Path parameters - `id` custom, required ```json { "$schema": "https://json-schema.org/draft/2020-12/schema" } ``` #### Query parameters - `deployment` string (pattern: ^dpl_[0-9a-z]+$), optional - `since` custom, optional - `until` custom, optional - `severity` "DEFAULT" | "DEBUG" | "INFO" | "NOTICE" | "WARNING" | "ERROR" | "CRITICAL" | "ALERT" | "EMERGENCY", optional - `after` string (pattern: ^\d{1,20}$), optional - `limit` integer (min: 1; max: 1000), optional JSON Schema: ```json { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "deployment": { "type": "string", "pattern": "^dpl_[0-9a-z]+$" }, "since": {}, "until": {}, "severity": { "type": "string", "enum": [ "DEFAULT", "DEBUG", "INFO", "NOTICE", "WARNING", "ERROR", "CRITICAL", "ALERT", "EMERGENCY" ] }, "after": { "type": "string", "pattern": "^\\d{1,20}$" }, "limit": { "type": "integer", "minimum": 1, "maximum": 1000 } } } ``` #### Response - `data` object[], required - `sequence` string, required - `timestamp` string, required - `deployment_id` string, required - `pod` string, required - `container` string, required - `restart` number, required - `severity` "DEFAULT" | "DEBUG" | "INFO" | "NOTICE" | "WARNING" | "ERROR" | "CRITICAL" | "ALERT" | "EMERGENCY", required - `message` string, required - `diagnostics` object[], optional - `deployment_id` string, required - `observed_at` custom, required - `checked_at` custom, required - `availability` "healthy" | "unhealthy" | "unknown", required - `diagnostics` string, required - `warning` string | null, required - `diagnostics_has_more` boolean, optional - `next_cursor` string, required - `has_more` boolean, required - `retention_start` custom, required - `checked_at` custom | null, required - `warning` string | null, required JSON Schema: ```json { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "sequence": { "type": "string" }, "timestamp": { "type": "string" }, "deployment_id": { "type": "string" }, "pod": { "type": "string" }, "container": { "type": "string" }, "restart": { "type": "number" }, "severity": { "type": "string", "enum": [ "DEFAULT", "DEBUG", "INFO", "NOTICE", "WARNING", "ERROR", "CRITICAL", "ALERT", "EMERGENCY" ] }, "message": { "type": "string" } }, "required": [ "sequence", "timestamp", "deployment_id", "pod", "container", "restart", "severity", "message" ], "additionalProperties": false } }, "diagnostics": { "type": "array", "items": { "type": "object", "properties": { "deployment_id": { "type": "string" }, "observed_at": {}, "checked_at": {}, "availability": { "type": "string", "enum": [ "healthy", "unhealthy", "unknown" ] }, "diagnostics": { "type": "string" }, "warning": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "deployment_id", "observed_at", "checked_at", "availability", "diagnostics", "warning" ], "additionalProperties": false } }, "diagnostics_has_more": { "type": "boolean" }, "next_cursor": { "type": "string" }, "has_more": { "type": "boolean" }, "retention_start": {}, "checked_at": { "anyOf": [ {}, { "type": "null" } ] }, "warning": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "data", "next_cursor", "has_more", "retention_start", "checked_at", "warning" ], "additionalProperties": false } ``` ### Delete workload `DELETE /v1/workloads/{id}` #### Path parameters - `id` custom, required ```json { "$schema": "https://json-schema.org/draft/2020-12/schema" } ``` #### Response No response body. ## Deployments A request to reconcile an immutable image into a workload. ### Resource schema - `id` custom, required - `project_id` custom, required - `workload_id` custom, required - `image` string (pattern: ^[^\s@]+@sha256:[0-9a-f]{64}$), required - `variables` object (default: {}), required - `secret_references` object (default: {}), required - `secrets` object (default: {}), required - `release_command` string[] | null, required - `schedule` object | null, optional - `cron` string (max length: 200; pattern: ^[\w*,/-]+(?:\s+[\w*,/-]+){4}$), required - `time_zone` string (default: "UTC"; max length: 100), required - `suspended` boolean (default: false), required - `timeout_seconds` integer (default: 300; min: 10; max: 86400), required - `max_retries` integer (default: 1; min: 0; max: 6), required - `url` string | null, required - `status` "queued" | "running" | "succeeded" | "failed" | "cancelled", required - `revision_id` string | null, required - `error` string | null, required - `logs` string, required - `created_at` custom, required - `updated_at` custom, required - `started_at` custom | null, required - `finished_at` custom | null, required JSON Schema: ```json { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": {}, "project_id": {}, "workload_id": {}, "image": { "type": "string", "pattern": "^[^\\s@]+@sha256:[0-9a-f]{64}$" }, "variables": { "default": {}, "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "type": "string" } }, "secret_references": { "default": {}, "type": "object", "propertyNames": { "type": "string", "pattern": "^[A-Z_][A-Z0-9_]*$" }, "additionalProperties": { "anyOf": [ { "anyOf": [ {}, {} ] }, { "anyOf": [ {}, {} ] } ] } }, "secrets": { "default": {}, "type": "object", "propertyNames": { "type": "string", "pattern": "^[A-Z_][A-Z0-9_]*$" }, "additionalProperties": { "anyOf": [ {}, {} ] } }, "release_command": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ] }, "schedule": { "anyOf": [ { "type": "object", "properties": { "cron": { "type": "string", "maxLength": 200, "pattern": "^[\\w*,/-]+(?:\\s+[\\w*,/-]+){4}$" }, "time_zone": { "default": "UTC", "type": "string", "maxLength": 100 }, "suspended": { "default": false, "type": "boolean" }, "timeout_seconds": { "default": 300, "type": "integer", "minimum": 10, "maximum": 86400 }, "max_retries": { "default": 1, "type": "integer", "minimum": 0, "maximum": 6 } }, "required": [ "cron", "time_zone", "suspended", "timeout_seconds", "max_retries" ], "additionalProperties": false }, { "type": "null" } ], "properties": { "cron": { "type": "string", "maxLength": 200, "pattern": "^[\\w*,/-]+(?:\\s+[\\w*,/-]+){4}$" }, "time_zone": { "default": "UTC", "type": "string", "maxLength": 100 }, "suspended": { "default": false, "type": "boolean" }, "timeout_seconds": { "default": 300, "type": "integer", "minimum": 10, "maximum": 86400 }, "max_retries": { "default": 1, "type": "integer", "minimum": 0, "maximum": 6 } }, "required": [ "cron", "time_zone", "suspended", "timeout_seconds", "max_retries" ] }, "url": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "status": { "type": "string", "enum": [ "queued", "running", "succeeded", "failed", "cancelled" ] }, "revision_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "logs": { "type": "string" }, "created_at": {}, "updated_at": {}, "started_at": { "anyOf": [ {}, { "type": "null" } ] }, "finished_at": { "anyOf": [ {}, { "type": "null" } ] } }, "required": [ "id", "project_id", "workload_id", "image", "variables", "secret_references", "secrets", "release_command", "url", "status", "revision_id", "error", "logs", "created_at", "updated_at", "started_at", "finished_at" ], "additionalProperties": false } ``` ### Create deployment `POST /v1/deployments` #### Request body - `project_id` custom, required - `workload` string (min length: 1; max length: 63; pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$), required - `image` string (pattern: ^[^\s@]+@sha256:[0-9a-f]{64}$), required JSON Schema: ```json { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "project_id": {}, "workload": { "type": "string", "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" }, "image": { "type": "string", "pattern": "^[^\\s@]+@sha256:[0-9a-f]{64}$" } }, "required": [ "project_id", "workload", "image" ] } ``` #### Response - `id` custom, required - `project_id` custom, required - `workload_id` custom, required - `image` string (pattern: ^[^\s@]+@sha256:[0-9a-f]{64}$), required - `variables` object (default: {}), required - `secret_references` object (default: {}), required - `secrets` object (default: {}), required - `release_command` string[] | null, required - `schedule` object | null, optional - `cron` string (max length: 200; pattern: ^[\w*,/-]+(?:\s+[\w*,/-]+){4}$), required - `time_zone` string (default: "UTC"; max length: 100), required - `suspended` boolean (default: false), required - `timeout_seconds` integer (default: 300; min: 10; max: 86400), required - `max_retries` integer (default: 1; min: 0; max: 6), required - `url` string | null, required - `status` "queued" | "running" | "succeeded" | "failed" | "cancelled", required - `revision_id` string | null, required - `error` string | null, required - `logs` string, required - `created_at` custom, required - `updated_at` custom, required - `started_at` custom | null, required - `finished_at` custom | null, required JSON Schema: ```json { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": {}, "project_id": {}, "workload_id": {}, "image": { "type": "string", "pattern": "^[^\\s@]+@sha256:[0-9a-f]{64}$" }, "variables": { "default": {}, "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "type": "string" } }, "secret_references": { "default": {}, "type": "object", "propertyNames": { "type": "string", "pattern": "^[A-Z_][A-Z0-9_]*$" }, "additionalProperties": { "anyOf": [ { "anyOf": [ {}, {} ] }, { "anyOf": [ {}, {} ] } ] } }, "secrets": { "default": {}, "type": "object", "propertyNames": { "type": "string", "pattern": "^[A-Z_][A-Z0-9_]*$" }, "additionalProperties": { "anyOf": [ {}, {} ] } }, "release_command": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ] }, "schedule": { "anyOf": [ { "type": "object", "properties": { "cron": { "type": "string", "maxLength": 200, "pattern": "^[\\w*,/-]+(?:\\s+[\\w*,/-]+){4}$" }, "time_zone": { "default": "UTC", "type": "string", "maxLength": 100 }, "suspended": { "default": false, "type": "boolean" }, "timeout_seconds": { "default": 300, "type": "integer", "minimum": 10, "maximum": 86400 }, "max_retries": { "default": 1, "type": "integer", "minimum": 0, "maximum": 6 } }, "required": [ "cron", "time_zone", "suspended", "timeout_seconds", "max_retries" ], "additionalProperties": false }, { "type": "null" } ], "properties": { "cron": { "type": "string", "maxLength": 200, "pattern": "^[\\w*,/-]+(?:\\s+[\\w*,/-]+){4}$" }, "time_zone": { "default": "UTC", "type": "string", "maxLength": 100 }, "suspended": { "default": false, "type": "boolean" }, "timeout_seconds": { "default": 300, "type": "integer", "minimum": 10, "maximum": 86400 }, "max_retries": { "default": 1, "type": "integer", "minimum": 0, "maximum": 6 } }, "required": [ "cron", "time_zone", "suspended", "timeout_seconds", "max_retries" ] }, "url": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "status": { "type": "string", "enum": [ "queued", "running", "succeeded", "failed", "cancelled" ] }, "revision_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "logs": { "type": "string" }, "created_at": {}, "updated_at": {}, "started_at": { "anyOf": [ {}, { "type": "null" } ] }, "finished_at": { "anyOf": [ {}, { "type": "null" } ] } }, "required": [ "id", "project_id", "workload_id", "image", "variables", "secret_references", "secrets", "release_command", "url", "status", "revision_id", "error", "logs", "created_at", "updated_at", "started_at", "finished_at" ], "additionalProperties": false } ``` ### List deployments `GET /v1/deployments` #### Query parameters - `limit` integer (min: 1; max: 100), optional - `after` string, optional - `project_id` custom, required - `workload_id` custom, optional - `status` "queued" | "running" | "succeeded" | "failed" | "cancelled", optional JSON Schema: ```json { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "limit": { "type": "integer", "minimum": 1, "maximum": 100 }, "after": { "type": "string" }, "project_id": {}, "workload_id": {}, "status": { "type": "string", "enum": [ "queued", "running", "succeeded", "failed", "cancelled" ] } }, "required": [ "project_id" ] } ``` #### Response - `data` object[], required - `id` custom, required - `project_id` custom, required - `workload_id` custom, required - `image` string (pattern: ^[^\s@]+@sha256:[0-9a-f]{64}$), required - `variables` object (default: {}), required - `secret_references` object (default: {}), required - `secrets` object (default: {}), required - `release_command` string[] | null, required - `schedule` object | null, optional - `cron` string (max length: 200; pattern: ^[\w*,/-]+(?:\s+[\w*,/-]+){4}$), required - `time_zone` string (default: "UTC"; max length: 100), required - `suspended` boolean (default: false), required - `timeout_seconds` integer (default: 300; min: 10; max: 86400), required - `max_retries` integer (default: 1; min: 0; max: 6), required - `url` string | null, required - `status` "queued" | "running" | "succeeded" | "failed" | "cancelled", required - `revision_id` string | null, required - `error` string | null, required - `logs` string, required - `created_at` custom, required - `updated_at` custom, required - `started_at` custom | null, required - `finished_at` custom | null, required - `has_more` boolean, required JSON Schema: ```json { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": {}, "project_id": {}, "workload_id": {}, "image": { "type": "string", "pattern": "^[^\\s@]+@sha256:[0-9a-f]{64}$" }, "variables": { "default": {}, "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "type": "string" } }, "secret_references": { "default": {}, "type": "object", "propertyNames": { "type": "string", "pattern": "^[A-Z_][A-Z0-9_]*$" }, "additionalProperties": { "anyOf": [ { "anyOf": [ {}, {} ] }, { "anyOf": [ {}, {} ] } ] } }, "secrets": { "default": {}, "type": "object", "propertyNames": { "type": "string", "pattern": "^[A-Z_][A-Z0-9_]*$" }, "additionalProperties": { "anyOf": [ {}, {} ] } }, "release_command": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ] }, "schedule": { "anyOf": [ { "type": "object", "properties": { "cron": { "type": "string", "maxLength": 200, "pattern": "^[\\w*,/-]+(?:\\s+[\\w*,/-]+){4}$" }, "time_zone": { "default": "UTC", "type": "string", "maxLength": 100 }, "suspended": { "default": false, "type": "boolean" }, "timeout_seconds": { "default": 300, "type": "integer", "minimum": 10, "maximum": 86400 }, "max_retries": { "default": 1, "type": "integer", "minimum": 0, "maximum": 6 } }, "required": [ "cron", "time_zone", "suspended", "timeout_seconds", "max_retries" ], "additionalProperties": false }, { "type": "null" } ], "properties": { "cron": { "type": "string", "maxLength": 200, "pattern": "^[\\w*,/-]+(?:\\s+[\\w*,/-]+){4}$" }, "time_zone": { "default": "UTC", "type": "string", "maxLength": 100 }, "suspended": { "default": false, "type": "boolean" }, "timeout_seconds": { "default": 300, "type": "integer", "minimum": 10, "maximum": 86400 }, "max_retries": { "default": 1, "type": "integer", "minimum": 0, "maximum": 6 } }, "required": [ "cron", "time_zone", "suspended", "timeout_seconds", "max_retries" ] }, "url": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "status": { "type": "string", "enum": [ "queued", "running", "succeeded", "failed", "cancelled" ] }, "revision_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "logs": { "type": "string" }, "created_at": {}, "updated_at": {}, "started_at": { "anyOf": [ {}, { "type": "null" } ] }, "finished_at": { "anyOf": [ {}, { "type": "null" } ] } }, "required": [ "id", "project_id", "workload_id", "image", "variables", "secret_references", "secrets", "release_command", "url", "status", "revision_id", "error", "logs", "created_at", "updated_at", "started_at", "finished_at" ], "additionalProperties": false } }, "has_more": { "type": "boolean" } }, "required": [ "data", "has_more" ], "additionalProperties": false } ``` ### Get deployment `GET /v1/deployments/{id}` #### Path parameters - `id` custom, required ```json { "$schema": "https://json-schema.org/draft/2020-12/schema" } ``` #### Response - `id` custom, required - `project_id` custom, required - `workload_id` custom, required - `image` string (pattern: ^[^\s@]+@sha256:[0-9a-f]{64}$), required - `variables` object (default: {}), required - `secret_references` object (default: {}), required - `secrets` object (default: {}), required - `release_command` string[] | null, required - `schedule` object | null, optional - `cron` string (max length: 200; pattern: ^[\w*,/-]+(?:\s+[\w*,/-]+){4}$), required - `time_zone` string (default: "UTC"; max length: 100), required - `suspended` boolean (default: false), required - `timeout_seconds` integer (default: 300; min: 10; max: 86400), required - `max_retries` integer (default: 1; min: 0; max: 6), required - `url` string | null, required - `status` "queued" | "running" | "succeeded" | "failed" | "cancelled", required - `revision_id` string | null, required - `error` string | null, required - `logs` string, required - `created_at` custom, required - `updated_at` custom, required - `started_at` custom | null, required - `finished_at` custom | null, required JSON Schema: ```json { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": {}, "project_id": {}, "workload_id": {}, "image": { "type": "string", "pattern": "^[^\\s@]+@sha256:[0-9a-f]{64}$" }, "variables": { "default": {}, "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "type": "string" } }, "secret_references": { "default": {}, "type": "object", "propertyNames": { "type": "string", "pattern": "^[A-Z_][A-Z0-9_]*$" }, "additionalProperties": { "anyOf": [ { "anyOf": [ {}, {} ] }, { "anyOf": [ {}, {} ] } ] } }, "secrets": { "default": {}, "type": "object", "propertyNames": { "type": "string", "pattern": "^[A-Z_][A-Z0-9_]*$" }, "additionalProperties": { "anyOf": [ {}, {} ] } }, "release_command": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ] }, "schedule": { "anyOf": [ { "type": "object", "properties": { "cron": { "type": "string", "maxLength": 200, "pattern": "^[\\w*,/-]+(?:\\s+[\\w*,/-]+){4}$" }, "time_zone": { "default": "UTC", "type": "string", "maxLength": 100 }, "suspended": { "default": false, "type": "boolean" }, "timeout_seconds": { "default": 300, "type": "integer", "minimum": 10, "maximum": 86400 }, "max_retries": { "default": 1, "type": "integer", "minimum": 0, "maximum": 6 } }, "required": [ "cron", "time_zone", "suspended", "timeout_seconds", "max_retries" ], "additionalProperties": false }, { "type": "null" } ], "properties": { "cron": { "type": "string", "maxLength": 200, "pattern": "^[\\w*,/-]+(?:\\s+[\\w*,/-]+){4}$" }, "time_zone": { "default": "UTC", "type": "string", "maxLength": 100 }, "suspended": { "default": false, "type": "boolean" }, "timeout_seconds": { "default": 300, "type": "integer", "minimum": 10, "maximum": 86400 }, "max_retries": { "default": 1, "type": "integer", "minimum": 0, "maximum": 6 } }, "required": [ "cron", "time_zone", "suspended", "timeout_seconds", "max_retries" ] }, "url": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "status": { "type": "string", "enum": [ "queued", "running", "succeeded", "failed", "cancelled" ] }, "revision_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "logs": { "type": "string" }, "created_at": {}, "updated_at": {}, "started_at": { "anyOf": [ {}, { "type": "null" } ] }, "finished_at": { "anyOf": [ {}, { "type": "null" } ] } }, "required": [ "id", "project_id", "workload_id", "image", "variables", "secret_references", "secrets", "release_command", "url", "status", "revision_id", "error", "logs", "created_at", "updated_at", "started_at", "finished_at" ], "additionalProperties": false } ``` ### Get deployment logs `GET /v1/deployments/{id}/logs` #### Path parameters - `id` custom, required ```json { "$schema": "https://json-schema.org/draft/2020-12/schema" } ``` #### Response - `data` string, required - `status` "queued" | "running" | "succeeded" | "failed" | "cancelled", required JSON Schema: ```json { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "string" }, "status": { "type": "string", "enum": [ "queued", "running", "succeeded", "failed", "cancelled" ] } }, "required": [ "data", "status" ], "additionalProperties": false } ``` ### Get deployment events `GET /v1/deployments/{id}/events` #### Path parameters - `id` custom, required ```json { "$schema": "https://json-schema.org/draft/2020-12/schema" } ``` #### Response - `data` object[], required - `type` "queued" | "started" | "succeeded" | "failed" | "cancelled", required - `at` custom, required - `message` string, required JSON Schema: ```json { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "queued", "started", "succeeded", "failed", "cancelled" ] }, "at": {}, "message": { "type": "string" } }, "required": [ "type", "at", "message" ], "additionalProperties": false } } }, "required": [ "data" ], "additionalProperties": false } ``` ### Get deployment health `GET /v1/deployments/{id}/health` #### Path parameters - `id` custom, required ```json { "$schema": "https://json-schema.org/draft/2020-12/schema" } ``` #### Response - `runtime_checked_at` custom | null, optional - `warning` string | null, optional - `status` "pending" | "deploying" | "healthy" | "unhealthy" | "stopped" | "unknown", required - `url` string | null, required - `revision_id` string | null, required - `checked_at` custom, required JSON Schema: ```json { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "runtime_checked_at": { "anyOf": [ {}, { "type": "null" } ] }, "warning": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "status": { "type": "string", "enum": [ "pending", "deploying", "healthy", "unhealthy", "stopped", "unknown" ] }, "url": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "revision_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "checked_at": {} }, "required": [ "status", "url", "revision_id", "checked_at" ], "additionalProperties": false } ``` ### Cancel deployment `POST /v1/deployments/{id}/cancel` #### Path parameters - `id` custom, required ```json { "$schema": "https://json-schema.org/draft/2020-12/schema" } ``` #### Response - `id` custom, required - `project_id` custom, required - `workload_id` custom, required - `image` string (pattern: ^[^\s@]+@sha256:[0-9a-f]{64}$), required - `variables` object (default: {}), required - `secret_references` object (default: {}), required - `secrets` object (default: {}), required - `release_command` string[] | null, required - `schedule` object | null, optional - `cron` string (max length: 200; pattern: ^[\w*,/-]+(?:\s+[\w*,/-]+){4}$), required - `time_zone` string (default: "UTC"; max length: 100), required - `suspended` boolean (default: false), required - `timeout_seconds` integer (default: 300; min: 10; max: 86400), required - `max_retries` integer (default: 1; min: 0; max: 6), required - `url` string | null, required - `status` "queued" | "running" | "succeeded" | "failed" | "cancelled", required - `revision_id` string | null, required - `error` string | null, required - `logs` string, required - `created_at` custom, required - `updated_at` custom, required - `started_at` custom | null, required - `finished_at` custom | null, required JSON Schema: ```json { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": {}, "project_id": {}, "workload_id": {}, "image": { "type": "string", "pattern": "^[^\\s@]+@sha256:[0-9a-f]{64}$" }, "variables": { "default": {}, "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "type": "string" } }, "secret_references": { "default": {}, "type": "object", "propertyNames": { "type": "string", "pattern": "^[A-Z_][A-Z0-9_]*$" }, "additionalProperties": { "anyOf": [ { "anyOf": [ {}, {} ] }, { "anyOf": [ {}, {} ] } ] } }, "secrets": { "default": {}, "type": "object", "propertyNames": { "type": "string", "pattern": "^[A-Z_][A-Z0-9_]*$" }, "additionalProperties": { "anyOf": [ {}, {} ] } }, "release_command": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ] }, "schedule": { "anyOf": [ { "type": "object", "properties": { "cron": { "type": "string", "maxLength": 200, "pattern": "^[\\w*,/-]+(?:\\s+[\\w*,/-]+){4}$" }, "time_zone": { "default": "UTC", "type": "string", "maxLength": 100 }, "suspended": { "default": false, "type": "boolean" }, "timeout_seconds": { "default": 300, "type": "integer", "minimum": 10, "maximum": 86400 }, "max_retries": { "default": 1, "type": "integer", "minimum": 0, "maximum": 6 } }, "required": [ "cron", "time_zone", "suspended", "timeout_seconds", "max_retries" ], "additionalProperties": false }, { "type": "null" } ], "properties": { "cron": { "type": "string", "maxLength": 200, "pattern": "^[\\w*,/-]+(?:\\s+[\\w*,/-]+){4}$" }, "time_zone": { "default": "UTC", "type": "string", "maxLength": 100 }, "suspended": { "default": false, "type": "boolean" }, "timeout_seconds": { "default": 300, "type": "integer", "minimum": 10, "maximum": 86400 }, "max_retries": { "default": 1, "type": "integer", "minimum": 0, "maximum": 6 } }, "required": [ "cron", "time_zone", "suspended", "timeout_seconds", "max_retries" ] }, "url": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "status": { "type": "string", "enum": [ "queued", "running", "succeeded", "failed", "cancelled" ] }, "revision_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "logs": { "type": "string" }, "created_at": {}, "updated_at": {}, "started_at": { "anyOf": [ {}, { "type": "null" } ] }, "finished_at": { "anyOf": [ {}, { "type": "null" } ] } }, "required": [ "id", "project_id", "workload_id", "image", "variables", "secret_references", "secrets", "release_command", "url", "status", "revision_id", "error", "logs", "created_at", "updated_at", "started_at", "finished_at" ], "additionalProperties": false } ``` ## Revisions An immutable successful workload configuration. ### Resource schema - `id` custom, required - `project_id` custom, required - `deployment_id` custom, required - `workload_id` custom, required - `number` integer (greater than: 0; max: 9007199254740991), required - `image` string (pattern: ^[^\s@]+@sha256:[0-9a-f]{64}$), required - `variables` object (default: {}), required - `secret_references` object (default: {}), required - `secrets` object (default: {}), required - `release_command` string[] | null, required - `schedule` object | null, optional - `cron` string (max length: 200; pattern: ^[\w*,/-]+(?:\s+[\w*,/-]+){4}$), required - `time_zone` string (default: "UTC"; max length: 100), required - `suspended` boolean (default: false), required - `timeout_seconds` integer (default: 300; min: 10; max: 86400), required - `max_retries` integer (default: 1; min: 0; max: 6), required - `created_at` custom, required JSON Schema: ```json { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": {}, "project_id": {}, "deployment_id": {}, "workload_id": {}, "number": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "image": { "type": "string", "pattern": "^[^\\s@]+@sha256:[0-9a-f]{64}$" }, "variables": { "default": {}, "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "type": "string" } }, "secret_references": { "default": {}, "type": "object", "propertyNames": { "type": "string", "pattern": "^[A-Z_][A-Z0-9_]*$" }, "additionalProperties": { "anyOf": [ { "anyOf": [ {}, {} ] }, { "anyOf": [ {}, {} ] } ] } }, "secrets": { "default": {}, "type": "object", "propertyNames": { "type": "string", "pattern": "^[A-Z_][A-Z0-9_]*$" }, "additionalProperties": { "anyOf": [ {}, {} ] } }, "release_command": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ] }, "schedule": { "anyOf": [ { "type": "object", "properties": { "cron": { "type": "string", "maxLength": 200, "pattern": "^[\\w*,/-]+(?:\\s+[\\w*,/-]+){4}$" }, "time_zone": { "default": "UTC", "type": "string", "maxLength": 100 }, "suspended": { "default": false, "type": "boolean" }, "timeout_seconds": { "default": 300, "type": "integer", "minimum": 10, "maximum": 86400 }, "max_retries": { "default": 1, "type": "integer", "minimum": 0, "maximum": 6 } }, "required": [ "cron", "time_zone", "suspended", "timeout_seconds", "max_retries" ], "additionalProperties": false }, { "type": "null" } ], "properties": { "cron": { "type": "string", "maxLength": 200, "pattern": "^[\\w*,/-]+(?:\\s+[\\w*,/-]+){4}$" }, "time_zone": { "default": "UTC", "type": "string", "maxLength": 100 }, "suspended": { "default": false, "type": "boolean" }, "timeout_seconds": { "default": 300, "type": "integer", "minimum": 10, "maximum": 86400 }, "max_retries": { "default": 1, "type": "integer", "minimum": 0, "maximum": 6 } }, "required": [ "cron", "time_zone", "suspended", "timeout_seconds", "max_retries" ] }, "created_at": {} }, "required": [ "id", "project_id", "deployment_id", "workload_id", "number", "image", "variables", "secret_references", "secrets", "release_command", "created_at" ], "additionalProperties": false } ``` ### List revisions `GET /v1/revisions` #### Query parameters - `limit` integer (min: 1; max: 100), optional - `after` string, optional - `project_id` custom, required - `workload_id` custom, optional JSON Schema: ```json { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "limit": { "type": "integer", "minimum": 1, "maximum": 100 }, "after": { "type": "string" }, "project_id": {}, "workload_id": {} }, "required": [ "project_id" ] } ``` #### Response - `data` object[], required - `id` custom, required - `project_id` custom, required - `deployment_id` custom, required - `workload_id` custom, required - `number` integer (greater than: 0; max: 9007199254740991), required - `image` string (pattern: ^[^\s@]+@sha256:[0-9a-f]{64}$), required - `variables` object (default: {}), required - `secret_references` object (default: {}), required - `secrets` object (default: {}), required - `release_command` string[] | null, required - `schedule` object | null, optional - `cron` string (max length: 200; pattern: ^[\w*,/-]+(?:\s+[\w*,/-]+){4}$), required - `time_zone` string (default: "UTC"; max length: 100), required - `suspended` boolean (default: false), required - `timeout_seconds` integer (default: 300; min: 10; max: 86400), required - `max_retries` integer (default: 1; min: 0; max: 6), required - `created_at` custom, required - `has_more` boolean, required JSON Schema: ```json { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": {}, "project_id": {}, "deployment_id": {}, "workload_id": {}, "number": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "image": { "type": "string", "pattern": "^[^\\s@]+@sha256:[0-9a-f]{64}$" }, "variables": { "default": {}, "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "type": "string" } }, "secret_references": { "default": {}, "type": "object", "propertyNames": { "type": "string", "pattern": "^[A-Z_][A-Z0-9_]*$" }, "additionalProperties": { "anyOf": [ { "anyOf": [ {}, {} ] }, { "anyOf": [ {}, {} ] } ] } }, "secrets": { "default": {}, "type": "object", "propertyNames": { "type": "string", "pattern": "^[A-Z_][A-Z0-9_]*$" }, "additionalProperties": { "anyOf": [ {}, {} ] } }, "release_command": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ] }, "schedule": { "anyOf": [ { "type": "object", "properties": { "cron": { "type": "string", "maxLength": 200, "pattern": "^[\\w*,/-]+(?:\\s+[\\w*,/-]+){4}$" }, "time_zone": { "default": "UTC", "type": "string", "maxLength": 100 }, "suspended": { "default": false, "type": "boolean" }, "timeout_seconds": { "default": 300, "type": "integer", "minimum": 10, "maximum": 86400 }, "max_retries": { "default": 1, "type": "integer", "minimum": 0, "maximum": 6 } }, "required": [ "cron", "time_zone", "suspended", "timeout_seconds", "max_retries" ], "additionalProperties": false }, { "type": "null" } ], "properties": { "cron": { "type": "string", "maxLength": 200, "pattern": "^[\\w*,/-]+(?:\\s+[\\w*,/-]+){4}$" }, "time_zone": { "default": "UTC", "type": "string", "maxLength": 100 }, "suspended": { "default": false, "type": "boolean" }, "timeout_seconds": { "default": 300, "type": "integer", "minimum": 10, "maximum": 86400 }, "max_retries": { "default": 1, "type": "integer", "minimum": 0, "maximum": 6 } }, "required": [ "cron", "time_zone", "suspended", "timeout_seconds", "max_retries" ] }, "created_at": {} }, "required": [ "id", "project_id", "deployment_id", "workload_id", "number", "image", "variables", "secret_references", "secrets", "release_command", "created_at" ], "additionalProperties": false } }, "has_more": { "type": "boolean" } }, "required": [ "data", "has_more" ], "additionalProperties": false } ``` ### Get revision `GET /v1/revisions/{id}` #### Path parameters - `id` custom, required ```json { "$schema": "https://json-schema.org/draft/2020-12/schema" } ``` #### Response - `id` custom, required - `project_id` custom, required - `deployment_id` custom, required - `workload_id` custom, required - `number` integer (greater than: 0; max: 9007199254740991), required - `image` string (pattern: ^[^\s@]+@sha256:[0-9a-f]{64}$), required - `variables` object (default: {}), required - `secret_references` object (default: {}), required - `secrets` object (default: {}), required - `release_command` string[] | null, required - `schedule` object | null, optional - `cron` string (max length: 200; pattern: ^[\w*,/-]+(?:\s+[\w*,/-]+){4}$), required - `time_zone` string (default: "UTC"; max length: 100), required - `suspended` boolean (default: false), required - `timeout_seconds` integer (default: 300; min: 10; max: 86400), required - `max_retries` integer (default: 1; min: 0; max: 6), required - `created_at` custom, required JSON Schema: ```json { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": {}, "project_id": {}, "deployment_id": {}, "workload_id": {}, "number": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "image": { "type": "string", "pattern": "^[^\\s@]+@sha256:[0-9a-f]{64}$" }, "variables": { "default": {}, "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "type": "string" } }, "secret_references": { "default": {}, "type": "object", "propertyNames": { "type": "string", "pattern": "^[A-Z_][A-Z0-9_]*$" }, "additionalProperties": { "anyOf": [ { "anyOf": [ {}, {} ] }, { "anyOf": [ {}, {} ] } ] } }, "secrets": { "default": {}, "type": "object", "propertyNames": { "type": "string", "pattern": "^[A-Z_][A-Z0-9_]*$" }, "additionalProperties": { "anyOf": [ {}, {} ] } }, "release_command": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ] }, "schedule": { "anyOf": [ { "type": "object", "properties": { "cron": { "type": "string", "maxLength": 200, "pattern": "^[\\w*,/-]+(?:\\s+[\\w*,/-]+){4}$" }, "time_zone": { "default": "UTC", "type": "string", "maxLength": 100 }, "suspended": { "default": false, "type": "boolean" }, "timeout_seconds": { "default": 300, "type": "integer", "minimum": 10, "maximum": 86400 }, "max_retries": { "default": 1, "type": "integer", "minimum": 0, "maximum": 6 } }, "required": [ "cron", "time_zone", "suspended", "timeout_seconds", "max_retries" ], "additionalProperties": false }, { "type": "null" } ], "properties": { "cron": { "type": "string", "maxLength": 200, "pattern": "^[\\w*,/-]+(?:\\s+[\\w*,/-]+){4}$" }, "time_zone": { "default": "UTC", "type": "string", "maxLength": 100 }, "suspended": { "default": false, "type": "boolean" }, "timeout_seconds": { "default": 300, "type": "integer", "minimum": 10, "maximum": 86400 }, "max_retries": { "default": 1, "type": "integer", "minimum": 0, "maximum": 6 } }, "required": [ "cron", "time_zone", "suspended", "timeout_seconds", "max_retries" ] }, "created_at": {} }, "required": [ "id", "project_id", "deployment_id", "workload_id", "number", "image", "variables", "secret_references", "secrets", "release_command", "created_at" ], "additionalProperties": false } ``` ### Roll back to revision `POST /v1/revisions/{id}/rollback` #### Path parameters - `id` custom, required ```json { "$schema": "https://json-schema.org/draft/2020-12/schema" } ``` #### Response - `id` custom, required - `project_id` custom, required - `workload_id` custom, required - `image` string (pattern: ^[^\s@]+@sha256:[0-9a-f]{64}$), required - `variables` object (default: {}), required - `secret_references` object (default: {}), required - `secrets` object (default: {}), required - `release_command` string[] | null, required - `schedule` object | null, optional - `cron` string (max length: 200; pattern: ^[\w*,/-]+(?:\s+[\w*,/-]+){4}$), required - `time_zone` string (default: "UTC"; max length: 100), required - `suspended` boolean (default: false), required - `timeout_seconds` integer (default: 300; min: 10; max: 86400), required - `max_retries` integer (default: 1; min: 0; max: 6), required - `url` string | null, required - `status` "queued" | "running" | "succeeded" | "failed" | "cancelled", required - `revision_id` string | null, required - `error` string | null, required - `logs` string, required - `created_at` custom, required - `updated_at` custom, required - `started_at` custom | null, required - `finished_at` custom | null, required JSON Schema: ```json { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": {}, "project_id": {}, "workload_id": {}, "image": { "type": "string", "pattern": "^[^\\s@]+@sha256:[0-9a-f]{64}$" }, "variables": { "default": {}, "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "type": "string" } }, "secret_references": { "default": {}, "type": "object", "propertyNames": { "type": "string", "pattern": "^[A-Z_][A-Z0-9_]*$" }, "additionalProperties": { "anyOf": [ { "anyOf": [ {}, {} ] }, { "anyOf": [ {}, {} ] } ] } }, "secrets": { "default": {}, "type": "object", "propertyNames": { "type": "string", "pattern": "^[A-Z_][A-Z0-9_]*$" }, "additionalProperties": { "anyOf": [ {}, {} ] } }, "release_command": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ] }, "schedule": { "anyOf": [ { "type": "object", "properties": { "cron": { "type": "string", "maxLength": 200, "pattern": "^[\\w*,/-]+(?:\\s+[\\w*,/-]+){4}$" }, "time_zone": { "default": "UTC", "type": "string", "maxLength": 100 }, "suspended": { "default": false, "type": "boolean" }, "timeout_seconds": { "default": 300, "type": "integer", "minimum": 10, "maximum": 86400 }, "max_retries": { "default": 1, "type": "integer", "minimum": 0, "maximum": 6 } }, "required": [ "cron", "time_zone", "suspended", "timeout_seconds", "max_retries" ], "additionalProperties": false }, { "type": "null" } ], "properties": { "cron": { "type": "string", "maxLength": 200, "pattern": "^[\\w*,/-]+(?:\\s+[\\w*,/-]+){4}$" }, "time_zone": { "default": "UTC", "type": "string", "maxLength": 100 }, "suspended": { "default": false, "type": "boolean" }, "timeout_seconds": { "default": 300, "type": "integer", "minimum": 10, "maximum": 86400 }, "max_retries": { "default": 1, "type": "integer", "minimum": 0, "maximum": 6 } }, "required": [ "cron", "time_zone", "suspended", "timeout_seconds", "max_retries" ] }, "url": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "status": { "type": "string", "enum": [ "queued", "running", "succeeded", "failed", "cancelled" ] }, "revision_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "logs": { "type": "string" }, "created_at": {}, "updated_at": {}, "started_at": { "anyOf": [ {}, { "type": "null" } ] }, "finished_at": { "anyOf": [ {}, { "type": "null" } ] } }, "required": [ "id", "project_id", "workload_id", "image", "variables", "secret_references", "secrets", "release_command", "url", "status", "revision_id", "error", "logs", "created_at", "updated_at", "started_at", "finished_at" ], "additionalProperties": false } ``` ## Routes A Run ingress rule connecting one claimed Hostname to a service workload. ### Resource schema - `id` custom, required - `project_id` custom, required - `hostname_id` custom, required - `hostname` string (min length: 3; max length: 253; pattern: ^(?=.{3,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$), required - `workload` string (min length: 1; max length: 63; pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$), required - `status` "active" | "disabled", required - `created_at` custom, required - `updated_at` custom, required JSON Schema: ```json { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": {}, "project_id": {}, "hostname_id": {}, "hostname": { "type": "string", "minLength": 3, "maxLength": 253, "pattern": "^(?=.{3,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$" }, "workload": { "type": "string", "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" }, "status": { "type": "string", "enum": [ "active", "disabled" ] }, "created_at": {}, "updated_at": {} }, "required": [ "id", "project_id", "hostname_id", "hostname", "workload", "status", "created_at", "updated_at" ], "additionalProperties": false } ``` ### Create route `POST /v1/routes` #### Request body - `project_id` custom, required - `hostname` string (min length: 3; max length: 253; pattern: ^(?=.{3,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$), required - `workload` string (min length: 1; max length: 63; pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$), required JSON Schema: ```json { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "project_id": {}, "hostname": { "type": "string", "minLength": 3, "maxLength": 253, "pattern": "^(?=.{3,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$" }, "workload": { "type": "string", "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" } }, "required": [ "project_id", "hostname", "workload" ] } ``` #### Response - `id` custom, required - `project_id` custom, required - `hostname_id` custom, required - `hostname` string (min length: 3; max length: 253; pattern: ^(?=.{3,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$), required - `workload` string (min length: 1; max length: 63; pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$), required - `status` "active" | "disabled", required - `created_at` custom, required - `updated_at` custom, required JSON Schema: ```json { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": {}, "project_id": {}, "hostname_id": {}, "hostname": { "type": "string", "minLength": 3, "maxLength": 253, "pattern": "^(?=.{3,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$" }, "workload": { "type": "string", "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" }, "status": { "type": "string", "enum": [ "active", "disabled" ] }, "created_at": {}, "updated_at": {} }, "required": [ "id", "project_id", "hostname_id", "hostname", "workload", "status", "created_at", "updated_at" ], "additionalProperties": false } ``` ### List routes `GET /v1/routes` #### Query parameters - `limit` integer (min: 1; max: 100), optional - `after` string, optional - `project_id` custom, required - `hostname` string (min length: 3; max length: 253; pattern: ^(?=.{3,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$), optional - `workload` string (min length: 1; max length: 63; pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$), optional - `status` "active" | "disabled", optional JSON Schema: ```json { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "limit": { "type": "integer", "minimum": 1, "maximum": 100 }, "after": { "type": "string" }, "project_id": {}, "hostname": { "type": "string", "minLength": 3, "maxLength": 253, "pattern": "^(?=.{3,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$" }, "workload": { "type": "string", "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" }, "status": { "type": "string", "enum": [ "active", "disabled" ] } }, "required": [ "project_id" ] } ``` #### Response - `data` object[], required - `id` custom, required - `project_id` custom, required - `hostname_id` custom, required - `hostname` string (min length: 3; max length: 253; pattern: ^(?=.{3,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$), required - `workload` string (min length: 1; max length: 63; pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$), required - `status` "active" | "disabled", required - `created_at` custom, required - `updated_at` custom, required - `has_more` boolean, required JSON Schema: ```json { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": {}, "project_id": {}, "hostname_id": {}, "hostname": { "type": "string", "minLength": 3, "maxLength": 253, "pattern": "^(?=.{3,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$" }, "workload": { "type": "string", "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" }, "status": { "type": "string", "enum": [ "active", "disabled" ] }, "created_at": {}, "updated_at": {} }, "required": [ "id", "project_id", "hostname_id", "hostname", "workload", "status", "created_at", "updated_at" ], "additionalProperties": false } }, "has_more": { "type": "boolean" } }, "required": [ "data", "has_more" ], "additionalProperties": false } ``` ### Get route `GET /v1/routes/{id}` #### Path parameters - `id` custom, required ```json { "$schema": "https://json-schema.org/draft/2020-12/schema" } ``` #### Response - `id` custom, required - `project_id` custom, required - `hostname_id` custom, required - `hostname` string (min length: 3; max length: 253; pattern: ^(?=.{3,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$), required - `workload` string (min length: 1; max length: 63; pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$), required - `status` "active" | "disabled", required - `created_at` custom, required - `updated_at` custom, required JSON Schema: ```json { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": {}, "project_id": {}, "hostname_id": {}, "hostname": { "type": "string", "minLength": 3, "maxLength": 253, "pattern": "^(?=.{3,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$" }, "workload": { "type": "string", "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" }, "status": { "type": "string", "enum": [ "active", "disabled" ] }, "created_at": {}, "updated_at": {} }, "required": [ "id", "project_id", "hostname_id", "hostname", "workload", "status", "created_at", "updated_at" ], "additionalProperties": false } ``` ### Update route `PATCH /v1/routes/{id}` #### Path parameters - `id` custom, required ```json { "$schema": "https://json-schema.org/draft/2020-12/schema" } ``` #### Request body - `workload` string (min length: 1; max length: 63; pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$), optional - `status` "active" | "disabled", optional JSON Schema: ```json { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "workload": { "type": "string", "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" }, "status": { "type": "string", "enum": [ "active", "disabled" ] } } } ``` #### Response - `id` custom, required - `project_id` custom, required - `hostname_id` custom, required - `hostname` string (min length: 3; max length: 253; pattern: ^(?=.{3,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$), required - `workload` string (min length: 1; max length: 63; pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$), required - `status` "active" | "disabled", required - `created_at` custom, required - `updated_at` custom, required JSON Schema: ```json { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": {}, "project_id": {}, "hostname_id": {}, "hostname": { "type": "string", "minLength": 3, "maxLength": 253, "pattern": "^(?=.{3,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$" }, "workload": { "type": "string", "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" }, "status": { "type": "string", "enum": [ "active", "disabled" ] }, "created_at": {}, "updated_at": {} }, "required": [ "id", "project_id", "hostname_id", "hostname", "workload", "status", "created_at", "updated_at" ], "additionalProperties": false } ``` ### Delete route `DELETE /v1/routes/{id}` #### Path parameters - `id` custom, required ```json { "$schema": "https://json-schema.org/draft/2020-12/schema" } ``` #### Response No response body. --- Socra company tagline: Multiply Your Judgment Canonical URL: https://cloud.socra.com/docs/run/reference/api