create post: 創建 報告 資料 12-13 15:16
create post: 創建 報告 資料
更新時間:2022-12-13 15:16:10
HTTP Request
POST: post/create
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
report | int | optional | reports.id |
content | string | required | posts.content |
attachment | int[] | required | filesystem_file.id |
Response Structure
Parameter | Type | Status | Description |
---|---|---|---|
status | int | required | 0: 成功, 非0: 失敗 |
data | object | optional | |
report | string | required | reports.id |
content | string | required | posts.content |
attachment | object[] | required | |
created_by | int | required | posts.created_by |
updated_by | int | required | posts.updated_by |
created_at | datetime | required | posts.created_at |
updated_at | datetime | required | posts.updated_at |
Example usage
Example #1
POST: post/create
Response(200,status=0)
{
"status": 0,
"data": [
{
"id": 8,
"report": 6,
"content": "tt",
"created_by": 0,
"updated_by": 0,
"created_at": "2021-11-05 13:28:25",
"updated_at": "2021-11-05 13:28:25",
"attachment": [
{
"id": 2,
"pid": 1,
"filename": "aaa.png",
"type": 1,
"type_name": "file",
"hash": "",
"mime": "image/png",
"extension": "",
"path": "/uploads/images/aaa.png",
"url": "/dev_ipms/uploads/images/aaa.png"
}
]
}
]
}