Skip to content

Commit 6f640df

Browse files
committed
add epics write endpoints
1 parent ed97fd7 commit 6f640df

File tree

7 files changed

+949
-0
lines changed

7 files changed

+949
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/coverage
22
/src/client/shared.ts
33
/src/node/shared.ts
4+
.cursor
45
*.log
56
*.tgz
67
.DS_Store

docs/.vitepress/config.mts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -686,8 +686,13 @@ export default withMermaid(
686686
collapsed: true,
687687
items: [
688688
{ text: "Overview", link: "/api-reference/epics/overview" },
689+
{ text: "Create Epic", link: "/api-reference/epics/create-epic" },
689690
{ text: "List Epics", link: "/api-reference/epics/list-epics" },
690691
{ text: "Get Epic", link: "/api-reference/epics/get-epic-detail" },
692+
{ text: "Update Epic", link: "/api-reference/epics/update-epic" },
693+
{ text: "Delete Epic", link: "/api-reference/epics/delete-epic" },
694+
{ text: "Add Epic Work Items", link: "/api-reference/epics/add-epic-work-items" },
695+
{ text: "List Epic Work Items", link: "/api-reference/epics/list-epic-work-items" },
691696
],
692697
},
693698
{
Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
---
2+
title: Add work items to epic
3+
description: Add work items to epic via Plane API. HTTP request format, parameters, scopes, and example responses for add work items to epic.
4+
keywords: plane, plane api, rest api, api integration, epics, add work items to epic
5+
---
6+
7+
# Add work items to epic
8+
9+
<div class="api-endpoint-badge">
10+
<span class="method post">POST</span>
11+
<span class="path">/api/v1/workspaces/{slug}/projects/{project_id}/epics/{epic_id}/issues/</span>
12+
</div>
13+
14+
<div class="api-two-column">
15+
<div class="api-left">
16+
17+
Add multiple work items as sub-issues under an epic. Validates type hierarchy before assignment.
18+
19+
<div class="params-section">
20+
21+
### Path Parameters
22+
23+
<div class="params-list">
24+
25+
<ApiParam name="epic_id" type="string" :required="true">
26+
27+
Epic ID
28+
29+
</ApiParam>
30+
31+
<ApiParam name="project_id" type="string" :required="true">
32+
33+
Project ID
34+
35+
</ApiParam>
36+
37+
<ApiParam name="slug" type="string" :required="true">
38+
39+
Workspace slug
40+
41+
</ApiParam>
42+
43+
</div>
44+
</div>
45+
46+
<div class="params-section">
47+
48+
### Body Parameters
49+
50+
<div class="params-list">
51+
52+
<ApiParam name="work_item_ids" type="array" :required="true">
53+
54+
List of work item IDs to add to the epic
55+
56+
</ApiParam>
57+
58+
</div>
59+
</div>
60+
61+
<div class="params-section">
62+
63+
### Scopes
64+
65+
`projects.epics:write`
66+
67+
</div>
68+
69+
</div>
70+
71+
<div class="api-right">
72+
73+
<CodePanel title="Add work items to epic" :languages="['cURL', 'Python', 'JavaScript']">
74+
<template #curl>
75+
76+
```bash
77+
curl -X POST \
78+
"https://api.plane.so/api/v1/workspaces/my-workspace/projects/550e8400-e29b-41d4-a716-446655440000/epics/550e8400-e29b-41d4-a716-446655440001/issues/" \
79+
-H "X-API-Key: $PLANE_API_KEY" \
80+
# Or use -H "Authorization: Bearer $PLANE_OAUTH_TOKEN" \
81+
-H "Content-Type: application/json" \
82+
-d '{
83+
"work_item_ids": [
84+
"550e8400-e29b-41d4-a716-446655440010",
85+
"550e8400-e29b-41d4-a716-446655440011"
86+
]
87+
}'
88+
```
89+
90+
</template>
91+
<template #python>
92+
93+
```python
94+
import requests
95+
96+
response = requests.post(
97+
"https://api.plane.so/api/v1/workspaces/my-workspace/projects/550e8400-e29b-41d4-a716-446655440000/epics/550e8400-e29b-41d4-a716-446655440001/issues/",
98+
headers={"X-API-Key": "your-api-key"},
99+
json={
100+
"work_item_ids": [
101+
"550e8400-e29b-41d4-a716-446655440010",
102+
"550e8400-e29b-41d4-a716-446655440011"
103+
]
104+
}
105+
)
106+
print(response.json())
107+
```
108+
109+
</template>
110+
<template #javascript>
111+
112+
```javascript
113+
const response = await fetch(
114+
"https://api.plane.so/api/v1/workspaces/my-workspace/projects/550e8400-e29b-41d4-a716-446655440000/epics/550e8400-e29b-41d4-a716-446655440001/issues/",
115+
{
116+
method: "POST",
117+
headers: {
118+
"X-API-Key": "your-api-key",
119+
"Content-Type": "application/json",
120+
},
121+
body: JSON.stringify({
122+
work_item_ids: [
123+
"550e8400-e29b-41d4-a716-446655440010",
124+
"550e8400-e29b-41d4-a716-446655440011",
125+
],
126+
}),
127+
}
128+
);
129+
const data = await response.json();
130+
```
131+
132+
</template>
133+
</CodePanel>
134+
135+
<ResponsePanel status="200">
136+
137+
```json
138+
[
139+
{
140+
"id": "550e8400-e29b-41d4-a716-446655440010",
141+
"name": "Implement login screen",
142+
"description_html": "<p>Build the login screen UI</p>",
143+
"description_stripped": "Build the login screen UI",
144+
"description_binary": null,
145+
"state": "550e8400-e29b-41d4-a716-446655440002",
146+
"priority": "high",
147+
"assignees": [],
148+
"labels": [],
149+
"type": null,
150+
"type_id": null,
151+
"estimate_point": null,
152+
"point": null,
153+
"start_date": null,
154+
"target_date": null,
155+
"parent": "550e8400-e29b-41d4-a716-446655440001",
156+
"sequence_id": 12,
157+
"sort_order": 65535.0,
158+
"is_draft": false,
159+
"completed_at": null,
160+
"archived_at": null,
161+
"last_activity_at": "2025-03-15T10:00:00Z",
162+
"project": "550e8400-e29b-41d4-a716-446655440000",
163+
"workspace": "550e8400-e29b-41d4-a716-446655440003",
164+
"external_id": null,
165+
"external_source": null,
166+
"deleted_at": null,
167+
"created_at": "2025-03-10T09:00:00Z",
168+
"updated_at": "2025-03-15T10:00:00Z",
169+
"created_by": "550e8400-e29b-41d4-a716-446655440005",
170+
"updated_by": null
171+
}
172+
]
173+
```
174+
175+
</ResponsePanel>
176+
177+
</div>
178+
179+
</div>

0 commit comments

Comments
 (0)