{ "components": { "schemas": { "FunctionExecuteRequest": { "properties": { "async_job": { "default": false, "title": "Async Job", "type": "boolean" }, "input_data": { "additionalProperties": true, "title": "Input Data", "type": "object" }, "run_id": { "format": "uuid", "title": "Run Id", "type": "string" }, "timeout_seconds": { "default": 120, "maximum": 3600.0, "minimum": 1.0, "title": "Timeout Seconds", "type": "integer" } }, "required": [ "run_id" ], "title": "FunctionExecuteRequest", "type": "object" }, "FunctionJobStatusResponse": { "properties": { "code_hash": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Code Hash" }, "completed_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Completed At" }, "duration_ms": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Duration Ms" }, "error": { "anyOf": [ { "$ref": "#/components/schemas/RuntimeErrorInfo" }, { "type": "null" } ] }, "job_id": { "title": "Job Id", "type": "string" }, "output_data": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Output Data" }, "run_id": { "format": "uuid", "title": "Run Id", "type": "string" }, "started_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Started At" }, "status": { "enum": [ "queued", "running", "completed", "failed", "cancelled", "timeout" ], "title": "Status", "type": "string" } }, "required": [ "run_id", "job_id", "status" ], "title": "FunctionJobStatusResponse", "type": "object" }, "FunctionLogEntry": { "properties": { "message": { "title": "Message", "type": "string" }, "stream": { "enum": [ "stdout", "stderr", "system" ], "title": "Stream", "type": "string" }, "timestamp": { "title": "Timestamp", "type": "string" } }, "required": [ "timestamp", "stream", "message" ], "title": "FunctionLogEntry", "type": "object" }, "FunctionLogsResponse": { "properties": { "logs": { "items": { "$ref": "#/components/schemas/FunctionLogEntry" }, "title": "Logs", "type": "array" }, "run_id": { "format": "uuid", "title": "Run Id", "type": "string" } }, "required": [ "run_id" ], "title": "FunctionLogsResponse", "type": "object" }, "FunctionSchemaRequest": { "properties": { "code_hash": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Code Hash" } }, "title": "FunctionSchemaRequest", "type": "object" }, "FunctionSchemaResponse": { "properties": { "code_hash": { "title": "Code Hash", "type": "string" }, "config_schema": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Config Schema" }, "input_schema": { "additionalProperties": true, "title": "Input Schema", "type": "object" }, "output_schema": { "additionalProperties": true, "title": "Output Schema", "type": "object" } }, "required": [ "input_schema", "output_schema", "code_hash" ], "title": "FunctionSchemaResponse", "type": "object" }, "HTTPValidationError": { "properties": { "detail": { "items": { "$ref": "#/components/schemas/ValidationError" }, "title": "Detail", "type": "array" } }, "title": "HTTPValidationError", "type": "object" }, "RuntimeErrorInfo": { "properties": { "message": { "title": "Message", "type": "string" }, "name": { "title": "Name", "type": "string" }, "retryable": { "default": false, "title": "Retryable", "type": "boolean" }, "traceback": { "items": { "type": "string" }, "title": "Traceback", "type": "array" } }, "required": [ "name", "message" ], "title": "RuntimeErrorInfo", "type": "object" }, "ValidationError": { "properties": { "ctx": { "title": "Context", "type": "object" }, "input": { "title": "Input" }, "loc": { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "title": "Location", "type": "array" }, "msg": { "title": "Message", "type": "string" }, "type": { "title": "Error Type", "type": "string" } }, "required": [ "loc", "msg", "type" ], "title": "ValidationError", "type": "object" } } }, "info": { "title": "AgentBox Function Executor", "version": "0.1.0" }, "openapi": "3.1.0", "paths": { "/health": { "get": { "operationId": "get_health", "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": { "type": "string" }, "title": "Response Health Health Get", "type": "object" } } }, "description": "Successful Response" } }, "summary": "Health" } }, "/pods/{pod_id}/functions/{function_name}/execute": { "post": { "operationId": "post_pods_pod_id_functions_function_name_execute", "parameters": [ { "in": "path", "name": "pod_id", "required": true, "schema": { "format": "uuid", "title": "Pod Id", "type": "string" } }, { "in": "path", "name": "function_name", "required": true, "schema": { "title": "Function Name", "type": "string" } }, { "in": "header", "name": "authorization", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FunctionExecuteRequest" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Execute Function" } }, "/pods/{pod_id}/functions/{function_name}/schemas": { "post": { "operationId": "post_pods_pod_id_functions_function_name_schemas", "parameters": [ { "in": "path", "name": "pod_id", "required": true, "schema": { "format": "uuid", "title": "Pod Id", "type": "string" } }, { "in": "path", "name": "function_name", "required": true, "schema": { "title": "Function Name", "type": "string" } }, { "in": "header", "name": "authorization", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FunctionSchemaRequest" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FunctionSchemaResponse" } } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Extract Schemas" } }, "/readiness": { "get": { "operationId": "get_readiness", "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": { "type": "string" }, "title": "Response Readiness Readiness Get", "type": "object" } } }, "description": "Successful Response" } }, "summary": "Readiness" } }, "/runs/{run_id}": { "delete": { "operationId": "delete_runs_run_id", "parameters": [ { "in": "path", "name": "run_id", "required": true, "schema": { "format": "uuid", "title": "Run Id", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": { "anyOf": [ { "type": "boolean" }, { "type": "string" } ] }, "title": "Response Delete Run Runs Run Id Delete", "type": "object" } } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Delete Run" }, "get": { "operationId": "get_runs_run_id", "parameters": [ { "in": "path", "name": "run_id", "required": true, "schema": { "format": "uuid", "title": "Run Id", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FunctionJobStatusResponse" } } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Get Run" } }, "/runs/{run_id}/logs": { "get": { "operationId": "get_runs_run_id_logs", "parameters": [ { "in": "path", "name": "run_id", "required": true, "schema": { "format": "uuid", "title": "Run Id", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FunctionLogsResponse" } } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Get Run Logs" } } } }