openapi: 3.0.3 info: title: KuFlow Public API version: "2024-06-14" termsOfService: "https://kuflow.com/legal" contact: email: kuflow@kuflow.com description: | # Introduction This document contains the KuFlow REST API reference. This API is a fundamental part in the integration of external systems with KuFlow and is used, among others, by the different implementations of the Workers that connect to our network. # API Versioning A versioning strategy allows our clients to continue using the existing REST API and migrate their applications to the newer API when they are ready. The scheme followed is a simplification of *Semver* where only MAJOR versions are differentiated from MINOR or PATCH versions, i.e. a version number of only two levels is used. With this approach, you only have to migrate your applications if you want to upgrade to a MAJOR version of the KuFlow API. In case you want to upgrade to a MINOR version, you can do so without any incompatibility issues. The versioning of the api is done through the URI Path, that is, the version number is included in the URI Path. The URL structure would be as follows: ```bash https://{endpoint}/v{VERSION}/{api-path} ``` # Idempotency The API is designed to support idempotency in order to achieve a correct resilience in the implementation of its clients. The way to achieve this is very simple, in the methods that create resources, you simply have to specify a UUID in the input data and the API will respond by creating or returning the resource if it previously existed. With this mechanism, your systems can implement retry logic without worrying about performing data tradeoffs. # Resource URIs Some operations identify resources and documents through URIs instead of plain IDs: * `ku:` URIs identify KuFlow resources, e.g. `ku:process/{processId}` or `ku:business-artifact/{businessArtifactId}`. Resources that can be referenced this way expose their URI in a read-only `uri` field. Documents owned by a resource extend its URI, e.g. `ku:process/{processId}/document/{documentId}`. * `kuflow-file:` values are document references: they wrap a `ku:` document URI together with its metadata using the format `kuflow-file:uri=;type=;size=;name=;`. Operations that receive a document URI accept both the full `kuflow-file:` reference and the inner `ku:` document URI. # OpenAPI Specification This API is documented in OpenAPI format. This file allows you to create REST clients with the technology of your choice automatically. externalDocs: description: Find out more about KuFlow url: "https://kuflow.com" servers: - url: "https://api.kuflow.com/v2024-06-14" description: Live environment security: - BasicAuth: [] - BearerAuth: [] - OAuth2Auth: [] tags: - name: principal description: Operations about principals. externalDocs: description: Find out more about our principal model. url: "https://docs.kuflow.com/fine-grained-concepts/users-groups-roles" x-displayName: Principal - name: tenant description: Operations about tenants. externalDocs: description: Find out more about our tenant model. url: "https://docs.kuflow.com" x-displayName: Tenant - name: tenantUser description: Operations about tenant users. externalDocs: description: Find out more about our principal model. url: "https://docs.kuflow.com" x-displayName: Tenant User - name: group description: Operations about user groups. externalDocs: description: Find out more about our principal model. url: "https://docs.kuflow.com" x-displayName: Group - name: process description: Operations about processes. externalDocs: description: Find out more about our process model. url: "https://docs.kuflow.com" x-displayName: Process - name: processItem description: Operations about process items. externalDocs: description: Find out more about our process item model. url: "https://docs.kuflow.com" x-displayName: Process Item - name: businessArtifact description: Operations about business artifacts. externalDocs: description: Find out more about our business artifact model. url: "https://docs.kuflow.com" x-displayName: Business Artifact - name: document description: Operations about documents. externalDocs: description: Find out more about our document handling. url: "https://docs.kuflow.com" x-displayName: Document - name: worker description: Operations about workers. externalDocs: description: Find out more about our workers. url: "https://docs.kuflow.com" x-displayName: Worker - name: robot description: Operations about robots. externalDocs: description: Find out more about our robots. url: "https://docs.kuflow.com" x-displayName: Robot - name: webhook description: Operations that Kuflow invokes towards external systems. externalDocs: description: Find out more about our webhooks. url: "https://docs.kuflow.com" x-displayName: Webhook - name: authentication description: Operations for handling authentication tokens. externalDocs: description: Find out more about our authentication process. url: "https://docs.kuflow.com/developers/authentication" x-displayName: Authentication - name: kms description: Operations for handling Key Management System operations. externalDocs: description: Find out more about our Key Management System operations. url: "https://docs.kuflow.com" x-displayName: kms x-tagGroups: - name: General tags: - principal - tenant - tenantUser - process - processItem - businessArtifact - document - worker - robot - name: Key Management System tags: - kms - name: Authentication management tags: - authentication - name: Notification tags: - webhook paths: /authentications: post: summary: Create an authentication for the current principal. operationId: createAuthentication tags: - apiRestExternalV20240614Authentications - authentication requestBody: description: Authentication to be created. required: true content: application/json: schema: $ref: "#/components/schemas/AuthenticationCreateParams" x-ms-requestBody-name: authenticationCreateParams responses: "200": description: Authentication Created. content: application/json: schema: $ref: "#/components/schemas/Authentication" default: $ref: "#/components/responses/DefaultError" /kms/keys/{keyId}: get: summary: Get the requested key id. operationId: retrieveKmsKey tags: - apiRestExternalV20240614Kms - kms parameters: - $ref: "#/components/parameters/KeyIdPathParam" responses: "200": description: KMS Key. content: application/json: schema: $ref: "#/components/schemas/KmsKey" default: $ref: "#/components/responses/DefaultError" /principals: get: summary: Find all accessible Principals description: | List all the Principals that have been created and the used credentials has access. Available sort query values: id, name operationId: findPrincipals tags: - apiRestExternalV20240614Principals - principal parameters: - $ref: "#/components/parameters/SizeQueryParam" - $ref: "#/components/parameters/PageQueryParam" - $ref: "#/components/parameters/SortQueryParam" - name: type description: Filter principals by type. in: query schema: $ref: "#/components/schemas/PrincipalType" - $ref: "#/components/parameters/GroupIdQueryParam" - $ref: "#/components/parameters/GroupCodeQueryParam" - $ref: "#/components/parameters/TenantIdQueryParam" responses: "200": description: Principals found paginated. content: application/json: schema: $ref: "#/components/schemas/PrincipalPage" default: $ref: "#/components/responses/DefaultError" /principals/{id}: get: summary: Get a Principal by ID description: Returns the requested Principal when has access to do it. operationId: retrievePrincipal tags: - apiRestExternalV20240614Principals - principal parameters: - $ref: "#/components/parameters/IdPathParam" responses: "200": description: Successful operation content: application/json: schema: $ref: "#/components/schemas/Principal" default: $ref: "#/components/responses/DefaultError" /groups: get: summary: Find all accessible Groups description: | List all the Groups that have been created and the used credentials has access. Available sort query values: id, name operationId: findGroups tags: - apiRestExternalV20240614Groups - group parameters: - $ref: "#/components/parameters/SizeQueryParam" - $ref: "#/components/parameters/PageQueryParam" - $ref: "#/components/parameters/SortQueryParam" - $ref: "#/components/parameters/TenantIdQueryParam" - $ref: "#/components/parameters/PrincipalIdQueryParam" - $ref: "#/components/parameters/GroupIdQueryParam" - $ref: "#/components/parameters/GroupCodeQueryParam" responses: "200": description: Groups found paginated. content: application/json: schema: $ref: "#/components/schemas/GroupPage" default: $ref: "#/components/responses/DefaultError" /tenants: get: summary: Find all accessible Tenants description: | List all the Tenants that the credentials used has access to. Available sort query values: id, name operationId: findTenants tags: - apiRestExternalV20240614Tenants - tenant parameters: - $ref: "#/components/parameters/SizeQueryParam" - $ref: "#/components/parameters/PageQueryParam" - $ref: "#/components/parameters/SortQueryParam" - $ref: "#/components/parameters/TenantIdQueryParam" responses: "200": description: Tenants found paginated. content: application/json: schema: $ref: "#/components/schemas/TenantPage" default: $ref: "#/components/responses/DefaultError" /tenants/{id}: get: summary: Get a Tenant by ID description: Returns the requested Tenant when has access to do it. operationId: retrieveTenant tags: - apiRestExternalV20240614Tenants - tenant parameters: - $ref: "#/components/parameters/IdPathParam" responses: "200": description: Successful operation content: application/json: schema: $ref: "#/components/schemas/Tenant" default: $ref: "#/components/responses/DefaultError" /tenant-users: get: summary: Find all accessible Tenant Users description: | List all the Tenant Users that have been created and the used credentials has access. Available sort query values: id, createdAt, lastModifiedAt operationId: findTenantUsers tags: - apiRestExternalV20240614TenantUser - tenantUser parameters: - $ref: "#/components/parameters/SizeQueryParam" - $ref: "#/components/parameters/PageQueryParam" - $ref: "#/components/parameters/SortQueryParam" - $ref: "#/components/parameters/GroupIdQueryParam" - $ref: "#/components/parameters/GroupCodeQueryParam" - $ref: "#/components/parameters/EmailQueryParam" - $ref: "#/components/parameters/TenantIdQueryParam" responses: "200": description: Tenant users found paginated. content: application/json: schema: $ref: "#/components/schemas/TenantUserPage" default: $ref: "#/components/responses/DefaultError" /tenant-users/{id}: get: summary: Get a Tenant User by ID description: Returns the requested TenantUser when has access to do it. operationId: retrieveTenantUser tags: - apiRestExternalV20240614TenantUser - tenantUser parameters: - $ref: "#/components/parameters/IdPathParam" responses: "200": description: Successful operation content: application/json: schema: $ref: "#/components/schemas/TenantUser" default: $ref: "#/components/responses/DefaultError" /processes: get: summary: Find all accessible Processes description: | List all the Processes that have been created and the credentials has access. Available sort query values: id, createdAt, lastModifiedAt operationId: findProcesses tags: - apiRestExternalV20240614Processes - process parameters: - $ref: "#/components/parameters/SizeQueryParam" - $ref: "#/components/parameters/PageQueryParam" - $ref: "#/components/parameters/SortQueryParam" - $ref: "#/components/parameters/TenantIdQueryParam" - $ref: "#/components/parameters/ProcessDefinitionIdQueryParam" - $ref: "#/components/parameters/ProcessDefinitionCodeQueryParam" - name: state description: Filter by an array of process states. in: query schema: type: array items: $ref: "#/components/schemas/ProcessState" style: form explode: true - name: initiatorId description: Filter by an array of initiator ids, Principal ID. in: query schema: type: array items: type: string format: uuid style: form explode: true - name: initiatorEmail description: Filter by an array of initiator emails. in: query schema: type: array items: type: string format: email style: form explode: true - name: metadata description: | Filter by process metadata field values. Each value is an expression with the format `fieldCode operation value1 value2...` (space-separated). Supported operations: `eq`, `le`, `ge`, `between`, `contains`, `in`. Filtering by metadata requires specifying exactly one `processDefinitionId` or `processDefinitionCode`. in: query schema: type: array items: type: string pattern: '^\S+ (eq|le|ge|between|contains|in) \S+( \S+)*$' example: - "invoiceNumber eq INV-001" - "amount ge 100" style: form explode: true - name: deleted description: | Deleted Processes filtering mode; when omitted, `EXCLUDE` applies. With `INCLUDE` or `ONLY`, deleted Processes are returned with their `deletedAt` and `deletedBy` fields set. They are only returned when the request identifies exactly one Process Definition — by exactly one `processDefinitionId`, or by exactly one `processDefinitionCode` together with exactly one `tenantId` (codes are unique per tenant) — and the credentials can delete any Process of that definition; otherwise they are silently left out. in: query schema: $ref: "#/components/schemas/DeletedQueryParam" responses: "200": description: Processes found paginated content: application/json: schema: $ref: "#/components/schemas/ProcessPage" default: $ref: "#/components/responses/DefaultError" post: summary: Create a new process description: | Creates a process. This option has direct correspondence to the action of starting a process in the Kuflow GUI. If you want the method to be idempotent, please specify the `id` field in the request body. operationId: createProcess tags: - apiRestExternalV20240614Processes - process requestBody: description: Process to create required: true content: application/json: schema: $ref: "#/components/schemas/ProcessCreateParams" x-ms-requestBody-name: processCreateParams responses: "200": description: Process already created content: application/json: schema: $ref: "#/components/schemas/Process" "201": description: Process created content: application/json: schema: $ref: "#/components/schemas/Process" default: $ref: "#/components/responses/DefaultError" /processes/{id}: get: summary: Get a Process by ID description: | Returns the requested Process when has access to do it. A deleted Process is returned too, with its `deletedAt` and `deletedBy` fields set. operationId: retrieveProcess tags: - apiRestExternalV20240614Processes - process parameters: - $ref: "#/components/parameters/IdPathParam" responses: "200": description: Successful operation content: application/json: schema: $ref: "#/components/schemas/Process" default: $ref: "#/components/responses/DefaultError" delete: summary: Delete a Process by ID description: | Deletes the requested Process, and its Process Items with it. Only a finished Process (`COMPLETED` or `CANCELLED`) with nothing in progress, neither tasks still to be done nor workflows of its actions still running, can be deleted; otherwise it answers conflict. The deletion is soft: the Process is still returned by id and with `deleted=INCLUDE|ONLY`, with its `deletedAt` and `deletedBy` fields set, but it cannot be restored. Deleting a Process that is already deleted does nothing. operationId: deleteProcess tags: - apiRestExternalV20240614Processes - process parameters: - $ref: "#/components/parameters/IdPathParam" responses: "204": description: Process deleted default: $ref: "#/components/responses/DefaultError" /processes/{id}/actions: post: summary: Invoke a Process action description: | Invoke an action on a Process. Whether the call returns synchronously or asynchronously depends on the action type: - `START_WORKFLOW`, `DOWNLOADABLE`: dispatched to a background worker. The response returns immediately with `status=REQUESTED`. Poll `retrieveProcessAction` for the final state. - `START_RELATED_PROCESS`, `CREATE_TASK`, `CREATE_PROCESS_ITEM_MESSAGE`, `CREATE_PROCESS_ITEM_THREAD`, `SEND_WORKFLOW_SIGNAL`: completed synchronously. The response returns with `status=COMPLETED` (or an error status). If you want the method to be idempotent, please specify the `id` field in the request body. Actions of type `SEND_WORKFLOW_SIGNAL` whose definition declares an input form accept a `sendWorkflowSignal.input` payload: it is validated against the definition schema, persisted on the action and delivered inside the workflow signal. The input is not part of the idempotency key — replaying the same `id` with a different input returns the original action untouched. operationId: createProcessAction tags: - apiRestExternalV20240614Processes - process parameters: - $ref: "#/components/parameters/IdPathParam" requestBody: description: Params identifying the action to invoke. required: true content: application/json: schema: $ref: "#/components/schemas/ProcessActionCreateParams" x-ms-requestBody-name: processActionCreateParams responses: "200": description: Process action already created content: application/json: schema: $ref: "#/components/schemas/ProcessAction" "201": description: Process action created content: application/json: schema: $ref: "#/components/schemas/ProcessAction" default: $ref: "#/components/responses/DefaultError" /processes/{id}/actions/{actionId}: get: summary: Get a Process action by ID description: Returns a Process action by its ID. operationId: retrieveProcessAction tags: - apiRestExternalV20240614Processes - process parameters: - $ref: "#/components/parameters/IdPathParam" - name: actionId description: The Process action ID. in: path required: true schema: type: string format: uuid x-ms-parameter-location: method responses: "200": description: Successful operation content: application/json: schema: $ref: "#/components/schemas/ProcessAction" default: $ref: "#/components/responses/DefaultError" /processes/{id}/actions/{actionId}/~actions/cancel: post: summary: Cancel a Process action description: | Cancel a Process action. Only meaningful for asynchronous actions still in `REQUESTED` state. The action's status is set to `CANCELED`. If the action is already in a terminal state, no transition occurs. operationId: cancelProcessAction tags: - apiRestExternalV20240614Processes - process parameters: - $ref: "#/components/parameters/IdPathParam" - name: actionId description: The Process action ID. in: path required: true schema: type: string format: uuid x-ms-parameter-location: method responses: "200": description: Process action cancelled. content: application/json: schema: $ref: "#/components/schemas/ProcessAction" default: $ref: "#/components/responses/DefaultError" /processes/{id}/~actions/complete: post: summary: Complete a Process description: | Complete a Process. The state of Process is set to 'completed'. If you are already in this state, no action is taken. operationId: completeProcess tags: - apiRestExternalV20240614Processes - process parameters: - $ref: "#/components/parameters/IdPathParam" responses: "200": description: Process completed. content: application/json: schema: $ref: "#/components/schemas/Process" default: $ref: "#/components/responses/DefaultError" /processes/{id}/~actions/cancel: post: summary: Cancel a Process description: | Cancel a Process. The Process state is set to 'cancelled'. All the active process items will be marked as cancelled too. If you are already in this state, no action is taken. operationId: cancelProcess tags: - apiRestExternalV20240614Processes - process parameters: - $ref: "#/components/parameters/IdPathParam" responses: "200": description: Process cancelled. content: application/json: schema: $ref: "#/components/schemas/Process" default: $ref: "#/components/responses/DefaultError" /processes/{id}/~actions/cancel-process-items: post: summary: Cancel Process Items description: | Cancel Process Items in a Process. When processItemId query parameters are provided, only those specific process items are cancelled. When omitted, all active process items in the process are cancelled. For task process items, tasks in a cancellable state (ready, claimed) are set to 'cancelled'. Already cancelled tasks are treated as a no-op. The Process itself is not affected. operationId: cancelProcessProcessItems tags: - apiRestExternalV20240614Processes - process parameters: - $ref: "#/components/parameters/IdPathParam" - name: processItemId description: Optional list of process item IDs to cancel. If omitted, all active process items are cancelled. in: query schema: type: array items: type: string format: uuid style: form explode: true responses: "200": description: Process Items cancelled. content: application/json: schema: $ref: "#/components/schemas/Process" default: $ref: "#/components/responses/DefaultError" /processes/{id}/~actions/change-initiator: post: summary: Change process initiator description: | Change the current initiator of a process. Allows you to choose a user (by email or principal identifier) or an application (principal identifier). Only one option will be necessary. operationId: changeProcessInitiator tags: - apiRestExternalV20240614Processes - process parameters: - $ref: "#/components/parameters/IdPathParam" requestBody: description: Params to change the process initiator. required: true content: application/json: schema: $ref: "#/components/schemas/ProcessChangeInitiatorParams" x-ms-requestBody-name: processChangeInitiatorParams responses: "200": description: Process with the new initiator. content: application/json: schema: $ref: "#/components/schemas/Process" default: $ref: "#/components/responses/DefaultError" /processes/{id}/metadata: put: summary: Save process metadata operationId: updateProcessMetadata tags: - apiRestExternalV20240614Processes - process parameters: - $ref: "#/components/parameters/IdPathParam" requestBody: description: Params to save the metadata data. required: true content: application/json: schema: $ref: "#/components/schemas/ProcessMetadataUpdateParams" x-ms-requestBody-name: processMetadataUpdateParams responses: "200": description: Process with the metadata updated. content: application/json: schema: $ref: "#/components/schemas/Process" default: $ref: "#/components/responses/DefaultError" patch: summary: Patch JSON data description: | Allow to patch a JSON data validating that the data follow the related schema. If the data is invalid, then the json is marked as invalid. operationId: patchProcessMetadata tags: - apiRestExternalV20240614Processes - process parameters: - $ref: "#/components/parameters/IdPathParam" requestBody: description: Params to save the JSON value. required: true content: application/json-patch+json: schema: $ref: "#/components/schemas/JsonPatch" x-ms-requestBody-name: jsonPatch responses: "200": description: Process with the metadata updated. content: application/json: schema: $ref: "#/components/schemas/Process" default: $ref: "#/components/responses/DefaultError" /processes/{id}/entity: put: summary: Save JSON data description: | Allow to save a JSON validating that the data follow the related schema. If the data is invalid, then the json form is marked as invalid. operationId: updateProcessEntity tags: - apiRestExternalV20240614Processes - process parameters: - $ref: "#/components/parameters/IdPathParam" requestBody: description: Params to save the JSON value. required: true content: application/json: schema: $ref: "#/components/schemas/ProcessEntityUpdateParams" x-ms-requestBody-name: processEntityUpdateParams responses: "200": description: Process with the entity json data saved content: application/json: schema: $ref: "#/components/schemas/Process" default: $ref: "#/components/responses/DefaultError" patch: summary: Patch JSON data description: | Allow to patch a JSON data validating that the data follow the related schema. If the data is invalid, then the json is marked as invalid. operationId: patchProcessEntity tags: - apiRestExternalV20240614Processes - process parameters: - $ref: "#/components/parameters/IdPathParam" requestBody: description: Params to save the JSON value. required: true content: application/json-patch+json: schema: $ref: "#/components/schemas/JsonPatch" x-ms-requestBody-name: jsonPatch responses: "200": description: Process with the entity updated. content: application/json: schema: $ref: "#/components/schemas/Process" default: $ref: "#/components/responses/DefaultError" /processes/{id}/~actions/upload-document: post: summary: Upload a temporal document into the process that later on must be linked with a process domain resource description: | Upload a temporal document into the process that later on must be linked with a process domain resource. Documents uploaded with this API will be deleted after 2 hours as long as they have not been linked to a process or process item. **Deprecated:** use the `uploadDocument` operation with `targetUri=ku:process/{processId}` instead. operationId: uploadProcessDocument deprecated: true tags: - apiRestExternalV20240614Processes - process parameters: - $ref: "#/components/parameters/IdPathParam" - name: fileContentType description: Document content type in: query required: true schema: type: string - name: fileName description: Document name in: query required: true schema: type: string requestBody: description: Document to save. required: true content: application/octet-stream: schema: type: string format: binary x-ms-requestBody-name: file responses: "200": description: Document reference content: application/json: schema: $ref: "#/components/schemas/DocumentReference" default: $ref: "#/components/responses/DefaultError" /processes/{id}/~actions/download-document: get: summary: Download document description: | Given a document uri download a document. **Deprecated:** use the `downloadDocument` operation instead; it resolves any document the credentials can read without requiring the owning Process in the path. operationId: downloadProcessDocument deprecated: true tags: - apiRestExternalV20240614Processes - process parameters: - $ref: "#/components/parameters/IdPathParam" - name: documentUri description: Document URI to download. in: query required: true schema: type: string responses: "200": description: Document requested content: "application/octet-stream": schema: type: string format: binary default: $ref: "#/components/responses/DefaultError" /process-items: get: summary: Find all accessible Process Items description: | List all Process Items that have been created and the credentials has access. Available sort query values: id, createdAt, lastModifiedAt, claimedAt, completedAt, cancelledAt operationId: findProcessItems tags: - apiRestExternalV20240614ProcessItems - processItem parameters: - $ref: "#/components/parameters/SizeQueryParam" - $ref: "#/components/parameters/PageQueryParam" - $ref: "#/components/parameters/SortQueryParam" - name: processId description: Filter by an array of process ids. in: query schema: type: array items: type: string format: uuid style: form explode: true - name: type description: Filter by an array of type. in: query schema: type: array items: $ref: "#/components/schemas/ProcessItemType" style: form explode: true - name: taskState description: Filter by an array of task states. in: query schema: type: array items: $ref: "#/components/schemas/ProcessItemTaskState" style: form explode: true - name: processItemDefinitionCode description: Filter by an array of task definition codes. in: query schema: type: array items: type: string style: form explode: true - $ref: "#/components/parameters/ProcessDefinitionIdQueryParam" - $ref: "#/components/parameters/ProcessDefinitionCodeQueryParam" - $ref: "#/components/parameters/TenantIdQueryParam" - name: deleted description: | Deleted Process Items filtering mode; when omitted, `EXCLUDE` applies. The Process Items of a deleted Process are deleted with it. With `INCLUDE` or `ONLY`, deleted Process Items are returned with their `deletedAt` and `deletedBy` fields set. They are only returned when the request identifies exactly one Process Definition — by exactly one `processDefinitionId`, or by exactly one `processDefinitionCode` together with exactly one `tenantId` (codes are unique per tenant) — and the credentials can delete any Process of that definition; otherwise they are silently left out. in: query schema: $ref: "#/components/schemas/DeletedQueryParam" responses: "200": description: Process items found paginated. content: application/json: schema: $ref: "#/components/schemas/ProcessItemPage" default: $ref: "#/components/responses/DefaultError" post: summary: Create a new Process Item in the selected Process description: | Create a Process Item and optionally fill its value. To create a `TASK` or a `MESSAGE` inside a thread, set `processItemThreadId` to the id of a Process Item of type `THREAD` that belongs to the same Process. If you want to add document type elements, you can pass a reference to an existing document type element indicating its 'uri'. This will copy that document into the element. In case you want to add a new document, please use the corresponding API method. If you want the method to be idempotent, please specify the `id` field in the request body. operationId: createProcessItem tags: - apiRestExternalV20240614ProcessItems - processItem requestBody: description: Process Item to be created required: true content: application/json: schema: $ref: "#/components/schemas/ProcessItemCreateParams" x-ms-requestBody-name: processItemCreateParams responses: "200": description: Process Item already created. content: application/json: schema: $ref: "#/components/schemas/ProcessItem" "201": description: Process Item created. content: application/json: schema: $ref: "#/components/schemas/ProcessItem" default: $ref: "#/components/responses/DefaultError" /process-items/{id}: get: summary: Get a process item given it ID description: | Allow to get a process item by ID. A deleted Process Item (the ones of a deleted Process) is returned too, with its `deletedAt` and `deletedBy` fields set. operationId: retrieveProcessItem tags: - apiRestExternalV20240614ProcessItems - processItem parameters: - $ref: "#/components/parameters/IdPathParam" responses: "200": description: Process Item requested. content: application/json: schema: $ref: "#/components/schemas/ProcessItem" default: $ref: "#/components/responses/DefaultError" /process-items/{id}/~actions/ai-assistance: get: summary: Get the current AI assistance run status for a process item description: | Return the status of the latest AI assistance run for the given process item. Poll this endpoint after triggering `generateProcessItemAiAssistance` to determine when the run has finished. Returns 404 when no run has ever been triggered for the process item. operationId: retrieveProcessItemAiAssistance tags: - apiRestExternalV20240614ProcessItems - processItem parameters: - $ref: "#/components/parameters/IdPathParam" responses: "200": description: Current AI assistance run status. content: application/json: schema: $ref: "#/components/schemas/ProcessItemAiAssistance" default: $ref: "#/components/responses/DefaultError" post: summary: Trigger or poll AI assistance for a process item description: | Trigger an asynchronous AI assistance run for a process item and return its current state, identified by a client-supplied `requestId` (UUID). The `requestId` makes the call idempotent and lets a client launch successive AI assistance attempts on the same process item — one at a time. Behavior given the latest persisted run (if any) for the process item: - No prior run → schedules a new run and returns the initial PENDING state (202). - The stored `requestId` matches the incoming one → returns the current state of that run without scheduling a new one (200). Use this to poll your own attempt. - The stored `requestId` differs and the run is in a final state (COMPLETED or FAILED) → schedules a new run on the same record, replacing the previous result (202). - The stored `requestId` differs and the run is still PENDING → rejected with 409, since another AI assistance attempt is already in progress on this process item. The AI prompt configuration comes from the process item definition. operationId: generateProcessItemAiAssistance tags: - apiRestExternalV20240614ProcessItems - processItem parameters: - $ref: "#/components/parameters/IdPathParam" requestBody: description: Params identifying this AI assistance attempt. required: true content: application/json: schema: $ref: "#/components/schemas/ProcessItemAiAssistanceGenerateParams" x-ms-requestBody-name: processItemAiAssistanceGenerateParams responses: "200": description: The stored `requestId` matches; current state returned without scheduling a new run. content: application/json: schema: $ref: "#/components/schemas/ProcessItemAiAssistance" "202": description: A new run has been accepted and scheduled; initial PENDING state returned. content: application/json: schema: $ref: "#/components/schemas/ProcessItemAiAssistance" default: $ref: "#/components/responses/DefaultError" /process-items/{id}/task/~actions/claim: post: summary: Claim a process item task description: Allow to claim a task. operationId: claimProcessItemTask tags: - apiRestExternalV20240614ProcessItems - processItem parameters: - $ref: "#/components/parameters/IdPathParam" responses: "200": description: Process item task claimed. content: application/json: schema: $ref: "#/components/schemas/ProcessItem" default: $ref: "#/components/responses/DefaultError" /process-items/{id}/task/~actions/assign: post: summary: Assign a process item task description: Allow to assign a process item task to a user or application. Only one option will be necessary. operationId: assignProcessItemTask tags: - apiRestExternalV20240614ProcessItems - processItem parameters: - $ref: "#/components/parameters/IdPathParam" requestBody: description: Params to change the process item task owner. required: true content: application/json: schema: $ref: "#/components/schemas/ProcessItemTaskAssignParams" x-ms-requestBody-name: processItemTaskAssignParams responses: "200": description: Response with the Process Item Task assigned. content: application/json: schema: $ref: "#/components/schemas/ProcessItem" default: $ref: "#/components/responses/DefaultError" /process-items/{id}/task/~actions/complete: post: summary: Complete a process item task description: Allow to complete a claimed task by the principal. operationId: completeProcessItemTask tags: - apiRestExternalV20240614ProcessItems - processItem parameters: - $ref: "#/components/parameters/IdPathParam" responses: "200": description: Process Item Task completed content: application/json: schema: $ref: "#/components/schemas/ProcessItem" default: $ref: "#/components/responses/DefaultError" /process-items/{id}/task/~actions/append-log: post: summary: Append a log to the process item task description: | A log entry is added to the task. If the number of log entries is reached, the oldest log entry is removed. operationId: appendProcessItemTaskLog tags: - apiRestExternalV20240614ProcessItems - processItem parameters: - $ref: "#/components/parameters/IdPathParam" requestBody: description: Log to be created. required: true content: application/json: schema: $ref: "#/components/schemas/ProcessItemTaskAppendLogParams" x-ms-requestBody-name: processItemTaskAppendLogParams responses: "200": description: Task with log entry added content: application/json: schema: $ref: "#/components/schemas/ProcessItem" default: $ref: "#/components/responses/DefaultError" /process-items/{id}/task/data: put: summary: Save JSON data description: | Allow to save a JSON data validating that the data follow the related schema. If the data is invalid, then the json form is marked as invalid. operationId: updateProcessItemTaskData tags: - apiRestExternalV20240614ProcessItems - processItem parameters: - $ref: "#/components/parameters/IdPathParam" requestBody: description: Params used to update the JSON value. required: true content: application/json: schema: $ref: "#/components/schemas/ProcessItemTaskDataUpdateParams" x-ms-requestBody-name: processItemTaskDataUpdateParams responses: "200": description: Response with the task with json data saved content: application/json: schema: $ref: "#/components/schemas/ProcessItem" default: $ref: "#/components/responses/DefaultError" patch: summary: Patch JSON data description: | Allow to patch a JSON data validating that the data follow the related schema. If the data is invalid, then the json is marked as invalid. operationId: patchProcessItemTaskData tags: - apiRestExternalV20240614ProcessItems - processItem parameters: - $ref: "#/components/parameters/IdPathParam" requestBody: description: Params to save the JSON value. required: true content: application/json-patch+json: schema: $ref: "#/components/schemas/JsonPatch" x-ms-requestBody-name: jsonPatch responses: "200": description: Response with the task with json data saved content: application/json: schema: $ref: "#/components/schemas/ProcessItem" default: $ref: "#/components/responses/DefaultError" /process-items/{id}/task/context-data: put: summary: Save JSON context data description: | Allow to save a JSON context data validating that the data follow the related schema. If the data is invalid, then the json form is marked as invalid. operationId: updateProcessItemTaskContextData tags: - apiRestExternalV20240614ProcessItems - processItem parameters: - $ref: "#/components/parameters/IdPathParam" requestBody: description: Params used to update the JSON context data value. required: true content: application/json: schema: $ref: "#/components/schemas/ProcessItemTaskContextDataUpdateParams" x-ms-requestBody-name: processItemTaskContextDataUpdateParams responses: "200": description: Response with the task with json context data saved content: application/json: schema: $ref: "#/components/schemas/ProcessItem" default: $ref: "#/components/responses/DefaultError" /process-items/{id}/task/data/~actions/download-webforms-as-document: get: summary: Download a Form rendered as PDF or Zip of PDFs (when the element is multiple) description: | Given a task, generate a PDF from a Form type element with the data filled in, if any. If there are multiple form values, they are packed into a ZIP. Important!: To use this feature, please contact to kuflow@kuflow.com operationId: downloadProcessItemTaskDataWebformsAsDocument tags: - apiRestExternalV20240614ProcessItems - processItem parameters: - $ref: "#/components/parameters/IdPathParam" - name: propertyPath description: | JSON pointer to the property with the error. See: https://datatracker.ietf.org/doc/html/rfc6901 ie: /user/name or /users/1/name in: query required: true schema: type: string responses: "200": description: Form requested as PDF or ZIP of PDFs. content: "application/pdf": schema: type: string format: binary "application/zip": schema: type: string format: binary default: $ref: "#/components/responses/DefaultError" /business-artifacts: get: summary: Find all accessible Business Artifacts description: | List all the Business Artifacts that have been created and the credentials has access. Available sort query values: id, createdAt, lastModifiedAt operationId: findBusinessArtifacts tags: - apiRestExternalV20240614BusinessArtifacts - businessArtifact parameters: - $ref: "#/components/parameters/SizeQueryParam" - $ref: "#/components/parameters/PageQueryParam" - $ref: "#/components/parameters/SortQueryParam" - $ref: "#/components/parameters/TenantIdQueryParam" - name: businessArtifactDefinitionId description: Filter by an array of business artifact definition ids. in: query schema: type: array items: type: string format: uuid style: form explode: true - name: businessArtifactDefinitionCode description: Filter by an array of business artifact definition codes. in: query schema: type: array items: type: string style: form explode: true - name: value description: | Filter by indexed field values. Each value is an expression with the format `fieldCode operation value1 value2...` (space-separated). Supported operations: `eq`, `le`, `ge`, `between`, `contains`, `in`. in: query schema: type: array items: type: string pattern: '^\S+ (eq|le|ge|between|contains|in) \S+( \S+)*$' example: - "myField eq someValue" - "amount ge 100" - "amount between 10 20" - "status in active inactive" style: form explode: true - name: deleted description: | Soft-deleted Business Artifacts filtering mode; when omitted, `EXCLUDE` applies. With `INCLUDE` or `ONLY`, deleted Business Artifacts are returned with their `deletedAt` and `deletedBy` fields set. They are only returned when the request identifies exactly one Business Artifact Definition — by exactly one `businessArtifactDefinitionId`, or by exactly one `businessArtifactDefinitionCode` together with exactly one `tenantId` (codes are unique per tenant) — and the credentials can archive or supervise its Business Artifacts; otherwise they are silently left out. in: query schema: $ref: "#/components/schemas/DeletedQueryParam" responses: "200": description: Business Artifacts found paginated. content: application/json: schema: $ref: "#/components/schemas/BusinessArtifactPage" default: $ref: "#/components/responses/DefaultError" post: summary: Create a new Business Artifact description: | Creates a Business Artifact. If you want the method to be idempotent, please specify the `id` field in the request body. operationId: createBusinessArtifact tags: - apiRestExternalV20240614BusinessArtifacts - businessArtifact requestBody: description: Business Artifact to create required: true content: application/json: schema: $ref: "#/components/schemas/BusinessArtifactCreateParams" x-ms-requestBody-name: businessArtifactCreateParams responses: "200": description: Business Artifact already created content: application/json: schema: $ref: "#/components/schemas/BusinessArtifact" "201": description: Business Artifact created content: application/json: schema: $ref: "#/components/schemas/BusinessArtifact" default: $ref: "#/components/responses/DefaultError" /business-artifacts/{id}: get: summary: Get a Business Artifact by ID description: Returns the requested Business Artifact when has access to do it. operationId: retrieveBusinessArtifact tags: - apiRestExternalV20240614BusinessArtifacts - businessArtifact parameters: - $ref: "#/components/parameters/IdPathParam" responses: "200": description: Successful operation content: application/json: schema: $ref: "#/components/schemas/BusinessArtifact" default: $ref: "#/components/responses/DefaultError" delete: summary: Delete a Business Artifact by ID description: | Deletes the requested Business Artifact. The deletion is soft: the Business Artifact can be brought back with the `restoreBusinessArtifact` operation. operationId: deleteBusinessArtifact tags: - apiRestExternalV20240614BusinessArtifacts - businessArtifact parameters: - $ref: "#/components/parameters/IdPathParam" responses: "204": description: Business Artifact deleted default: $ref: "#/components/responses/DefaultError" /business-artifacts/{id}/~actions/restore: post: summary: Restore a deleted Business Artifact by ID description: | Restore a previously deleted Business Artifact, the undo of the `deleteBusinessArtifact` operation. If the Business Artifact is not deleted, no action is taken. operationId: restoreBusinessArtifact tags: - apiRestExternalV20240614BusinessArtifacts - businessArtifact parameters: - $ref: "#/components/parameters/IdPathParam" responses: "200": description: Business Artifact restored. content: application/json: schema: $ref: "#/components/schemas/BusinessArtifact" default: $ref: "#/components/responses/DefaultError" /business-artifacts/{id}/data: put: summary: Save JSON data description: | Allow to save a JSON data validating that the data follow the related schema. If the data is invalid, then the json is marked as invalid. operationId: updateBusinessArtifactData tags: - apiRestExternalV20240614BusinessArtifacts - businessArtifact parameters: - $ref: "#/components/parameters/IdPathParam" requestBody: description: Params used to update the JSON value. required: true content: application/json: schema: $ref: "#/components/schemas/BusinessArtifactDataUpdateParams" x-ms-requestBody-name: businessArtifactDataUpdateParams responses: "200": description: Business Artifact with json data saved content: application/json: schema: $ref: "#/components/schemas/BusinessArtifact" default: $ref: "#/components/responses/DefaultError" patch: summary: Patch JSON data description: | Allow to patch a JSON data validating that the data follow the related schema. If the data is invalid, then the json is marked as invalid. operationId: patchBusinessArtifactData tags: - apiRestExternalV20240614BusinessArtifacts - businessArtifact parameters: - $ref: "#/components/parameters/IdPathParam" requestBody: description: Params to save the JSON value. required: true content: application/json-patch+json: schema: $ref: "#/components/schemas/JsonPatch" x-ms-requestBody-name: jsonPatch responses: "200": description: Business Artifact with json data saved content: application/json: schema: $ref: "#/components/schemas/BusinessArtifact" default: $ref: "#/components/responses/DefaultError" /business-artifacts/{id}/actions: post: summary: Invoke a Business Artifact action description: | Invoke an action on a Business Artifact. Whether the call returns synchronously or asynchronously depends on the action type: - `START_WORKFLOW`, `DOWNLOADABLE`: dispatched to a background worker. The response returns immediately with `status=REQUESTED`. Poll `retrieveBusinessArtifactAction` for the final state. - `START_PROCESS`, `CREATE_BUSINESS_ARTIFACT`: completed synchronously. The response returns with `status=COMPLETED` (or an error status). If you want the method to be idempotent, please specify the `id` field in the request body. operationId: createBusinessArtifactAction tags: - apiRestExternalV20240614BusinessArtifacts - businessArtifact parameters: - $ref: "#/components/parameters/IdPathParam" requestBody: description: Params identifying the action to invoke. required: true content: application/json: schema: $ref: "#/components/schemas/BusinessArtifactActionCreateParams" x-ms-requestBody-name: businessArtifactActionCreateParams responses: "200": description: Business Artifact action already created content: application/json: schema: $ref: "#/components/schemas/BusinessArtifactAction" "201": description: Business Artifact action created content: application/json: schema: $ref: "#/components/schemas/BusinessArtifactAction" default: $ref: "#/components/responses/DefaultError" /business-artifacts/{id}/actions/{actionId}: get: summary: Get a Business Artifact action by ID description: Returns a Business Artifact action by its ID. operationId: retrieveBusinessArtifactAction tags: - apiRestExternalV20240614BusinessArtifacts - businessArtifact parameters: - $ref: "#/components/parameters/IdPathParam" - name: actionId description: The Business Artifact action ID. in: path required: true schema: type: string format: uuid x-ms-parameter-location: method responses: "200": description: Successful operation content: application/json: schema: $ref: "#/components/schemas/BusinessArtifactAction" default: $ref: "#/components/responses/DefaultError" /business-artifacts/{id}/actions/{actionId}/~actions/cancel: post: summary: Cancel a Business Artifact action description: | Cancel a Business Artifact action. Only meaningful for asynchronous actions still in `REQUESTED` state. The action's status is set to `CANCELED`. If the action is already in a terminal state, no transition occurs. operationId: cancelBusinessArtifactAction tags: - apiRestExternalV20240614BusinessArtifacts - businessArtifact parameters: - $ref: "#/components/parameters/IdPathParam" - name: actionId description: The Business Artifact action ID. in: path required: true schema: type: string format: uuid x-ms-parameter-location: method responses: "200": description: Business Artifact action cancelled. content: application/json: schema: $ref: "#/components/schemas/BusinessArtifactAction" default: $ref: "#/components/responses/DefaultError" /business-artifacts/{id}/~actions/prepare-create-artifact: post: summary: Prepare the data for a CREATE_BUSINESS_ARTIFACT action description: | Compute the pre-filled value that a `CREATE_BUSINESS_ARTIFACT` action would produce for this Business Artifact, without invoking the action or persisting any state. Use it to populate a form that the user can review and edit. Once the user submits, the filled value is sent back via `createBusinessArtifactAction` (in the `createArtifact.value` field). operationId: prepareBusinessArtifactActionCreateArtifact tags: - apiRestExternalV20240614BusinessArtifacts - businessArtifact parameters: - $ref: "#/components/parameters/IdPathParam" requestBody: description: Params identifying the CREATE_BUSINESS_ARTIFACT action to prepare. required: true content: application/json: schema: $ref: "#/components/schemas/BusinessArtifactActionCreateArtifactPrepareParams" x-ms-requestBody-name: businessArtifactActionCreateArtifactPrepareParams responses: "200": description: Pre-filled value for the create-artifact form. content: application/json: schema: $ref: "#/components/schemas/BusinessArtifactActionCreateArtifactPrepare" default: $ref: "#/components/responses/DefaultError" /business-artifacts/{id}/~actions/prepare-start-process: post: summary: Prepare the metadata for a START_PROCESS action description: | Compute the pre-filled metadata that a `START_PROCESS` action would apply to the process it creates, without invoking the action or persisting any state. Use it to populate a form that the user can review and edit. Once the user submits, the filled metadata is sent back via `createBusinessArtifactAction` (in the `startProcess.metadata` field). operationId: prepareBusinessArtifactActionStartProcess tags: - apiRestExternalV20240614BusinessArtifacts - businessArtifact parameters: - $ref: "#/components/parameters/IdPathParam" requestBody: description: Params identifying the START_PROCESS action to prepare. required: true content: application/json: schema: $ref: "#/components/schemas/BusinessArtifactActionStartProcessPrepareParams" x-ms-requestBody-name: businessArtifactActionStartProcessPrepareParams responses: "200": description: Pre-filled metadata for the process creation form. content: application/json: schema: $ref: "#/components/schemas/BusinessArtifactActionStartProcessPrepare" default: $ref: "#/components/responses/DefaultError" /business-artifacts/{id}/~actions/upload-document: post: summary: | Upload a temporal document into the business artifact that later on must be linked with a business artifact domain resource description: | Upload a temporal document into the business artifact that later on must be linked with a business artifact domain resource. Documents uploaded with this API will be deleted after 2 hours as long as they have not been linked to a business artifact. **Deprecated:** use the `uploadDocument` operation with `targetUri=ku:business-artifact/{businessArtifactId}` instead. operationId: uploadBusinessArtifactDocument deprecated: true tags: - apiRestExternalV20240614BusinessArtifacts - businessArtifact parameters: - $ref: "#/components/parameters/IdPathParam" - name: fileContentType description: Document content type in: query required: true schema: type: string - name: fileName description: Document name in: query required: true schema: type: string requestBody: description: Document to save. required: true content: application/octet-stream: schema: type: string format: binary x-ms-requestBody-name: file responses: "200": description: Document reference content: application/json: schema: $ref: "#/components/schemas/DocumentReference" default: $ref: "#/components/responses/DefaultError" /business-artifacts/{id}/~actions/download-document: get: summary: Download document description: | Given a document uri download a document. **Deprecated:** use the `downloadDocument` operation instead; it resolves any document the credentials can read without requiring the owning Business Artifact in the path. operationId: downloadBusinessArtifactDocument deprecated: true tags: - apiRestExternalV20240614BusinessArtifacts - businessArtifact parameters: - $ref: "#/components/parameters/IdPathParam" - name: documentUri description: Document URI to download. in: query required: true schema: type: string responses: "200": description: Document requested content: "application/octet-stream": schema: type: string format: binary default: $ref: "#/components/responses/DefaultError" /documents/~actions/upload: post: summary: Upload a temporal document description: | Upload a temporal document that later on must be linked with a domain resource of its target. The target resource is identified by `targetUri`: * `ku:process/{processId}`: the document is deleted after 2 hours as long as it has not been linked to the process or to one of its process items. * `ku:business-artifact/{businessArtifactId}`: the document is deleted after 2 hours as long as it has not been linked to the business artifact. A target the credentials cannot read answers `404`. operationId: uploadDocument tags: - apiRestExternalV20240614Documents - document parameters: - name: targetUri description: | URI of the resource the document is uploaded for. Supported forms are `ku:process/{id}` and `ku:business-artifact/{id}`. in: query required: true schema: type: string - name: fileContentType description: Document content type in: query required: true schema: type: string - name: fileName description: Document name in: query required: true schema: type: string requestBody: description: Document to save. required: true content: application/octet-stream: schema: type: string format: binary x-ms-requestBody-name: file responses: "200": description: Document reference content: application/json: schema: $ref: "#/components/schemas/DocumentReference" default: $ref: "#/components/responses/DefaultError" /documents/~actions/download: get: summary: Download a document description: | Given a document uri, download its content. Accepts both the `kuflow-file:` reference returned by the upload operations and a plain `ku:` document uri. The credentials must be able to read the resource that owns the document; a document outside their reach, or a uri that does not resolve to a document, answers `404`. operationId: downloadDocument tags: - apiRestExternalV20240614Documents - document parameters: - name: documentUri description: Document URI to download, in `kuflow-file:` or `ku:` form. in: query required: true schema: type: string responses: "200": description: Document requested content: "application/octet-stream": schema: type: string format: binary default: $ref: "#/components/responses/DefaultError" /workers: post: summary: Create or update a worker description: | Register a worker in KuFlow, this allows the platform to have a catalogue of all registered workers. If already exist a worker for the same identity, the worker will be updated. operationId: createWorker tags: - apiRestExternalV20240614Workers - worker requestBody: description: Worker to create or update required: true content: application/json: schema: $ref: "#/components/schemas/WorkerCreateParams" x-ms-requestBody-name: workerCreateParams responses: "200": description: Worker updated. content: application/json: schema: $ref: "#/components/schemas/Worker" "201": description: Worker created. content: application/json: schema: $ref: "#/components/schemas/Worker" default: $ref: "#/components/responses/DefaultError" /robots: get: summary: Find all accessible Robots description: | List all the Robots that have been created and the credentials has access. Available sort query values: createdAt, lastModifiedAt operationId: findRobots tags: - apiRestExternalV20240614Robots - robot parameters: - $ref: "#/components/parameters/SizeQueryParam" - $ref: "#/components/parameters/PageQueryParam" - $ref: "#/components/parameters/SortQueryParam" - $ref: "#/components/parameters/TenantIdQueryParam" - $ref: "#/components/parameters/RobotContextQueryParam" responses: "200": description: Robots found paginated content: application/json: schema: $ref: "#/components/schemas/RobotPage" default: $ref: "#/components/responses/DefaultError" /robots/{id}: get: summary: Get a Robot by ID description: Returns the requested Robot when has access to do it. operationId: retrieveRobot tags: - apiRestExternalV20240614Robots - robot parameters: - $ref: "#/components/parameters/IdPathParam" responses: "200": description: Successful operation content: application/json: schema: $ref: "#/components/schemas/Robot" default: $ref: "#/components/responses/DefaultError" /robots/{id}/~actions/download-source-code: get: summary: Download robot code description: Given a robot, download the source code. operationId: downloadRobotSourceCode tags: - apiRestExternalV20240614Robots - robot parameters: - $ref: "#/components/parameters/IdPathParam" responses: "200": description: Source code requested content: "application/octet-stream": schema: type: string format: binary default: $ref: "#/components/responses/DefaultError" /robots/{id}/~actions/download-asset: get: summary: Download robot asset description: Given a robot, download the requested asset. operationId: downloadRobotAsset tags: - apiRestExternalV20240614Robots - robot parameters: - $ref: "#/components/parameters/IdPathParam" - name: type description: The asset type. in: query required: true schema: $ref: "#/components/schemas/RobotAssetType" x-ms-parameter-location: method - name: version description: The asset version. in: query required: true schema: type: string x-ms-parameter-location: method - name: platform description: The asset platform. in: query required: true schema: $ref: "#/components/schemas/RobotAssetPlatform" x-ms-parameter-location: method - name: architecture description: The asset platform architecture. in: query required: true schema: $ref: "#/components/schemas/RobotAssetArchitecture" x-ms-parameter-location: method responses: "200": description: Source code requested content: "application/octet-stream": schema: type: string format: binary default: $ref: "#/components/responses/DefaultError" x-webhooks: events: post: summary: Event sent description: Information about a event produced in the platform operationId: webhook_handleWebhookEvent tags: - webhook requestBody: content: application/json: schema: $ref: "#/components/schemas/WebhookEvent" responses: "200": description: Return a 200 status to indicate that the data was received successfully components: parameters: IdPathParam: name: id description: The resource ID. in: path required: true schema: type: string format: uuid x-ms-parameter-location: method KeyIdPathParam: name: keyId description: The resource ID. in: path required: true schema: type: string x-ms-parameter-location: method SizeQueryParam: name: size description: The number of records returned within a single API call. in: query required: false schema: type: integer default: 25 minimum: 0 maximum: 1000 x-ms-parameter-location: method PageQueryParam: name: page description: The page number of the current page in the returned records, 0 is the first page. in: query required: false schema: type: integer default: 0 minimum: 0 x-ms-parameter-location: method SortQueryParam: name: sort description: | Sorting criteria in the format: property{,asc|desc}. Example: createdAt,desc Default sort order is ascending. Multiple sort criteria are supported. Please refer to the method description for supported properties. in: query required: false schema: type: array items: type: string style: form explode: true x-ms-parameter-location: method GroupIdQueryParam: name: groupId description: Filter by group ids. in: query required: false schema: type: array items: type: string format: uuid style: form explode: true x-ms-parameter-location: method GroupCodeQueryParam: name: groupCode description: Filter by group codes. in: query required: false schema: type: array items: type: string style: form explode: true x-ms-parameter-location: method ProcessDefinitionIdQueryParam: name: processDefinitionId description: Filter by process definition ids. in: query required: false schema: type: array items: type: string format: uuid style: form explode: true x-ms-parameter-location: method ProcessDefinitionCodeQueryParam: name: processDefinitionCode description: Filter by process definition codes. in: query required: false schema: type: array items: type: string style: form explode: true x-ms-parameter-location: method EmailQueryParam: name: email description: Filter by email. in: query required: false schema: type: array items: type: string format: email style: form explode: true x-ms-parameter-location: method TenantIdQueryParam: name: tenantId description: Filter by tenantId. in: query required: false schema: type: array items: type: string format: uuid style: form explode: true x-ms-parameter-location: method PrincipalIdQueryParam: name: principalId description: Filter by principalId. in: query required: false schema: type: string format: uuid x-ms-parameter-location: method RobotContextQueryParam: name: filterContext description: Filter by the specified context. in: query required: false schema: $ref: '#/components/schemas/RobotFilterContext' style: form x-ms-parameter-location: method schemas: AbstractAudited: type: object properties: createdBy: description: Who create this model. type: string format: uuid createdAt: description: When this model was created. type: string format: date-time lastModifiedBy: description: Who was last update this model. type: string format: uuid lastModifiedAt: description: When this model type was last updated. type: string format: date-time AbstractDeleted: allOf: - $ref: "#/components/schemas/AbstractAudited" - type: object properties: deletedBy: description: Who deleted this model, present only when it is deleted. type: string format: uuid deletedAt: description: When this model was deleted, present only when it is deleted. type: string format: date-time Page: type: object properties: metadata: $ref: "#/components/schemas/PageMetadata" required: - metadata PageMetadata: type: object properties: size: type: integer minimum: 0 example: 25 page: type: integer minimum: 0 example: 0 totalElements: type: integer format: int64 example: 1096 totalPages: type: integer example: 110 required: - size - page - totalElements - totalPages JsonValue: type: object description: Json value. properties: valid: type: boolean description: true if the data complain the related json schema. value: type: object description: json value filled that complain with the related json schema. additionalProperties: true errors: type: array items: $ref: "#/components/schemas/JsonValueError" required: - value JsonValueError: type: object description: Json value. properties: propertyPath: type: string description: | JSON pointer to the property with the error. See: https://datatracker.ietf.org/doc/html/rfc6901 ie: /user/name or /users/1/name type: type: string description: Error type. JsonPatch: type: array items: $ref: "#/components/schemas/JsonPatchOperation" minItems: 1 JsonPatchOperation: type: object additionalProperties: false properties: op: $ref: "#/components/schemas/JsonPatchOperationType" from: description: A JSON Pointer path used when op is "copy" or "move". type: string path: description: A JSON Pointer path. type: string value: description: The value to "add", "replace" or "test". required: - op - path JsonPatchOperationType: type: string description: The operation to perform. enum: - add - remove - replace - move - copy - test DefaultError: description: Default error type: object properties: timestamp: description: Timestamp indicating when the error happened. type: string format: date-time status: description: HTTP Status type: integer message: description: Message Status type: string errors: description: Related error information. type: array items: $ref: "#/components/schemas/DefaultErrorInfo" required: - timestamp - status - message DefaultErrorInfo: type: object properties: code: type: string message: type: string location: type: string locationType: type: string required: - code - message ProcessState: description: Process state type: string enum: - RUNNING - COMPLETED - CANCELLED ProcessItemType: description: Process Item Type type: string enum: - TASK - MESSAGE - THREAD ProcessItemAiAssistanceGenerateParams: description: Params identifying a logical AI assistance attempt for a process item. type: object properties: requestId: description: | Client-supplied UUID identifying this logical AI assistance attempt. Use the same `requestId` to poll an in-flight or completed run. Use a new `requestId` to start a fresh run once the previous one has reached a final state. While a run is PENDING, calling this endpoint with a different `requestId` is rejected with 409. type: string format: uuid required: - requestId ProcessItemAiAssistanceState: type: string description: State of an AI assistance run. enum: - PENDING - COMPLETED - FAILED ProcessItemAiAssistance: description: Status of the latest AI assistance run for a process item. type: object properties: requestId: description: | Client-supplied UUID identifying the logical AI assistance attempt this run represents. type: string format: uuid state: $ref: "#/components/schemas/ProcessItemAiAssistanceState" embeddingPending: description: Number of document embeddings still queued. Only present when state is PENDING. type: integer format: int32 embeddingProcessing: description: Number of document embeddings actively processing. Only present when state is PENDING. type: integer format: int32 retryAfterSeconds: description: Suggested number of seconds to wait before polling again. Only present when state is PENDING. type: integer format: int32 model: description: The AI model used for the assistance. Only present when state is COMPLETED. type: string finishReason: description: The reason the AI model stopped generating. Only present when state is COMPLETED. type: string errorCode: description: Error code. Only present when state is FAILED. type: string errorMessage: description: Human-readable error description. Only present when state is FAILED. type: string startedAt: description: When this run was started. type: string format: date-time finishedAt: description: When this run finished (COMPLETED or FAILED). Absent while PENDING. type: string format: date-time required: - requestId - state - startedAt ProcessItemTaskState: description: Process Item Task state type: string enum: - READY - CLAIMED - COMPLETED - CANCELLED DocumentReference: type: object properties: documentUri: type: string description: | Reference to the uploaded file. Format: `kuflow-file:uri=;type=;size=;name=;` Example: `kuflow-file:uri=ku:process/xxx/document/yyy;type=application/json;size=500;name=file.json;` Operations that receive a document uri accept both this full form and the inner `ku:` document uri. required: - documentUri Authentication: allOf: - $ref: "#/components/schemas/AbstractAudited" - type: object properties: id: type: string format: uuid type: $ref: "#/components/schemas/AuthenticationType" tenantId: type: string format: uuid description: Tenant id. This attribute is required when an OAuth2 authentication is used. engineToken: $ref: "#/components/schemas/AuthenticationEngineToken" engineCertificate: $ref: "#/components/schemas/AuthenticationEngineCertificate" AuthenticationType: type: string enum: - ENGINE_TOKEN - ENGINE_CERTIFICATE AuthenticationEngineToken: type: object properties: token: type: string description: Engine authentication token expiredAt: type: string format: date-time required: - token - expiredAt AuthenticationEngineCertificate: type: object properties: namespace: type: string tls: type: object properties: serverRootCaCertificate: type: string clientCertificate: type: string clientPrivateKey: type: string required: - serverRootCaCertificate - clientCertificate - clientPrivateKey required: - namespace - tls AuthenticationCreateParams: type: object properties: type: $ref: "#/components/schemas/AuthenticationType" tenantId: type: string format: uuid description: Tenant id. This attribute is required when an OAuth2 authentication is used. required: - type Principal: type: object properties: id: type: string format: uuid type: $ref: "#/components/schemas/PrincipalType" name: type: string user: $ref: "#/components/schemas/PrincipalUser" application: $ref: "#/components/schemas/PrincipalApplication" PrincipalType: type: string enum: - USER - APPLICATION - SYSTEM PrincipalUser: type: object properties: id: type: string format: uuid email: type: string PrincipalApplication: type: object properties: id: type: string format: uuid PrincipalPage: allOf: - $ref: "#/components/schemas/Page" - type: object properties: content: type: array items: $ref: "#/components/schemas/PrincipalPageItem" required: - content PrincipalPageItem: type: object properties: id: type: string format: uuid type: $ref: "#/components/schemas/PrincipalType" name: type: string GroupPage: allOf: - $ref: "#/components/schemas/Page" - type: object properties: content: type: array items: $ref: "#/components/schemas/GroupPageItem" required: - content GroupPageItem: type: object properties: id: type: string format: uuid name: type: string code: type: string tenantId: description: Tenant ID. type: string format: uuid required: - id - name - code - tenantId TenantPricingPlan: description: Tenant pricing plan type: string enum: - FREE - PREMIUM - UNLIMITED Tenant: allOf: - $ref: "#/components/schemas/AbstractAudited" - type: object properties: id: type: string format: uuid name: type: string plan: $ref: "#/components/schemas/TenantPricingPlan" required: - id - name - plan TenantPage: allOf: - $ref: "#/components/schemas/Page" - type: object properties: content: type: array items: $ref: "#/components/schemas/TenantPageItem" required: - content TenantPageItem: type: object properties: id: type: string format: uuid name: type: string required: - id - name TenantUser: allOf: - $ref: "#/components/schemas/AbstractAudited" - type: object properties: id: type: string format: uuid metadata: $ref: "#/components/schemas/JsonValue" principal: $ref: "#/components/schemas/Principal" tenantId: type: string format: uuid required: - id - principal - tenantId TenantUserPage: allOf: - $ref: "#/components/schemas/Page" - type: object properties: content: type: array items: $ref: "#/components/schemas/TenantUserPageItem" required: - content TenantUserPageItem: allOf: - $ref: "#/components/schemas/AbstractAudited" - type: object properties: id: type: string format: uuid principalId: type: string format: uuid tenantId: type: string format: uuid required: - id - principalId - tenantId ProcessPage: allOf: - $ref: "#/components/schemas/Page" - type: object properties: content: type: array items: $ref: "#/components/schemas/ProcessPageItem" required: - content ProcessPageItem: allOf: - $ref: "#/components/schemas/AbstractDeleted" - type: object properties: id: description: Process ID. type: string format: uuid uri: description: | Process resource URI, e.g. usable as `targetUri` of the `uploadDocument` operation. Format `ku:process/{id}`. type: string state: $ref: "#/components/schemas/ProcessState" processDefinitionRef: $ref: "#/components/schemas/ProcessDefinitionRef" initiatorId: description: Principal ID. type: string format: uuid tenantId: description: Tenant ID. type: string format: uuid required: - id - state - processDefinitionRef - initiator - tenantId ProcessCreateParams: description: | Params to create a Process. Either `processDefinitionId` or `processDefinitionCode` (with `tenantId`) must be provided. type: object properties: id: type: string format: uuid processDefinitionId: type: string format: uuid tenantId: type: string format: uuid processDefinitionCode: type: string metadata: $ref: "#/components/schemas/JsonValue" entity: $ref: "#/components/schemas/JsonValue" initiatorId: type: string format: uuid initiatorEmail: type: string format: email relatedProcessId: description: | Optional id of another process to which the created process is related. Surfaced on read as `Process.processRelated.outcoming`. type: string format: uuid anyOf: - required: - processDefinitionId - required: - tenantId - processDefinitionCode ProcessChangeInitiatorParams: description: Params to change the process initiator, only one option is required. type: object properties: initiatorId: type: string format: uuid initiatorEmail: type: string format: email ProcessMetadataUpdateParams: description: Params to save metadata data. type: object properties: metadata: $ref: "#/components/schemas/JsonValue" required: - metadata ProcessEntityUpdateParams: type: object properties: entity: $ref: "#/components/schemas/JsonValue" required: - entity Process: allOf: - $ref: "#/components/schemas/AbstractDeleted" - type: object properties: id: description: Process ID. type: string format: uuid uri: description: | Process resource URI, e.g. usable as `targetUri` of the `uploadDocument` operation. Format `ku:process/{id}`. type: string state: $ref: "#/components/schemas/ProcessState" processDefinitionRef: $ref: "#/components/schemas/ProcessDefinitionRef" metadata: $ref: "#/components/schemas/JsonValue" entity: $ref: "#/components/schemas/JsonValue" processRelated: $ref: "#/components/schemas/ProcessRelated" initiatorId: description: Process initiator id, Principal ID. type: string format: uuid tenantId: description: Tenant ID. type: string format: uuid required: - id - state - processDefinition - initiator - tenantId ProcessRelated: type: object properties: incoming: description: Processes whose relationship target is the current process. type: array items: type: string format: uuid outcoming: description: Processes to which the current process relates. type: array items: type: string format: uuid ProcessAction: description: | A Process action invocation. The populated sub-field (`downloadable`, `startRelatedProcess`, `createTask`, `createProcessItemMessage`, `createProcessItemThread`, `sendWorkflowSignal`) is dictated by `type`. Actions of type START_WORKFLOW carry no additional details. allOf: - $ref: "#/components/schemas/AbstractAudited" - type: object properties: id: type: string format: uuid type: $ref: "#/components/schemas/ProcessActionType" status: $ref: "#/components/schemas/ProcessActionStatus" processActionDefinitionRef: $ref: "#/components/schemas/ProcessActionDefinitionRef" downloadable: $ref: "#/components/schemas/ProcessActionDownloadable" startRelatedProcess: $ref: "#/components/schemas/ProcessActionStartRelatedProcess" createTask: $ref: "#/components/schemas/ProcessActionCreateTask" createProcessItemMessage: $ref: "#/components/schemas/ProcessActionCreateProcessItemMessage" createProcessItemThread: $ref: "#/components/schemas/ProcessActionCreateProcessItemThread" sendWorkflowSignal: $ref: "#/components/schemas/ProcessActionSendWorkflowSignal" required: - id - type - status - processActionDefinitionRef ProcessActionDownloadable: description: Action details for actions of type DOWNLOADABLE. type: object properties: documentUri: description: URI of the generated document. Only present when status is COMPLETED. type: string documentExpired: description: Whether the generated document has expired. Only present when status is COMPLETED. type: boolean ProcessActionStartRelatedProcess: description: | Action details for actions of type START_RELATED_PROCESS. Actions of this type complete synchronously, so all fields are present in the invoke response. type: object properties: processDefinitionId: description: ID of the Process Definition that was instantiated. type: string format: uuid processId: description: ID of the Process created by this action. type: string format: uuid required: - processDefinitionId - processId ProcessActionCreateTask: description: | Action details for actions of type CREATE_TASK. Actions of this type complete synchronously, so the created Process Item ID is present in the invoke response. type: object properties: processItemId: description: ID of the task Process Item created by this action. type: string format: uuid ProcessActionCreateProcessItemMessage: description: | Action details for actions of type CREATE_PROCESS_ITEM_MESSAGE. Actions of this type complete synchronously, so the created Process Item ID is present in the invoke response. type: object properties: processItemId: description: ID of the message Process Item created by this action. type: string format: uuid ProcessActionCreateProcessItemThread: description: | Action details for actions of type CREATE_PROCESS_ITEM_THREAD. Actions of this type complete synchronously, so the created Process Item ID is present in the invoke response. type: object properties: processItemId: description: ID of the thread Process Item created by this action. type: string format: uuid ProcessActionSendWorkflowSignal: description: Action details for actions of type SEND_WORKFLOW_SIGNAL. type: object properties: signalName: description: Name of the signal sent to the Process workflow. type: string input: $ref: "#/components/schemas/JsonValue" ProcessActionCreateParams: description: | Params to invoke an action on a Process. The populated sub-field (`createTask`, `createProcessItemMessage`, `startRelatedProcess`, `sendWorkflowSignal`) must match the type of the action identified by `processActionDefinitionCode`; the remaining action types take no params. type: object properties: id: type: string format: uuid processActionDefinitionCode: type: string createTask: $ref: "#/components/schemas/ProcessActionCreateParamsCreateTask" createProcessItemMessage: $ref: "#/components/schemas/ProcessActionCreateParamsCreateProcessItemMessage" startRelatedProcess: $ref: "#/components/schemas/ProcessActionCreateParamsStartRelatedProcess" sendWorkflowSignal: $ref: "#/components/schemas/ProcessActionCreateParamsSendWorkflowSignal" required: - processActionDefinitionCode ProcessActionCreateParamsCreateTask: description: Params for invoking an action of type CREATE_TASK. type: object properties: processItemThreadId: description: ID of the thread Process Item the created task is attached to. type: string format: uuid ProcessActionCreateParamsCreateProcessItemMessage: description: | Params for invoking an action of type CREATE_PROCESS_ITEM_MESSAGE. Messages are created through the built-in `__KF_MESSAGE__` action definition code. type: object properties: text: description: Text of the message to create. type: string processItemThreadId: description: ID of the thread Process Item the created message is attached to. type: string format: uuid required: - text ProcessActionCreateParamsStartRelatedProcess: description: Params for invoking an action of type START_RELATED_PROCESS. type: object properties: metadata: description: Metadata applied to the process created by this action. type: object additionalProperties: true entity: description: | Entity data applied to the process created by this action. Validated against the process definition entity schema; validation errors are recorded on the process entity value. Ignored if empty or if the process definition has no entity structure. type: object additionalProperties: true ProcessActionCreateParamsSendWorkflowSignal: description: Params for invoking an action of type SEND_WORKFLOW_SIGNAL. type: object properties: input: description: | Input delivered inside the workflow signal. Validated against the action's input schema; only accepted when the action definition declares one. The serialized input is limited to 200 KB. type: object additionalProperties: true ProcessActionStatus: description: Status of a Process action. type: string enum: - REQUESTED - COMPLETED - CANCELED - ERROR ProcessActionType: description: Type of a Process action. type: string enum: - DOWNLOADABLE - START_RELATED_PROCESS - START_WORKFLOW - CREATE_TASK - CREATE_PROCESS_ITEM_MESSAGE - CREATE_PROCESS_ITEM_THREAD - SEND_WORKFLOW_SIGNAL ProcessItemPage: allOf: - $ref: "#/components/schemas/Page" - type: object properties: content: type: array items: $ref: "#/components/schemas/ProcessItemPageItem" required: - content ProcessItemPageItem: allOf: - $ref: "#/components/schemas/AbstractDeleted" - type: object properties: id: type: string format: uuid uri: description: Process Item resource URI. Format `ku:process-item/{id}`. type: string type: $ref: "#/components/schemas/ProcessItemType" processId: type: string format: uuid processItemThreadId: description: ID of the thread Process Item this item is attached to, if any. type: string format: uuid ownerId: description: Principal ID. type: string format: uuid tenantId: description: Tenant ID. type: string format: uuid processItemDefinitionRef: $ref: "#/components/schemas/ProcessItemDefinitionRef" task: $ref: "#/components/schemas/ProcessItemTaskPageItem" message: $ref: "#/components/schemas/ProcessItemMessagePageItem" required: - id - type - processId - tenantId ProcessItemTaskPageItem: type: object properties: state: $ref: "#/components/schemas/ProcessItemTaskState" required: - state ProcessItemMessagePageItem: type: object properties: text: type: string description: Message text in Markdown format according to the specification https://spec.commonmark.org/ dataStructureDataDefinitionCode: type: string ProcessItemCreateParams: type: object properties: id: type: string format: uuid type: $ref: "#/components/schemas/ProcessItemType" processId: type: string format: uuid processItemThreadId: description: | ID of the thread Process Item the created item is attached to. Only allowed for items of type `TASK` or `MESSAGE`; it must reference a Process Item of type `THREAD` that belongs to the same Process. It is not part of the idempotency key. type: string format: uuid ownerId: type: string format: uuid ownerEmail: type: string format: email processItemDefinitionCode: type: string task: $ref: "#/components/schemas/ProcessItemTaskCreateParams" message: $ref: "#/components/schemas/ProcessItemMessageCreateParams" required: - type - processId ProcessItemTaskCreateParams: type: object properties: data: $ref: "#/components/schemas/JsonValue" contextData: $ref: "#/components/schemas/JsonValue" ProcessItemMessageCreateParams: type: object properties: text: type: string description: Message text in Markdown format according to the specification https://spec.commonmark.org/ data: $ref: "#/components/schemas/JsonValue" dataStructureDataDefinitionCode: type: string ProcessItemTaskDataUpdateParams: type: object properties: data: $ref: "#/components/schemas/JsonValue" required: - data ProcessItemTaskContextDataUpdateParams: type: object properties: data: $ref: "#/components/schemas/JsonValue" required: - data ProcessItemTaskAssignParams: description: Params to assign a process item task, only one option is required. type: object properties: ownerId: type: string format: uuid ownerEmail: type: string format: email ProcessItem: allOf: - $ref: "#/components/schemas/AbstractDeleted" - type: object properties: id: type: string format: uuid uri: description: Process Item resource URI. Format `ku:process-item/{id}`. type: string type: $ref: "#/components/schemas/ProcessItemType" processId: type: string format: uuid processItemThreadId: description: ID of the thread Process Item this item is attached to, if any. type: string format: uuid ownerId: description: Owner Principal ID. type: string format: uuid tenantId: description: Tenant ID. type: string format: uuid processItemDefinitionRef: $ref: "#/components/schemas/ProcessItemDefinitionRef" task: $ref: "#/components/schemas/ProcessItemTask" message: $ref: "#/components/schemas/ProcessItemMessage" required: - id - type - processId ProcessItemTask: type: object properties: state: $ref: "#/components/schemas/ProcessItemTaskState" data: $ref: "#/components/schemas/JsonValue" contextData: $ref: "#/components/schemas/JsonValue" logs: type: array items: $ref: "#/components/schemas/ProcessItemTaskLog" required: - state - taskDefinition ProcessItemMessage: type: object properties: text: type: string description: Message text in Markdown format according to the specification https://spec.commonmark.org/ data: $ref: "#/components/schemas/JsonValue" dataStructureDataDefinitionCode: type: string ProcessItemTaskAppendLogParams: type: object properties: message: type: string level: $ref: "#/components/schemas/ProcessItemTaskLogLevel" required: - message - level ProcessItemTaskLog: type: object properties: id: type: string format: uuid timestamp: description: When this model was created. type: string format: date-time message: type: string level: $ref: "#/components/schemas/ProcessItemTaskLogLevel" required: - id - timestamp - message - level ProcessItemTaskLogLevel: type: string enum: - INFO - WARN - ERROR BusinessArtifactPage: allOf: - $ref: "#/components/schemas/Page" - type: object properties: content: type: array items: $ref: "#/components/schemas/BusinessArtifactPageItem" required: - content BusinessArtifactPageItem: allOf: - $ref: "#/components/schemas/AbstractDeleted" - type: object properties: id: description: Business Artifact ID. type: string format: uuid uri: description: | Business Artifact resource URI, e.g. usable as `targetUri` of the `uploadDocument` operation. Format `ku:business-artifact/{id}`. type: string tenantId: description: Tenant ID. type: string format: uuid businessArtifactDefinitionRef: $ref: "#/components/schemas/BusinessArtifactDefinitionRef" required: - id - tenantId - businessArtifactDefinitionRef BusinessArtifactCreateParams: description: | Params to create a Business Artifact. Either `businessArtifactDefinitionId` or `businessArtifactDefinitionCode` (with `tenantId`) must be provided. type: object properties: id: type: string format: uuid businessArtifactDefinitionId: type: string format: uuid tenantId: type: string format: uuid businessArtifactDefinitionCode: type: string data: $ref: "#/components/schemas/JsonValue" anyOf: - required: - businessArtifactDefinitionId - required: - tenantId - businessArtifactDefinitionCode BusinessArtifactDataUpdateParams: type: object properties: data: $ref: "#/components/schemas/JsonValue" required: - data BusinessArtifact: allOf: - $ref: "#/components/schemas/AbstractDeleted" - type: object properties: id: description: Business Artifact ID. type: string format: uuid uri: description: | Business Artifact resource URI, e.g. usable as `targetUri` of the `uploadDocument` operation. Format `ku:business-artifact/{id}`. type: string tenantId: description: Tenant ID. type: string format: uuid businessArtifactDefinitionRef: $ref: "#/components/schemas/BusinessArtifactDefinitionRef" data: $ref: "#/components/schemas/JsonValue" required: - id - tenantId - businessArtifactDefinitionRef BusinessArtifactAction: description: | A Business Artifact action invocation. The populated sub-field (`startWorkflow`, `startProcess`, `downloadable`, `createArtifact`) is dictated by `type`. allOf: - $ref: "#/components/schemas/AbstractAudited" - type: object properties: id: type: string format: uuid type: $ref: "#/components/schemas/BusinessArtifactActionType" status: $ref: "#/components/schemas/BusinessArtifactActionStatus" businessArtifactActionDefinitionRef: $ref: "#/components/schemas/BusinessArtifactActionDefinitionRef" startWorkflow: $ref: "#/components/schemas/BusinessArtifactActionStartWorkflow" startProcess: $ref: "#/components/schemas/BusinessArtifactActionStartProcess" downloadable: $ref: "#/components/schemas/BusinessArtifactActionDownloadable" createArtifact: $ref: "#/components/schemas/BusinessArtifactActionCreateArtifact" required: - id - type - status - businessArtifactActionDefinitionRef BusinessArtifactActionStartWorkflow: description: Action details for actions of type START_WORKFLOW. type: object properties: input: $ref: "#/components/schemas/JsonValue" BusinessArtifactActionStartProcess: description: | Action details for actions of type START_PROCESS. Actions of this type complete synchronously, so all fields are present in the invoke response. type: object properties: processDefinitionId: description: ID of the Process Definition that was instantiated. type: string format: uuid processId: description: ID of the Process created by this action. type: string format: uuid required: - processDefinitionId - processId BusinessArtifactActionDownloadable: description: Action details for actions of type DOWNLOADABLE. type: object properties: input: $ref: "#/components/schemas/JsonValue" documentUri: description: URI of the generated document. Only present when status is COMPLETED. type: string documentExpired: description: Whether the generated document has expired. Only present when status is COMPLETED. type: boolean BusinessArtifactActionCreateArtifact: description: | Action details for actions of type CREATE_BUSINESS_ARTIFACT. Actions of this type complete synchronously, so the populated value and the created Business Artifact ID are present in the invoke response. type: object properties: businessArtifactDefinitionRef: $ref: "#/components/schemas/BusinessArtifactDefinitionRef" businessArtifactId: description: ID of the Business Artifact created by this action. Only present when status is COMPLETED. type: string format: uuid value: description: Form value applied to the new Business Artifact. type: object additionalProperties: true required: - businessArtifactDefinitionRef BusinessArtifactActionCreateParams: description: | Params to invoke an action on a Business Artifact. The populated sub-field (`startWorkflow`, `downloadable`, `startProcess`, `createArtifact`) must match the type of the action identified by `businessArtifactActionDefinitionCode`. type: object properties: id: type: string format: uuid businessArtifactActionDefinitionCode: type: string startWorkflow: $ref: "#/components/schemas/BusinessArtifactActionCreateParamsStartWorkflow" downloadable: $ref: "#/components/schemas/BusinessArtifactActionCreateParamsDownloadable" startProcess: $ref: "#/components/schemas/BusinessArtifactActionCreateParamsStartProcess" createArtifact: $ref: "#/components/schemas/BusinessArtifactActionCreateParamsCreateArtifact" required: - businessArtifactActionDefinitionCode BusinessArtifactActionCreateParamsStartWorkflow: description: Params for invoking an action of type START_WORKFLOW. type: object properties: input: description: Input passed to the workflow. Validated against the action's input schema. type: object additionalProperties: true BusinessArtifactActionCreateParamsDownloadable: description: Params for invoking an action of type DOWNLOADABLE. type: object properties: input: description: Input passed to the workflow that produces the downloadable. Validated against the action's input schema. type: object additionalProperties: true BusinessArtifactActionCreateParamsStartProcess: description: Params for invoking an action of type START_PROCESS. type: object properties: metadata: description: | Metadata applied to the process created by this action. If empty or omitted, the action's metadata expression (if any) is evaluated against this Business Artifact and its result is applied instead. A non-empty value is applied as provided, with no merging. type: object additionalProperties: true entity: description: | Entity data applied to the process created by this action. Validated against the process definition entity schema; validation errors are recorded on the process entity value. Ignored if empty or if the process definition has no entity structure. type: object additionalProperties: true BusinessArtifactActionCreateParamsCreateArtifact: description: | Params for invoking an action of type CREATE_BUSINESS_ARTIFACT. The `value` is the (potentially user-edited) form previously obtained via the `prepareBusinessArtifactActionCreateArtifact` operation. type: object properties: value: description: Form value to be applied to the new Business Artifact. type: object additionalProperties: true BusinessArtifactActionCreateArtifactPrepareParams: description: Params identifying a CREATE_BUSINESS_ARTIFACT action to prepare. type: object properties: businessArtifactActionDefinitionCode: type: string required: - businessArtifactActionDefinitionCode BusinessArtifactActionCreateArtifactPrepare: description: | Pre-filled value for a CREATE_BUSINESS_ARTIFACT action. Returned by the prepare operation; nothing is persisted on the server. type: object properties: businessArtifactDefinitionRef: $ref: "#/components/schemas/BusinessArtifactDefinitionRef" value: description: Pre-filled form value computed from the action definition. type: object additionalProperties: true required: - businessArtifactDefinitionRef BusinessArtifactActionStartProcessPrepareParams: description: Params identifying a START_PROCESS action to prepare. type: object properties: businessArtifactActionDefinitionCode: type: string required: - businessArtifactActionDefinitionCode BusinessArtifactActionStartProcessPrepare: description: | Pre-filled metadata for a START_PROCESS action. Returned by the prepare operation; nothing is persisted on the server. type: object properties: processDefinitionId: description: Process Definition the action will start. type: string format: uuid metadata: description: Pre-filled process metadata computed from the action definition. type: object additionalProperties: true required: - processDefinitionId BusinessArtifactActionStatus: description: Status of a Business Artifact action. type: string enum: - REQUESTED - COMPLETED - CANCELED - ERROR BusinessArtifactActionType: description: Type of a Business Artifact action. type: string enum: - START_WORKFLOW - START_PROCESS - DOWNLOADABLE - CREATE_BUSINESS_ARTIFACT DeletedQueryParam: description: | Soft-deleted records filtering mode: * EXCLUDE: only records that are not deleted (default) * INCLUDE: both deleted and non-deleted records * ONLY: only deleted records type: string enum: - EXCLUDE - INCLUDE - ONLY ProcessDefinitionRef: type: object properties: id: type: string format: uuid version: type: string format: uuid code: type: string required: - id - version - code ProcessActionDefinitionRef: type: object properties: id: description: Not present when the action definition was removed from the process definition after the invocation. type: string format: uuid code: type: string required: - code ProcessItemDefinitionRef: type: object properties: id: type: string format: uuid version: type: string format: uuid code: type: string required: - id - version - code BusinessArtifactDefinitionRef: type: object properties: id: type: string format: uuid code: type: string required: - id - code BusinessArtifactActionDefinitionRef: type: object properties: id: type: string format: uuid code: type: string required: - id - code Worker: allOf: - $ref: "#/components/schemas/AbstractAudited" - type: object properties: id: type: string format: uuid identity: type: string minLength: 1 maxLength: 255 taskQueue: type: string minLength: 1 maxLength: 255 workflowTypes: type: array items: type: string minLength: 1 maxLength: 255 activityTypes: type: array items: type: string minLength: 1 maxLength: 255 hostname: type: string minLength: 1 maxLength: 255 ip: type: string minLength: 7 maxLength: 40 installationId: description: Installation Id. type: string format: uuid robotIds: description: Robot Ids that this worker implements. type: array items: type: string format: uuid tenantId: description: Tenant ID. type: string format: uuid required: - identity - taskQueue - hostname - ip WorkerCreateParams: type: object properties: identity: type: string minLength: 1 maxLength: 255 taskQueue: type: string minLength: 1 maxLength: 255 workflowTypes: type: array items: type: string minLength: 1 maxLength: 255 activityTypes: type: array items: type: string minLength: 1 maxLength: 255 hostname: type: string minLength: 1 maxLength: 255 ip: type: string minLength: 7 maxLength: 40 installationId: description: Installation Id. type: string format: uuid robotIds: description: Robot Ids that this worker implements. type: array items: type: string format: uuid tenantId: description: Tenant ID. type: string format: uuid required: - identity - taskQueue - hostname - ip RobotFilterContext: type: string description: | Robot filter context: * READY: filters out robots ready for execution for the current credentials * DEFAULT: filters out robots accessible for the current credentials (if no set this is the default option) enum: - READY - DEFAULT RobotPage: allOf: - $ref: "#/components/schemas/Page" - type: object properties: content: type: array items: $ref: "#/components/schemas/RobotPageItem" required: - content RobotPageItem: allOf: - $ref: "#/components/schemas/AbstractAudited" - type: object properties: id: description: Robot ID. type: string format: uuid code: description: Robot Code. type: string minLength: 1 maxLength: 50 name: description: Robot name. type: string minLength: 1 maxLength: 50 description: description: Robot description. type: string minLength: 1 maxLength: 4000 sourceType: $ref: "#/components/schemas/RobotSourceType" sourceFile: $ref: "#/components/schemas/RobotSourceFile" tenantId: description: Tenant ID. type: string format: uuid required: - id - code - name - sourceType - sourceFile - tenantId Robot: allOf: - $ref: "#/components/schemas/AbstractAudited" - type: object properties: id: description: Robot ID. type: string format: uuid code: description: Robot Code. type: string minLength: 1 maxLength: 50 name: description: Robot name. type: string minLength: 1 maxLength: 50 description: description: Robot description. type: string minLength: 1 maxLength: 4000 sourceType: $ref: "#/components/schemas/RobotSourceType" sourceFile: $ref: "#/components/schemas/RobotSourceFile" environmentVariables: description: Environment variables to load when the robot is executed. type: object additionalProperties: type: string minLength: 1 maxLength: 4000 tenantId: description: Tenant ID. type: string format: uuid required: - id - code - name - sourceType - sourceFile - tenantId RobotSourceType: type: string description: Robot source type enum: - PACKAGE - UNKNOWN RobotAssetType: type: string description: Robot asset type enum: - PYTHON - PYTHON_PIP - NODEJS RobotAssetPlatform: type: string description: Robot asset platform enum: - WINDOWS - MAC_OS - LINUX RobotAssetArchitecture: type: string description: Robot asset platform architecture enum: - X86_32 - X86_64 x-enum-varnames: - X86_32 - X86_64 RobotSourceFile: type: object description: Robot source type properties: id: description: Robot ID. type: string format: uuid name: description: Source file name. type: string contentType: description: Source file content type. type: string contentLength: description: Source file length. type: integer format: int64 contentHash: description: Source file to check the integrity. type: string required: - id - name - contentType - contentLength - contentHash WebhookEvent: type: object properties: id: type: string format: uuid version: type: string type: $ref: "#/components/schemas/WebhookType" timestamp: type: string format: date-time required: - id - version - type - timestamp discriminator: propertyName: type mapping: "PROCESS.CREATED": "#/components/schemas/WebhookEventProcessCreated" "PROCESS.STATE_CHANGED": "#/components/schemas/WebhookEventProcessStateChanged" "PROCESS_ITEM.CREATED": "#/components/schemas/WebhookEventProcessItemCreated" "PROCESS_ITEM.TASK_STATE_CHANGED": "#/components/schemas/WebhookEventProcessItemTaskStateChanged" WebhookType: description: Type of the Event. type: string enum: - PROCESS.CREATED - PROCESS.STATE_CHANGED - PROCESS_ITEM.CREATED - PROCESS_ITEM.TASK_STATE_CHANGED x-enum-varnames: - PROCESS__CREATED - PROCESS__STATE_CHANGED - PROCESS_ITEM__CREATED - PROCESS_ITEM__TASK_STATE_CHANGED WebhookEventProcessCreated: description: Process Events allOf: - $ref: "#/components/schemas/WebhookEvent" - type: object properties: data: $ref: "#/components/schemas/WebhookEventProcessCreatedData" required: - data WebhookEventProcessCreatedData: type: object properties: processId: type: string format: uuid processState: $ref: "#/components/schemas/ProcessState" required: - processId - processState WebhookEventProcessStateChanged: description: Process Events allOf: - $ref: "#/components/schemas/WebhookEvent" - type: object properties: data: $ref: "#/components/schemas/WebhookEventProcessStateChangedData" required: - data WebhookEventProcessStateChangedData: type: object properties: processId: type: string format: uuid processState: $ref: "#/components/schemas/ProcessState" required: - processId - processState WebhookEventProcessItemCreated: description: Process Events allOf: - $ref: "#/components/schemas/WebhookEvent" - type: object properties: data: $ref: "#/components/schemas/WebhookEventProcessItemCreatedData" required: - data WebhookEventProcessItemCreatedData: type: object properties: processId: type: string format: uuid processItemId: type: string format: uuid processItemType: $ref: "#/components/schemas/ProcessItemType" processItemState: $ref: "#/components/schemas/ProcessItemTaskState" processItemDefinitionCode: type: string required: - processId - processItemId - processItemType WebhookEventProcessItemTaskStateChanged: description: Process Events allOf: - $ref: "#/components/schemas/WebhookEvent" - type: object properties: data: $ref: "#/components/schemas/WebhookEventProcessItemTaskStateChangedData" required: - data WebhookEventProcessItemTaskStateChangedData: type: object properties: processId: type: string format: uuid processItemId: type: string format: uuid processItemType: $ref: "#/components/schemas/ProcessItemType" processItemState: $ref: "#/components/schemas/ProcessItemTaskState" processItemDefinitionCode: type: string required: - processId - processItemId - processItemType - processItemState - processItemDefinitionCode KmsKey: type: object properties: id: description: Key Id type: string value: description: Encryption/decryption key type: string format: byte required: - id - value responses: DefaultError: description: Unexpected error. content: application/json: schema: $ref: "#/components/schemas/DefaultError" securitySchemes: BasicAuth: type: http scheme: basic BearerAuth: type: http scheme: bearer OAuth2Auth: type: oauth2 flows: authorizationCode: authorizationUrl: https://auth.kuflow.com/realms/KuFlow/protocol/openid-connect/auth tokenUrl: https://auth.kuflow.com/realms/KuFlow/protocol/openid-connect/token scopes: openid: Grants read openid data access email: Grants read email data access