Create a configuration plan
/configuration/plansCalculates the steps required to bring the account to the state described in a configuration manifest, and returns them as a signed plan.
This operation is synchronous and does not modify any resource. The plan expires 24 hours after it is created, as indicated by expires_at. To apply it, submit the plan to the apply operation before it expires.
If the manifest is invalid, the API returns validation_failed with the same error codes reported by the validation operation, and no plan is created.
Autonomous mode: the API credential secret, sent as a bearer token. Credential secrets are identified by a fixed prefix.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
A declarative configuration manifest document (cademi/configuration-manifest/v1).
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/configuration/plans" \ -H "Content-Type: application/json" \ -d '{ "resources": [ { "kind": "showcase", "ref": "string" } ] }'{ "data": { "expires_at": "2019-08-24T14:15:22Z", "id": "string", "object": "plan", "revisions": {}, "signature": "string", "steps": [ { "action": "create", "attributes": {}, "changes": {}, "external_id": "string", "id": "string", "kind": "string", "ref": "string", "requires": [ "string" ], "revision": "string", "skip_reason": "string" } ], "summary": { "create": 0, "delete": 0, "noop": 0, "skip": 0, "update": 0 } }}Apply a configuration plan POST
Applies a configuration plan previously returned by the plan operation. Submit the plan's `id` as `plan_id`, together with its `signature` and `steps`. Before accepting the request, the API verifies that the plan is still valid, that its signature matches the submitted steps, and that none of the affected resources has changed since the plan was calculated. A plan can only be applied with the same credentials used to create it, and only once. The plan is applied asynchronously. The response returns an operation, and the `Location` header points to it so you can track progress. Steps are not applied as a single transaction: if a step fails, steps that were already applied remain in effect.
Validate a configuration manifest POST
Validates a configuration manifest without modifying any resource. Content problems, such as invalid fields or unresolved references, are reported in the validation report, and the response status is still `200`. Check the `valid` field to determine the result. The request is rejected with `422` only when the manifest cannot be evaluated: `too_many_items` when it exceeds the maximum number of resources, and `unsupported_resource` when it contains an unsupported resource kind.