openapi: 3.2.0 info: title: Microsoft Azure Purview Workflow Service Workflow Tasks API version: 2022-05-01-preview description: Workflows are automated, repeatable business processes which allow organizations to track changes, enforce policy compliance, and ensure quality data across their data landscape.Workflow service is a micro service within Microsoft Purview to validate and orchestrate CUD (create, update, delete) operations on their data entities. This spec defines REST API of Purview Workflow Service, which could used for creating Purview workflow client. servers: - url: https://purview.azure.com/workflow security: - azure_auth: - https://purview.azure.net/.default tags: - name: Workflow Tasks paths: /workflowtasks: get: tags: - Workflow Tasks description: Get all workflow tasks. operationId: microsoftAzureListworkflowtasks x-ms-examples: WorkflowTasks_List: $ref: ./examples/ListWorkflowTasks.json x-ms-pageable: nextLinkName: nextLink parameters: - $ref: '#/components/parameters/api-version' - $ref: '#/components/parameters/viewMode' - $ref: '#/components/parameters/workflowIds' - $ref: '#/components/parameters/timeWindow' - $ref: '#/components/parameters/maxpagesize' - name: orderby in: query required: false x-ms-enum: name: orderby modelAsString: true description: The key word which used to sort the results. x-ms-parameter-location: method schema: type: string enum: - createdTime desc - createdTime asc - requestor desc - requestor asc - $ref: '#/components/parameters/taskTypes' - $ref: '#/components/parameters/taskStatuses' - $ref: '#/components/parameters/workflowNameKeyword' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/TasksList' default: description: Error response describing why the operation failed. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Microsoft Azure Get Workflowtasks /workflowtasks/{taskId}: get: tags: - Workflow Tasks description: Get a workflow task. operationId: microsoftAzureGetworkflowtask x-ms-examples: WorkTask_Get: $ref: ./examples/GetWorkflowTask.json parameters: - $ref: '#/components/parameters/taskId' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/WorkflowTask' default: description: Error response describing why the operation failed. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Microsoft Azure Get Workflowtasks Taskid /workflowtasks/{taskId}/approve-approval: post: tags: - Workflow Tasks description: Approve an approval task. operationId: microsoftAzureApproveapprovaltask x-ms-examples: ApprovalTask_Approve: $ref: ./examples/ApproveApprovalTask.json parameters: - $ref: '#/components/parameters/taskId' - $ref: '#/components/parameters/api-version' responses: '200': description: OK default: description: Error response describing why the operation failed. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Microsoft Azure Post Workflowtasks Taskid Approve Approval requestBody: content: application/json: schema: $ref: '#/components/schemas/ApprovalResponseComment' description: The request body of approving an approval request. required: true /workflowtasks/{taskId}/reject-approval: post: tags: - Workflow Tasks description: Reject an approval task. operationId: microsoftAzureRejectapprovaltask x-ms-examples: ApprovalRequest_Reject: $ref: ./examples/RejectApprovalTask.json parameters: - $ref: '#/components/parameters/taskId' - $ref: '#/components/parameters/api-version' responses: '200': description: OK default: description: Error response describing why the operation failed. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Microsoft Azure Post Workflowtasks Taskid Reject Approval requestBody: content: application/json: schema: $ref: '#/components/schemas/ApprovalResponseComment' description: The request body of rejecting an approval request. required: true /workflowtasks/{taskId}/reassign: post: tags: - Workflow Tasks description: Reassign a workflow task. operationId: microsoftAzureReassignworkflowtask x-ms-examples: ApprovalRequest_Reassign: $ref: ./examples/ReassignWorkflowTask.json parameters: - $ref: '#/components/parameters/taskId' - $ref: '#/components/parameters/api-version' responses: '200': description: OK default: description: Error response describing why the operation failed. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Microsoft Azure Post Workflowtasks Taskid Reassign requestBody: content: application/json: schema: $ref: '#/components/schemas/ReassignCommand' description: The request body of reassigning a workflow task. required: true /workflowtasks/{taskId}/change-task-status: post: tags: - Workflow Tasks description: Update the status of a workflow task request. operationId: microsoftAzureUpdatetaskstatus x-ms-examples: TaskRequest_Update: $ref: ./examples/UpdateTaskRequest.json parameters: - $ref: '#/components/parameters/taskId' - $ref: '#/components/parameters/api-version' responses: '200': description: OK default: description: Error response describing why the operation failed. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Microsoft Azure Post Workflowtasks Taskid Change Task Status requestBody: content: application/json: schema: $ref: '#/components/schemas/TaskUpdateCommand' description: Request body of updating workflow task request. required: true components: parameters: workflowIds: name: workflowIds in: query required: false description: Filter items by workflow id list. x-ms-parameter-location: method schema: type: array items: type: string taskId: name: taskId in: path required: true description: The task id. x-ms-parameter-location: method schema: type: string format: uuid workflowNameKeyword: name: workflowNameKeyword in: query required: false description: The key word which could used to filter workflow item with related workflow. x-ms-parameter-location: method schema: type: string taskStatuses: name: taskStatuses in: query required: false description: Filter workflow tasks by status. x-ms-parameter-location: method schema: type: array items: type: string enum: - Pending - Approved - Rejected - Canceled - NotStarted - InProgress - Completed x-ms-enum: name: status modelAsString: true api-version: name: api-version description: Version of Purview APIs in: query required: true x-ms-parameter-location: client schema: type: string taskTypes: name: taskTypes in: query required: false description: Filter items by workflow task type. x-ms-parameter-location: method schema: type: array items: type: string enum: - approval - simpleTask x-ms-enum: name: TaskType modelAsString: true maxpagesize: name: maxpagesize in: query required: false description: The maximum page size to get the items at one time. x-ms-parameter-location: method schema: type: integer format: int32 timeWindow: name: timeWindow in: query required: false x-ms-enum: name: TimeWindow modelAsString: true description: Time window of filtering items. x-ms-parameter-location: method schema: type: string enum: - 1d - 7d - 30d - 90d viewMode: name: viewMode in: query required: false description: To filter user's sent, received or history workflow tasks. x-ms-parameter-location: method schema: type: string items: type: string enum: - sent - received - history x-ms-enum: name: status modelAsString: true schemas: ReassignCommand: type: object description: The request payload of reassigning a workflow task. properties: reassignments: type: array description: The request body of reassigning a workflow task. items: type: object properties: reassignFrom: type: string format: uuid description: Reassign a workflow task from a user or a group. reassignTo: type: string format: uuid description: Reassign a workflow task to a user or a group. required: - reassignFrom - reassignTo ErrorModel: description: Default error model type: object properties: code: description: Gets or sets the code. type: string details: description: Gets or sets the details. uniqueItems: false type: array items: $ref: '#/components/schemas/ErrorModel' x-ms-identifiers: - code message: description: Gets or sets the messages. type: string target: description: Gets or sets the target. type: string required: - code - message WorkflowTask: discriminator: propertyName: type type: object description: An actionable item assigned to assignees. It is created when approval or task action starts to execute. Approval is one kind of task. properties: type: type: string description: The workflow task type. enum: - Approval - SimpleTask x-ms-enum: name: TaskType modelAsString: true id: type: string format: uuid description: The workflow task id. title: type: string description: The workflow task title. workflowRunId: $ref: '#/components/schemas/WorkflowRunId' workflowId: $ref: '#/components/schemas/WorkflowId' requestor: $ref: '#/components/schemas/RequestorId' createdTime: $ref: '#/components/schemas/CreatedTime' lastUpdateTime: $ref: '#/components/schemas/LastUpdateTime' payload: $ref: '#/components/schemas/TaskPayload' reminderInfo: type: object description: Info of task reminder. properties: lastRemindTime: type: string format: date-time description: The last update time. nextRemindTime: type: string format: date-time description: The next remind time. reminderSettings: type: object description: The reminder settings. required: - nextRemindTime - reminderSettings expiryInfo: type: object description: Info of task expiry. properties: lastExpiryNotificationTime: type: string format: date-time description: The last expiry notification time. nextExpiryNotificationTime: type: string format: date-time description: The next expiry notification time. expiryTime: type: string format: date-time description: The expiry time. expirySettings: type: object properties: expireAfter: type: object description: The time of expiry. notifyOnExpiration: type: array items: type: string format: uuid description: Notify user on expiration. required: - expireAfter required: - nextExpiryNotificationTime - expiryTime - expirySettings required: - type - id - workflowRunId - workflowId - requestor - createdTime - lastUpdateTime - payload TaskPayload: type: object description: Info and material that helps assignees to take action. properties: type: $ref: '#/components/schemas/TaskPayloadType' targetValue: type: string description: The target value of entity which user want to involve workflow to update. payload: type: object description: The payload of the task. required: - type - targetValue RequestorId: type: string format: uuid description: The person who submitted the user request. WorkflowRunId: type: string format: uuid description: The workflow run id. WorkflowId: type: string format: uuid description: The workflow id. ErrorResponse: description: Default error response model type: object properties: error: $ref: '#/components/schemas/ErrorModel' required: - error ApprovalResponseComment: type: object properties: comment: type: string description: The comment of approving or rejecting an approval request. CreatedTime: type: string format: date-time description: The created time. TaskUpdateCommand: type: object properties: newStatus: type: string description: The new status will be used to update the task. enum: - NotStarted - InProgress - Completed - Canceled x-ms-enum: name: TaskStatus modelAsString: true comment: type: string description: The comment when update a task. required: - newStatus LastUpdateTime: type: string format: date-time description: The last update time. TaskPayloadType: type: string description: The task payload type. enum: - CreateTerm - UpdateTerm - DeleteTerm - ImportTerms - UpdateAsset - GrantDataAccess x-ms-enum: name: TaskPayloadType modelAsString: true TasksList: type: object properties: value: type: array items: $ref: '#/components/schemas/WorkflowTask' description: The value of workflow tasks list. nextLink: type: string description: The URL to get the next set of results. required: - value securitySchemes: azure_auth: type: oauth2 flows: implicit: scopes: https://purview.azure.net/.default: Default authorization scope. authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize description: Azure Active Directory OAuth2 Flow x-ms-parameterized-host: hostTemplate: '{endpoint}' useSchemePrefix: false parameters: - $ref: '#/components/parameters/endpoint'