Meegle API — Setting (Workflow Settings)
APIs under this skill: Get Workflow Templates, Get Detailed Settings of Workflow Templates, Create Workflow Templates, Update Workflow Template, Delete Workflow Templates.
Get Workflow Templates
Obtain the list of all process templates under the specified work item type. Response follows the TemplateConf structure (version, unique_key, is_disabled, template_id, template_key, template_name). Permission: Permission Management – Configuration.
When to Use
- When listing workflow/process templates for a work item type (e.g. story, issue)
- When you need template_id, unique_key, or template_name for Get Detailed Settings of Workflow Templates, Update Workflow Template, or Delete Workflow Templates
- When building template selection UIs or checking is_disabled / version per template
API Spec: get_workflow_templates
name: get_workflow_templates
type: api
description: >
Obtain the list of all process templates under the specified work item type.
Returns list per TemplateConf: version, unique_key, is_disabled, template_id, template_key, template_name.
auth:
type: plugin_access_token
header: X-Plugin-Token
user_header: X-User-Key
http:
method: GET
url: https://{domain}/open_api/{project_key}/template_list/{work_item_type_key}
headers:
X-Plugin-Token: "{{resolved_token}}"
X-User-Key: "{{user_key}}"
path_params:
project_key:
type: string
required: true
description: >
Space ID (project_key) or space domain name (simple_name).
project_key: Double-click space name in Meegle. simple_name: from space URL (e.g. doc).
work_item_type_key:
type: string
required: true
description: Work item type. Obtain via Get work item types in space.
outputs:
data:
type: array
description: >
List of TemplateConf. Each has version, unique_key, is_disabled, template_id,
template_key, template_name.
constraints:
- Permission: Permission Management – Configuration
Usage notes
- data items: Use template_id or unique_key when calling Get Detailed Settings of Workflow Templates, Update Workflow Template, or Delete Workflow Templates. is_disabled indicates whether the template is disabled (value meaning per product).
- For common error codes and server-side call analysis, refer to Open API Error Codes in the product docs.
Get Detailed Settings of Workflow Templates
Obtain the detailed configuration of the specified process template, including node information and node transfer configuration. Node event configuration is not supported. Response follows the TemplateDetail structure (template_id, template_name, version, work_item_type_key, workflow_confs, connections). Permission: Permission Management – Process Type.
When to Use
- When editing or displaying a workflow template's nodes, fields, sub_tasks, sub_work_items, and transitions (connections)
- When template_id comes from Get Workflow Templates, Get metadata for creating work items, or Get field information (template field options)
- When building template editors or syncing workflow config; omit template_id to use the first process template of the work item type (per product behavior)
API Spec: get_detailed_settings_of_workflow_templates
name: get_detailed_settings_of_workflow_templates
type: api
description: >
Obtain detailed configuration of the specified process template: node info and
node transfer config. TemplateDetail includes workflow_confs (nodes) and connections.
Node event configuration not supported.
auth:
type: plugin_access_token
header: X-Plugin-Token
user_header: X-User-Key
http:
method: GET
url: https://{domain}/open_api/{project_key}/template_detail/{template_id}
headers:
X-Plugin-Token: "{{resolved_token}}"
X-User-Key: "{{user_key}}"
path_params:
project_key:
type: string
required: true
description: >
Space ID (project_key) or space domain name (simple_name).
project_key: Double-click space name in Meegle. simple_name: from space URL (e.g. doc).
template_id:
type: string
required: true
description: >
Process template ID. Obtain from Get Workflow Templates, or from template
field options in Get metadata for creating work items / Get field information.
When not passed, first process template of the work item type may be used (product-dependent).
outputs:
data:
type: object
description: >
TemplateDetail: template_id, template_name, version, is_disabled,
work_item_type_key, workflow_confs (nodes with name, state_key, owner_usage_mode,
fields, sub_tasks, sub_work_items, done_operation_role, connections, etc.),
connections (source_state_key, target_state_key).
constraints:
- Permission: Permission Management – Process Type
- Node event configuration not supported
error_mapping:
50006: Template not found (check template_id)
30001: Data not found (template_id not found in project_key space)
Usage notes
- template_id: From Get Workflow Templates (data[].template_id), or from the template field options in Get metadata for creating work items / Get field information. Must belong to the space identified by project_key (30001 otherwise).
- data.workflow_confs: Array of node configs; each has state_key, name, fields, sub_tasks, sub_work_items, done_operation_role, connections, and related flags. data.connections: Transitions between state_key values.
- Node event configuration is not supported in this interface.
Create Workflow Templates
Create a new process template under the specified work item type. Optionally copy from an existing template via copy_template_id. Returns the new template ID. Permission: Permission Management – Configuration.
When to Use
- When creating a new process template for a work item type (e.g. story, issue)
- When copying an existing template: set copy_template_id from Get Workflow Templates (list of process templates under the work item type)
- When you need the returned template ID for Get Detailed Settings, Update, or Delete Workflow Template
API Spec: create_workflow_templates
name: create_workflow_templates
type: api
description: >
Create a new process template under the specified work item type. Optional
copy_template_id to reuse an existing template. Returns new template ID (int64).
auth:
type: plugin_access_token
header: X-Plugin-Token
user_header: X-User-Key
http:
method: POST
url: https://{domain}/open_api/template/v2/create_template
headers:
Content-Type: application/json
X-Plugin-Token: "{{resolved_token}}"
X-User-Key: "{{user_key}}"
path_params: {}
inputs:
project_key:
type: string
required: true
description: Space ID (project_key). Double-click space name in Meegle project space.
work_item_type_key:
type: string
required: true
description: Work item type. Obtain via Get work item types in space.
template_name:
type: string
required: true
description: Process template name; must not duplicate an existing template name.
copy_template_id:
type: integer
required: false
description: >
ID of template to copy from. Obtain via Get Workflow Templates (list of process
templates under the work item type). Omit to create an empty new template.
outputs:
data:
type: integer
description: Template ID of the newly created process template (int64).
constraints:
- Permission: Permission Management – Configuration
- Current user must have space configuration permission (else 10005)
error_mapping:
10005: No project admin permission (no permission to configure the space)
50006: Template name duplicate (template name already exists; change the name)
Usage notes
- template_name: Must be unique among process templates for the work item type in the space; duplicate returns 50006.
- copy_template_id: From Get Workflow Templates (data[].template_id). When provided, the new template is created by copying this template; when omitted, a new empty template is created.
- data: Use the returned template ID when calling Get Detailed Settings of Workflow Templates, Update Workflow Template, or Delete Workflow Templates.
- Space configuration (admin) permission is required (10005 if not allowed).
Update Workflow Template
Update the configuration of the specified process template. Supports node flow (workflow_confs, WorkflowConf) and state flow (state_flow_confs, StateFlowConf). Permission: Permission Management – Settings.
When to Use
- When changing node configuration (add/delete/modify nodes via action in workflow_confs or state_flow_confs)
- When template_id comes from Get Workflow Templates, Get metadata for creating work items, or Get field information
- When updating owner_usage_mode, owner_roles, owners, need_schedule, pass_mode, done_operation_role, task_confs, etc.
API Spec: update_workflow_template
name: update_workflow_template
type: api
description: >
Update the specified process template. workflow_confs for node flow (WorkflowConf),
state_flow_confs for state flow (StateFlowConf). Node action: 1 Add, 2 Delete (state_key only), 3 Modify.
auth:
type: plugin_access_token
header: X-Plugin-Token
user_header: X-User-Key
http:
method: PUT
url: https://{domain}/open_api/template/v2/update_template
headers:
Content-Type: application/json
X-Plugin-Token: "{{resolved_token}}"
X-User-Key: "{{user_key}}"
path_params: {}
inputs:
project_key:
type: string
required: true
description: >
Space ID (project_key) or space domain name (simple_name).
project_key: Double-click space name in Meegle. simple_name: from space URL (e.g. doc).
template_id:
type: integer
required: true
description: >
Process template ID. From Get Workflow Templates, or template field options in
Get metadata for creating work items / Get field information.
workflow_confs:
type: array
required: false
description: Node flow configuration per WorkflowConf. Each can have action (1 add, 2 delete, 3 modify), state_key, name, tags, pre_node_state_key, owner_usage_mode, owner_roles, owners, need_schedule, different_schedule, deletable, deletable_operation_role, pass_mode, done_operation_role, done_schedule, done_allocate_owner, task_confs, etc. For action 2 (delete), only state_key required.
state_flow_confs:
type: array
required: false
description: State flow configuration per StateFlowConf structure.
outputs:
data:
type: object
description: Empty on success (no data in response).
constraints:
- Permission: Permission Management – Settings
- Current user must have space configuration permission (else 10005)
error_mapping:
10005: No project admin permission (operator cannot configure the space)
1000052062: Project key is wrong (project_key incorrect)
20006: Invalid param (state_key illegal for node flow work item)
50006: Template not found (template_id incorrect)
Usage notes
- template_id: From Get Workflow Templates, or from template field options in Get metadata for creating work items / Get field information. Must be correct for the space (50006 if not found).
- workflow_confs (node flow): action 1 = add node, 2 = delete node (only state_key needed), 3 = modify node. Structure follows WorkflowConf (state_key, name, tags, owner_usage_mode, owner_roles, owners, need_schedule, different_schedule, pass_mode, done_operation_role, task_confs, etc.).
- state_flow_confs: State flow config per StateFlowConf; use for state-flow work item types.
- Space configuration (admin) permission is required (10005 if not allowed).
Delete Workflow Templates
Delete the specified process template. Permission: Permission Management – Settings.
When to Use
- When removing a process template for a work item type
- When template_id comes from Get Workflow Templates, Get metadata for creating work items, or Get field information (template field options)
API Spec: delete_workflow_templates
name: delete_workflow_templates
type: api
description: >
Delete the specified process template. Path parameters project_key and template_id.
auth:
type: plugin_access_token
header: X-Plugin-Token
user_header: X-User-Key
http:
method: DELETE
url: https://{domain}/open_api/template/v2/delete_template/{project_key}/{template_id}
headers:
X-Plugin-Token: "{{resolved_token}}"
X-User-Key: "{{user_key}}"
path_params:
project_key:
type: string
required: true
description: >
Space ID (project_key) or space domain name (simple_name).
project_key: Double-click space name in Meegle. simple_name: from space URL (e.g. doc).
template_id:
type: string
required: true
description: >
Process template ID. From Get Workflow Templates, or template field options in
Get metadata for creating work items / Get field information.
outputs:
data:
type: object
description: Empty on success (no data in response).
constraints:
- Permission: Permission Management – Settings
error_mapping:
9999: Invalid param (key template_id value invalid; template_id incorrect)
Usage notes
- template_id: From Get Workflow Templates (data[].template_id), or from template field options in Get metadata for creating work items / Get field information. Invalid or non-existent template_id returns 9999.
- Success response has no data; check err_code 0.
1---2name: meegle-api-setting-workflow-settings3description: Meegle OpenAPI for workflow/process template settings: list, get detail, create, update, delete.4---5
6# Meegle API — Setting (Workflow Settings)
7
8APIs under this skill: Get Workflow Templates, Get Detailed Settings of Workflow Templates, Create Workflow Templates, Update Workflow Template, Delete Workflow Templates.
9
10---
11
12## Get Workflow Templates
13
14Obtain the list of all process templates under the specified work item type. Response follows the TemplateConf structure (version, unique_key, is_disabled, template_id, template_key, template_name). Permission: Permission Management – Configuration.
15
16### When to Use
17
18- When listing workflow/process templates for a work item type (e.g. story, issue)
19- When you need **template_id**, **unique_key**, or **template_name** for Get Detailed Settings of Workflow Templates, Update Workflow Template, or Delete Workflow Templates
20- When building template selection UIs or checking **is_disabled** / **version** per template
21
22### API Spec: get_workflow_templates
23
24```yaml
25name: get_workflow_templates
26type: api
27description: >
28 Obtain the list of all process templates under the specified work item type.
29 Returns list per TemplateConf: version, unique_key, is_disabled, template_id, template_key, template_name.
30
31auth:
32 type: plugin_access_token
33 header: X-Plugin-Token
34 user_header: X-User-Key
35
36http:
37 method: GET
38 url: https://{domain}/open_api/{project_key}/template_list/{work_item_type_key}
39 headers:
40 X-Plugin-Token: "{{resolved_token}}"
41 X-User-Key: "{{user_key}}"
42
43path_params:
44 project_key:
45 type: string
46 required: true
47 description: >
48 Space ID (project_key) or space domain name (simple_name).
49 project_key: Double-click space name in Meegle. simple_name: from space URL (e.g. doc).
50 work_item_type_key:
51 type: string
52 required: true
53 description: Work item type. Obtain via Get work item types in space.
54
55outputs:
56 data:
57 type: array
58 description: >
59 List of TemplateConf. Each has version, unique_key, is_disabled, template_id,
60 template_key, template_name.
61
62constraints:
63 - Permission: Permission Management – Configuration
64```
65
66### Usage notes
67
68- **data** items: Use **template_id** or **unique_key** when calling Get Detailed Settings of Workflow Templates, Update Workflow Template, or Delete Workflow Templates. **is_disabled** indicates whether the template is disabled (value meaning per product).
69- For common error codes and server-side call analysis, refer to **Open API Error Codes** in the product docs.
70
71---
72
73## Get Detailed Settings of Workflow Templates
74
75Obtain the detailed configuration of the specified process template, including node information and node transfer configuration. Node event configuration is not supported. Response follows the TemplateDetail structure (template_id, template_name, version, work_item_type_key, workflow_confs, connections). Permission: Permission Management – Process Type.
76
77### When to Use
78
79- When editing or displaying a workflow template's nodes, fields, sub_tasks, sub_work_items, and transitions (connections)
80- When **template_id** comes from Get Workflow Templates, Get metadata for creating work items, or Get field information (template field options)
81- When building template editors or syncing workflow config; omit template_id to use the first process template of the work item type (per product behavior)
82
83### API Spec: get_detailed_settings_of_workflow_templates
84
85```yaml
86name: get_detailed_settings_of_workflow_templates
87type: api
88description: >
89 Obtain detailed configuration of the specified process template: node info and
90 node transfer config. TemplateDetail includes workflow_confs (nodes) and connections.
91 Node event configuration not supported.
92
93auth:
94 type: plugin_access_token
95 header: X-Plugin-Token
96 user_header: X-User-Key
97
98http:
99 method: GET
100 url: https://{domain}/open_api/{project_key}/template_detail/{template_id}
101 headers:
102 X-Plugin-Token: "{{resolved_token}}"
103 X-User-Key: "{{user_key}}"
104
105path_params:
106 project_key:
107 type: string
108 required: true
109 description: >
110 Space ID (project_key) or space domain name (simple_name).
111 project_key: Double-click space name in Meegle. simple_name: from space URL (e.g. doc).
112 template_id:
113 type: string
114 required: true
115 description: >
116 Process template ID. Obtain from Get Workflow Templates, or from template
117 field options in Get metadata for creating work items / Get field information.
118 When not passed, first process template of the work item type may be used (product-dependent).
119
120outputs:
121 data:
122 type: object
123 description: >
124 TemplateDetail: template_id, template_name, version, is_disabled,
125 work_item_type_key, workflow_confs (nodes with name, state_key, owner_usage_mode,
126 fields, sub_tasks, sub_work_items, done_operation_role, connections, etc.),
127 connections (source_state_key, target_state_key).
128
129constraints:
130 - Permission: Permission Management – Process Type
131 - Node event configuration not supported
132
133error_mapping:
134 50006: Template not found (check template_id)
135 30001: Data not found (template_id not found in project_key space)
136```
137
138### Usage notes
139
140- **template_id**: From **Get Workflow Templates** (data[].template_id), or from the template field options in **Get metadata for creating work items** / **Get field information**. Must belong to the space identified by **project_key** (30001 otherwise).
141- **data.workflow_confs**: Array of node configs; each has **state_key**, **name**, **fields**, **sub_tasks**, **sub_work_items**, **done_operation_role**, **connections**, and related flags. **data.connections**: Transitions between state_key values.
142- Node event configuration is not supported in this interface.
143
144---
145
146## Create Workflow Templates
147
148Create a new process template under the specified work item type. Optionally copy from an existing template via **copy_template_id**. Returns the new **template ID**. Permission: Permission Management – Configuration.
149
150### When to Use
151
152- When creating a new process template for a work item type (e.g. story, issue)
153- When copying an existing template: set **copy_template_id** from Get Workflow Templates (list of process templates under the work item type)
154- When you need the returned template ID for Get Detailed Settings, Update, or Delete Workflow Template
155
156### API Spec: create_workflow_templates
157
158```yaml
159name: create_workflow_templates
160type: api
161description: >
162 Create a new process template under the specified work item type. Optional
163 copy_template_id to reuse an existing template. Returns new template ID (int64).
164
165auth:
166 type: plugin_access_token
167 header: X-Plugin-Token
168 user_header: X-User-Key
169
170http:
171 method: POST
172 url: https://{domain}/open_api/template/v2/create_template
173 headers:
174 Content-Type: application/json
175 X-Plugin-Token: "{{resolved_token}}"
176 X-User-Key: "{{user_key}}"
177
178path_params: {}
179
180inputs:
181 project_key:
182 type: string
183 required: true
184 description: Space ID (project_key). Double-click space name in Meegle project space.
185 work_item_type_key:
186 type: string
187 required: true
188 description: Work item type. Obtain via Get work item types in space.
189 template_name:
190 type: string
191 required: true
192 description: Process template name; must not duplicate an existing template name.
193 copy_template_id:
194 type: integer
195 required: false
196 description: >
197 ID of template to copy from. Obtain via Get Workflow Templates (list of process
198 templates under the work item type). Omit to create an empty new template.
199
200outputs:
201 data:
202 type: integer
203 description: Template ID of the newly created process template (int64).
204
205constraints:
206 - Permission: Permission Management – Configuration
207 - Current user must have space configuration permission (else 10005)
208
209error_mapping:
210 10005: No project admin permission (no permission to configure the space)
211 50006: Template name duplicate (template name already exists; change the name)
212```
213
214### Usage notes
215
216- **template_name**: Must be unique among process templates for the work item type in the space; duplicate returns 50006.
217- **copy_template_id**: From **Get Workflow Templates** (data[].template_id). When provided, the new template is created by copying this template; when omitted, a new empty template is created.
218- **data**: Use the returned template ID when calling Get Detailed Settings of Workflow Templates, Update Workflow Template, or Delete Workflow Templates.
219- Space configuration (admin) permission is required (10005 if not allowed).
220
221---
222
223## Update Workflow Template
224
225Update the configuration of the specified process template. Supports node flow (**workflow_confs**, WorkflowConf) and state flow (**state_flow_confs**, StateFlowConf). Permission: Permission Management – Settings.
226
227### When to Use
228
229- When changing node configuration (add/delete/modify nodes via **action** in workflow_confs or state_flow_confs)
230- When **template_id** comes from Get Workflow Templates, Get metadata for creating work items, or Get field information
231- When updating owner_usage_mode, owner_roles, owners, need_schedule, pass_mode, done_operation_role, task_confs, etc.
232
233### API Spec: update_workflow_template
234
235```yaml
236name: update_workflow_template
237type: api
238description: >
239 Update the specified process template. workflow_confs for node flow (WorkflowConf),
240 state_flow_confs for state flow (StateFlowConf). Node action: 1 Add, 2 Delete (state_key only), 3 Modify.
241
242auth:
243 type: plugin_access_token
244 header: X-Plugin-Token
245 user_header: X-User-Key
246
247http:
248 method: PUT
249 url: https://{domain}/open_api/template/v2/update_template
250 headers:
251 Content-Type: application/json
252 X-Plugin-Token: "{{resolved_token}}"
253 X-User-Key: "{{user_key}}"
254
255path_params: {}
256
257inputs:
258 project_key:
259 type: string
260 required: true
261 description: >
262 Space ID (project_key) or space domain name (simple_name).
263 project_key: Double-click space name in Meegle. simple_name: from space URL (e.g. doc).
264 template_id:
265 type: integer
266 required: true
267 description: >
268 Process template ID. From Get Workflow Templates, or template field options in
269 Get metadata for creating work items / Get field information.
270 workflow_confs:
271 type: array
272 required: false
273 description: Node flow configuration per WorkflowConf. Each can have action (1 add, 2 delete, 3 modify), state_key, name, tags, pre_node_state_key, owner_usage_mode, owner_roles, owners, need_schedule, different_schedule, deletable, deletable_operation_role, pass_mode, done_operation_role, done_schedule, done_allocate_owner, task_confs, etc. For action 2 (delete), only state_key required.
274 state_flow_confs:
275 type: array
276 required: false
277 description: State flow configuration per StateFlowConf structure.
278
279outputs:
280 data:
281 type: object
282 description: Empty on success (no data in response).
283
284constraints:
285 - Permission: Permission Management – Settings
286 - Current user must have space configuration permission (else 10005)
287
288error_mapping:
289 10005: No project admin permission (operator cannot configure the space)
290 1000052062: Project key is wrong (project_key incorrect)
291 20006: Invalid param (state_key illegal for node flow work item)
292 50006: Template not found (template_id incorrect)
293```
294
295### Usage notes
296
297- **template_id**: From **Get Workflow Templates**, or from template field options in **Get metadata for creating work items** / **Get field information**. Must be correct for the space (50006 if not found).
298- **workflow_confs** (node flow): **action** 1 = add node, 2 = delete node (only **state_key** needed), 3 = modify node. Structure follows WorkflowConf (state_key, name, tags, owner_usage_mode, owner_roles, owners, need_schedule, different_schedule, pass_mode, done_operation_role, task_confs, etc.).
299- **state_flow_confs**: State flow config per StateFlowConf; use for state-flow work item types.
300- Space configuration (admin) permission is required (10005 if not allowed).
301
302---
303
304## Delete Workflow Templates
305
306Delete the specified process template. Permission: Permission Management – Settings.
307
308### When to Use
309
310- When removing a process template for a work item type
311- When **template_id** comes from Get Workflow Templates, Get metadata for creating work items, or Get field information (template field options)
312
313### API Spec: delete_workflow_templates
314
315```yaml
316name: delete_workflow_templates
317type: api
318description: >
319 Delete the specified process template. Path parameters project_key and template_id.
320
321auth:
322 type: plugin_access_token
323 header: X-Plugin-Token
324 user_header: X-User-Key
325
326http:
327 method: DELETE
328 url: https://{domain}/open_api/template/v2/delete_template/{project_key}/{template_id}
329 headers:
330 X-Plugin-Token: "{{resolved_token}}"
331 X-User-Key: "{{user_key}}"
332
333path_params:
334 project_key:
335 type: string
336 required: true
337 description: >
338 Space ID (project_key) or space domain name (simple_name).
339 project_key: Double-click space name in Meegle. simple_name: from space URL (e.g. doc).
340 template_id:
341 type: string
342 required: true
343 description: >
344 Process template ID. From Get Workflow Templates, or template field options in
345 Get metadata for creating work items / Get field information.
346
347outputs:
348 data:
349 type: object
350 description: Empty on success (no data in response).
351
352constraints:
353 - Permission: Permission Management – Settings
354
355error_mapping:
356 9999: Invalid param (key template_id value invalid; template_id incorrect)
357```
358
359### Usage notes
360
361- **template_id**: From **Get Workflow Templates** (data[].template_id), or from template field options in **Get metadata for creating work items** / **Get field information**. Invalid or non-existent template_id returns 9999.
362- Success response has no **data**; check **err_code** 0.