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. # 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: 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 - 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/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" 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/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" 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. 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" /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/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}/~actions/upload-user-action-document: post: summary: Upload and save a document in a user action description: | Allow saving a user action document uploading the content. operationId: uploadProcessUserActionDocument 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 - name: userActionValueId description: User action value ID related to de document in: query required: true schema: type: string format: uuid 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 Saved in user action. content: application/json: schema: $ref: "#/components/schemas/Process" "304": description: Untouched 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 24 hours as long as they have not been linked to a process or process item.. operationId: uploadProcessDocument 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. operationId: downloadProcessDocument 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/TenantIdQueryParam" 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. 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. 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}/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/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" /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 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 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. readOnly: true value: type: object description: json value filled that complain with the related json schema. additionalProperties: true errors: type: array items: $ref: "#/components/schemas/JsonValueError" readOnly: true 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". nullable: true 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 ProcessItemTaskState: description: Process Item Task state type: string enum: - READY - CLAIMED - COMPLETED - CANCELLED DocumentReference: type: object properties: documentUri: type: string description: | JSON value representing the uploaded file. Example: `kuflow-file:uri=xxx-yyy-zzz;type=application/json;size=500;name=file.json;` 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 tenantId: description: Tenant ID. type: string format: uuid required: - id - name - 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 readOnly: true 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 readOnly: true principalId: type: string format: uuid readOnly: true tenantId: type: string format: uuid readOnly: true 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/AbstractAudited" - type: object properties: id: description: Process ID. type: string format: uuid 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: type: object properties: id: type: string format: uuid processDefinitionId: type: string format: uuid metadata: $ref: "#/components/schemas/JsonValue" initiatorId: type: string format: uuid initiatorEmail: type: string format: email required: - processDefinitionId 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/AbstractAudited" - type: object properties: id: description: Process ID. type: string format: uuid 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 ProcessItemPage: allOf: - $ref: "#/components/schemas/Page" - type: object properties: content: type: array items: $ref: "#/components/schemas/ProcessItemPageItem" required: - content ProcessItemPageItem: allOf: - $ref: "#/components/schemas/AbstractAudited" - type: object properties: id: type: string format: uuid type: $ref: "#/components/schemas/ProcessItemType" processId: 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 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" 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 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/AbstractAudited" - type: object properties: id: type: string format: uuid type: $ref: "#/components/schemas/ProcessItemType" processId: 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" 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 ProcessDefinitionRef: type: object properties: id: type: string format: uuid version: type: string format: uuid required: - id - version ProcessItemDefinitionRef: type: object properties: id: type: string format: uuid version: type: string format: uuid code: type: string required: - id - version - 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