Appearance
Projects
List Projects
Available on: NEXT
This endpoint accepts the experimental keyset pagination parameters *cursor, per_page to restrict the list of projects.cursor is removed in favor of Offset-based pagination.
http
GET /v2/projectsQuery Parameters:
| Name | Type | Description |
|---|---|---|
order_by | string | Field name to order by. Default is id. Options are: id, project_name, updatedAt |
search | string | Search by project name. |
sort | string | 'asc' or 'desc'. Default is 'asc'. |
cursor | string | |
per_page | integer | Number of items per page. |
Example Response
json
// Example of a response from the List Projects API
{
"total": 5,
"last_page": 1,
"prev_page": null,
"next_page": null,
"has_next_page": false,
"page": 1,
"per_page": 5,
"from": 0,
"to": 5,
"result": [
{
"id": 25,
"node_id": "iRl1cnAIShmnF5Ii",
"project_name": "test232defa",
"start_date": "2024-08-07T16:00:00.000Z",
"end_date": "2024-08-14T16:00:00.000Z",
"description": "asdasd",
"createdAt": "2024-08-08T00:30:05.000Z",
"created_by": {
"id": 1,
"email": "jcoronel.ccheetah@gmail.com",
"avatar": "",
"node_id": "a6c374ee-17d6-4acf-ae2a-0b7eb09a38fd",
"full_name": "Joel Coronel",
"first_name": "Joel",
"last_name": "Coronel",
"employee_no": "1"
}
},
{
"id": 24,
"node_id": "a4D5S3ELN9zcen6O",
"project_name": "1Test Create",
"start_date": "2024-08-05T16:00:00.000Z",
"end_date": "2024-08-13T16:00:00.000Z",
"description": "asdsad",
"createdAt": "2024-08-06T22:40:09.000Z",
"created_by": {
"id": 1,
"email": "jcoronel.ccheetah@gmail.com",
"avatar": "",
"node_id": "a6c374ee-17d6-4acf-ae2a-0b7eb09a38fd",
"full_name": "Joel Coronel",
"first_name": "Joel",
"last_name": "Coronel",
"employee_no": "1"
}
},
{
"id": 23,
"node_id": "3xOAiCHg7qm4g3Xl",
"project_name": "AAAA3",
"start_date": "2024-08-01T16:00:00.000Z",
"end_date": "2024-08-13T16:00:00.000Z",
"description": "asdasd",
"createdAt": "2024-08-01T18:48:30.000Z",
"created_by": {
"id": 1,
"email": "jcoronel.ccheetah@gmail.com",
"avatar": "",
"node_id": "a6c374ee-17d6-4acf-ae2a-0b7eb09a38fd",
"full_name": "Joel Coronel",
"first_name": "Joel",
"last_name": "Coronel",
"employee_no": "1"
}
},
{
"id": 22,
"node_id": "WQmXv87LcNRfUb1Z",
"project_name": "AAAAA2",
"start_date": "2024-08-01T16:00:00.000Z",
"end_date": "2024-08-21T16:00:00.000Z",
"description": "asdadas",
"createdAt": "2024-08-01T18:44:56.000Z",
"created_by": {
"id": 1,
"email": "jcoronel.ccheetah@gmail.com",
"avatar": "",
"node_id": "a6c374ee-17d6-4acf-ae2a-0b7eb09a38fd",
"full_name": "Joel Coronel",
"first_name": "Joel",
"last_name": "Coronel",
"employee_no": "1"
}
},
{
"id": 21,
"node_id": "5vpKAWVme9yewfEd",
"project_name": "AAAAA",
"start_date": "2024-08-01T16:00:00.000Z",
"end_date": "2024-08-12T16:00:00.000Z",
"description": "asdsadas",
"createdAt": "2024-08-01T18:43:02.000Z",
"created_by": {
"id": 1,
"email": "jcoronel.ccheetah@gmail.com",
"avatar": "",
"node_id": "a6c374ee-17d6-4acf-ae2a-0b7eb09a38fd",
"full_name": "Joel Coronel",
"first_name": "Joel",
"last_name": "Coronel",
"employee_no": "1"
}
}
]
}Create Project
http
POST /v2/projectsRequest Body:
| Name | Type | Description |
|---|---|---|
project_name | string | Required. Project Name. Within 3 to 50 characters. |
description | string | Project Description. Maximum of 3000 characters |
start_date | Date | Project Start Date. |
end_date | Date | Project End Date. |
Data Constraints:
- Only Admin can create a project
- Project Name length should be between 3 and 50 characters.
- Start Date should not be greater than End Date.
- End Date should not be less than Start Date.
- Description should not exceed 3000 characters.
Get Project by ID
http
GET /projects/{nodeId}| Name | Type | Description |
|---|---|---|
nodeId | string | Required. Project Node ID. |
Update Project
Available on: NEXT
http
PATCH /v2/projects/:project_node_id/URL Parameters:
| Name | Type | Description |
|---|---|---|
nodeId | string | Required. Project Node ID. |
Request Body:
| Name | Type | Description |
|---|---|---|
project_name | string | (Optional) Project Name. Within 3 to 50 characters. |
description | string | (Optional) Project Description. Maximum of 3000 characters |
start_date | Date | (Optional) Project Start Date. |
end_date | Date | (Optional) Project End Date. |
Data Constraints:
- Only Admin can update a project
- Empty body returns 204 status code
Response Codes:
yml
200:
- When the project is updated successfully
204:
- When the project is updated successfully
404:
- When project is not found
400:
- Failed on validation
403:
- When the user is not an adminProject Tasks
Get Tasks of a Project
Available on: NEXT
http
GET /v2/projects/{nodeId}/tasksURL Parameters:
| Parameter | Type | Description |
|---|---|---|
nodeId | string | Required. Project Node ID. |
Query Parameters:
| Name | Type | Description |
|---|---|---|
| dottie | boolean | Transform object dot notation to nested object |
Project Member
List Project Members
NOTE
Available on: NEXT
http
GET /v2/projects/:id/membersURL Parameters:
| Name | Type | Description |
|---|---|---|
id | string | Required. Project Node ID. |
Data Constraints:
- Project must exist.
- Requesting user must be a member of the project.
Add Project Member
NOTE
Available on: NEXT
Accepts object for adding single user or array of objects for adding multiple users.
http
POST /v2/projects/{nodeId}/add-memberURL Parameters:
| Name | Type | Description |
|---|---|---|
nodeId | string | Required. Project Node ID. |
Request Body:
Array<{ user_node_id: string }>
| Name | Type | Description |
|---|---|---|
user_node_id | string | Required. Member Node ID. |
Data Constraints:
- Only admin can add a member to the project.
Example Payload:
Add single user to project:
shell
curl --request POST \
--url http://localhost:1337/v2/projects/padd-member \
--header 'content-type: application/json' \
--data '
{
"user_node_id": "pseudo-random-string-or-uuidv4"
}
'Add multiple user to project:
shell
curl --request POST \
--url http://localhost:1337/v2/projects/padd-member \
--header 'content-type: application/json' \
--data '[
{
"user_node_id": "pseudo-random-string-or-uuidv4"
},
{
"user_node_id": "pseudo-random-string-or-uuidv4"
}
]'Example Response:
json
{
project: {
id: 1,
node_id: "pseudo-random-string-or-uuidv4",
project_name: "Project Name",
},
id: 1,
node_id: "pseudo-random-string-or-uuidv4",
member: {
id: 1,
node_id: "pseudo-random-string-or-uuidv4",
username: "username",
email: "username@example.com",
},
}Error Responses:
yml
404:
- When project is not found
- When user to be added is not found
400:
- When the user is already a member of the project
403:
- When the user is not an admin
500:
- Server error or when unexpected error occursChange Log:
member_idis removed from the request body.member_node_idis removed from the response body and replaced withuser_node_id.- Accepts array of
user_node_idin the request body.
Remove Project Member
INFO
Available on: NEXT
NOTE
This endpoint is implemented with the requirements of having request body, so it is recommended to use the PATCH method instead of DELETE.
This will permanently delete the member from the project.
http
PATCH /v2/projects/{nodeId}/remove-memberURL Parameters:
| Name | Type | Description |
|---|---|---|
nodeId | string | Required. Project Node ID. |
Request Body:
| Name | Type | Description |
|---|---|---|
member_node_id | string | Required. Member Node ID. |
Data Constraints:
- Only admin can add a member to the project.
Example Response:
json
{
message: "PROJECT_MEMBER_REMOVED",
project: {
id: 1,
node_id: "pseudo-random-string-or-uuidv4",
project_name: "Project Name",
},
id: 1,
node_id: "pseudo-random-string-or-uuidv4",
member: {
id: 1,
node_id: "pseudo-random-string-or-uuidv4",
username: "username",
email: "username@example.com",
},
}Error Responses:
yml
404:
- When project is not found
- When user to be removed is not found
400:
- When the user is not a member of the project
- When admin is trying to remove themselves
- When admin is trying to remove an admin
403:
- When the user is not an admin
500:
- Server error or when unexpected error occurs