Project
Method & Permission
| API | GET | POST | PUT | PATCH | DELETE |
|---|---|---|---|---|---|
| Project List | Admin, Project Admin*, Project Edit*, Project View* | Admin, Project Admin** | - | - | - |
| Project Detail | Admin, Project Admin, Project Edit, Project View | - | - | Admin, Project Admin | - |
*Can only view/edit the project they are allowed to view/edit
** Project Admin can only create sub projects.
GET Project List
Endpoint: /projects/project/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 = name
{
"page_size": 10,
"page_number": 1,
"page_count": 1,
"count": 2,
"next": null,
"previous": null,
"add_permission": true,
"results": [
{
"sid": "xxx",
"name": "Sample Project"
},
...
]
}
# serializer = list
{
"page_size": 10,
"page_number": 1,
"page_count": 1,
"count": 2,
"next": null,
"previous": null,
"add_permission": true,
"results": [
{
"sid": "xxx",
"name": "Sample Project",
"parent": null,
"description": "This is a sample project created automatically. Please archive it on your production data.",
"date_start": "2020-02-10",
"date_end": null,
"is_archived": false,
"change_permission": true
},
...
]
}
# serializer = detail
{
"page_size": 10,
"page_number": 1,
"page_count": 1,
"count": 2,
"next": null,
"previous": null,
"add_permission": true,
"results": [
{
"sid": "xxx",
"name": "Sample Project",
"parent": null,
"description": "This is a sample project created automatically. Please archive it on your production data.",
"date_start": "2020-02-10",
"date_end": null,
"should_receive_weekly_digest": true,
"open_to_organization": false,
"open_to_public": false,
"metadata": [
],
"is_archived": false,
"number_of_records": 0,
"updated_by": "xxx",
"date_updated": "2020-02-10T03:02:22.241376Z",
"date_created": "2020-02-10T03:02:22.240056Z",
"change_permission": true
},
...
]
}
POST Project List
Endpoint: /projects/project/list/{level}/{sid}/{serializer}/
Parameter: level (path, string)
sid
Parameter: sid (path, string)
organization sid
Parameter: serializer (path, string)
Parameter: token (header, string)
Parameter: name (body, string)
Parameter: description (body, string)
Parameter: date_start (body, string)
Parameter: date_end (body, string)
Parameter: is_archived (body, boolean)
Parameter: open_to_organization (body, boolean)
Parameter: metadata (body, object)
Response: 201
{
"sid": "xxx",
"name": "Sample Project",
"parent": null,
"description": "This is a sample project created automatically. Please archive it on your production data.",
"date_start": "2020-02-10",
"date_end": null,
"should_receive_weekly_digest": true,
"open_to_organization": false,
"open_to_public": false,
"metadata": [
],
"is_archived": false,
"number_of_records": 0,
"updated_by": "xxx",
"date_updated": "2020-02-10T03:02:22.241376Z",
"date_created": "2020-02-10T03:02:22.240056Z",
"change_permission": true
}
GET Project Detail
Endpoint: /projects/project/detail/{sid}/
Parameter: sid (path, string)
Parameter: token (header, string)
Response: 200
{
"sid": "xxx",
"name": "Sample Project",
"parent": null,
"description": "This is a sample project created automatically. Please archive it on your production data.",
"date_start": "2020-02-10",
"date_end": null,
"should_receive_weekly_digest": true,
"open_to_organization": false,
"open_to_public": false,
"metadata": [
],
"is_archived": false,
"number_of_records": 0,
"updated_by": "xxx",
"date_updated": "2020-02-10T03:02:22.241376Z",
"date_created": "2020-02-10T03:02:22.240056Z",
"change_permission": true
}
PATCH Project Detail
Endpoint: /projects/project/detail/{sid}/
Parameter: sid (path, string)
Parameter: token (header, string)
Parameter: name (body, string)
Parameter: description (body, string)
Parameter: date_start (body, string)
Parameter: date_end (body, string)
Parameter: is_archived (body, boolean)
Parameter: open_to_organization (body, boolean)
Parameter: metadata (body, object)
Response: 200
{
"sid": "xxx",
"name": "Sample Project",
"parent": null,
"description": "This is a sample project created automatically. Please archive it on your production data.",
"date_start": "2020-02-10",
"date_end": null,
"should_receive_weekly_digest": true,
"open_to_organization": false,
"open_to_public": false,
"metadata": [
],
"is_archived": false,
"number_of_records": 0,
"updated_by": "xxx",
"date_updated": "2020-02-10T03:02:22.241376Z",
"date_created": "2020-02-10T03:02:22.240056Z",
"change_permission": true
}