Skip to main content

Add bundle

post
/api/pvlt/1.0/ctl/bundles

Adds a bundle.

The role performing this operation must have the CapCodeWriter capability. See Access control for more information about how capabilities are used to control access to operations.

Request

Query parameters

  • custom_audit - string

Request body

required*
All of:
12
  • description - string
  • code - string
Example
{
"name": "example_bundle",
"description": "An example bundle that exports a validator, normalizer, transformer, and action",
"code": "U2FtcGxlIGNvZGU="
}

Possible responses

required*
All of:
12
  • description - string
  • code - string
Example
{
"name": "example_bundle",
"description": "An example bundle that exports a validator, normalizer, transformer, and action",
"exports": {
"validators": [
{
"name": "is_positive",
"type": "validator",
"description": "A validator that returns true if its argument is positive.",
"dependencies": {
"properties": []
}
}
],
"normalizers": [
{
"name": "to_lower",
"type": "normalizer",
"description": "A normalizer that formats a string to lowercase without any dependencies."
}
],
"transformers": [
{
"name": "to_name_with_title",
"type": "transformer",
"description": "A transformer that accepts a full name and returns it prepended with a title.",
"dependencies": {
"properties": [
"gender",
"marital_status"
]
}
}
],
"actions": [
{
"name": "decrypt_and_send",
"type": "action",
"description": "An action that decrypts an object and sends it to a compliant third-party service."
}
]
},
"code": "U2FtcGxlIGNvZGU=",
"creation_time": "2022-12-02T02:02:14.398599Z"
}

Try the API

Authorization

Query parameters

Request body

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

Code examples

Example