opal-scripts

Create OpalScript

Changed on

Creates a new OpalScript.

post/opal-scripts

Request

  • Base URL
    https://api.opal.dev/v1
  • Auth
    HTTP bearer

Request body

namestring required

The name of the OpalScript.

script_type'REQUEST_REVIEW' | 'REQUEST_DELEGATION_CONDITION' | 'CONTEXT_PROVIDER' | 'REQUEST_CONFIGURATION_CONDITION' required

The kind of automation an OpalScript performs.

scriptstring required

The source of the OpalScript.

owner_idstring uuid

The owner of the service user Opal provisions for a REQUEST_REVIEW script. Required for that script type and ignored for the others, which have no reviewer identity.

Example request

{
  "name": "MFA check",
  "script_type": "REQUEST_REVIEW",
  "owner_id": "7c86c85d-0651-43e2-a748-d69d658418e8"
}

Response

The created OpalScript.

opal_script_idstring uuid required

The ID of the OpalScript.

namestring required

The name of the OpalScript.

script_type'REQUEST_REVIEW' | 'REQUEST_DELEGATION_CONDITION' | 'CONTEXT_PROVIDER' | 'REQUEST_CONFIGURATION_CONDITION' required

The kind of automation an OpalScript performs.

scriptstring required

The source of the OpalScript's latest version.

versioninteger required

The version number of the OpalScript's latest version.

updated_atstring date-time

The date the OpalScript was last updated.

Example response

{
  "opal_script_id": "32acc112-21ff-4669-91c2-21e27683eaa1",
  "name": "MFA check",
  "script_type": "REQUEST_REVIEW",
  "version": 3
}

Changes

    • warning

      added the new REQUEST_CONFIGURATION_CONDITION enum value to the response property for the response status

    • info

      added the new REQUEST_CONFIGURATION_CONDITION enum value to the request property

    • info

      endpoint added