Skip to main content

Add collection property

post
/api/pvlt/1.0/ctl/collections/{collection}/properties/{property}

Adds a property to a collection.

The property name provided in the property parameter and request body must match. When the collection contains objects, only nullable properties can be added to the collection.

note

The combined length of the collection name and the longest property name can not exceed 40 characters.

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

Request

Path parameters

  • collection - string required*

    The name of a collection.

  • property - string required*

    The name of the property.

    The name of a property.

Request body

Details of the property.

object required*
  • creation_time - string

    The time when the property was created, in RFC3339Nano format. Vault sets this value automatically. Sending a value for this field is ignored.

  • modification_time - string

    The time when the property was last modified, in RFC3339 format. Vault sets this value automatically. Sending a value for this field is ignored.

  • description - string

    The description of a model.

  • is_builtin - boolean

    Whether the property is created by Vault (or by the user). Built-in properties cannot be deleted or modified. Sending a value for this field is ignored.

  • is_encrypted - boolean

    Whether the value is stored encrypted.

  • is_index - boolean

    Whether the backend storage is optimized for searches on this property. Cannot be set to true for properties with data types LONG_TEXT, JSON, or BLOB, or custom data types based on those types.

  • is_nullable - boolean

    Whether the value of the property can be removed (set to null).

  • is_readonly - boolean

    Whether the user can modify values of this property. Ignored for user define properties. Sending a value for this field is ignored.

  • is_unique - boolean

    Whether the backend storage enforces unique values for active objects. Cannot be set to true for properties with data types LONG_TEXT, JSON, or BLOB, or custom data types based on those types.

  • name - string required*

    The name of a property.

  • data_type_name - string required*

    The name of a data type.

Example
{
"description": "Social Security Number",
"name": "ssn",
"data_type_name": "ssn",
"is_unique": true,
"is_index": true,
"is_encrypted": true,
"is_nullable": true
}

Possible responses

The request is successful.

object required*
  • creation_time - string

    The time when the property was created, in RFC3339Nano format. Vault sets this value automatically. Sending a value for this field is ignored.

  • modification_time - string

    The time when the property was last modified, in RFC3339 format. Vault sets this value automatically. Sending a value for this field is ignored.

  • description - string

    The description of a model.

  • is_builtin - boolean

    Whether the property is created by Vault (or by the user). Built-in properties cannot be deleted or modified. Sending a value for this field is ignored.

  • is_encrypted - boolean

    Whether the value is stored encrypted.

  • is_index - boolean

    Whether the backend storage is optimized for searches on this property. Cannot be set to true for properties with data types LONG_TEXT, JSON, or BLOB, or custom data types based on those types.

  • is_nullable - boolean

    Whether the value of the property can be removed (set to null).

  • is_readonly - boolean

    Whether the user can modify values of this property. Ignored for user define properties. Sending a value for this field is ignored.

  • is_unique - boolean

    Whether the backend storage enforces unique values for active objects. Cannot be set to true for properties with data types LONG_TEXT, JSON, or BLOB, or custom data types based on those types.

  • name - string required*

    The name of a property.

  • data_type_name - string required*

    The name of a data type.

Example
{
"description": "Social Security Number",
"name": "ssn",
"data_type_name": "ssn",
"is_unique": true,
"is_index": true,
"is_encrypted": true,
"is_nullable": true,
"is_builtin": false,
"is_readonly": false,
"creation_time": "2022-12-02T02:02:14.398599Z",
"modification_time": "2022-12-02T02:02:14.398599Z"
}

Try the API

Authorization

Path parameters

Request body

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

Code examples

Example