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