# Run a one-shot command in a pod (synchronous, non-streaming) Source: https://docs.orchard.hackclub.com/api/operations/pods_exec/ `POST /apiv1/pods/{podName}/exec` Operation ID: `pods_exec` Auth: authenticated (scope: exec) ## Parameters | Name | In | Required | Description | | --- | --- | --- | --- | | `podName` | path | Yes | | ## Request body ```json { "additionalProperties": {}, "properties": { "command": { "anyOf": [ { "type": "string" }, { "items": { "type": "string" }, "type": "array" } ], "description": "Command to run; a string is wrapped as ['/bin/sh', '-c', command]" }, "container": { "description": "Container name (defaults to the first container in the pod spec)", "type": "string" }, "namespace": { "description": "Pod namespace; required here or as a ?namespace= query param", "type": "string" }, "timeoutMs": { "description": "Timeout in milliseconds, clamped to 1000..300000 (default 60000)", "type": "integer" } }, "required": [ "command" ], "type": "object" } ``` ## Responses ### 200: OK ```json { "additionalProperties": {}, "properties": { "container": { "description": "The container the command ran in", "type": "string" }, "stderr": { "type": "string" }, "stdout": { "type": "string" }, "success": { "type": "boolean" } }, "required": [ "stdout", "stderr", "success", "container" ], "type": "object" } ```