Add collection
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.
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
- stringoptions
- array of stringsEach string:
Request body
- application/json
- application/pvschema
creation_time
- stringmodification_time
- stringname
- string required*properties
- array of objects required*Each object:creation_time
- stringmodification_time
- stringdescription
- stringis_builtin
- booleanis_encrypted
- booleanis_index
- booleanis_substring_index
- booleanis_nullable
- booleanis_readonly
- booleanis_unique
- booleanname
- string required*data_type_name
- string required*
type
- string required*
{
"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_substring_index": false,
"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_substring_index": false,
"is_nullable": true
}
]
}
{
"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_substring_index": false,
"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_substring_index": false,
"is_nullable": true
}
]
}
customers PERSONS (
date_of_birth DATE_OF_BIRTH NULL COMMENT 'Date of birth',
email EMAIL NULL UNIQUE INDEX COMMENT 'Email',
first_name NAME COMMENT 'First name',
last_name NAME COMMENT 'Last name',
phone_number PHONE_NUMBER NULL UNIQUE INDEX COMMENT 'Phone number',
);
Possible responses
- 200
- 400
- 401
- 403
- 404
- 405
- 409
- 410
- 500
- 503
- application/json
- application/pvschema
creation_time
- stringmodification_time
- stringname
- string required*properties
- array of objects required*Each object:creation_time
- stringmodification_time
- stringdescription
- stringis_builtin
- booleanis_encrypted
- booleanis_index
- booleanis_substring_index
- booleanis_nullable
- booleanis_readonly
- booleanis_unique
- booleanname
- string required*data_type_name
- string required*
type
- string required*
{
"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_substring_index": false,
"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_substring_index": false,
"is_nullable": true
}
]
}
{
"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_substring_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_substring_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": "First name",
"name": "first_name",
"data_type_name": "NAME",
"is_unique": false,
"is_index": false,
"is_substring_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_substring_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_substring_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"
}
],
"creation_time": "2022-12-01T10:04:42.777225Z",
"modification_time": "2022-12-01T10:04:42.777225Z"
}
customers PERSONS (
date_of_birth DATE_OF_BIRTH NULL COMMENT 'Date of birth',
email EMAIL NULL UNIQUE INDEX COMMENT 'Email',
first_name NAME COMMENT 'First name',
last_name NAME COMMENT 'Last name',
phone_number PHONE_NUMBER NULL UNIQUE INDEX COMMENT 'Phone number',
);
- application/json
context
- object required*Values of additional properties are stringsExample{
"objectid": "b56dd6aa-35f0-11ed-a261-0242ac120002"
}error_code
- string required*message
- string required*error_url
- string
{
"error_code": "PV1001",
"message": "The access reason is missing.",
"context": {
"reason": null
}
}
- application/json
context
- object required*Values of additional properties are stringsExample{
"objectid": "b56dd6aa-35f0-11ed-a261-0242ac120002"
}error_code
- string required*message
- string required*error_url
- string
{
"error_code": "PV1005",
"message": "The request is unauthorized.",
"context": {}
}
- application/json
context
- object required*Values of additional properties are stringsExample{
"objectid": "b56dd6aa-35f0-11ed-a261-0242ac120002"
}error_code
- string required*message
- string required*error_url
- string
{
"error_code": "PV1007",
"message": "The operation is forbidden due to missing capabilities.",
"context": {
"username": "WebServer"
}
}
- application/json
context
- object required*Values of additional properties are stringsExample{
"objectid": "b56dd6aa-35f0-11ed-a261-0242ac120002"
}error_code
- string required*message
- string required*error_url
- string
{
"error_code": "PV1004",
"message": "The collection is not found.",
"context": {}
}
- application/json
context
- object required*Values of additional properties are stringsExample{
"objectid": "b56dd6aa-35f0-11ed-a261-0242ac120002"
}error_code
- string required*message
- string required*error_url
- string
{
"error_code": "PV1026",
"message": "The operation is not allowed in in-memory mode.",
"context": {}
}
- application/json
context
- object required*Values of additional properties are stringsExample{
"objectid": "b56dd6aa-35f0-11ed-a261-0242ac120002"
}error_code
- string required*message
- string required*error_url
- string
{
"error_code": "PV3218",
"message": "Concurrent conflicting updates to the same object.",
"context": {}
}
- application/json
context
- object required*Values of additional properties are stringsExample{
"objectid": "b56dd6aa-35f0-11ed-a261-0242ac120002"
}error_code
- string required*message
- string required*error_url
- string
{
"error_code": "PV1033",
"message": "The resource is gone.",
"context": {}
}
- application/json
context
- object required*Values of additional properties are stringsExample{
"objectid": "b56dd6aa-35f0-11ed-a261-0242ac120002"
}error_code
- string required*message
- string required*error_url
- string
{
"error_code": "PV1000",
"message": "Something went wrong",
"context": {}
}
- application/json
context
- object required*Values of additional properties are stringsExample{
"objectid": "b56dd6aa-35f0-11ed-a261-0242ac120002"
}error_code
- string required*message
- string required*error_url
- string
{
"error_code": "PV1009",
"message": "The operation timed out on the server.",
"context": {}
}
Query parameters
Request body
Code examples