Skip to main content

Invoke action

post
/api/pvlt/1.0/data/actions/{action}

Invokes an action.

The body of the request is passed to the action function parameters, and the result of the action function is returned in the response.

The role performing this operation must have:

  • The CapActionInvoker capability.
  • At least one allowing policy and no denying policies for the invoke operation for the action provided in the call.

See identity and access management for more information about how capabilities are used to control access to operations and policies are used to control access to data.

Request

Path parameters

  • action - string required*

    The name of an action.

Query parameters

  • adhoc_reason - string

    An ad-hoc reason for accessing the Vault data. Required when reason is set to Other.

  • reason - string

    Details of the reason for requesting the property. The default is set when no access reason is provided and PVAULT_SERVICE_FORCE_ACCESS_REASON is false.

  • custom_audit - string

    Custom audit information to be included in the audit log.

  • reload_cache - boolean

    Reloads the cache before the action.

Request body

Details of the action to execute.

required*

Any valid JSON value to be used as an input to the action function.

Possible responses

The request is successful.

required*

The result of an action invocation serialized as a JSON value.

Try the API

Authorization

Path parameters

Query parameters

Request body

Navigate to the docs of your local Vault installation to try the API directly from there.

Code examples

Example