Pcornel
Automation · Automation Architecture

API Layer

Cheat sheet · https://pcornel.dk/topic.php?topic=5190

Back to the Topic

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

LayerAutomation Architecture → API Layer operational reference
Runtime/ownershipAutomation API layer / OpenAPI-described HTTP interfaces · identify controller/parser, durable intent, identity and target ownership before mutation
Persistent intentVersioned definition/configuration with explicit dependencies, scope and credential boundary
VerificationValidate the API description, exercise one documented read and one bounded write against a test endpoint, then compare response schema and target read-back.
Expected interpretationThe 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 boundaryPreserve 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

Confirmation

Confirm action

Continue?