Classes/collections (classes)
Requests
| HTTP verb | Endpoint | Description |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Creating a new class
Request
Field description: class entity
POST /rest/v1/design/classes HTTP/1.1
Content-Type: application/json; charset=utf-8
class entity
Response
Field description: class entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "5580bb7a-0178-3fc1-67fc-7cd30a921f58",
"classname": "abc/mnesia",
"name": "",
"description": "",
"parent_id": "00000000-0000-0000-0000-000000000000",
"storage_mode": "runtime",
"integrity_mode": "sync_fast_notify",
"cache_mode": "temp",
"properties": [
{
"caption": "NAME",
"data_type": "string",
"name": "name"
},
{
"caption": "VALUE",
"data_type": "any",
"name": "value"
},
{
"caption": "TS",
"data_type": "long",
"name": "ts"
},
{
"caption": "TTL",
"data_type": "int",
"name": "ttl"
}
],
"opts": {
"title": "",
"comment": "",
"dms_group": {},
"cache_limit": 1000,
"cache_sec": 600,
"check_required_fill_defaults": true,
"expires_mode": "create",
"expires_ts_property": "ts",
"expires_ttl_property": "ttl",
"lookup_properties": [
"ttl",
"name"
],
"max_limit": 100,
"max_mask": [],
"max_size": 1000000,
"notify_transactions": false,
"partition_count": 2,
"partition_interval": "month",
"partition_property": "",
"replication_factor": 2,
"storage_instance": "",
"filestorage_instance": "fstest"
},
"ext": {
"ct": "2021-04-02T19:33:49.46Z",
"lwt": "2021-09-03T12:57:17.48Z"
}
}
Getting the list of classes (collection metadata)
Request
| Name | Type | Description |
|---|---|---|
|
|
Filter by field values. |
|
|
List of fields to output. Available fields for output: id, classname, parent_id, name, description, properties, storage_mode, integrity_mode, cache_mode, opts.title, opts.comment, ext.lwt, ext.ct. |
|
|
Offset in the list of resources to output. |
|
|
Maximum number of resources in the list. |
|
|
Sorting order of resources in the list. |
|
|
Transformation of composite fields to flat form. |
GET /rest/v1/design/classes?offset=0&limit=10 HTTP/1.1
Response
Field description: class entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
[
{
"id": "1830c247-017b-bf98-5d37-7cd30a921f58",
"classname": "base",
"name": "",
"description": "",
"parent_id": "00000000-0000-0000-0000-000000000000",
"storage_mode": "abstract",
"integrity_mode": "sync_fast_read",
"cache_mode": "none",
"properties": [
{
"caption": "INT",
"data_type": "integer",
"name": "pint",
"required": true
},
{
"caption": "STR",
"data_type": "string",
"name": "pstr"
},
{
"caption": "DT",
"data_type": "datetime",
"name": "pdt",
"required": true
},
{
"caption": "BOOL",
"data_type": "boolean",
"default": false,
"name": "pbool"
},
{
"caption": "TIME",
"data_type": "time",
"name": "ptime"
},
{
"caption": "DATE",
"data_type": "date",
"name": "pdate"
},
{
"caption": "INTARR",
"data_type": "integer",
"multi": true,
"name": "pintarr"
},
{
"caption": "TIME",
"data_type": "time",
"name": "ptime"
},
{
"caption": "FLOAT",
"data_type": "float",
"name": "pfloat"
},
{
"caption": "ANY",
"data_type": "any",
"name": "pany"
},
{
"caption": "ENUM",
"data_type": "enum",
"default": "i1",
"items": [
"i1",
"i2",
"i3"
],
"name": "penum"
},
{
"caption": "UUID",
"data_type": "uuid",
"name": "puuid"
},
{
"caption": "LONG",
"data_type": "long",
"default": "1234567890",
"name": "plong"
},
{
"caption": "ATT",
"data_type": "attachment",
"name": "patt"
},
{
"caption": "ATTS",
"data_type": "attachment",
"multi": true,
"name": "patts"
}
],
"opts": {
"title": "",
"comment": "This is abstract base class",
"dms_group": {},
"cache_limit": 1000,
"cache_sec": 600,
"check_required_fill_defaults": true,
"expires_mode": "none",
"expires_ts_property": "",
"expires_ttl_property": "",
"lookup_properties": [],
"max_limit": 100,
"max_mask": [],
"max_size": 10000,
"notify_transactions": false,
"partition_count": 2,
"partition_interval": "month",
"partition_property": "",
"replication_factor": 2,
"storage_instance": "auto",
"filestorage_instance": "auto"
},
"ext": {
"ct": "2021-04-05T05:26:13.44Z",
"lwt": "2021-04-05T05:26:13.44Z"
}
},
{
"id": "6680bb7a-0178-3fc1-67fc-7cd30a921f58",
"classname": "abc/asd",
"name": "",
"description": "",
"parent_id": "1830c247-017b-bf98-5d37-7cd30a921f58",
"storage_mode": "category",
"integrity_mode": "sync_fast_read",
"cache_mode": "none",
"properties": [],
"opts": {
"title": "",
"comment": "This is child class of base",
"dms_group": {},
"cache_limit": 1000,
"cache_sec": 600,
"check_required_fill_defaults": true,
"expires_mode": "none",
"expires_ts_property": "",
"expires_ttl_property": "",
"lookup_properties": [
"pdt",
"pint"
],
"max_limit": 100,
"max_mask": [],
"max_size": 10000,
"notify_transactions": false,
"partition_count": 2,
"partition_interval": "month",
"partition_property": "",
"replication_factor": 2,
"storage_instance": "a",
"filestorage_instance": "auto"
},
"ext": {
"ct": "2021-04-05T07:57:02.22Z",
"lwt": "2021-04-05T08:02:13.14Z"
}
},
{
"id": "5580bb7a-0178-3fc1-67fc-7cd30a921f58",
"classname": "abc/mnesia",
"name": "",
"description": "",
"parent_id": "00000000-0000-0000-0000-000000000000",
"storage_mode": "runtime",
"integrity_mode": "sync_fast_notify",
"cache_mode": "temp",
"properties": [
{
"caption": "NAME",
"data_type": "string",
"name": "name"
},
{
"caption": "VALUE",
"data_type": "any",
"name": "value"
},
{
"caption": "TS",
"data_type": "long",
"name": "ts"
},
{
"caption": "TTL",
"data_type": "int",
"name": "ttl"
}
],
"opts": {
"title": "",
"comment": "",
"dms_group": {},
"cache_limit": 1000,
"cache_sec": 600,
"check_required_fill_defaults": true,
"expires_mode": "create",
"expires_ts_property": "ts",
"expires_ttl_property": "ttl",
"lookup_properties": [
"ttl",
"name"
],
"max_limit": 100,
"max_mask": [],
"max_size": 1000000,
"notify_transactions": false,
"partition_count": 2,
"partition_interval": "month",
"partition_property": "",
"replication_factor": 2,
"storage_instance": "",
"filestorage_instance": "fstest"
},
"ext": {
"ct": "2021-04-02T19:33:49.46Z",
"lwt": "2021-09-03T12:57:17.48Z"
}
},
{
"id": "7780bb7a-0178-3fc1-67fc-7cd30a921f58",
"classname": "abc/fgh",
"name": "",
"description": "",
"parent_id": "6680bb7a-0178-3fc1-67fc-7cd30a921f58",
"storage_mode": "history",
"integrity_mode": "sync_fast_read",
"cache_mode": "none",
"properties": [
{
"caption": "INT",
"data_type": "integer",
"name": "pint",
"required": false
},
{
"caption": "STR",
"data_type": "string",
"name": "pstr",
"default": ""
},
{
"caption": "DT",
"data_type": "datetime",
"name": "pdt",
"required": false
},
{
"caption": "BOOL",
"data_type": "boolean",
"default": true,
"name": "pbool"
}
],
"opts": {
"title": "",
"comment": "This is child class of abc/asd, overriding some properties",
"dms_group": {},
"cache_limit": 1000,
"cache_sec": 600,
"check_required_fill_defaults": true,
"expires_mode": "none",
"expires_ts_property": "",
"expires_ttl_property": "",
"filestorage_instance": "",
"lookup_properties": [
"pdt",
"pint"
],
"max_limit": 100,
"max_mask": [],
"max_size": 10000,
"notify_transactions": false,
"partition_count": 2,
"partition_interval": "month",
"partition_property": "pdt",
"replication_factor": 2,
"storage_instance": "a",
"filestorage_instance": "auto"
},
"ext": {
"ct": "2021-04-05T11:24:54.75Z",
"lwt": "2021-04-05T11:24:54.75Z"
}
},
{
"id": "8780bb7a-0178-3fc1-67fc-7cd30a921f58",
"classname": "abc/kafka",
"name": "",
"description": "",
"parent_id": "00000000-0000-0000-0000-000000000000",
"storage_mode": "transactionlog",
"integrity_mode": "sync_fast_read",
"cache_mode": "none",
"properties": [
{
"data_type": "uuid",
"name": "id2"
},
{
"data_type": "string",
"name": "pstr"
},
{
"data_type": "integer",
"name": "pint"
},
{
"data_type": "datetime",
"name": "pdt"
}
],
"opts": {
"title": "",
"comment": "transactionlog",
"dms_group": {},
"cache_limit": 1000,
"cache_sec": 600,
"check_required_fill_defaults": true,
"expires_mode": "none",
"expires_ts_property": "",
"expires_ttl_property": "",
"filestorage_instance": "",
"lookup_properties": [
"pstr",
"pint"
],
"max_limit": 100,
"max_mask": [],
"max_size": 10000,
"notify_transactions": false,
"partition_count": 2,
"partition_interval": "month",
"partition_property": "",
"replication_factor": 2,
"storage_instance": "b",
"filestorage_instance": "mys3"
},
"ext": {
"ct": "2021-04-21T19:45:47.55Z",
"lwt": "2021-05-20T07:19:19.77Z"
}
}
]
Getting class data (collection metadata)
Request
| Name | Type | Description |
|---|---|---|
|
|
List of fields to output. |
|
|
Transformation of composite fields to flat form. |
GET /rest/v1/design/classes/5580bb7a-0178-3fc1-67fc-7cd30a921f58 HTTP/1.1
Response
Field description: class entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "5580bb7a-0178-3fc1-67fc-7cd30a921f58",
"classname": "abc/mnesia",
"name": "",
"description": "",
"parent_id": "00000000-0000-0000-0000-000000000000",
"storage_mode": "runtime",
"integrity_mode": "sync_fast_notify",
"cache_mode": "temp",
"properties": [
{
"caption": "NAME",
"data_type": "string",
"name": "name"
},
{
"caption": "VALUE",
"data_type": "any",
"name": "value"
},
{
"caption": "TS",
"data_type": "long",
"name": "ts"
},
{
"caption": "TTL",
"data_type": "int",
"name": "ttl"
}
],
"opts": {
"title": "",
"comment": "",
"dms_group": {},
"cache_limit": 1000,
"cache_sec": 600,
"check_required_fill_defaults": true,
"expires_mode": "create",
"expires_ts_property": "ts",
"expires_ttl_property": "ttl",
"lookup_properties": [
"ttl",
"name"
],
"max_limit": 100,
"max_mask": [],
"max_size": 1000000,
"notify_transactions": false,
"partition_count": 2,
"partition_interval": "month",
"partition_property": "",
"replication_factor": 2,
"storage_instance": "",
"filestorage_instance": "fstest"
},
"ext": {
"ct": "2021-04-02T19:33:49.46Z",
"lwt": "2021-09-03T12:57:17.48Z"
}
}
Modifying class data (collection metadata)
Fields prohibited for modification: id
Request
Field description: class entity
PATCH /rest/v1/design/classes/5580bb7a-0178-3fc1-67fc-7cd30a921f58 HTTP/1.1
Content-Type: application/json; charset=utf-8
class entity
Response
Field description: class entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "5580bb7a-0178-3fc1-67fc-7cd30a921f58",
"classname": "abc/mnesia",
"name": "",
"description": "",
"parent_id": "00000000-0000-0000-0000-000000000000",
"storage_mode": "runtime",
"integrity_mode": "sync_fast_notify",
"cache_mode": "temp",
"properties": [
{
"caption": "NAME",
"data_type": "string",
"name": "name",
"required": true
},
{
"caption": "VALUE",
"data_type": "any",
"name": "value"
},
{
"caption": "DT",
"data_type": "datetime",
"name": "dt"
},
{
"caption": "TS",
"data_type": "long",
"name": "ts"
},
{
"caption": "TTL",
"data_type": "int",
"name": "ttl"
}
],
"opts": {
"title": "",
"comment": "This is auto-ttl class",
"dms_group": {},
"cache_limit": 1000,
"cache_sec": 600,
"check_required_fill_defaults": true,
"expires_mode": "create",
"expires_ts_property": "ts",
"expires_ttl_property": "ttl",
"lookup_properties": [
"ttl",
"name"
],
"max_limit": 100,
"max_mask": [],
"max_size": 1000000,
"notify_transactions": false,
"partition_count": 2,
"partition_interval": "month",
"partition_property": "",
"replication_factor": 2,
"storage_instance": "",
"filestorage_instance": "fstest"
},
"ext": {
"ct": "2021-04-02T19:33:49.46Z",
"lwt": "2021-09-03T12:57:17.48Z"
}
}
Deleting a class
Searching for a class identifier
Searches for a resource by the specified key and returns the identifier(s) for building the endpoint.
Key fields for search: id, classname
Waiting for class loading
Waits for the specified classes to load. The request body is a JSON list of class identifiers or names.
If some classes are not ready, waiting is performed with a total timeout of no more than 30 seconds. All specified classes must exist in the collection and must not be abstract.
To wait longer, execute the request several times in sequence until a response without timeout is received.
Request
SYNC /rest/v1/design/classes HTTP/1.1
Content-Type: application/json; charset=utf-8
["email/Accounts", "email/Folders"]
Response
HTTP/1.1 204 OK
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
"error_code": 1405,
"error_message": "Items not found: aaa/bbb, my/test7"
}
HTTP/1.1 408 Timeout
Content-Type: application/json; charset=utf-8
{
"error_code": 1404,
"error_message": "Timeout of 'my/test8'"
}