Lock state for a job
The server validates that the SAT's runner binding matches the runner assigned to this job. Returns PERMISSION_DENIED if they do not match. Returns FAILED_PRECONDITION if the state is already locked by a different operation. The lock_id is generated by Terraform and must be passed to UnlockState.
Maps to Terraform HTTP backend POST on the lock address.
Scope: state:write | Token types: sat
Authorization
bearerAuth Personal Access Token (PAT) or Service Access Token (SAT). Pass the token in the Authorization header: Bearer adm_pat_...
In: header
Path Parameters
The job requesting the lock (UUID).
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://admiral.example.com/api/v1/runner/jobs/497f6eca-6276-4993-bfeb-53cbbbba6f08/state/lock" \ -H "Content-Type: application/json" \ -d '{}'{}Retrieve state for a job GET
The server validates that the SAT's runner binding matches the runner assigned to this job. Returns PERMISSION_DENIED if they do not match. Returns NOT_FOUND if the job does not exist or has been cancelled. Maps to Terraform HTTP backend GET on the state address. Scope: `state:read` | Token types: `sat`
Push state for a job POST
The server validates that the SAT's runner binding matches the runner assigned to this job. Returns PERMISSION_DENIED if they do not match. Returns FAILED_PRECONDITION if the serial is not greater than the current serial. Returns INVALID_ARGUMENT if the lineage does not match the existing state record. Maps to Terraform HTTP backend POST on the state address. Scope: `state:write` | Token types: `sat`