Automation · Automation Architecture
API Layer
Cheat sheet · https://pcornel.dk/topic.php?topic=5190
Answer
The API layer exposes automation as REST or GraphQL endpoints, so other systems, portals and pipelines can start jobs, pass inputs and read results without direct access to the automation server.
Remember
- Authenticate and authorize every API call.
- Return job IDs and status.
- Validate inputs at the API.
First checks
curl -s -H 'Authorization: Bearer <token>' https://<automation-api>/api/v2/ping/— API reachable (AWX example)- API RBAC and tokens — security
- API versioning — stability
Verify in this order
client → API → controller → jobs
Where it usually breaks
Client payload/auth → HTTP transport → endpoint validation/policy → request accepted → queued/job execution → target mutation → effective state → consumer workload.
Automation Architecture → API Layer · operational reference
| Layer | Automation Architecture → API Layer operational reference |
|---|---|
| Runtime/ownership | Automation API layer / OpenAPI-described HTTP interfaces · identify controller/parser, durable intent, identity and target ownership before mutation |
| Persistent intent | Versioned definition/configuration with explicit dependencies, scope and credential boundary |
| Verification | Validate the API description, exercise one documented read and one bounded write against a test endpoint, then compare response schema and target read-back. |
| Expected interpretation | The API layer exposes explicit operations, schemas, auth and error contracts; clients can distinguish accepted work from completed state and can verify the target independently. |
| Recovery boundary | Preserve correlation IDs + pre-state, repair first failing boundary, then verify the target independently |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5190