Approval

Dry-run an approval

Changed on

Resolves the approval action a real request would resolve and previews the result without creating a request. In checklist mode, conditions are evaluated for real while manual and external items report what they would wait for.

post/approval/dry-run

Request

  • Base URL
    https://api.nullplatform.com
  • URL
    https://api.nullplatform.com/approval/dry-run
  • Auth
    HTTP bearer

Request body

nrnstring required

Where the request would be made.

actionstring required

The action the request would perform.

approval_mode'auto' | 'checklist' | 'policy'

Which branch to evaluate. auto picks the checklist when the action has one.

entity_idinteger

The entity the request would act on.

dimensionsobject

Dimensions used to match the approval action.

requestedobject

The request payload the context is built from.

contextobject

Supply a context to evaluate against instead of the one nullplatform would build.

Example request

{
  "nrn": "organization=1:account=2:namespace=3:application=4",
  "action": "deployment:create",
  "approval_mode": "checklist",
  "entity_id": 9876,
  "requested": {
    "scope_id": 5521,
    "release_id": 7710
  }
}

Response

The operation was successful.

mode'checklist' | 'policy'

Which branch was evaluated.

approvalActionobject

The approval action the request matched. Every field is emitted twice, in camelCase and in snake_case.

specification_snapshotobject

The specification that was evaluated. Checklist mode only.

policiesobject[]

One entry per requirement, in the shape policy mode returns.

action'approve' | 'manual' | 'deny'

Whether the request would be approved, sent to a person, or denied.

Example response

{
  "mode": "checklist",
  "approvalAction": {
    "id": 1842,
    "nrn": "organization=1:account=2:namespace=3",
    "entity": "deployment",
    "action": "deployment:create",
    "checklistSpecificationId": "spec_abc123def456ghij",
    "checklist_specification_id": "spec_abc123def456ghij"
  },
  "action": "manual"
}

Changes

    • breaking

      the response property became optional for the status

    • breaking

      the response property became optional for the status

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • info

      media type application/json was changed to a more specific media type application/problem+json for the response status

    • info

      media type application/json was changed to a more specific media type application/problem+json for the response status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      response property message deprecated

    • info

      response property message deprecated

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      endpoint added