Skip to content

Commit 9a39eb9

Browse files
authored
Merge pull request #66 from makeplane/worklogs-api
Worklogs API endpoints
2 parents 321c33c + 426c1b1 commit 9a39eb9

File tree

8 files changed

+244
-3
lines changed

8 files changed

+244
-3
lines changed

api-reference/issue-attachments/overview.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Overview
3-
description: Allows you to manage file attachments associated with issues. You can upload new attachments and retrieve existing attachments for a specific issue.
3+
description: Allows you to manage file attachments associated with issues and Intake issues. You can upload new attachments and retrieve existing attachments for a specific issue.
44
---
55

66
```http
@@ -107,9 +107,9 @@ PATCH /api/v1/workspaces/:workspace-slug/projects/:project_id/issues/:issue_id/
107107

108108
ID of user who last modified the attachment
109109

110-
* `updated_by` _string_
110+
* `deleted_by` _string_
111111

112-
ID of user who last modified the attachment
112+
ID of user who deleted the attachment
113113

114114
* `workspace` _string_
115115

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
title: Create Worklog
3+
sidebarTitle: Create Worklog
4+
description: Add a new worklog entry for a specific issue.
5+
api: POST /api/v1/workspaces/:workspace-slug/projects/:project_id/issues/:issue_id/worklogs/
6+
---
7+
8+
### Path parameters
9+
10+
<ParamField path="workspace-slug" type="string" required>
11+
The workspace-slug represents the unique workspace identifier for a workspace in Plane. It can be found in the URL. For example, in the URL `https://app.plane.so/my-team/projects/`, the workspace slug is `my-team`.
12+
13+
</ParamField>
14+
<ParamField path="project_id" type="string" required>The unique identifier of the project</ParamField>
15+
<ParamField path="issue_id" type="string" required>The unique identifier of the issue</ParamField>
16+
17+
### Body
18+
19+
<ParamField body="description" type="string" required>Description of the work done during the worklog</ParamField>
20+
<ParamField body="duration" type="integer" required>Time spent on the issue in minutes</ParamField>
21+
22+
### Response
23+
24+
```json
25+
{
26+
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
27+
"created_at": "2025-01-29T21:27:54.197306+05:30",
28+
"updated_at": "2025-01-29T21:27:54.197320+05:30",
29+
"description": "Added user story",
30+
"duration": 2,
31+
"created_by": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
32+
"updated_by": null,
33+
"project_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
34+
"workspace_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
35+
"logged_by": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
36+
}
37+
```
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
title: Delete Worklog
3+
sidebarTitle: Delete Worklog
4+
description: Delete a specific worklog entry from an issue.
5+
api: DELETE /api/v1/workspaces/:workspace-slug/projects/:project_id/issues/:issue_id/worklogs/:worklog_id/
6+
---
7+
8+
### Path parameters
9+
10+
<ParamField path="workspace-slug" type="string" required>
11+
The workspace-slug represents the unique workspace identifier for a workspace in Plane. It can be found in the URL. For example, in the URL `https://app.plane.so/my-team/projects/`, the workspace slug is `my-team`.
12+
13+
</ParamField>
14+
<ParamField path="project_id" type="string" required>The unique identifier of the project</ParamField>
15+
<ParamField path="issue_id" type="string" required>The unique identifier of the issue</ParamField>
16+
<ParamField path="worklog_id" type="string" required>The unique identifier of the worklog</ParamField>
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
title: Get total time for each issue
3+
sidebarTitle: Total logged time
4+
description: Aggregates the worklogs and provides the total time spent on each issue in the project.
5+
api: GET /api/v1/workspaces/:workspace-slug/projects/:project_id/total-worklogs/
6+
---
7+
8+
### Path parameters
9+
10+
<ParamField path="workspace-slug" type="string" required>
11+
The workspace-slug represents the unique workspace identifier for a workspace in Plane. It can be found in the URL. For example, in the URL `https://app.plane.so/my-team/projects/`, the workspace slug is `my-team`.
12+
13+
</ParamField>
14+
<ParamField path="project_id" type="string" required>The unique identifier of the project</ParamField>
15+
16+
### Response
17+
18+
```json
19+
[
20+
{
21+
"issue_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
22+
"duration": 3.5
23+
},
24+
{
25+
"issue_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
26+
"duration": 8
27+
},
28+
]
29+
```
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
title: Get worklogs for a specific issue
3+
sidebarTitle: Worklogs for an issue
4+
description: Retrieve a list of worklogs for a specific issue.
5+
api: GET /api/v1/workspaces/:workspace-slug/projects/:project_id/issues/:issue_id/worklogs/
6+
---
7+
8+
### Path parameters
9+
10+
<ParamField path="workspace-slug" type="string" required>
11+
The workspace-slug represents the unique workspace identifier for a workspace in Plane. It can be found in the URL. For example, in the URL `https://app.plane.so/my-team/projects/`, the workspace slug is `my-team`.
12+
13+
</ParamField>
14+
<ParamField path="project_id" type="string" required>The unique identifier of the project</ParamField>
15+
<ParamField path="issue_id" type="string" required>The unique identifier of the issue</ParamField>
16+
17+
### Response
18+
19+
```json
20+
{
21+
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
22+
"created_at": "2025-01-29T21:27:54.197306+05:30",
23+
"updated_at": "2025-01-29T21:27:54.197320+05:30",
24+
"description": "",
25+
"duration": 1,
26+
"created_by": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
27+
"updated_by": null,
28+
"project_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
29+
"workspace_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
30+
"logged_by": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
31+
}
32+
```
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
---
2+
title: Overview
3+
description: Enables you to track time spent on issues within a project. Worklogs track duration in minutes and include details like description, timestamps, and user information.
4+
---
5+
6+
```http
7+
GET /api/v1/workspaces/:workspace-slug/projects/:project_id/issues/:issue_id/worklogs/
8+
GET /api/v1/workspaces/:workspace-slug/projects/:project_id/total-worklogs/
9+
POST /api/v1/workspaces/:workspace-slug/projects/:project_id/issues/:issue_id/worklogs/
10+
PATCH /api/v1/workspaces/:workspace-slug/projects/:project_id/issues/:issue_id/worklogs/:worklog_id/
11+
DELETE /api/v1/workspaces/:workspace-slug/projects/:project_id/issues/:issue_id/worklogs/:worklog_id/
12+
```
13+
14+
## Worklogs object
15+
16+
**Attributes**
17+
18+
* `id` _string_
19+
20+
Unique identifier for the worklog
21+
22+
* `created_at` _timestamp_
23+
24+
Timestamp when the worklog was created
25+
26+
* `updated_at` _timestamp_
27+
28+
Timestamp when the worklog was last modified
29+
30+
* `deleted_at` _timestamp_
31+
32+
Timestamp when the worklog was deleted
33+
34+
* `description` _string_
35+
36+
Description of the work done during the worklog
37+
38+
* `duration` _integer_
39+
40+
Time spent on the issue, recorded in minutes
41+
42+
* `created_by` _string_
43+
44+
ID of user who created the worklog
45+
46+
* `updated_by` _string_
47+
48+
ID of user who last modified the worklog
49+
50+
* `project_id` _string_
51+
52+
ID of project associated with the worklog
53+
54+
* `workspace_id` _string_
55+
56+
ID of workspace associated with the worklog
57+
58+
* `logged_by` _string_
59+
60+
ID of the user who logged the work
61+
62+
63+
<ResponseExample>
64+
```json JSON
65+
{
66+
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
67+
"created_at": "2025-01-29T21:27:54.197306+05:30",
68+
"updated_at": "2025-01-29T21:27:54.197320+05:30",
69+
"description": "",
70+
"duration": 1,
71+
"created_by": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
72+
"updated_by": null,
73+
"project_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
74+
"workspace_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
75+
"logged_by": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
76+
}
77+
```
78+
</ResponseExample>
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
title: Update Worklog
3+
sidebarTitle: Update Worklog
4+
description: Update an existing worklog entry. You can change the description or duration of the worklog.
5+
api: PATCH /api/v1/workspaces/:workspace-slug/projects/:project_id/issues/:issue_id/worklogs/:worklog_id/
6+
---
7+
8+
### Path parameters
9+
10+
<ParamField path="workspace-slug" type="string" required>
11+
The workspace-slug represents the unique workspace identifier for a workspace in Plane. It can be found in the URL. For example, in the URL `https://app.plane.so/my-team/projects/`, the workspace slug is `my-team`.
12+
13+
</ParamField>
14+
<ParamField path="project_id" type="string" required>The unique identifier of the project</ParamField>
15+
<ParamField path="issue_id" type="string" required>The unique identifier of the issue</ParamField>
16+
<ParamField path="worklog_id" type="string" required>The unique identifier of the worklog</ParamField>
17+
18+
### Body
19+
20+
<ParamField body="description" type="string" required>Description of the work done during the worklog</ParamField>
21+
<ParamField body="duration" type="integer" required>Time spent on the issue in minutes</ParamField>
22+
23+
### Response
24+
25+
```json
26+
{
27+
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
28+
"created_at": "2025-01-29T21:27:54.197306+05:30",
29+
"updated_at": "2025-01-29T21:27:54.197320+05:30",
30+
"description": "Added user story",
31+
"duration": 2,
32+
"created_by": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
33+
"updated_by": null,
34+
"project_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
35+
"workspace_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
36+
"logged_by": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
37+
}
38+
```

mint.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,17 @@
300300
"api-reference/intake-issue/update-intake-issue-detail",
301301
"api-reference/intake-issue/delete-intake-issue"
302302
]
303+
},
304+
{
305+
"group": "Worklogs",
306+
"pages": [
307+
"api-reference/worklogs/overview",
308+
"api-reference/worklogs/get-worklogs-for-issue",
309+
"api-reference/worklogs/get-all-worklogs",
310+
"api-reference/worklogs/create-worklog",
311+
"api-reference/worklogs/update-worklog",
312+
"api-reference/worklogs/delete-worklog"
313+
]
303314
}
304315
]
305316
},

0 commit comments

Comments
 (0)