Action

Create an approval action

Changed on

Creates a new approval action.

post/approval/action

Request

  • Base URL
    https://api.nullplatform.com
  • URL
    https://api.nullplatform.com/approval/action
  • Auth
    HTTP bearer

Request body

nrnstring required

A resource identifier (NRN) specifying where this action applies.

entity'deployment' | 'scope' | 'service:action' | 'parameter' | 'action_item' required

The entity that requires approval.

action'deployment:create' | 'scope:create' | 'scope:recreate' | 'scope:write' | 'scope:delete' | 'scope:stop' | 'service:action:create' | 'parameter:read-secrets' | 'action_item:resolve' | 'action_item:defer' | 'action_item:reject' required

The action that requires approval.

dimensionsobject

Key-value pairs defining the scope of the action.

on_policy_success'approve' | 'manual'

The action to be taken when the policy check is successful.

Note: If omitted, this value defaults to manual.

on_policy_fail'manual' | 'deny'

The action to be taken when the policy check fails.

Note: If omitted, this value defaults to manual.

on_checklist_fail'deny' | 'pending' | 'manual'

What happens to the request when its checklist run resolves as fail. Only read in checklist mode; policy-mode actions use on_policy_fail instead.

  • deny: the request is denied outright. Reviewers are never notified and manual review can't be requested.
  • pending: the request stays open. The requester fixes the cause and requests again, cancels, or asks for a manual review, which is when reviewers are notified.
  • manual: the request goes to manual review right away and reviewers are notified.

Note: If omitted, this value defaults to pending. An invalid value returns 400 INVALID_CHECKLIST_FAIL_PATH.

time_to_replyinteger

How long (in milliseconds) approvers have to respond before the request expires. If the window closes without a decision, the request status moves to expired.

allowed_time_to_executeinteger

How long (in milliseconds) after approval the action can be executed. If execution doesn't happen within this window, the execution_status moves to expired.

Example request

{
  "nrn": "organization=1:account=2:namespace=3:application=4",
  "entity": "deployment",
  "action": "deployment:create",
  "dimensions": {
    "environment": "production",
    "country": "us"
  },
  "on_policy_success": "approve",
  "on_policy_fail": "deny",
  "on_checklist_fail": "pending",
  "time_to_reply": 259200000,
  "allowed_time_to_execute": 86400000
}

Response

The operation was successful.

idinteger required

A unique identifier for the approval action.

nrnstring required

A resource identifier (NRN) specifying where this action applies.

entity'deployment' | 'scope' | 'service:action' | 'parameter' | 'action_item' required

The entity that requires approval.

action'deployment:create' | 'scope:create' | 'scope:recreate' | 'scope:write' | 'scope:delete' | 'scope:stop' | 'service:action:create' | 'parameter:read-secrets' | 'action_item:resolve' | 'action_item:defer' | 'action_item:reject' required

The action that requires approval.

dimensionsobject

Key-value pairs defining the scope of the action.

on_policy_success'approve' | 'manual'

The action to be taken when the policy check is successful.

Note: If omitted, this value defaults to manual.

on_policy_fail'manual' | 'deny'

The action to be taken when the policy check fails.

Note: If omitted, this value defaults to manual.

on_checklist_fail'deny' | 'pending' | 'manual'

What happens to the request when its checklist run resolves as fail. Only read in checklist mode; policy-mode actions use on_policy_fail instead.

  • deny: the request is denied outright. Reviewers are never notified and manual review can't be requested.
  • pending: the request stays open. The requester fixes the cause and requests again, cancels, or asks for a manual review, which is when reviewers are notified.
  • manual: the request goes to manual review right away and reviewers are notified.

Note: If omitted, this value defaults to pending. An invalid value returns 400 INVALID_CHECKLIST_FAIL_PATH.

time_to_replyinteger

How long (in milliseconds) approvers have to respond before the request expires. If the window closes without a decision, the request status moves to expired.

allowed_time_to_executeinteger

How long (in milliseconds) after approval the action can be executed. If execution doesn't happen within this window, the execution_status moves to expired.

Example response

{
  "id": 1234,
  "nrn": "organization=1:account=2:namespace=3:application=4",
  "entity": "deployment",
  "action": "deployment:create",
  "dimensions": {
    "environment": "production",
    "country": "us"
  },
  "on_policy_success": "approve",
  "on_policy_fail": "deny",
  "on_checklist_fail": "manual",
  "time_to_reply": 259200000,
  "allowed_time_to_execute": 86400000
}

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

      added the new optional request property

    • info

      added the optional property to the response with the status