Web API Methods
Table of Contents
- Introduction
- Accessing Web API
- Using Swagger
- Definitions
- Web API Method Descriptions
- Account — individual accounts
- AccountTemplate — account templates and accounts linked to them
- Attribute — template attributes
- Backup — backup configurations and sessions
- BehaviourState — scenarios and process elements
- CaseTemplate — case templates (legacy)
- Dataset — tables
- Document — files attached to Document attributes
- DocumentExportTemplate — export templates
- Form — forms and form rules (except process start forms and user task forms)
- SolutionGitIntegration — application version control via Git
- Heartbeat — server, process, scripts, and service status monitoring
- ProcessObjects — process diagram version migration
- ProcessTemplate — process templates
- Record — single record (except process templates)
- Records — multiple records and record export/import (except process templates)
- RecordTemplate — record templates
- ReferenceData — records with specified attribute values
- Solution — applications
- Toolbar — toolbars and buttons on them
- Transfer — application model export/import
- UserCommand — buttons
- WorkerEngine — system services
Introduction
The CMW Platform RESTful Web API provides generic REST API methods. These methods are the same for all CMW Platform versions.
This article contains the Web API methods overview. See complete API details in the Swagger UI.
Accessing Web API
- Base URL for the Web API requests:
https://your-host/webapi/
- Web API supports
GET
,PUT
,POST
, andDELETE
queries. - Web API supports JSON or XML content types.
- Web API supports basic authentication.
Using Swagger
The Swagger UI provides detailed API method references, including request and response descriptions and data models with example values.
With the Swagger UI, you can execute the requests and view the responses.
Access the Swagger UI for Web API at:
https://your-host/Docs/WebApi/
Here your-host
is the domain name of the CMW Platform instance.
Definitions
The Web API methods and Swagger documentation use the following names for the CMW Platform entities:
- activity — process diagram element
- alias — system name
- behaviour — scenario, process diagram element
- container — template, application
- dataset — table in a template
- global alias — object path, consisting of its type, parent system name, and object system name
- id — object identifier
- list — array
- property — attribute
- solution — application
- scheme — process diagram
- stream — file stored in the system
- transfer — application version management
- trigger — scenario
- user command — button
- worker — system service
- object — a collection of property/value pairs
Web API Method Descriptions
Account — individual accounts |
||||
---|---|---|---|---|
Method | Query | Description | Input | Output |
GET | /webapi/Account | Gets all accounts. | Array of objects with account properties | |
POST | /webapi/Account | Creates account. | Account properties object | Account ID |
PUT | /webapi/Account | Edits account properties. | Account properties object | Status object |
DELETE |
/webapi/Account/ |
Deletes account. | Account ID | Status object |
GET |
/webapi/Account/ |
Gets account properties. | Account ID |
Account properties object |
AccountTemplate — account templates and accounts linked to them |
||||
Method | Query | Description | Input | Output |
POST |
/webapi/AccountTemplate/ |
Creates account template. | Application system name, account template properties object | Object with account template system name |
PUT |
/webapi/AccountTemplate/ |
Edits account template properties. | Application system name, account template properties object | Status object |
DELETE |
/webapi/AccountTemplate/ |
Deletes account template. | Application system name, account template system name | Status object |
GET |
/webapi/AccountTemplate/ |
Gets account template properties. | Application system name, account template system name | Account template properties object |
PUT |
/webapi/AccountTemplate/ |
Archives account template. | Application system name, account template system name. | Status object |
PUT |
/webapi/AccountTemplate/ |
Unarchives account template. | Application system name, account template system name | Status object |
PUT |
/webapi/AccountTemplate/ |
Unlinks accounts from the specified account template. | Application system name, account template system name, array of account IDs | Status object |
PUT |
/webapi/AccountTemplate/ |
Links specified accounts to the specified account template. | Application system name, account template system name, array of account IDs | Status object |
GET |
/webapi/AccountTemplate/ |
Gets accounts linked to the specified account template. | Application system name, account template system name | Array of objects with account properties |
GET |
/webapi/AccountTemplate/ |
Gets all account templates in the specified application. | Application system name | Array of objects with account template properties |
Attribute — template attributes |
||||
Method | Query | Description | Input | Output |
POST |
/webapi/Attribute/ |
Creates attribute. | Application system name, attribute properties object | Object with attribute system name |
PUT |
/webapi/Attribute/ |
Edits attribute properties. | Application system name, attribute properties object | Status object |
DELETE |
/webapi/Attribute/ |
Deletes attribute. | Application system name, attribute global alias: Attribute@ |
Status object |
GET |
/webapi/Attribute/ |
Gets attribute properties. | Application system name, attribute global alias: Attribute@ |
Attribute properties object |
PUT |
/webapi/Attribute/ |
Archives attribute. | Application system name, attribute global alias: Attribute@ |
Status object |
PUT |
/webapi/Attribute/ |
Unarchives attribute. | Application system name, attribute global alias: Attribute@ |
Status object |
GET |
/webapi/Attribute/ |
Gets all attributes for the specified template. | Template global alias: Template@ |
Array of objects with attribute properties |
Backup — backup configurations and sessions |
||||
Method | Query | Description | Input | Output |
DELETE |
/webapi/Backup/ |
Deletes specified backup configurations. | Array of backup configuration IDs | Status object |
GET |
/webapi/Backup/ |
Gets all backup configurations. | Array of backup configuration objects | |
POST |
/webapi/Backup/ |
Creates backup configuration. | Backup configuration object | Backup configuration ID |
PUT |
/webapi/Backup/ |
Edits backup configuration. | Backup configuration object | Status object |
GET |
/webapi/Backup/ |
Gets backup configuration. | Backup configuration ID | Backup configuration object |
DELETE |
/webapi/Backup/ |
Deletes specified backup sessions. | Array of backup session IDs | Status object |
POST |
/webapi/Backup/ |
Returns backup sessions matching the specified filter. | Backup session filter object | Array of objects with backup session details |
POST |
/webapi/Backup/ |
Initiates backup session using the specified configuration. | Backup configuration ID | Object with backup session details |
GET |
/webapi/Backup/ |
Gets backup session. | Backup session ID | Object with backup session details |
PUT |
/webapi/Backup/ |
Aborts backup session. | Backup session ID | Object with backup session details |
POST |
/webapi/Backup/ |
Sets Elasticsearch snapshots repository. | Name of existing Elasticsearch snapshots repository | Status object |
BehaviourState — scenarios and process elements |
||||
Method | Query | Description | Input | Output |
GET |
/webapi/BehaviourState/ |
Gets scenario and process element states in the specified application. | Application system name | Object with scenario and process element states |
PUT |
/webapi/BehaviourState/ |
Updates scenario and process element states in the specified application. | Object with scenario and process element states | Status object |
CaseTemplate — case templates (legacy) |
||||
Method | Query | Description | Input | Output |
POST |
/webapi/CaseTemplate/ |
Creates case template with/without related record template. | Application system name, case template properties object | Object with case template system name |
PUT |
/webapi/CaseTemplate/ |
Edits case template. | Application system name, case template properties object | Status object |
DELETE |
/webapi/CaseTemplate/ |
Deletes case template. | Application system name, case template system name | Status object |
GET |
/webapi/CaseTemplate/ |
Gets case template properties. | Application system name, case template system name | Case template properties object |
PUT |
/webapi/CaseTemplate/ |
Archives case template. | Application system name, case template system name | Status object |
PUT |
/webapi/CaseTemplate/ |
Unarchives case template. | Application system name, case template system name | Status object |
GET |
/webapi/CaseTemplate/ |
Gets all case templates in the specified application. | Application system name | Array of objects with case template properties |
Dataset — tables |
||||
Method | Query | Description | Input | Output |
POST |
/webapi/Dataset/ |
Creates table. | Application system name, table configuration object | Table configuration object |
PUT |
/webapi/Dataset/ |
Edits table configuration. | Application system name, table configuration object | Status object |
DELETE |
/webapi/Dataset/ |
Deletes table. | Application system name, table global alias: Dataset@ |
Status object |
GET |
/webapi/Dataset/ |
Gets table configuration. | Application system name, table global alias: Dataset@ |
Table configuration object |
GET |
/webapi/Dataset/ |
Gets all tables of the specified template. | Application system name, template global alias: Template@ |
Array of table configuration objects |
Document — files attached to Document attributes |
||||
Method | Query | Description | Input | Output |
POST | /webapi/Document | Creates document. | Document properties object | Object with document ID |
PUT | /webapi/Document | Edits document properties. | Document properties object | Status object |
DELETE |
/webapi/Document/ |
Deletes document. | Document ID | Status object |
GET |
/webapi/Document/ |
Gets document properties. | Document ID | Document properties object |
GET |
/webapi/Document/ |
Gets document content. | Document ID | Document content (application/octet-stream ) |
POST |
/webapi/Document/ |
Creates document by uploading a file. | Object with filename and content (byte array ) |
Object with document ID |
POST |
/webapi/Document/ |
Creates revision by uploading a file. | Document ID, object with filename and content (byte array ) |
Object with revision ID |
GET |
/webapi/Document/ |
Gets revision properties. | Revision ID | Revision properties object |
GET |
/webapi/Document/ |
Gets revision content. | Revision ID | Revision content (application/octet-stream ). |
DocumentExportTemplate — export templates |
||||
Method | Query | Description | Input | Output |
POST |
/webapi/ |
Creates export template. | Application system name, object with export template properties | Export template system name |
PUT |
/webapi/ |
Edits export template. | Application system name, object with export template properties | Status object |
DELETE |
/webapi/ |
Deletes export template. | Application system name, export template global alias: ExportTemplate@ |
Status object |
GET |
/webapi/ |
Gets export template properties. | Application system name, export template global alias: ExportTemplate@ |
Object with export template properties |
GET |
/webapi/ |
Gets all export templates for the specified template. | Application system name, template global alias: Template@ |
Array of objects with export template properties |
Form — forms and form rules (except process start forms and user task forms) |
||||
Method | Query | Description | Input | Output |
POST |
/webapi/Form/ |
Creates form. | Application system name, form configuration object | Form system name |
PUT |
/webapi/Form/ |
Edits form. | Application system name, form configuration object | Status object |
DELETE |
/webapi/Form/ |
Deletes form. | Application system name, form global alias: Form@template |
Status object |
GET |
/webapi/Form/ |
Gets form configuration. | Application system name, form global alias: Form@template |
Form configuration object |
GET |
/webapi/Form/ |
Gets form rules. | Application system name, form global alias: Form@template |
Form rules object |
PUT |
/webapi/Form/ |
Sets form rules. | Application system name, form global alias (Form@template ), form rules object. |
Status object |
GET |
/webapi/Form/ |
Gets all forms of the specified template. | Application system name, template global alias: Template@solutionSystemName. |
Array of form configuration objects |
SolutionGitIntegration — application version control via Git |
||||
Method | Query | Description | Input | Output |
POST |
/webapi/Git/ |
Creates branch in the remote repository. | Repository and branch configuration object | Status object |
POST |
/webapi/Git/ |
Initializes connection with the specified repository. | Repository configuration object | Status object |
POST |
/webapi/Git/ |
Gets repository commits. | Repository configuration object | Array of objects with commit properties |
GET |
/webapi/Git/ |
Gets repository user credentials. | Object with repository user credentials | |
GET |
/webapi/Git/ |
Gets repository configuration and user details. | Object with repository configuration and user credentials | |
POST |
/webapi/Git/ |
Gets all repository branches. | Repository configuration object |
Array of objects with branch properties |
GET |
/webapi/Git/ |
Gets all repositories of Git connections. | Array of repository configuration objects | |
POST |
/webapi/Git/ |
Saves user credentials. | Repository configuration and user credentials object | Status object |
Heartbeat — server, process, scripts, and service status monitoring |
||||
Method | Query | Description | Input | Output |
GET |
/webapi/Heartbeat/ |
Gets service usage statistics. | Heartbeat details object | |
GET |
/webapi/Heartbeat/ |
Gets service availability status. | Status object | |
GET |
/webapi/Heartbeat/ |
Gets server details. | Server information object | |
ProcessObjects — process diagram version migration |
||||
Method |
Query |
Description | Input | Output |
POST |
/webapi/ |
Changes process instances diagram version and moves tokens. | Process template global alias (ProcessTemplate@application ), target diagram ID, process instance IDs |
Status object |
ProcessTemplate — process templates |
||||
Method | Query | Description | Input | Output |
POST |
/webapi/ProcessTemplate/ |
Creates process template. | Application system name, process template properties object | Process template system name |
PUT |
/webapi/ProcessTemplate/ |
Edits process template properties. | Application system name, process template properties object | Status object |
DELETE |
/webapi/ProcessTemplate/ |
Deletes process template. | Application system name, process template system name | Status object |
GET |
/webapi/ProcessTemplate/ |
Gets process template properties. | Application system name, process template system name | Process template properties object |
PUT |
/webapi/ProcessTemplate/ |
Archives process template. | Application system name, process template system name | Status object |
PUT |
/webapi/ProcessTemplate/ |
Unarchives process template. | Application system name, process template system name | Status object |
GET |
/webapi/ProcessTemplate/ |
Gets all process templates in the specified application. | Application system name | Array of objects with process template properties |
Record — single record (except process templates) |
||||
Method | Query | Description | Input | Output |
DELETE |
/webapi/Record/ |
Deletes record. | Record ID | Status object |
GET |
/webapi/Record/ |
Gets record. | Record ID | Object with attribute values: {"attribute |
PUT |
/webapi/Record/ |
Edits record. | Record ID, object with record attribute values:[{"attribute |
Status object |
POST |
/webapi/Record/ |
Clones record. | Record ID, deep cloning flag (true — clone linked records) |
Cloned record ID |
PUT |
/webapi/Record/ |
Archives record. | Record ID | Status object |
PUT |
/webapi/Record/ |
Unarchives record. | Record ID | Status object |
POST |
/webapi/Record/ |
Creates record. | Application system name, template global alias (Template@ ), object with record attribute values: [{"attribute |
Record ID |
Records — multiple records and record export/import (except process templates) |
||||
Method | Query | Description | Input | Output |
DELETE | /webapi/Records | Deletes specified records. | Array of record IDs | Status object |
PUT | /webapi/Records | Edits specified records. | Array of record IDs and objects with record attribute values: [{"attribute |
Status object |
DELETE |
/webapi/Records/ |
Deletes all records from the specified template. | Application system name, template global alias: Template@ |
Status object |
GET |
/webapi/Records/ |
Gets all records of the specified template. | Application system name, template global alias :Template@ |
Array of objects with record attribute values: |
POST |
/webapi/Records/ |
Creates records. |
Template global alias ( |
Array of record IDs |
GET |
/webapi/Records/ |
Exports all records of the specified template. | Application system name, template global alias: Template@ |
Serialized records data |
PUT |
/webapi/Records/ |
Updates specified records with the same data. | Record properties and values to update | Status object |
PUT |
/webapi/Records/ |
Archives specified records. | Array of record IDs | Status object |
PUT |
/webapi/Records/ |
Unarchives specified records. | Array of record IDs | Status object |
POST |
/webapi/Records/ |
Exports specified records. | Record template global alias object, array of record IDs | Serialized records data |
POST |
/webapi/Records/ |
Imports records from a file. | ID of an uploaded file with serialized records data | The number of imported records |
RecordTemplate — record templates |
||||
Method | Query | Description | Input | Output |
POST |
/webapi/RecordTemplate/ |
Creates record template. | Application system name, record template properties object | Record template system name |
PUT |
/webapi/RecordTemplate/ |
Edits record template. | Application system name, record template properties object | Status object |
DELETE |
/webapi/RecordTemplate/ |
Deletes record template. | Application system name, record template system name | Status object |
GET |
/webapi/RecordTemplate/ |
Gets template by system name. | Application system name, record template system name | Record template properties object |
PUT |
/webapi/RecordTemplate/ |
Archives record template. | Application system name, record template system name | Status object |
PUT |
/webapi/RecordTemplate/ |
Unarchives record template. | Application system name, record template system name | Status object |
GET |
/webapi/ |
Gets all record templates in the specified application. | Application system name | Array of objects with record template properties |
ReferenceData — records with specified attribute values |
||||
Method | Query | Description | Input | Output |
DELETE |
/webapi/ReferenceData/ |
Deletes a record with specified key attribute values. | Template global alias object, object with key attribute system names and values | Deleted record ID. If several records are matched, returns null and no records are deleted |
POST |
/webapi/ReferenceData/ |
Gets attribute values of a record with specified key attribute values. | Template global alias object, object with key attribute system names and values, array of attribute system names to get | Object with record attribute values. If several records are matched, returns null and no records are returned |
PUT |
/webapi/ReferenceData/ |
Edits record with specified key attribute values. | Template global alias object, array of key attribute system names, object with key attribute system names and values, object with attribute system names and their new values | Edited record ID. If several records are matched, returns null and no records are edited |
Solution — applications |
||||
Method | Query | Description | Input | Output |
GET | /webapi/Solution | Gets all applications. | Array of objects with application properties | |
POST | /webapi/Solution | Creates application. | An object with application properties | Application system name |
PUT | /webapi/Solution | Edits application properties. | An object with application properties | Status object |
DELETE |
/webapi/Solution/ |
Deletes application. | Application system name | Status object |
GET |
/webapi/Solution/ |
Gets application properties. | Application system name | Object with application properties |
Toolbar — toolbars and buttons on them |
||||
Method | Query | Description | Input | Output |
POST |
/webapi/Toolbar/ |
Creates toolbar. | Application system name, toolbar configuration object | Toolbar system name |
PUT |
/webapi/Toolbar/ |
Edits toolbar. | Application system name, toolbar configuration object | Status object |
DELETE |
/webapi/Toolbar/ |
Deletes toolbar. | Application system name, toolbar global alias: Toolbar@ |
Status object |
GET |
/webapi/Toolbar/ |
Gets toolbar by system name. | Application system name, toolbar global alias: Toolbar@ |
Toolbar configuration object |
GET |
/webapi/Toolbar/ |
Gets all toolbars for the specified template. | Application system name, template global alias: Template@ |
Array of toolbar configuration objects |
Transfer — application model export/import |
||||
Method | Query | Description | Input | Output |
GET |
/webapi/Transfer/ |
Validates application model. | Application model file ID | Validation summary object |
GET |
/webapi/Transfer/ |
Exports application model. | Application system name | An object with application model ZIP file in Base64 format and export summary |
POST |
/webapi/Transfer/ |
Imports application model. | Application system name, application model ZIP/CTF file ID, imported process diagrams publishing flag (true — publish), behaviour state policy (ApplyNew , ApplyOld , DisableAll , or EnableAll ). |
Application import summary object |
POST |
/webapi/Transfer/ |
Uploads application model file. | Application model ZIP file in Base64 format | An object with the uploaded file ID |
UserCommand — buttons |
||||
Method | Query | Description | Input | Output |
POST |
/webapi/UserCommand/ |
Creates button. | Application system name, button configuration object |
Button system name |
PUT |
/webapi/UserCommand/ |
Edits button. | Application system name, button configuration object | Status object |
DELETE |
/webapi/UserCommand/ |
Deletes button. | Application system name, button global alias: UserCommand@ |
Status object |
GET |
/webapi/UserCommand/ |
Gets button configuration. | Application system name, button global alias: UserCommand@ |
Button configuration object |
PUT |
/webapi/UserCommand/ |
Archives button. | Application system name, button global alias: UserCommand@ |
Status object |
PUT |
/webapi/UserCommand/ |
Unarchives button. | Application system name, button global alias: UserCommand@ |
Status object |
GET |
/webapi/UserCommand/ |
Gets all buttons of the specified template. | Application system name, template global alias: Template@ |
Array of button configuration objects |
WorkerEngine — system services |
||||
Method | Query | Description | Input | Output |
GET |
/webapi/WorkerEngine/ |
Gets system service statuses (true — enabled). |
Object with system service statuses | |
PUT |
/webapi/WorkerEngine/ |
Sets system service statuses. | Object with system service statuses (true — enabled) |
Status object |