-
Notifications
You must be signed in to change notification settings - Fork 3
files API
jisoo edited this page Dec 4, 2019
·
5 revisions
Method | URI | Feat |
---|---|---|
POST | /api/projects/:project_id/files | ํ์ผ ์์ฑ |
PATCH | /api/projects/:project_id/files/:file_id | ํ์ผ ์์ |
DELETE | /api/projects/:project_id/files/:file_id | ํ์ผ ์ญ์ |
- projet_id ๊ฐ์ผ๋ก ์๋ณํ์ฌ ํด๋น ํ๋ก์ ํธ์ ํ์ผ์ ์ถ๊ฐํ๋ค.
POST /api/projects/:project_id/files
{
"parentId": ๋ถ๋ชจ ๋๋ ํ ๋ฆฌ์ id,
"name": ํ์ผ ์ด๋ฆ,
"type": ํ์ผ ํ์
,
"contents": ํ์ผ ๋ด์ฉ(๋๋ ํ ๋ฆฌ ํ์
์ธ ๊ฒฝ์ฐ ํ์์์)
}
201 : Ok
{}
400 : Bad Request
{}
- file_id ๊ฐ์ผ๋ก ํด๋น ํ์ผ์ ์๋ณํ์ฌ ์์ ํ๋ค.
PATCH /api/projects/:project_id/files/:file_id
{
"contents": ๋ด์ฉ ๋ณ๊ฒฝ์
"name": ์ด๋ฆ ๋ณ๊ฒฝ์
"newParentId": ํ์ผ ์์น ๋ณ๊ฒฝ์
"oldParentId": ํ์ผ ์์น ๋ณ๊ฒฝ์
}
200 : Ok
{}
400 : Bad Request
{}
- file_id ๊ฐ์ผ๋ก ํด๋น ํ์ผ์ ์๋ณํ์ฌ ์ญ์ ํ๋ค.
DELETE /api/projects/:project_id/files/:file_id
{
"parentId": ์ญ์ ํ ํ์ผ์ ๋ถ๋ชจ ๋๋ ํ ๋ฆฌ id
}
204 : Ok
{}
400 : Bad Request
{}
โ 2019. BoostCamp Membership Team 4 all rights reserved.