Skip to main content

Add collection

post
/api/pvlt/1.0/ctl/collections

Adds a collection.

The collection request can be provided in JSON or PVSchema format by setting the Content-Type header to application/json or application/pvschema, respectively. The collection can be returned in JSON or PVSchema format using the format query parameter or by setting the Accept header to application/json or application/pvschema, respectively. The default is to return JSON.

See PVSchema for more details on the structure and content of PVSchema.

Invalid optional properties attributes in a JSON request are ignored.

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

Query parameters

  • format - string
  • options - array of strings
    Each string:

Request body

object required*
  • creation_time - string
  • modification_time - string
  • name - string required*
  • properties - array of objects required*
    Each object:
    • creation_time - string
    • modification_time - string
    • description - string
    • is_builtin - boolean
    • is_encrypted - boolean
    • is_index - boolean
    • is_nullable - boolean
    • is_readonly - boolean
    • is_unique - boolean
    • name - string required*
    • data_type_name - string required*
  • type - string required*
Example
{
"type": "PERSONS",
"name": "customers",
"properties": [
{
"description": "Date of birth",
"name": "date_of_birth",
"data_type_name": "DATE_OF_BIRTH",
"is_nullable": true
},
{
"description": "Email",
"name": "email",
"data_type_name": "EMAIL",
"is_unique": true,
"is_index": true,
"is_nullable": true
},
{
"description": "First name",
"name": "first_name",
"data_type_name": "NAME"
},
{
"description": "Last name",
"name": "last_name",
"data_type_name": "NAME"
},
{
"description": "Phone number",
"name": "phone_number",
"data_type_name": "PHONE_NUMBER",
"is_unique": true,
"is_index": true,
"is_nullable": true
}
]
}
Example
{
"type": "PERSONS",
"name": "customers",
"properties": [
{
"description": "Date of birth",
"name": "date_of_birth",
"data_type_name": "DATE_OF_BIRTH",
"is_nullable": true
},
{
"description": "Email",
"name": "email",
"data_type_name": "EMAIL",
"is_unique": true,
"is_index": true,
"is_nullable": true
},
{
"description": "First name",
"name": "first_name",
"data_type_name": "NAME"
},
{
"description": "Last name",
"name": "last_name",
"data_type_name": "NAME"
},
{
"description": "Phone number",
"name": "phone_number",
"data_type_name": "PHONE_NUMBER",
"is_unique": true,
"is_index": true,
"is_nullable": true
}
]
}

Possible responses

object required*
  • creation_time - string
  • modification_time - string
  • name - string required*
  • properties - array of objects required*
    Each object:
    • creation_time - string
    • modification_time - string
    • description - string
    • is_builtin - boolean
    • is_encrypted - boolean
    • is_index - boolean
    • is_nullable - boolean
    • is_readonly - boolean
    • is_unique - boolean
    • name - string required*
    • data_type_name - string required*
  • type - string required*
Example
{
"type": "PERSONS",
"name": "customers",
"properties": [
{
"description": "Date of birth",
"name": "date_of_birth",
"data_type_name": "DATE_OF_BIRTH",
"is_nullable": true
},
{
"description": "Email",
"name": "email",
"data_type_name": "EMAIL",
"is_unique": true,
"is_index": true,
"is_nullable": true
},
{
"description": "First name",
"name": "first_name",
"data_type_name": "NAME"
},
{
"description": "Last name",
"name": "last_name",
"data_type_name": "NAME"
},
{
"description": "Phone number",
"name": "phone_number",
"data_type_name": "PHONE_NUMBER",
"is_unique": true,
"is_index": true,
"is_nullable": true
}
]
}
Example
{
"type": "PERSONS",
"name": "customers",
"properties": [
{
"description": "Date of birth",
"name": "date_of_birth",
"data_type_name": "DATE_OF_BIRTH",
"is_unique": false,
"is_index": false,
"is_encrypted": true,
"is_nullable": true,
"is_builtin": false,
"is_readonly": false,
"creation_time": "2022-12-01T10:04:42.777225Z",
"modification_time": "2022-12-01T10:04:42.777225Z"
},
{
"description": "Email",
"name": "email",
"data_type_name": "EMAIL",
"is_unique": true,
"is_index": true,
"is_encrypted": true,
"is_nullable": true,
"is_builtin": false,
"is_readonly": false,
"creation_time": "2022-12-01T10:04:42.777225Z",
"modification_time": "2022-12-01T10:04:42.777225Z"
},
{
"description": "First name",
"name": "first_name",
"data_type_name": "NAME",
"is_unique": false,
"is_index": false,
"is_encrypted": true,
"is_nullable": false,
"is_builtin": false,
"is_readonly": false,
"creation_time": "2022-12-01T10:04:42.777225Z",
"modification_time": "2022-12-01T10:04:42.777225Z"
},
{
"description": "Last name",
"name": "last_name",
"data_type_name": "NAME",
"is_unique": false,
"is_index": false,
"is_encrypted": true,
"is_nullable": false,
"is_builtin": false,
"is_readonly": false,
"creation_time": "2022-12-01T10:04:42.777225Z",
"modification_time": "2022-12-01T10:04:42.777225Z"
},
{
"description": "Phone number",
"name": "phone_number",
"data_type_name": "PHONE_NUMBER",
"is_unique": true,
"is_index": true,
"is_encrypted": true,
"is_nullable": true,
"is_builtin": false,
"is_readonly": false,
"creation_time": "2022-12-01T10:04:42.777225Z",
"modification_time": "2022-12-01T10:04:42.777225Z"
}
],
"creation_time": "2022-12-01T10:04:42.777225Z",
"modification_time": "2022-12-01T10:04:42.777225Z"
}

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