Table
Method & Permission
| API | GET | POST | PUT | PATCH | DELETE |
|---|---|---|---|---|---|
| Table List | Admin, Member | Admin | - | - | - |
| Table Detail | Admin, Member | - | - | Admin | - |
GET Table List
Endpoint: /tables/table/list/{level}/{sid}/{serializer}/
Parameter: level (path, string)
organization
Parameter: sid (path, string)
organization sid
Parameter: serializer (path, string)
Parameter: token (header, string)
Response: 200 — serializer = list
# serializer = name
{
"page_size": 10,
"page_number": 1,
"page_count": 1,
"count": 9,
"next": null,
"previous": null,
"add_permission": true,
"results": [
{
"sid": "xxx",
"name": "experiment",
"name_plural": "experiments",
"name_singular": "experiment"
},
...
]
}
# serializer = list
{
"page_size": 10,
"page_number": 1,
"page_count": 1,
"count": 9,
"next": null,
"previous": null,
"add_permission": true,
"results": [
{
"sid": "xxx",
"icon": "xxx",
"name_singular": "experiment",
"name_plural": "experiments",
"unique_code": "EP",
"table_type": "Document",
"order": 1,
"is_archived": false,
"change_permission": true
},
...
]
}
# serializer = detail
{
"page_size": 10,
"page_number": 1,
"page_count": 1,
"count": 9,
"next": null,
"previous": null,
"add_permission": true,
"results": [
{
"sid": "xxx",
"icon": "assignment",
"name": "experiments",
"name_singular": "experiment",
"name_plural": "experiments",
"name_system": null,
"description": "An experiment is the lab note that document the purpose, the procedures the results of the experiment.",
"unique_code": "EP",
"default_view": "detail",
"order": 3,
"number_of_records": 4,
"number_of_columns": 2,
"number_of_sections": 6,
"number_of_filters": 2,
"number_of_workflows": 3,
"metadata": [
],
"default_filter": null,
"is_archived": false,
"updated_by": "xxx",
"date_updated": "2020-05-25T00:35:21.236133Z",
"date_created": "2020-05-25T00:35:21.234651Z",
"change_permission": true
},
...
]
}
POST Table List
Endpoint: /tables/table/list/{level}/{sid}/{serializer}/
Parameter: level (path, string)
organization
Parameter: sid (path, string)
organization sid
Parameter: serializer (path, string)
Parameter: token (header, string)
Parameter: name_singular (body, string)
Parameter: name_plural (body, string)
Parameter: description (body, string)
Parameter: unique_code (body, string)
Parameter: icon (body, string)
Parameter: table_type (body, string)
Parameter: is_archived (body, boolean)
Response: 201
{
"sid": "xxx",
"icon": "assignment",
"name": "experiments",
"name_singular": "experiment",
"name_plural": "experiments",
"name_system": null,
"description": "An experiment is the lab note that document the purpose, the procedures the results of the experiment.",
"unique_code": "EP",
"default_view": "detail",
"order": 3,
"number_of_records": 4,
"number_of_columns": 2,
"number_of_sections": 6,
"number_of_filters": 2,
"number_of_workflows": 3,
"metadata": [
],
"default_filter": null,
"is_archived": false,
"updated_by": "xxx",
"date_updated": "2020-05-25T00:35:21.236133Z",
"date_created": "2020-05-25T00:35:21.234651Z",
"change_permission": true
}
Response: 400
{"non_field_errors":
[
"The fields organization, name_plural must make a unique set.",
"The fields organization, name_singular must make a unique set.",
"The fields organization, unique_code must make a unique set."
]
}
GET Table Detail
Endpoint: /tables/table/detail/{sid}/
Parameter: sid (path, string)
Parameter: token (header, string)
Response: 200
{
"sid": "xxx",
"icon": "assignment",
"name": "experiments",
"name_singular": "experiment",
"name_plural": "experiments",
"name_system": null,
"description": "An experiment is the lab note that document the purpose, the procedures the results of the experiment.",
"unique_code": "EP",
"default_view": "detail",
"order": 3,
"number_of_records": 4,
"number_of_columns": 2,
"number_of_sections": 6,
"number_of_filters": 2,
"number_of_workflows": 3,
"metadata": [
],
"default_filter": null,
"is_archived": false,
"updated_by": "xxx",
"date_updated": "2020-05-25T00:35:21.236133Z",
"date_created": "2020-05-25T00:35:21.234651Z",
"change_permission": true
}
PATCH Table Detail
Endpoint: /tables/table/detail/{sid}/
Parameter: sid (path, string)
Parameter: token (header, string)
Parameter: name_singular (body, string)
Parameter: name_plural (body, string)
Parameter: description (body, string)
Parameter: unique_code (body, string)
Parameter: icon (body, string)
Parameter: order (body, number)
Parameter: table_type (body, string)
Parameter: is_archived (body, boolean)
Response: 200
{
"sid": "xxx",
"icon": "assignment",
"name": "experiments",
"name_singular": "experiment",
"name_plural": "experiments",
"name_system": null,
"description": "An experiment is the lab note that document the purpose, the procedures the results of the experiment.",
"unique_code": "EP",
"default_view": "detail",
"order": 3,
"number_of_records": 4,
"number_of_columns": 2,
"number_of_sections": 6,
"number_of_filters": 2,
"number_of_workflows": 3,
"metadata": [
],
"default_filter": null,
"is_archived": false,
"updated_by": "xxx",
"date_updated": "2020-05-25T00:35:21.236133Z",
"date_created": "2020-05-25T00:35:21.234651Z",
"change_permission": true
}