行
方法与权限
| API | GET | POST | PUT | PATCH | DELETE |
|---|---|---|---|---|---|
| 行列表 | 管理员,项目管理员,项目编辑,项目查看 | 项目管理员,项目编辑 | - | - | - |
| 行详情 | 管理员,项目管理员,项目编辑,项目查看 | - | - | 项目管理员*, 项目编辑* | - |
*具有 is_locked=True 的行无法更新
*具有 is_archived=True 的行无法更新,除非是 is_archived 字段
获取行列表
端点: /tables/row/list/{level}/{sid}/{serializer}/
参数: level (路径,字符串)
组织
参数: sid (路径,字符串)
组织 sid
参数: serializer (路径,字符串)
参数: token (头部,字符串)
参数: presigned_post (查询,字符串)
使用之前的 presigned_post 获取上传文件的 URL
响应: 200
# serializer = name
{
"page_size": 10,
"page_number": 1,
"page_count": xxx,
"count": xxx,
"next": "xxx",
"previous": null,
"add_permission": true,
"results": [
{
"sid": "xxx",
"name": "EP625: Test Name 20200525133408",
"table__name_plural": "experiments",
"description": "Test add from sidebar 20200525133408"
},
...
]
}
# serializer = list
{
"page_size": 10,
"page_number": 1,
"page_count": xxx,
"count": xxx,
"next": "xxx",
"previous": null,
"add_permission": true,
"results": [
{
"sid": "xxx",
"uid": "EP622",
"name": "EP622: Test Name 20200524151652",
"column_set": [
{
"column": {
"sid": "xxx",
"name": "date_start",
"name_system": null,
"description": "The start date of the expriment.",
"widget": {
"sid": "xxx",
"name": "Date",
"documentation_url": "https://docs.labii.com/widgets/column-widgets#date"
},
"default_value": null,
"order": 1,
"is_required": true,
"is_hidden": false,
"metadata": {
},
"table": {
"sid": "xxx",
"name": "experiments"
},
"is_archived": false,
"date_created": "2020-02-10T03:02:26.988985Z",
"change_permission": false
},
"data": "2020-05-24",
"sid": "xxx"
},
{
"column": {
"sid": "xxx",
"name": "date_due",
"name_system": null,
"description": "The expected end date of the experiment.",
"widget": {
"sid": "xxx",
"name": "Date",
"documentation_url": "https://docs.labii.com/widgets/column-widgets#date"
},
"default_value": null,
"order": 2,
"is_required": false,
"is_hidden": false,
"metadata": {
},
"table": {
"sid": "xxx",
"name": "experiments"
},
"is_archived": false,
"date_created": "2020-02-10T03:02:27.004055Z",
"change_permission": false
},
"data": ""
}
],
"projects": [
{
"sid": "xxx",
"name": "Sample Project"
}
],
"owner": "Test Labii",
"is_template": false,
"change_permission": true
},
...
]
}
# serializer = detail
{
"page_size": 10,
"page_number": 1,
"page_count": xxx,
"count": xxx,
"next": "xxx",
"previous": null,
"add_permission": true,
"results": [
{
"sid": "xxx",
"uid": "EP622",
"version": 3,
"table": {
"sid": "xxx",
"name": "experiments"
},
"projects": [
{
"sid": "xxx",
"name": "Sample Project"
}
],
"name": "EP622: Test Name 20200524151652",
"description": "Test add from sidebar 20200524151652",
"is_template": false,
"is_archived": false,
"metadata": [
],
"updated_by": "Test Labii",
"date_updated": "2020-05-24T22:19:35.179111Z",
"owner": "Test Labii",
"date_created": "2020-05-24T22:19:35.174584Z",
"column_set": [
{
"column": {
"sid": "xxx",
"name": "date_start",
"name_system": null,
"description": "The start date of the expriment.",
"widget": {
"sid": "xxx",
"name": "Date",
"documentation_url": "https://docs.labii.com/widgets/column-widgets#date"
},
"default_value": null,
"order": 1,
"is_required": true,
"is_hidden": false,
"metadata": {
},
"table": {
"sid": "xxx",
"name": "experiments"
},
"is_archived": false,
"date_created": "2020-02-10T03:02:26.988985Z",
"change_permission": false
},
"data": "2020-05-24",
"sid": "xxx"
},
{
"column": {
"sid": "xxx",
"name": "date_due",
"name_system": null,
"description": "The expected end date of the experiment.",
"widget": {
"sid": "xxx",
"name": "Date",
"documentation_url": "https://docs.labii.com/widgets/column-widgets#date"
},
"default_value": null,
"order": 2,
"is_required": false,
"is_hidden": false,
"metadata": {
},
"table": {
"sid": "xxx",
"name": "experiments"
},
"is_archived": false,
"date_created": "2020-02-10T03:02:27.004055Z",
"change_permission": false
},
"data": ""
}
],
"section_set": [
{
"sid": "xxx",
"table": {
"sid": "xxx",
"name": "experiments"
},
"row": {
"sid": "xxx",
"name": "Overview"
},
"name": "Overview",
"description": "",
"widget": {
"sid": "xxx",
"icon": "format_color_text",
"name": "Rich Text (CKEditor Classic)",
"category": "Office",
"sub_category": "Text, Word, Docs",
"company": "Labii Inc.",
"notes": "Smart WYSIWYG HTML editor",
"description": "xxx",
"documentation_url": "https://docs.labii.com/widgets/office/text#rich-text-ckeditor-classic",
"usecase": "Protocol Steps; Experiment Overview; Descriptional Result;",
"type": "Section",
"constructor": "object",
"related_to": "xxx",
"version": "1.00",
"release_date": "2020-04-19",
"order": "2.00",
"subscription_price": "Free",
"ppu_price": "0.15",
"allow_multiple": true,
"is_readonly": false,
"metadata_labels": "",
"data": "xxx",
"default_data": ""
},
"data": {
},
"order": 1,
"metadata": {
},
"is_archived": false,
"date_updated": "2020-05-24T22:19:36.439669Z",
"date_created": "2020-05-24T22:19:36.436904Z",
"updated_by": "Test Labii",
"change_permission": true
}
],
"change_permission": true
},
...
]
}
响应: 406
Error: missing table__sid in the get parameters
创建行列表
端点: /tables/row/list/{level}/{sid}/{serializer}/
参数: level (路径,字符串)
组织
参数: sid (路径,字符串)
组织 sid
参数: serializer (路径,字符串)
参数: token (头部,字符串)
参数: projects (正文,数组)
参数: name (正文,字符串)
参数: description (正文,字符串)
参数: is_template (正文,布尔值)
参数: open_to_organization (正文,布尔值)
参数: is_archived (正文,布尔值)
参数: metadata (正文,字符串)
响应: 200
{
"sid": "xxx",
"uid": "EP622",
"version": 3,
"table": {
"sid": "xxx",
"name": "experiments"
},
"projects": [
{
"sid": "xxx",
"name": "Sample Project"
}
],
"name": "EP622: Test Name 20200524151652",
"description": "Test add from sidebar 20200524151652",
"is_template": false,
"is_archived": false,
"metadata": [
],
"updated_by": "Test Labii",
"date_updated": "2020-05-24T22:19:35.179111Z",
"owner": "Test Labii",
"date_created": "2020-05-24T22:19:35.174584Z",
"column_set": [
{
"column": {
"sid": "xxx",
"name": "date_start",
"name_system": null,
"description": "The start date of the expriment.",
"widget": {
"sid": "xxx",
"name": "Date",
"documentation_url": "https://docs.labii.com/widgets/column-widgets#date"
},
"default_value": null,
"order": 1,
"is_required": true,
"is_hidden": false,
"metadata": {
},
"table": {
"sid": "xxx",
"name": "experiments"
},
"is_archived": false,
"date_created": "2020-02-10T03:02:26.988985Z",
"change_permission": false
},
"data": "2020-05-24",
"sid": "xxx"
},
{
"column": {
"sid": "xxx",
"name": "date_due",
"name_system": null,
"description": "The expected end date of the experiment.",
"widget": {
"sid": "xxx",
"name": "Date",
"documentation_url": "https://docs.labii.com/widgets/column-widgets#date"
},
"default_value": null,
"order": 2,
"is_required": false,
"is_hidden": false,
"metadata": {
},
"table": {
"sid": "xxx",
"name": "experiments"
},
"is_archived": false,
"date_created": "2020-02-10T03:02:27.004055Z",
"change_permission": false
},
"data": ""
}
],
"section_set": [
{
"sid": "xxx",
"table": {
"sid": "xxx",
"name": "experiments"
},
"row": {
"sid": "xxx",
"name": "Overview"
},
"name": "Overview",
"description": "",
"widget": {
"sid": "xxx",
"icon": "format_color_text",
"name": "Rich Text (CKEditor Classic)",
"category": "Office",
"sub_category": "Text, Word, Docs",
"company": "Labii Inc.",
"notes": "Smart WYSIWYG HTML editor",
"description": "xxx",
"documentation_url": "https://docs.labii.com/widgets/office/text#rich-text-ckeditor-classic",
"usecase": "Protocol Steps; Experiment Overview; Descriptional Result;",
"type": "Section",
"constructor": "object",
"related_to": "xxx",
"version": "1.00",
"release_date": "2020-04-19",
"order": "2.00",
"subscription_price": "Free",
"ppu_price": "0.15",
"allow_multiple": true,
"is_readonly": false,
"metadata_labels": "",
"data": "xxx",
"default_data": ""
},
"data": {
},
"order": 1,
"metadata": {
},
"is_archived": false,
"date_updated": "2020-05-24T22:19:36.439669Z",
"date_created": "2020-05-24T22:19:36.436904Z",
"updated_by": "Test Labii",
"change_permission": true
}
],
"change_permission": true
},
}
响应: 406
Your organization does not have enough credits, contact sales@labii.com!
Character (%s) not allowed. Not allowed character are "#", "&", "*", "?", "^", "`", "<", ">"
获取行详情
端点: /tables/row/detail/{sid}/
参数: sid (路径,字符串)
参数: token (头部,字符串)
参数: presigned_post (查询,字符串)
使用 presigned_post 获取上传文件的 URL
参数: presigned_url (查询,字符串)
使用 presigned_url 获取下载文件的 URL
响应: 200
{
"sid": "xxx",
"uid": "EP622",
"version": 3,
"table": {
"sid": "xxx",
"name": "experiments"
},
"projects": [
{
"sid": "xxx",
"name": "Sample Project"
}
],
"name": "EP622: Test Name 20200524151652",
"description": "Test add from sidebar 20200524151652",
"is_template": false,
"is_archived": false,
"metadata": [
],
"updated_by": "Test Labii",
"date_updated": "2020-05-24T22:19:35.179111Z",
"owner": "Test Labii",
"date_created": "2020-05-24T22:19:35.174584Z",
"column_set": [
{
"column": {
"sid": "xxx",
"name": "date_start",
"name_system": null,
"description": "The start date of the expriment.",
"widget": {
"sid": "xxx",
"name": "Date",
"documentation_url": "https://docs.labii.com/widgets/column-widgets#date"
},
"default_value": null,
"order": 1,
"is_required": true,
"is_hidden": false,
"metadata": {
},
"table": {
"sid": "xxx",
"name": "experiments"
},
"is_archived": false,
"date_created": "2020-02-10T03:02:26.988985Z",
"change_permission": false
},
"data": "2020-05-24",
"sid": "xxx"
},
{
"column": {
"sid": "xxx",
"name": "date_due",
"name_system": null,
"description": "The expected end date of the experiment.",
"widget": {
"sid": "xxx",
"name": "Date",
"documentation_url": "https://docs.labii.com/widgets/column-widgets#date"
},
"default_value": null,
"order": 2,
"is_required": false,
"is_hidden": false,
"metadata": {
},
"table": {
"sid": "xxx",
"name": "experiments"
},
"is_archived": false,
"date_created": "2020-02-10T03:02:27.004055Z",
"change_permission": false
},
"data": ""
}
],
"section_set": [
{
"sid": "xxx",
"table": {
"sid": "xxx",
"name": "experiments"
},
"row": {
"sid": "xxx",
"name": "Overview"
},
"name": "Overview",
"description": "",
"widget": {
"sid": "xxx",
"icon": "format_color_text",
"name": "Rich Text (CKEditor Classic)",
"category": "Office",
"sub_category": "Text, Word, Docs",
"company": "Labii Inc.",
"notes": "Smart WYSIWYG HTML editor",
"description": "xxx",
"documentation_url": "https://docs.labii.com/widgets/office/text#rich-text-ckeditor-classic",
"usecase": "Protocol Steps; Experiment Overview; Descriptional Result;",
"type": "Section",
"constructor": "object",
"related_to": "xxx",
"version": "1.00",
"release_date": "2020-04-19",
"order": "2.00",
"subscription_price": "Free",
"ppu_price": "0.15",
"allow_multiple": true,
"is_readonly": false,
"metadata_labels": "",
"data": "xxx",
"default_data": ""
},
"data": {
},
"order": 1,
"metadata": {
},
"is_archived": false,
"date_updated": "2020-05-24T22:19:36.439669Z",
"date_created": "2020-05-24T22:19:36.436904Z",
"updated_by": "Test Labii",
"change_permission": true
}
],
"change_permission": true
},
}
更新行详情
端点: /tables/table/detail/{sid}/
参数: sid (路径,字符串)
参数: token (头部,字符串)
参数: project__sid (正文,字符串)
参数: name (正文,字符串)
参数: description (正文,字符串)
参数: is_template (正文,字符串)
参数: open_to_organization (正文,字符串)
参数: is_archived (正文,字符串)
参数: metadata (正文,字符串)
响应: 200
{
"sid": "xxx",
"uid": "EP622",
"version": 3,
"table": {
"sid": "xxx",
"name": "experiments"
},
"projects": [
{
"sid": "xxx",
"name": "Sample Project"
}
],
"name": "EP622: Test Name 20200524151652",
"description": "Test add from sidebar 20200524151652",
"is_template": false,
"is_archived": false,
"metadata": [
],
"updated_by": "Test Labii",
"date_updated": "2020-05-24T22:19:35.179111Z",
"owner": "Test Labii",
"date_created": "2020-05-24T22:19:35.174584Z",
"column_set": [
{
"column": {
"sid": "xxx",
"name": "date_start",
"name_system": null,
"description": "The start date of the expriment.",
"widget": {
"sid": "xxx",
"name": "Date",
"documentation_url": "https://docs.labii.com/widgets/column-widgets#date"
},
"default_value": null,
"order": 1,
"is_required": true,
"is_hidden": false,
"metadata": {
},
"table": {
"sid": "xxx",
"name": "experiments"
},
"is_archived": false,
"date_created": "2020-02-10T03:02:26.988985Z",
"change_permission": false
},
"data": "2020-05-24",
"sid": "xxx"
},
{
"column": {
"sid": "xxx",
"name": "date_due",
"name_system": null,
"description": "The expected end date of the experiment.",
"widget": {
"sid": "xxx",
"name": "Date",
"documentation_url": "https://docs.labii.com/widgets/column-widgets#date"
},
"default_value": null,
"order": 2,
"is_required": false,
"is_hidden": false,
"metadata": {
},
"table": {
"sid": "xxx",
"name": "experiments"
},
"is_archived": false,
"date_created": "2020-02-10T03:02:27.004055Z",
"change_permission": false
},
"data": ""
}
],
"section_set": [
{
"sid": "xxx",
"table": {
"sid": "xxx",
"name": "experiments"
},
"row": {
"sid": "xxx",
"name": "Overview"
},
"name": "Overview",
"description": "",
"widget": {
"sid": "xxx",
"icon": "format_color_text",
"name": "Rich Text (CKEditor Classic)",
"category": "Office",
"sub_category": "Text, Word, Docs",
"company": "Labii Inc.",
"notes": "Smart WYSIWYG HTML editor",
"description": "xxx",
"documentation_url": "https://docs.labii.com/widgets/office/text#rich-text-ckeditor-classic",
"usecase": "Protocol Steps; Experiment Overview; Descriptional Result;",
"type": "Section",
"constructor": "object",
"related_to": "xxx",
"version": "1.00",
"release_date": "2020-04-19",
"order": "2.00",
"subscription_price": "Free",
"ppu_price": "0.15",
"allow_multiple": true,
"is_readonly": false,
"metadata_labels": "",
"data": "xxx",
"default_data": ""
},
"data": {
},
"order": 1,
"metadata": {
},
"is_archived": false,
"date_updated": "2020-05-24T22:19:36.439669Z",
"date_created": "2020-05-24T22:19:36.436904Z",
"updated_by": "Test Labii",
"change_permission": true
}
],
"change_permission": true
},
}