Claim pending jobs
POST/api/v1/certops/agent/jobs/claim
Outbound-only claim poll authenticated with the per-agent credential (bearer). Request body is the agent-protocol envelope with messageType claim (packages/contracts/certops/agent-protocol.schema.json, additionalProperties false); the body only expresses poll preferences (maxJobs, supportedActions), never a specific job selection. Server selects pending workspace jobs with FOR UPDATE SKIP LOCKED, leases them, and returns signed dispatch payloads: job-payload fields plus claimId, leaseExpiresAt, attemptCount, and the Ed25519 dispatch fields nonce, issuedAt, expiresAt, signingKeyId, signature. Dispatch is blocked while the workspace kill switch is on (409 CERTOPS_WORKSPACE_PAUSED); results reporting never is. A retired agent receives 410. Hidden with 404 while certops.enabled is disabled.
Request
Responses
- 200
- 400
- 401
- 404
- 409
- 410
- 422
- 429
- 500
- 503
Zero or more signed claimed jobs
Message envelope or claim body failed agent-protocol validation
Per-agent credential missing, unknown, or revoked
CertOps is disabled deployment-wide (route is hidden)
Workspace CertOps is paused (CERTOPS_WORKSPACE_PAUSED); message sequence regression (CERTOPS_AGENT_SEQUENCE_REGRESSION); agent blocked by compatibility policy (CERTOPS_AGENT_COMPATIBILITY_BLOCKED); or the deploy public certificate is unavailable (CERTOPS_AGENT_DEPLOY_CERT_UNAVAILABLE)
Agent is retired
Request rejected because it contained private key material
CertOps machine-token rate limit exceeded
Internal server error
Security audit sink unavailable while rejecting private material