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---56# Meegle API — Setting (Workflow Settings)78APIs under this skill: Get Workflow Templates, Get Detailed Settings of Workflow Templates, Create Workflow Templates, Update Workflow Template, Delete Workflow Templates.910---1112## Get Workflow Templates1314Obtain 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.1516### When to Use1718- 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 Templates20- When building template selection UIs or checking **is_disabled** / **version** per template2122### API Spec: get_workflow_templates2324```yaml25name: get_workflow_templates26type: api27description: >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.3031auth:32 type: plugin_access_token33 header: X-Plugin-Token34 user_header: X-User-Key3536http:37 method: GET38 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}}"4243path_params:44 project_key:45 type: string46 required: true47 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: string52 required: true53 description: Work item type. Obtain via Get work item types in space.5455outputs:56 data:57 type: array58 description: >59 List of TemplateConf. Each has version, unique_key, is_disabled, template_id,60 template_key, template_name.6162constraints:63 - Permission: Permission Management – Configuration64```6566### Usage notes6768- **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.7071---7273## Get Detailed Settings of Workflow Templates7475Obtain 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.7677### When to Use7879- 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)8283### API Spec: get_detailed_settings_of_workflow_templates8485```yaml86name: get_detailed_settings_of_workflow_templates87type: api88description: >89 Obtain detailed configuration of the specified process template: node info and90 node transfer config. TemplateDetail includes workflow_confs (nodes) and connections.91 Node event configuration not supported.9293auth:94 type: plugin_access_token95 header: X-Plugin-Token96 user_header: X-User-Key9798http:99 method: GET100 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}}"104105path_params:106 project_key:107 type: string108 required: true109 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: string114 required: true115 description: >116 Process template ID. Obtain from Get Workflow Templates, or from template117 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).119120outputs:121 data:122 type: object123 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).128129constraints:130 - Permission: Permission Management – Process Type131 - Node event configuration not supported132133error_mapping:134 50006: Template not found (check template_id)135 30001: Data not found (template_id not found in project_key space)136```137138### Usage notes139140- **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.143144---145146## Create Workflow Templates147148Create 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.149150### When to Use151152- 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 Template155156### API Spec: create_workflow_templates157158```yaml159name: create_workflow_templates160type: api161description: >162 Create a new process template under the specified work item type. Optional163 copy_template_id to reuse an existing template. Returns new template ID (int64).164165auth:166 type: plugin_access_token167 header: X-Plugin-Token168 user_header: X-User-Key169170http:171 method: POST172 url: https://{domain}/open_api/template/v2/create_template173 headers:174 Content-Type: application/json175 X-Plugin-Token: "{{resolved_token}}"176 X-User-Key: "{{user_key}}"177178path_params: {}179180inputs:181 project_key:182 type: string183 required: true184 description: Space ID (project_key). Double-click space name in Meegle project space.185 work_item_type_key:186 type: string187 required: true188 description: Work item type. Obtain via Get work item types in space.189 template_name:190 type: string191 required: true192 description: Process template name; must not duplicate an existing template name.193 copy_template_id:194 type: integer195 required: false196 description: >197 ID of template to copy from. Obtain via Get Workflow Templates (list of process198 templates under the work item type). Omit to create an empty new template.199200outputs:201 data:202 type: integer203 description: Template ID of the newly created process template (int64).204205constraints:206 - Permission: Permission Management – Configuration207 - Current user must have space configuration permission (else 10005)208209error_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```213214### Usage notes215216- **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).220221---222223## Update Workflow Template224225Update the configuration of the specified process template. Supports node flow (**workflow_confs**, WorkflowConf) and state flow (**state_flow_confs**, StateFlowConf). Permission: Permission Management – Settings.226227### When to Use228229- 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 information231- When updating owner_usage_mode, owner_roles, owners, need_schedule, pass_mode, done_operation_role, task_confs, etc.232233### API Spec: update_workflow_template234235```yaml236name: update_workflow_template237type: api238description: >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.241242auth:243 type: plugin_access_token244 header: X-Plugin-Token245 user_header: X-User-Key246247http:248 method: PUT249 url: https://{domain}/open_api/template/v2/update_template250 headers:251 Content-Type: application/json252 X-Plugin-Token: "{{resolved_token}}"253 X-User-Key: "{{user_key}}"254255path_params: {}256257inputs:258 project_key:259 type: string260 required: true261 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: integer266 required: true267 description: >268 Process template ID. From Get Workflow Templates, or template field options in269 Get metadata for creating work items / Get field information.270 workflow_confs:271 type: array272 required: false273 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: array276 required: false277 description: State flow configuration per StateFlowConf structure.278279outputs:280 data:281 type: object282 description: Empty on success (no data in response).283284constraints:285 - Permission: Permission Management – Settings286 - Current user must have space configuration permission (else 10005)287288error_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```294295### Usage notes296297- **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).301302---303304## Delete Workflow Templates305306Delete the specified process template. Permission: Permission Management – Settings.307308### When to Use309310- When removing a process template for a work item type311- When **template_id** comes from Get Workflow Templates, Get metadata for creating work items, or Get field information (template field options)312313### API Spec: delete_workflow_templates314315```yaml316name: delete_workflow_templates317type: api318description: >319 Delete the specified process template. Path parameters project_key and template_id.320321auth:322 type: plugin_access_token323 header: X-Plugin-Token324 user_header: X-User-Key325326http:327 method: DELETE328 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}}"332333path_params:334 project_key:335 type: string336 required: true337 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: string342 required: true343 description: >344 Process template ID. From Get Workflow Templates, or template field options in345 Get metadata for creating work items / Get field information.346347outputs:348 data:349 type: object350 description: Empty on success (no data in response).351352constraints:353 - Permission: Permission Management – Settings354355error_mapping:356 9999: Invalid param (key template_id value invalid; template_id incorrect)357```358359### Usage notes360361- **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.