From 3bb28b0ebe1c53983172b99c18bc3cb313bdd764 Mon Sep 17 00:00:00 2001 From: jiwang6 <979782932@qq.com> Date: Fri, 20 Jan 2023 07:59:09 +0800 Subject: [PATCH] [Hub Generated] Publish private branch 'jiwang6/workflow-api' (#22241) * Add purview workflow api. * Fix prettier check errors * Fix workflow tag * Fix spell check error * Fix linter error * Fix spell error and remove redundant example * Remove readme.md * Fix linter warning * Add reassign workflow request API * Add nextLink in example file * Fix spell error * Fix example value * fix opertaion id * Fix some issue * Fix reassign task request operationId * Fix azure_auth scope * Re-organize workflow API * Add enum option for some parameters * Fix enum option for some parameters * Rename request type filter * Add description for top level resource schema * Add description for top level resource schema * Add RequestEventPayloadWebRequest multiple sub models * Rename and change the model of some properties * Update workflow swagger * Update workflow swagger for SDK board review * Update workflow app model * Remove list/get/cancel userrequest api * lint error fix * Fix lint error * Fix small swagger issue * fix small swagger issue * Add unknow words * fix small swagger issue * Fix small swagger issue * Fix some properties * Fix swagger Co-authored-by: Jing Wang --- cSpell.json | 10 + .../examples/ApproveApprovalTask.json | 12 + .../examples/CancelWorkflowRun.json | 12 + .../examples/ClaimDSARTaskRequest.json | 12 + .../examples/CreateOrReplaceWorkflow.json | 195 ++ .../examples/DeleteWorkflow.json | 9 + .../examples/GetWorkflow.json | 108 + .../examples/GetWorkflowRun.json | 161 ++ .../examples/GetWorkflowTask.json | 67 + .../examples/ListWorkflowRuns.json | 41 + .../examples/ListWorkflowTasks.json | 177 ++ .../examples/ListWorkflows.json | 43 + .../examples/ReassignWorkflowTask.json | 17 + .../examples/RejectApprovalTask.json | 12 + .../examples/ReleaseDSARTaskRequest.json | 12 + .../examples/SubmitUserRequests.json | 51 + .../examples/UpdateTaskRequest.json | 13 + .../2022-05-01-preview/purviewWorkflow.json | 2077 +++++++++++++++++ specification/purview/data-plane/readme.md | 61 + 19 files changed, 3090 insertions(+) create mode 100644 specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/ApproveApprovalTask.json create mode 100644 specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/CancelWorkflowRun.json create mode 100644 specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/ClaimDSARTaskRequest.json create mode 100644 specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/CreateOrReplaceWorkflow.json create mode 100644 specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/DeleteWorkflow.json create mode 100644 specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/GetWorkflow.json create mode 100644 specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/GetWorkflowRun.json create mode 100644 specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/GetWorkflowTask.json create mode 100644 specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/ListWorkflowRuns.json create mode 100644 specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/ListWorkflowTasks.json create mode 100644 specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/ListWorkflows.json create mode 100644 specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/ReassignWorkflowTask.json create mode 100644 specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/RejectApprovalTask.json create mode 100644 specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/ReleaseDSARTaskRequest.json create mode 100644 specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/SubmitUserRequests.json create mode 100644 specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/UpdateTaskRequest.json create mode 100644 specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/purviewWorkflow.json diff --git a/cSpell.json b/cSpell.json index e6d4d02b4bf4..2c0ef1f09012 100644 --- a/cSpell.json +++ b/cSpell.json @@ -886,6 +886,16 @@ "PrepareTimedout", "CommitTimedout" ] + }, + { + "filename": "**/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/purviewWorkflow.json", + "words": [ + "userrequests", + "DSAR", + "dsar", + "workflowruns", + "workflowtasks" + ] } ], "enableFiletypes": [ diff --git a/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/ApproveApprovalTask.json b/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/ApproveApprovalTask.json new file mode 100644 index 000000000000..276a6cf5a58b --- /dev/null +++ b/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/ApproveApprovalTask.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "api-version": "2022-05-01-preview", + "taskId": "98d98e2c-23fa-4157-a3f8-ff8ce5cc095c", + "approvalResponseComment": { + "comment": "Thanks for raising this!" + } + }, + "responses": { + "200": {} + } +} diff --git a/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/CancelWorkflowRun.json b/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/CancelWorkflowRun.json new file mode 100644 index 000000000000..eb3ea2749742 --- /dev/null +++ b/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/CancelWorkflowRun.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "api-version": "2022-05-01-preview", + "workflowRunId": "b7aaf54b-59c2-4a0e-a7d0-f431044f2198", + "runCancelReply": { + "comment": "Thanks!" + } + }, + "responses": { + "200": {} + } +} diff --git a/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/ClaimDSARTaskRequest.json b/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/ClaimDSARTaskRequest.json new file mode 100644 index 000000000000..ea947a6ee4a8 --- /dev/null +++ b/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/ClaimDSARTaskRequest.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "api-version": "2022-05-01-preview", + "taskId": "d5bd0215-df84-4245-8e18-3a8f012be376", + "dsarTaskClaimCommand": { + "comment": "Thanks!" + } + }, + "responses": { + "200": {} + } +} diff --git a/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/CreateOrReplaceWorkflow.json b/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/CreateOrReplaceWorkflow.json new file mode 100644 index 000000000000..a6a836636b05 --- /dev/null +++ b/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/CreateOrReplaceWorkflow.json @@ -0,0 +1,195 @@ +{ + "parameters": { + "api-version": "2022-05-01-preview", + "workflowId": "4afb5752-e47f-43a1-8ba7-c696bf8d2745", + "workflowCreateOrUpdateCommand": { + "name": "Create glossary term workflow", + "description": "", + "triggers": [ + { + "type": "when_term_creation_is_requested", + "underGlossaryHierarchy": "/glossaries/20031e20-b4df-4a66-a61d-1b0716f3fa48" + } + ], + "isEnabled": true, + "actionDag": { + "actions": { + "Start and wait for an approval": { + "type": "Approval", + "inputs": { + "parameters": { + "approvalType": "PendingOnAll", + "title": "Approval Request for Create Glossary Term", + "assignedTo": [ + "eece94d9-0619-4669-bb8a-d6ecec5220bc" + ] + } + }, + "runAfter": {} + }, + "Condition": { + "type": "If", + "expression": { + "and": [ + { + "equals": [ + "@outputs('Start and wait for an approval')['body/outcome']", + "Approved" + ] + } + ] + }, + "actions": { + "Create glossary term": { + "type": "CreateTerm", + "runAfter": {} + }, + "Send email notification": { + "type": "EmailNotification", + "inputs": { + "parameters": { + "emailSubject": "Glossary Term Create - APPROVED", + "emailMessage": "Your request for Glossary Term @{triggerBody()['request']['term']['name']} is approved.", + "emailRecipients": [ + "@{triggerBody()['request']['requestor']}" + ] + } + }, + "runAfter": { + "Create glossary term": [ + "Succeeded" + ] + } + } + }, + "else": { + "actions": { + "Send reject email notification": { + "type": "EmailNotification", + "inputs": { + "parameters": { + "emailSubject": "Glossary Term Create - REJECTED", + "emailMessage": "Your request for Glossary Term @{triggerBody()['request']['term']['name']} is rejected.", + "emailRecipients": [ + "@{triggerBody()['request']['requestor']}" + ] + } + }, + "runAfter": {} + } + } + }, + "runAfter": { + "Start and wait for an approval": [ + "Succeeded" + ] + } + } + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "179682a4-917d-11ed-a1eb-0242ac120002", + "triggers": [ + { + "type": "when_term_creation_is_requested", + "underGlossaryHierarchy": "/glossaries/20031e20-b4df-4a66-a61d-1b0716f3fa48" + } + ], + "createdTime": "2023-01-11T07:05:22.812901453Z", + "createdBy": "eece94d9-0619-4669-bb8a-d6ecec5220bc", + "lastUpdateTime": "2023-01-11T07:05:22.812901453Z", + "updatedBy": "eece94d9-0619-4669-bb8a-d6ecec5220bc", + "name": "Create glossary term workflow", + "isEnabled": true, + "description": "", + "actionDag": { + "actions": { + "Start and wait for an approval": { + "type": "Approval", + "inputs": { + "parameters": { + "approvalType": "PendingOnAll", + "title": "Approval Request for Create Glossary Term", + "assignedTo": [ + "eece94d9-0619-4669-bb8a-d6ecec5220bc" + ] + } + }, + "runAfter": {} + }, + "Condition": { + "type": "If", + "expression": { + "and": [ + { + "equals": [ + "@outputs('Start and wait for an approval')['body/outcome']", + "Approved" + ] + } + ] + }, + "actions": { + "Create glossary term": { + "type": "CreateTerm", + "runAfter": {} + }, + "Send email notification": { + "type": "EmailNotification", + "inputs": { + "parameters": { + "emailSubject": "Glossary Term Create - APPROVED", + "emailMessage": "Your request for Glossary Term @{triggerBody()['request']['term']['name']} is approved.", + "emailRecipients": [ + "@{triggerBody()['request']['requestor']}" + ] + } + }, + "runAfter": { + "Create glossary term": [ + "Succeeded" + ] + }, + "runtimeConfiguration": { + "secureInput": false, + "secureOutput": false + } + } + }, + "else": { + "actions": { + "Send reject email notification": { + "type": "EmailNotification", + "inputs": { + "parameters": { + "emailSubject": "Glossary Term Create - REJECTED", + "emailMessage": "Your request for Glossary Term @{triggerBody()['request']['term']['name']} is rejected.", + "emailRecipients": [ + "@{triggerBody()['request']['requestor']}" + ] + } + }, + "runAfter": {}, + "runtimeConfiguration": { + "secureInput": false, + "secureOutput": false + } + } + } + }, + "runAfter": { + "Start and wait for an approval": [ + "Succeeded" + ] + } + } + } + } + } + } + } +} diff --git a/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/DeleteWorkflow.json b/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/DeleteWorkflow.json new file mode 100644 index 000000000000..6dd363afdb6d --- /dev/null +++ b/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/DeleteWorkflow.json @@ -0,0 +1,9 @@ +{ + "parameters": { + "api-version": "2022-05-01-preview", + "workflowId": "4afb5752-e47f-43a1-8ba7-c696bf8d2745" + }, + "responses": { + "204": {} + } +} diff --git a/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/GetWorkflow.json b/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/GetWorkflow.json new file mode 100644 index 000000000000..d200758842f8 --- /dev/null +++ b/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/GetWorkflow.json @@ -0,0 +1,108 @@ +{ + "parameters": { + "workflowId": "d503b2d2-84da-4a85-9e85-6e82e39d59a0", + "api-version": "2022-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "773b326e-751c-4277-96a6-c4f522e9750f", + "triggers": [ + { + "type": "when_term_creation_is_requested" + } + ], + "createdTime": "2023-01-11T10:14:45.485999448Z", + "createdBy": "eece94d9-0619-4669-bb8a-d6ecec5220bc", + "lastUpdateTime": "2023-01-11T10:14:45.485999448Z", + "updatedBy": "eece94d9-0619-4669-bb8a-d6ecec5220bc", + "name": "Create glossary term", + "isEnabled": true, + "description": "", + "actionDag": { + "actions": { + "Start and wait for an approval": { + "type": "Approval", + "inputs": { + "parameters": { + "approvalType": "PendingOnAll", + "title": "Approval Request for Create Glossary Term", + "assignedTo": [ + "eece94d9-0619-4669-bb8a-d6ecec5220bc" + ] + } + }, + "runAfter": {} + }, + "Condition": { + "type": "If", + "expression": { + "and": [ + { + "equals": [ + "@outputs('Start and wait for an approval')['body/outcome']", + "Approved" + ] + } + ] + }, + "actions": { + "Create glossary term": { + "type": "CreateTerm", + "runAfter": {} + }, + "Send email notification": { + "type": "EmailNotification", + "inputs": { + "parameters": { + "emailSubject": "Glossary Term Create - APPROVED", + "emailMessage": "Your request for Glossary Term @{triggerBody()['request']['term']['name']} is approved.", + "emailRecipients": [ + "@{triggerBody()['request']['requestor']}" + ] + } + }, + "runAfter": { + "Create glossary term": [ + "Succeeded" + ] + }, + "runtimeConfiguration": { + "secureInput": false, + "secureOutput": false + } + } + }, + "else": { + "actions": { + "Send reject email notification": { + "type": "EmailNotification", + "inputs": { + "parameters": { + "emailSubject": "Glossary Term Create - REJECTED", + "emailMessage": "Your request for Glossary Term @{triggerBody()['request']['term']['name']} is rejected.", + "emailRecipients": [ + "@{triggerBody()['request']['requestor']}" + ] + } + }, + "runAfter": {}, + "runtimeConfiguration": { + "secureInput": false, + "secureOutput": false + } + } + } + }, + "runAfter": { + "Start and wait for an approval": [ + "Succeeded" + ] + } + } + } + } + } + } + } +} diff --git a/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/GetWorkflowRun.json b/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/GetWorkflowRun.json new file mode 100644 index 000000000000..721016ecd24b --- /dev/null +++ b/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/GetWorkflowRun.json @@ -0,0 +1,161 @@ +{ + "parameters": { + "x-ms-client-request-id": "1e903f7e-f127-11ec-8ea0-0242ac120002", + "workflowRunId": "04334a74-3400-11ed-a261-0242ac120002", + "api-version": "2022-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "4f8d70c3-c09b-4e56-bfd1-8b86c79bd4d9", + "workflowId": "3fb9ba13-bf35-4f29-ab63-70b5234923c2", + "startTime": "2023-01-12T09:36:11.533263721Z", + "requestor": "eece94d9-0619-4669-bb8a-d6ecec5220bc", + "runPayload": { + "type": "CreateTerm", + "targetValue": "term123", + "payload": { + "glossaryTerm": { + "name": "term123", + "anchor": { + "glossaryGuid": "20031e20-b4df-4a66-a61d-1b0716f3fa48" + }, + "status": "Approved", + "nickName": "term123", + "attributes": {} + } + } + }, + "status": "InProgress", + "actionDag": { + "actions": { + "Start and wait for an approval": { + "type": "Approval", + "inputs": { + "parameters": { + "approvalType": "PendingOnAll", + "title": "Approval Request for Create Glossary Term", + "assignedTo": [ + "eece94d9-0619-4669-bb8a-d6ecec5220bc" + ], + "reminderSettings": { + "interval": "1 day" + }, + "expirySettings": { + "expireAfter": "1 month", + "notifyOnExpiration": [] + } + } + }, + "runAfter": {} + }, + "Condition": { + "type": "If", + "expression": { + "and": [ + { + "equals": [ + "@outputs('Start and wait for an approval')['body/outcome']", + "Approved" + ] + } + ] + }, + "actions": { + "Create glossary term": { + "type": "CreateTerm", + "runAfter": {} + }, + "Send email notification": { + "type": "EmailNotification", + "inputs": { + "parameters": { + "emailSubject": "Glossary Term Create - APPROVED", + "emailMessage": "Your request for Glossary Term @{triggerBody()['request']['term']['name']} is approved.", + "emailRecipients": [ + "@{triggerBody()['request']['requestor']}" + ] + } + }, + "runAfter": { + "Create glossary term": [ + "Succeeded" + ] + }, + "runtimeConfiguration": { + "secureInput": false, + "secureOutput": false + } + } + }, + "else": { + "actions": { + "Send reject email notification": { + "type": "EmailNotification", + "inputs": { + "parameters": { + "emailSubject": "Glossary Term Create - REJECTED", + "emailMessage": "Your request for Glossary Term @{triggerBody()['request']['term']['name']} is rejected.", + "emailRecipients": [ + "@{triggerBody()['request']['requestor']}" + ] + } + }, + "runAfter": {}, + "runtimeConfiguration": { + "secureInput": false, + "secureOutput": false + } + } + } + }, + "runAfter": { + "Start and wait for an approval": [ + "Succeeded" + ] + } + } + } + }, + "detail": { + "runInput": { + "request": { + "requestor": "eece94d9-0619-4669-bb8a-d6ecec5220bc", + "term": { + "name": "term123", + "formalName": "term123", + "definition": null, + "experts": [], + "stewards": [], + "parent": null + } + } + }, + "actions": { + "Start and wait for an approval": { + "startTime": "2023-01-12T09:36:12.347229300Z", + "status": "Running", + "input": { + "type": "inlined", + "parameters": { + "approvalType": "PendingOnAll", + "title": "Approval Request for Create Glossary Term", + "assignedTo": [ + "eece94d9-0619-4669-bb8a-d6ecec5220bc" + ], + "reminderSettings": { + "interval": "1 day" + }, + "expirySettings": { + "expireAfter": "1 month", + "notifyOnExpiration": [] + } + } + } + } + } + } + } + } + } +} diff --git a/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/GetWorkflowTask.json b/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/GetWorkflowTask.json new file mode 100644 index 000000000000..72b245098d94 --- /dev/null +++ b/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/GetWorkflowTask.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "api-version": "2022-05-01-preview", + "taskId": "98d98e2c-23fa-4157-a3f8-ff8ce5cc095c" + }, + "responses": { + "200": { + "body": { + "type": "Approval", + "id": "54b7ccdb-0b09-427e-8105-61a8dd4b1309", + "workflowRunId": "2245c5e1-63d0-436a-b1c0-8252f03f0e17", + "workflowId": "3fb9ba13-bf35-4f29-ab63-70b5234923c2", + "requestor": "eece94d9-0619-4669-bb8a-d6ecec5220bc", + "createdTime": "2023-01-13T09:57:59.878107314Z", + "lastUpdateTime": "2023-01-13T09:58:08.034872193Z", + "payload": { + "type": "CreateTerm", + "targetValue": "term", + "payload": { + "glossaryTerm": { + "name": "term", + "anchor": { + "glossaryGuid": "20031e20-b4df-4a66-a61d-1b0716f3fa48" + }, + "status": "Approved", + "nickName": "term", + "attributes": {} + } + } + }, + "title": "Approval Request for Create Glossary Term", + "reminderInfo": { + "lastRemindTime": "2023-01-16T09:57:59.878107314Z", + "nextRemindTime": "2023-01-18T09:57:59.878107314Z", + "reminderSettings": { + "reminderFrequency": { + "Day": { + "number": 1 + } + } + } + }, + "expiryInfo": { + "nextExpiryNotificationTime": "2023-02-12T09:57:59.878107314Z", + "expiryTime": "2023-02-12T09:57:59.878107314Z", + "expirySettings": { + "expireAfter": { + "Month": { + "number": 1 + } + }, + "notifyOnExpiration": [] + } + }, + "approvalDetail": { + "approvalType": "PendingOnAll", + "status": "Pending", + "approvers": { + "eece94d9-0619-4669-bb8a-d6ecec5220bc": { + "reply": "pending" + } + } + } + } + } + } +} diff --git a/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/ListWorkflowRuns.json b/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/ListWorkflowRuns.json new file mode 100644 index 000000000000..7b4b0c1242b1 --- /dev/null +++ b/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/ListWorkflowRuns.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2022-05-01-preview", + "timeWindow": "30d", + "orderby": "startTime desc", + "runStatues": "InProgress", + "maxpagesize": 1000 + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "4f8d70c3-c09b-4e56-bfd1-8b86c79bd4d9", + "workflowId": "3fb9ba13-bf35-4f29-ab63-70b5234923c2", + "startTime": "2023-01-12T09:36:11.533263721Z", + "requestor": "eece94d9-0619-4669-bb8a-d6ecec5220bc", + "userRequestId": "4f8d70c3-c09b-4e56-bfd1-8b86c79bd4d9", + "runPayload": { + "type": "CreateTerm", + "targetValue": "term123" + }, + "status": "InProgress" + }, + { + "id": "5a5b35c1-a430-4397-a4e2-d75ac23be8df", + "workflowId": "8af1ecae-16ee-4b2d-8972-00d611dd2f99", + "startTime": "2023-01-11T10:22:58.512569863Z", + "requestor": "eece94d9-0619-4669-bb8a-d6ecec5220bc", + "userRequestId": "5a5b35c1-a430-4397-a4e2-d75ac23be8df", + "runPayload": { + "type": "DeleteTerm", + "targetValue": "sample-term" + }, + "status": "InProgress" + } + ] + } + } + } +} diff --git a/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/ListWorkflowTasks.json b/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/ListWorkflowTasks.json new file mode 100644 index 000000000000..c9c8f144bcba --- /dev/null +++ b/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/ListWorkflowTasks.json @@ -0,0 +1,177 @@ +{ + "parameters": { + "api-version": "2022-05-01-preview", + "viewMode": "sent", + "timeWindow": "30d", + "maxpagesize": 1000, + "orderby": "createdTime desc" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "type": "Approval", + "id": "3aec5deb-b819-499c-afe0-b742255c0577", + "workflowRunId": "26026374-f2f6-4627-b2f4-ba2db93c7e2c", + "workflowId": "3fb9ba13-bf35-4f29-ab63-70b5234923c2", + "requestor": "eece94d9-0619-4669-bb8a-d6ecec5220bc", + "createdTime": "2023-01-18T06:53:15.205196688Z", + "lastUpdateTime": "2023-01-18T06:53:23.159652782Z", + "payload": { + "type": "CreateTerm", + "targetValue": "term" + }, + "title": "Approval Request for Create Glossary Term", + "reminderInfo": { + "nextRemindTime": "2023-01-19T06:53:15.205196688Z", + "reminderSettings": { + "reminderFrequency": { + "Day": { + "number": 1 + } + } + } + }, + "expiryInfo": { + "nextExpiryNotificationTime": "2023-02-17T06:53:15.205196688Z", + "expiryTime": "2023-02-17T06:53:15.205196688Z", + "expirySettings": { + "expireAfter": { + "Month": { + "number": 1 + } + }, + "notifyOnExpiration": [] + } + }, + "approvalDetail": { + "approvalType": "PendingOnAll", + "status": "Pending", + "approvers": { + "eece94d9-0619-4669-bb8a-d6ecec5220bc": { + "reply": "pending" + } + } + } + }, + { + "type": "Approval", + "id": "54b7ccdb-0b09-427e-8105-61a8dd4b1309", + "workflowRunId": "2245c5e1-63d0-436a-b1c0-8252f03f0e17", + "workflowId": "3fb9ba13-bf35-4f29-ab63-70b5234923c2", + "requestor": "eece94d9-0619-4669-bb8a-d6ecec5220bc", + "createdTime": "2023-01-13T09:57:59.878107314Z", + "lastUpdateTime": "2023-01-13T09:58:08.034872193Z", + "payload": { + "type": "CreateTerm", + "targetValue": "term" + }, + "title": "Approval Request for Create Glossary Term", + "reminderInfo": { + "lastRemindTime": "2023-01-16T09:57:59.878107314Z", + "nextRemindTime": "2023-01-18T09:57:59.878107314Z", + "reminderSettings": { + "reminderFrequency": { + "Day": { + "number": 1 + } + } + } + }, + "expiryInfo": { + "nextExpiryNotificationTime": "2023-02-12T09:57:59.878107314Z", + "expiryTime": "2023-02-12T09:57:59.878107314Z", + "expirySettings": { + "expireAfter": { + "Month": { + "number": 1 + } + }, + "notifyOnExpiration": [] + } + }, + "approvalDetail": { + "approvalType": "PendingOnAll", + "status": "Pending", + "approvers": { + "eece94d9-0619-4669-bb8a-d6ecec5220bc": { + "reply": "pending" + } + } + } + }, + { + "type": "Approval", + "id": "1f4fda4b-95fe-4998-ac69-a65e266f5a51", + "workflowRunId": "4f8d70c3-c09b-4e56-bfd1-8b86c79bd4d9", + "workflowId": "3fb9ba13-bf35-4f29-ab63-70b5234923c2", + "requestor": "eece94d9-0619-4669-bb8a-d6ecec5220bc", + "createdTime": "2023-01-12T09:36:12.658595067Z", + "lastUpdateTime": "2023-01-12T09:36:51.501074235Z", + "payload": { + "type": "CreateTerm", + "targetValue": "term123" + }, + "title": "Approval Request for Create Glossary Term", + "reminderInfo": { + "lastRemindTime": "2023-01-17T09:36:12.658595067Z", + "nextRemindTime": "2023-01-19T09:36:12.658595067Z", + "reminderSettings": { + "reminderFrequency": { + "Day": { + "number": 1 + } + } + } + }, + "expiryInfo": { + "nextExpiryNotificationTime": "2023-02-11T09:36:12.658595067Z", + "expiryTime": "2023-02-11T09:36:12.658595067Z", + "expirySettings": { + "expireAfter": { + "Month": { + "number": 1 + } + }, + "notifyOnExpiration": [] + } + }, + "approvalDetail": { + "approvalType": "PendingOnAll", + "status": "Pending", + "approvers": { + "eece94d9-0619-4669-bb8a-d6ecec5220bc": { + "reply": "pending" + } + } + } + }, + { + "type": "Approval", + "id": "b129fe16-72d3-4994-9135-b997b9be46e0", + "workflowRunId": "5a5b35c1-a430-4397-a4e2-d75ac23be8df", + "workflowId": "8af1ecae-16ee-4b2d-8972-00d611dd2f99", + "requestor": "eece94d9-0619-4669-bb8a-d6ecec5220bc", + "createdTime": "2023-01-11T10:23:00.045459338Z", + "lastUpdateTime": "2023-01-11T10:23:08.042872508Z", + "payload": { + "type": "DeleteTerm", + "targetValue": "sample-term" + }, + "title": "Approval Request for Delete Glossary Term", + "approvalDetail": { + "approvalType": "PendingOnAll", + "status": "Pending", + "approvers": { + "eece94d9-0619-4669-bb8a-d6ecec5220bc": { + "reply": "pending" + } + } + } + } + ] + } + } + } +} diff --git a/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/ListWorkflows.json b/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/ListWorkflows.json new file mode 100644 index 000000000000..135efba8734e --- /dev/null +++ b/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/ListWorkflows.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "api-version": "2022-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "773b326e-751c-4277-96a6-c4f522e9750f", + "triggers": [ + { + "type": "when_term_creation_is_requested" + } + ], + "createdTime": "2023-01-11T10:14:45.485999448Z", + "createdBy": "eece94d9-0619-4669-bb8a-d6ecec5220bc", + "lastUpdateTime": "2023-01-11T10:14:45.485999448Z", + "updatedBy": "eece94d9-0619-4669-bb8a-d6ecec5220bc", + "name": "Create glossary term", + "isEnabled": true, + "description": "" + }, + { + "id": "8af1ecae-16ee-4b2d-8972-00d611dd2f99", + "triggers": [ + { + "type": "when_term_deletion_is_requested" + } + ], + "createdTime": "2023-01-11T10:15:43.610476536Z", + "createdBy": "eece94d9-0619-4669-bb8a-d6ecec5220bc", + "lastUpdateTime": "2023-01-11T10:15:43.610476536Z", + "updatedBy": "eece94d9-0619-4669-bb8a-d6ecec5220bc", + "name": "Delete glossary term", + "isEnabled": true, + "description": "" + } + ] + } + } + } +} diff --git a/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/ReassignWorkflowTask.json b/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/ReassignWorkflowTask.json new file mode 100644 index 000000000000..17e79ba0ad28 --- /dev/null +++ b/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/ReassignWorkflowTask.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "api-version": "2022-05-01-preview", + "taskId": "11b0244b-70ea-4c6b-9d28-08f52de40f2f", + "reassignCommand": { + "reassignments": [ + { + "reassignFrom": "eece94d9-0619-4669-bb8a-d6ecec5220bc", + "reassignTo": "7645223c-cdca-43e9-98c8-bd4d97e79e5e" + } + ] + } + }, + "responses": { + "200": {} + } +} diff --git a/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/RejectApprovalTask.json b/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/RejectApprovalTask.json new file mode 100644 index 000000000000..276a6cf5a58b --- /dev/null +++ b/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/RejectApprovalTask.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "api-version": "2022-05-01-preview", + "taskId": "98d98e2c-23fa-4157-a3f8-ff8ce5cc095c", + "approvalResponseComment": { + "comment": "Thanks for raising this!" + } + }, + "responses": { + "200": {} + } +} diff --git a/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/ReleaseDSARTaskRequest.json b/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/ReleaseDSARTaskRequest.json new file mode 100644 index 000000000000..75739750032b --- /dev/null +++ b/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/ReleaseDSARTaskRequest.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "api-version": "2022-05-01-preview", + "taskId": "5cc7992a-7f5e-11ed-a1eb-0242ac120002", + "dsarTaskReleaseCommand": { + "comment": "Thanks!" + } + }, + "responses": { + "200": {} + } +} diff --git a/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/SubmitUserRequests.json b/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/SubmitUserRequests.json new file mode 100644 index 000000000000..4caeab8fc2e4 --- /dev/null +++ b/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/SubmitUserRequests.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "api-version": "2022-05-01-preview", + "userRequestsPayload": { + "operations": [ + { + "type": "CreateTerm", + "payload": { + "glossaryTerm": { + "name": "term", + "anchor": { + "glossaryGuid": "20031e20-b4df-4a66-a61d-1b0716f3fa48" + }, + "status": "Approved", + "nickName": "term" + } + } + } + ], + "comment": "Thanks!" + } + }, + "responses": { + "200": { + "body": { + "requestId": "26026374-f2f6-4627-b2f4-ba2db93c7e2c", + "requestor": "eece94d9-0619-4669-bb8a-d6ecec5220bc", + "operations": [ + { + "type": "CreateTerm", + "payload": { + "glossaryTerm": { + "name": "term", + "anchor": { + "glossaryGuid": "20031e20-b4df-4a66-a61d-1b0716f3fa48" + }, + "status": "Approved", + "nickName": "term" + } + }, + "workflowRunIds": [ + "26026374-f2f6-4627-b2f4-ba2db93c7e2c" + ] + } + ], + "comment": "Thanks!", + "status": "InProgress" + } + } + } +} diff --git a/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/UpdateTaskRequest.json b/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/UpdateTaskRequest.json new file mode 100644 index 000000000000..febed1307656 --- /dev/null +++ b/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/examples/UpdateTaskRequest.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "api-version": "2022-05-01-preview", + "taskId": "d5bd0215-df84-4245-8e18-3a8f012be376", + "taskUpdateCommand": { + "newStatus": "In Progress", + "comment": "Thanks!" + } + }, + "responses": { + "200": {} + } +} diff --git a/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/purviewWorkflow.json b/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/purviewWorkflow.json new file mode 100644 index 000000000000..a1076221aea6 --- /dev/null +++ b/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/purviewWorkflow.json @@ -0,0 +1,2077 @@ +{ + "swagger": "2.0", + "info": { + "title": "Purview Workflow Service", + "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." + }, + "host": "purview.azure.com", + "x-ms-parameterized-host": { + "hostTemplate": "{endpoint}", + "useSchemePrefix": false, + "parameters": [ + { + "$ref": "#/parameters/endpoint" + } + ] + }, + "basePath": "/workflow", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "https://purview.azure.net/.default": "Default authorization scope." + } + } + }, + "security": [ + { + "azure_auth": [ + "https://purview.azure.net/.default" + ] + } + ], + "paths": { + "/workflows": { + "get": { + "tags": [ + "Workflows" + ], + "description": "List all workflows.", + "operationId": "ListWorkflows", + "x-ms-examples": { + "Workflows_List": { + "$ref": "./examples/ListWorkflows.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "parameters": [ + { + "$ref": "#/parameters/api-version" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/WorkflowMetadataList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/workflows/{workflowId}": { + "get": { + "tags": [ + "Workflows" + ], + "description": "Get a specific workflow.", + "operationId": "GetWorkflow", + "x-ms-examples": { + "Workflow_Get": { + "$ref": "./examples/GetWorkflow.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/workflowId" + }, + { + "$ref": "#/parameters/api-version" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Workflow" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "tags": [ + "Workflows" + ], + "description": "Create or replace a workflow.", + "operationId": "CreateOrReplaceWorkflow", + "x-ms-examples": { + "Workflow_CreateOrUpdate": { + "$ref": "./examples/CreateOrReplaceWorkflow.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/workflowId" + }, + { + "name": "workflowCreateOrUpdateCommand", + "in": "body", + "required": true, + "description": "Create or update workflow payload.", + "schema": { + "$ref": "#/definitions/WorkflowCreateOrUpdateCommand" + } + }, + { + "$ref": "#/parameters/api-version" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Workflow" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "tags": [ + "Workflows" + ], + "description": "Delete a workflow.", + "operationId": "DeleteWorkflow", + "x-ms-examples": { + "Workflow_Delete": { + "$ref": "./examples/DeleteWorkflow.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/workflowId" + }, + { + "$ref": "#/parameters/api-version" + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/userrequests": { + "post": { + "tags": [ + "UserRequests" + ], + "description": "Submit a user request for requestor, a user request describes user ask to do operation(s) on Purview. If any workflow's trigger matches with an operation in request, a run of the workflow is created.", + "operationId": "SubmitUserRequests", + "x-ms-examples": { + "UserRequests_Submit": { + "$ref": "./examples/SubmitUserRequests.json" + } + }, + "parameters": [ + { + "name": "userRequestsPayload", + "in": "body", + "required": true, + "description": "The payload of submitting a user request.", + "schema": { + "$ref": "#/definitions/UserRequestPayload" + } + }, + { + "$ref": "#/parameters/api-version" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/UserRequestResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/workflowruns": { + "get": { + "tags": [ + "WorkflowRuns" + ], + "description": "List workflow runs.", + "operationId": "ListWorkflowRuns", + "x-ms-examples": { + "WorkflowRuns_List": { + "$ref": "./examples/ListWorkflowRuns.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "parameters": [ + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/timeWindow" + }, + { + "name": "orderby", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "status desc", + "status asc", + "requestor desc", + "requestor asc", + "startTime desc", + "startTime asc" + ], + "x-ms-enum": { + "name": "orderby", + "modelAsString": true + }, + "description": "The key word which used to sort the results.", + "x-ms-parameter-location": "method" + }, + { + "$ref": "#/parameters/runStatuses" + }, + { + "$ref": "#/parameters/userRequestIds" + }, + { + "$ref": "#/parameters/workflowIds" + }, + { + "$ref": "#/parameters/maxpagesize" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/WorkflowRunList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/workflowruns/{workflowRunId}": { + "get": { + "tags": [ + "WorkflowRuns" + ], + "description": "Get a workflow run.", + "operationId": "GetWorkflowRun", + "x-ms-examples": { + "WorkflowRun_Get": { + "$ref": "./examples/GetWorkflowRun.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/workflowRunId" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/WorkflowRun" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/workflowruns/{workflowRunId}/cancel": { + "post": { + "tags": [ + "WorkflowRuns" + ], + "description": "Cancel a workflow run.", + "operationId": "CancelWorkflowRun", + "x-ms-examples": { + "WorkflowRun_Cancel": { + "$ref": "./examples/CancelWorkflowRun.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/workflowRunId" + }, + { + "name": "runCancelReply", + "in": "body", + "required": true, + "description": "Reply of canceling a workflow run.", + "schema": { + "$ref": "#/definitions/WorkflowRunCancelRequest" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/workflowtasks": { + "get": { + "tags": [ + "WorkflowTasks" + ], + "description": "Get all workflow tasks.", + "operationId": "ListWorkflowTasks", + "x-ms-examples": { + "WorkflowTasks_List": { + "$ref": "./examples/ListWorkflowTasks.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "parameters": [ + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/viewMode" + }, + { + "$ref": "#/parameters/workflowIds" + }, + { + "$ref": "#/parameters/timeWindow" + }, + { + "$ref": "#/parameters/maxpagesize" + }, + { + "name": "orderby", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "createdTime desc", + "createdTime asc" + ], + "x-ms-enum": { + "name": "orderby", + "modelAsString": true + }, + "description": "The key word which used to sort the results.", + "x-ms-parameter-location": "method" + }, + { + "$ref": "#/parameters/taskTypes" + }, + { + "$ref": "#/parameters/taskStatuses" + }, + { + "$ref": "#/parameters/workflowNameKeyword" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/TasksList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/workflowtasks/{taskId}": { + "get": { + "tags": [ + "WorkflowTasks" + ], + "description": "Get a workflow task.", + "operationId": "GetWorkflowTask", + "x-ms-examples": { + "WorkTask_Get": { + "$ref": "./examples/GetWorkflowTask.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/taskId" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/WorkflowTask" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/workflowtasks/{taskId}/approve-approval": { + "post": { + "tags": [ + "WorkflowTasks" + ], + "description": "Approve an approval task.", + "operationId": "ApproveApprovalTask", + "x-ms-examples": { + "ApprovalTask_Approve": { + "$ref": "./examples/ApproveApprovalTask.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/taskId" + }, + { + "$ref": "#/parameters/api-version" + }, + { + "name": "approvalResponseComment", + "in": "body", + "required": true, + "description": "The request body of approving an approval request.", + "schema": { + "$ref": "#/definitions/ApprovalResponseComment" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/workflowtasks/{taskId}/reject-approval": { + "post": { + "tags": [ + "WorkflowTasks" + ], + "description": "Reject an approval task.", + "operationId": "RejectApprovalTask", + "x-ms-examples": { + "ApprovalRequest_Reject": { + "$ref": "./examples/RejectApprovalTask.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/taskId" + }, + { + "$ref": "#/parameters/api-version" + }, + { + "name": "approvalResponseComment", + "in": "body", + "required": true, + "description": "The request body of rejecting an approval request.", + "schema": { + "$ref": "#/definitions/ApprovalResponseComment" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/workflowtasks/{taskId}/reassign": { + "post": { + "tags": [ + "WorkflowTasks" + ], + "description": "Reassign a workflow task.", + "operationId": "ReassignWorkflowTask", + "x-ms-examples": { + "ApprovalRequest_Reassign": { + "$ref": "./examples/ReassignWorkflowTask.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/taskId" + }, + { + "$ref": "#/parameters/api-version" + }, + { + "name": "reassignCommand", + "in": "body", + "required": true, + "description": "The request body of reassigning a workflow task.", + "schema": { + "$ref": "#/definitions/ReassignCommand" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/workflowtasks/{taskId}/change-task-status": { + "post": { + "tags": [ + "WorkflowTasks" + ], + "description": "Update the status of a workflow task request.", + "operationId": "UpdateTaskRequest", + "x-ms-examples": { + "TaskRequest_Update": { + "$ref": "./examples/UpdateTaskRequest.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/taskId" + }, + { + "name": "taskUpdateCommand", + "in": "body", + "required": true, + "description": "Request body of updating workflow task request.", + "schema": { + "$ref": "#/definitions/TaskUpdateCommand" + } + }, + { + "$ref": "#/parameters/api-version" + } + ], + "responses": { + "200": { + "description": "OK" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/workflowtasks/{taskId}/claim-task": { + "post": { + "tags": [ + "WorkflowTasks" + ], + "description": "Claim a DSAR task request.", + "operationId": "ClaimDSARTaskRequest", + "x-ms-examples": { + "DSARTaskRequest_Claim": { + "$ref": "./examples/ClaimDSARTaskRequest.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/taskId" + }, + { + "name": "dsarTaskClaimCommand", + "in": "body", + "required": true, + "description": "Request body of claiming DSAR task request.", + "schema": { + "$ref": "#/definitions/DSARTaskClaimCommand" + } + }, + { + "$ref": "#/parameters/api-version" + } + ], + "responses": { + "200": { + "description": "OK" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/workflowtasks/{taskId}/release-task": { + "post": { + "tags": [ + "WorkflowTasks" + ], + "description": "Release a DSAR task request.", + "operationId": "ReleaseDSARTaskRequest", + "x-ms-examples": { + "DSARTaskRequest_Release": { + "$ref": "./examples/ReleaseDSARTaskRequest.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/taskId" + }, + { + "name": "dsarTaskReleaseCommand", + "in": "body", + "required": true, + "description": "Request body of releasing DSAR task request.", + "schema": { + "$ref": "#/definitions/DSARTaskReleaseCommand" + } + }, + { + "$ref": "#/parameters/api-version" + } + ], + "responses": { + "200": { + "description": "OK" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": { + "WorkflowMetadataList": { + "type": "object", + "description": "The workflow list.", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/WorkflowMetadata" + }, + "description": "The value of workflow list." + }, + "nextLink": { + "type": "string", + "description": "The URL to get the next set of results." + } + }, + "required": [ + "value" + ] + }, + "WorkflowMetadata": { + "description": "The workflow metadata, action DAGs are not included.", + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "The id of workflow." + }, + "triggers": { + "$ref": "#/definitions/Triggers" + }, + "createdTime": { + "type": "string", + "format": "date-time", + "description": "The created time of workflow." + }, + "createdBy": { + "type": "string", + "description": "The person who created the workflow." + }, + "lastUpdateTime": { + "type": "string", + "format": "date-time", + "description": "The last update time." + }, + "updatedBy": { + "type": "string", + "description": "The person who updated the workflow." + }, + "name": { + "type": "string", + "description": "The name of a workflow." + }, + "isEnabled": { + "type": "boolean", + "description": "Whether the workflow is enabled or not." + }, + "description": { + "type": "string", + "description": "Description of a workflow." + } + }, + "required": [ + "id", + "triggers", + "createdTime", + "createdBy", + "lastUpdateTime", + "updatedBy", + "name", + "isEnabled", + "description" + ] + }, + "Triggers": { + "type": "array", + "description": "It describes under what condition a workflow will run. ", + "items": { + "$ref": "#/definitions/Trigger" + } + }, + "Trigger": { + "type": "object", + "description": "Describes under what condition a workflow will run.", + "properties": { + "type": { + "type": "string", + "enum": [ + "when_term_creation_is_requested", + "when_term_deletion_is_requested", + "when_term_update_is_requested", + "when_terms_import_is_requested", + "when_data_access_grant_is_requested", + "when_asset_update_is_requested", + "when_dsar_deletion_is_requested", + "when_dsar_export_is_requested" + ], + "x-ms-enum": { + "name": "TriggerType", + "modelAsString": true + } + }, + "underGlossaryHierarchy": { + "type": "string", + "description": "Glossary term hierarchy path." + }, + "underCollection": { + "type": "string", + "description": "The collection name." + }, + "underGlossary": { + "type": "string", + "description": "The glossary guid." + } + }, + "required": [ + "type" + ] + }, + "WorkflowCreateOrUpdateCommand": { + "type": "object", + "description": "Create or update workflow payload.", + "properties": { + "triggers": { + "$ref": "#/definitions/Triggers" + }, + "name": { + "type": "string", + "description": "The workflow name." + }, + "isEnabled": { + "type": "boolean", + "description": "Whether the workflow enabled or not." + }, + "description": { + "type": "string", + "description": "Description of a workflow." + }, + "actionDag": { + "type": "object", + "description": "The action DAG(Directed Acyclic Graph), it defines actual flow." + } + }, + "required": [ + "triggers", + "name", + "isEnabled", + "description" + ] + }, + "Workflow": { + "description": "The workflow properties. It includes the triggers, actual flow and other properties of a workflow.", + "allOf": [ + { + "$ref": "#/definitions/WorkflowMetadata" + }, + { + "type": "object", + "properties": { + "actionDag": { + "type": "object", + "description": "The action DAG(Directed Acyclic Graph), it defines steps to be executed in a workflow run and their order." + } + }, + "required": [ + "actionDag" + ] + } + ] + }, + "UserRequestPayload": { + "type": "object", + "properties": { + "operations": { + "type": "array", + "description": "The list of operations user want to submit, each operation matches one Purview API call and will do the operation directly.", + "items": { + "$ref": "#/definitions/Operation" + } + }, + "comment": { + "type": "string", + "description": "The comment when submit a user request." + } + }, + "required": [ + "operations" + ] + }, + "Operation": { + "type": "object", + "description": "The operation user wants to perform.", + "properties": { + "type": { + "$ref": "#/definitions/OperationType" + }, + "payload": { + "type": "object", + "description": "The payload of each operation which user want to submit." + } + }, + "required": [ + "type", + "payload" + ] + }, + "UserRequestResponse": { + "description": "Describes user ask to do operation(s) on Purview.", + "type": "object", + "properties": { + "requestId": { + "type": "string", + "format": "uuid", + "description": "The user request id." + }, + "requestor": { + "$ref": "#/definitions/RequestorId" + }, + "operations": { + "type": "array", + "description": "The list of operations user want to submit, each operation matches one Purview API call and will do the operation directly.", + "items": { + "type": "object", + "description": "The operation user wants to perform.", + "properties": { + "type": { + "$ref": "#/definitions/OperationType" + }, + "payload": { + "type": "object", + "description": "The payload of each operation which user want to submit." + }, + "workflowRunIds": { + "type": "array", + "items": { + "$ref": "#/definitions/WorkflowRunId" + } + } + }, + "required": [ + "type", + "payload" + ] + } + }, + "comment": { + "type": "string", + "description": "The comment when submit a user request." + }, + "status": { + "$ref": "#/definitions/Status" + } + }, + "required": [ + "requestId", + "requestor", + "operations", + "status" + ] + }, + "Status": { + "type": "string", + "description": "The status.", + "enum": [ + "NotStarted", + "InProgress", + "Failed", + "Completed", + "Canceling", + "CancellationFailed", + "Canceled" + ], + "x-ms-enum": { + "name": "UserRequestStatus", + "modelAsString": true + } + }, + "WorkflowRunId": { + "type": "string", + "format": "uuid", + "description": "The workflow run id." + }, + "WorkflowId": { + "type": "string", + "format": "uuid", + "description": "The workflow id." + }, + "RequestorId": { + "type": "string", + "format": "uuid", + "description": "The person who submitted the user request." + }, + "WorkflowRunList": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/WorkflowRunMetadata" + }, + "description": "The value of workflow run list." + }, + "nextLink": { + "type": "string", + "description": "The URL to get the next set of results." + } + }, + "required": [ + "value" + ] + }, + "WorkflowRunMetadata": { + "description": "The execution of a workflow. It includes status of the entire run and other properties of a run. ", + "type": "object", + "properties": { + "id": { + "$ref": "#/definitions/WorkflowRunId" + }, + "workflowId": { + "$ref": "#/definitions/WorkflowId" + }, + "startTime": { + "type": "string", + "description": "Workflow run start time.", + "format": "date-time" + }, + "requestor": { + "$ref": "#/definitions/RequestorId" + }, + "userRequestId": { + "type": "string", + "format": "uuid", + "description": "The user request id." + }, + "runPayload": { + "$ref": "#/definitions/WorkflowRunPayload" + }, + "status": { + "$ref": "#/definitions/Status" + }, + "endTime": { + "type": "string", + "format": "date-time", + "description": "The time of workflow run completed." + }, + "cancelTime": { + "type": "string", + "format": "date-time", + "description": "The time of workflow run be canceled." + }, + "cancelComment": { + "type": "string", + "description": "The comment when cancel a workflow run." + } + }, + "required": [ + "id", + "workflowId", + "startTime", + "requestor", + "runPayload", + "status" + ] + }, + "WorkflowRunPayload": { + "type": "object", + "description": "The input of a workflow run. Align with operation in user request. ", + "properties": { + "type": { + "$ref": "#/definitions/WorkflowRunPayloadType" + }, + "targetValue": { + "type": "string", + "description": "The target value which need involve workflow to update." + } + }, + "required": [ + "type", + "targetValue" + ] + }, + "WorkflowRunPayloadType": { + "type": "string", + "description": "The workflow run payload type.", + "enum": [ + "CreateTerm", + "UpdateTerm", + "DeleteTerm", + "ImportTerms", + "UpdateAsset", + "GrantDataAccess", + "DSARDelete", + "DSARExport" + ], + "x-ms-enum": { + "name": "WorkflowRunPayloadType", + "modelAsString": true + } + }, + "WorkflowRun": { + "description": "The execution of a workflow. It includes workflow action DAG at run time (action DAG snapshot), run payload, status of the entire run and other properties of a run. ", + "type": "object", + "properties": { + "id": { + "$ref": "#/definitions/WorkflowRunId" + }, + "workflowId": { + "$ref": "#/definitions/WorkflowId" + }, + "startTime": { + "type": "string", + "description": "Workflow run start time.", + "format": "date-time" + }, + "requestor": { + "$ref": "#/definitions/RequestorId" + }, + "userRequestId": { + "type": "string", + "format": "uuid", + "description": "The user request id." + }, + "runPayload": { + "type": "object", + "description": "The input of a workflow run. Align with operation in user request. ", + "properties": { + "type": { + "$ref": "#/definitions/WorkflowRunPayloadType" + }, + "targetValue": { + "type": "string", + "description": "The target value which need involve workflow to update." + }, + "payload": { + "type": "object", + "description": "The payload of each operation which user want to submit." + } + }, + "required": [ + "type", + "targetValue", + "payload" + ] + }, + "status": { + "$ref": "#/definitions/Status" + }, + "endTime": { + "type": "string", + "format": "date-time", + "description": "The time of workflow run completed." + }, + "cancelTime": { + "type": "string", + "format": "date-time", + "description": "The time of workflow run be canceled." + }, + "cancelComment": { + "type": "string", + "description": "The comment when cancel a workflow run." + }, + "actionDag": { + "type": "object", + "description": "The action DAG(Directed Acyclic Graph), it defines actual flow." + }, + "detail": { + "$ref": "#/definitions/WorkflowRunDetail" + } + }, + "required": [ + "actionDag", + "detail" + ] + }, + "WorkflowRunDetail": { + "type": "object", + "description": "It refers to the \"detail\" property of a workflow run object, which contains run context and runtime information of actions.", + "properties": { + "runInput": { + "description": "Built-in variables starts with @runInput. Its properties are determined by trigger type at workflow run time. ", + "type": "object" + }, + "actions": { + "type": "object" + } + }, + "required": [ + "runInput", + "actions" + ] + }, + "WorkflowRunCancelRequest": { + "type": "object", + "properties": { + "comment": { + "type": "string", + "description": "The comment of canceling a workflow run." + } + } + }, + "TasksList": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/WorkflowTask" + }, + "description": "The value of workflow tasks list." + }, + "nextLink": { + "type": "string", + "description": "The URL to get the next set of results." + } + }, + "required": [ + "value" + ] + }, + "WorkflowTask": { + "discriminator": "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", + "DsarTask" + ], + "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": "#/definitions/WorkflowRunId" + }, + "workflowId": { + "$ref": "#/definitions/WorkflowId" + }, + "requestor": { + "$ref": "#/definitions/RequestorId" + }, + "createdTime": { + "$ref": "#/definitions/CreatedTime" + }, + "lastUpdateTime": { + "$ref": "#/definitions/LastUpdateTime" + }, + "payload": { + "$ref": "#/definitions/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": "#/definitions/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" + ] + }, + "TaskPayloadType": { + "type": "string", + "description": "The task payload type.", + "enum": [ + "CreateTerm", + "UpdateTerm", + "DeleteTerm", + "ImportTerms", + "UpdateAsset", + "GrantDataAccess", + "DSARDelete", + "DSARExport" + ], + "x-ms-enum": { + "name": "TaskPayloadType", + "modelAsString": true + } + }, + "OperationType": { + "type": "string", + "description": "The operation type.", + "enum": [ + "CreateTerm", + "UpdateTerm", + "DeleteTerm", + "ImportTerms", + "UpdateAsset", + "GrantDataAccess", + "DSARDelete", + "DSARExport" + ], + "x-ms-enum": { + "name": "OperationType", + "modelAsString": true + } + }, + "SubmittedTime": { + "type": "string", + "format": "date-time", + "description": "The submitted time." + }, + "CreatedTime": { + "type": "string", + "format": "date-time", + "description": "The created time." + }, + "LastUpdateTime": { + "type": "string", + "format": "date-time", + "description": "The last update time." + }, + "Approval": { + "x-ms-discriminator-value": "Approval", + "description": "The workflow approval task properties.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/WorkflowTask" + }, + { + "type": "object", + "properties": { + "approvalDetail": { + "$ref": "#/definitions/ApprovalDetail" + } + } + } + ] + }, + "ApprovalDetail": { + "type": "object", + "description": "The approval task details", + "properties": { + "approvalType": { + "type": "string", + "description": "The approval type of an approval task.", + "enum": [ + "PendingOnAny", + "PendingOnAll" + ], + "x-ms-enum": { + "name": "ApprovalType", + "modelAsString": true + } + }, + "status": { + "type": "string", + "description": "The status of an approval task.", + "enum": [ + "Pending", + "Approved", + "Rejected", + "Canceled" + ], + "x-ms-enum": { + "name": "ApprovalTaskStatus", + "modelAsString": true + } + }, + "approvers": { + "type": "object", + "items": { + "$ref": "#/definitions/ApproverResponse" + }, + "description": "The list of approvers with reply." + } + }, + "required": [ + "approvalType", + "status", + "approvers" + ] + }, + "ApproverResponse": { + "type": "object", + "description": "The response of approvers for a workflow task.", + "properties": { + "reply": { + "type": "string", + "description": "The response for an approval task.", + "enum": [ + "approved", + "rejected", + "pending" + ], + "x-ms-enum": { + "name": "ApprovalResponse", + "modelAsString": true + } + }, + "comment": { + "type": "string", + "description": "The comment of approving or rejecting an approval request." + }, + "responseTime": { + "type": "string", + "format": "date-time", + "description": "The reply time of approver to a workflow task." + } + }, + "required": [ + "reply" + ] + }, + "SimpleTask": { + "x-ms-discriminator-value": "SimpleTask", + "description": "The workflow simple task properties.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/WorkflowTask" + }, + { + "type": "object", + "properties": { + "taskDetail": { + "$ref": "#/definitions/SimpleTaskDetail" + } + } + } + ] + }, + "SimpleTaskDetail": { + "type": "object", + "description": "Workflow simple task details.", + "properties": { + "taskBody": { + "type": "string", + "description": "The simple task body." + }, + "assignedTo": { + "type": "array", + "description": "The users or groups were assigned the simple task.", + "items": { + "type": "string", + "format": "uuid" + } + }, + "status": { + "type": "string", + "description": "Simple task status.", + "enum": [ + "NotStarted", + "InProgress", + "Completed", + "Canceled" + ], + "x-ms-enum": { + "name": "SimpleTaskStatus", + "modelAsString": true + } + }, + "changeHistory": { + "type": "array", + "items": { + "$ref": "#/definitions/TaskChangeEvent" + } + } + }, + "required": [ + "taskBody", + "assignedTo", + "status", + "changeHistory" + ] + }, + "DsarTask": { + "x-ms-discriminator-value": "DsarTask", + "description": "The workflow dsar task properties.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/WorkflowTask" + }, + { + "type": "object", + "properties": { + "taskDetail": { + "$ref": "#/definitions/DSARTaskDetail" + } + } + } + ] + }, + "DSARTaskDetail": { + "type": "object", + "description": "Workflow dsar task details.", + "properties": { + "taskBody": { + "type": "string", + "description": "The dsar task body." + }, + "assignedTo": { + "type": "array", + "description": "The users or groups were assigned the dsar task.", + "items": { + "type": "string", + "format": "uuid" + } + }, + "claimedBy": { + "type": "string", + "description": "The user who claimed the dsar task.", + "format": "uuid" + }, + "approvers": { + "type": "array", + "description": "The list of approvers.", + "items": { + "type": "string", + "description": "The approver of Dsar task.", + "format": "uuid" + } + }, + "dsarId": { + "type": "string", + "description": "The dsar id.", + "format": "uuid" + }, + "dsarTaskId": { + "type": "string", + "description": "The dsar task id.", + "format": "uuid" + }, + "status": { + "type": "string", + "description": "The dsar task status.", + "enum": [ + "NotStarted", + "InProgress", + "Completed", + "NotApplicable", + "Approved", + "Reopened" + ], + "x-ms-enum": { + "name": "DSARTaskStatus", + "modelAsString": true + } + }, + "changeHistory": { + "type": "array", + "items": { + "$ref": "#/definitions/TaskChangeEvent" + } + } + }, + "required": [ + "taskBody", + "assignedTo", + "approvers", + "dsarId", + "dsarTaskId", + "status", + "changeHistory" + ] + }, + "TaskChangeEvent": { + "type": "object", + "description": "History of changes made on task.", + "properties": { + "updatedBy": { + "type": "string", + "format": "uuid" + }, + "updatedTime": { + "type": "string", + "format": "date-time" + }, + "type": { + "type": "string", + "enum": [ + "ApproveApproval", + "RejectApproval", + "Reassign", + "ChangeTaskStatus", + "ClaimTask", + "ReleaseTask" + ], + "x-ms-enum": { + "name": "TaskChangeEventType", + "modelAsString": true + } + }, + "change": { + "type": "object", + "description": "The changes made on this task." + } + }, + "required": [ + "updatedBy", + "updatedTime", + "type", + "change" + ] + }, + "ApprovalResponseComment": { + "type": "object", + "properties": { + "comment": { + "type": "string", + "description": "The comment of approving or rejecting an approval request." + } + } + }, + "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" + ] + } + } + } + }, + "TaskUpdateCommand": { + "type": "object", + "properties": { + "newStatus": { + "type": "string", + "description": "The new status will be used to update the task.", + "enum": [ + "Not Started", + "In Progress", + "Completed", + "Canceled" + ], + "x-ms-enum": { + "name": "TaskStatus", + "modelAsString": true + } + }, + "comment": { + "type": "string", + "description": "The comment when update a task." + } + }, + "required": [ + "newStatus" + ] + }, + "DSARTaskClaimCommand": { + "type": "object", + "properties": { + "comment": { + "type": "string", + "description": "The comment when claiming a DSAR task." + } + } + }, + "DSARTaskReleaseCommand": { + "type": "object", + "properties": { + "comment": { + "type": "string", + "description": "The comment when releasing a DSAR task." + } + } + }, + "ErrorResponse": { + "description": "Default error response model", + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/ErrorModel" + } + }, + "required": [ + "error" + ] + }, + "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": "#/definitions/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" + ] + } + }, + "parameters": { + "api-version": { + "name": "api-version", + "description": "Version of Purview APIs", + "in": "query", + "required": true, + "type": "string", + "x-ms-parameter-location": "client" + }, + "endpoint": { + "name": "endpoint", + "description": "The account endpoint of your Purview account. Example: https://{accountName}.purview.azure.com/", + "x-ms-parameter-location": "client", + "required": true, + "type": "string", + "in": "path", + "format": "url", + "x-ms-skip-url-encoding": true + }, + "workflowId": { + "name": "workflowId", + "in": "path", + "required": true, + "type": "string", + "format": "uuid", + "description": "The workflow id.", + "x-ms-parameter-location": "method" + }, + "requestId": { + "name": "requestId", + "in": "path", + "required": true, + "type": "string", + "format": "uuid", + "description": "The request id.", + "x-ms-parameter-location": "method" + }, + "workflowRunId": { + "name": "workflowRunId", + "in": "path", + "required": true, + "type": "string", + "format": "uuid", + "description": "The workflow run id.", + "x-ms-parameter-location": "method" + }, + "taskId": { + "name": "taskId", + "in": "path", + "required": true, + "type": "string", + "format": "uuid", + "description": "The task id.", + "x-ms-parameter-location": "method" + }, + "timeWindow": { + "name": "timeWindow", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "1d", + "7d", + "30d", + "90d" + ], + "x-ms-enum": { + "name": "TimeWindow", + "modelAsString": true + }, + "description": "Time window of filtering items.", + "x-ms-parameter-location": "method" + }, + "maxpagesize": { + "name": "maxpagesize", + "in": "query", + "required": false, + "type": "integer", + "format": "int32", + "description": "The maximum page size to get the items at one time.", + "x-ms-parameter-location": "method" + }, + "taskTypes": { + "name": "taskTypes", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string", + "enum": [ + "approval", + "simpleTask", + "dsarTask" + ], + "x-ms-enum": { + "name": "TaskType", + "modelAsString": true + } + }, + "description": "Filter items by workflow task type.", + "x-ms-parameter-location": "method" + }, + "workflowIds": { + "name": "workflowIds", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "description": "Filter items by workflow id list.", + "x-ms-parameter-location": "method" + }, + "userRequestIds": { + "name": "userRequestIds", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "description": "Filter items by user request id list.", + "x-ms-parameter-location": "method" + }, + "runStatuses": { + "name": "runStatuses", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string", + "enum": [ + "InProgress", + "Failed", + "Completed", + "NotStarted", + "Canceling", + "CancellationFailed", + "Canceled" + ], + "x-ms-enum": { + "name": "status", + "modelAsString": true + } + }, + "description": "Filter workflow runs by workflow run status.", + "x-ms-parameter-location": "method" + }, + "taskStatuses": { + "name": "taskStatuses", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string", + "enum": [ + "Pending", + "Approved", + "Rejected", + "Canceled", + "NotStarted", + "InProgress", + "Completed" + ], + "x-ms-enum": { + "name": "status", + "modelAsString": true + } + }, + "description": "Filter workflow tasks by status.", + "x-ms-parameter-location": "method" + }, + "workflowNameKeyword": { + "name": "workflowNameKeyword", + "in": "query", + "required": false, + "type": "string", + "description": "The key word which could used to filter workflow item with related workflow.", + "x-ms-parameter-location": "method" + }, + "viewMode": { + "name": "viewMode", + "in": "query", + "required": false, + "type": "string", + "items": { + "type": "string", + "enum": [ + "sent", + "received", + "history" + ], + "x-ms-enum": { + "name": "status", + "modelAsString": true + } + }, + "description": "To filter user's sent, received or history workflow tasks.", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/purview/data-plane/readme.md b/specification/purview/data-plane/readme.md index 2e562b28d7a1..a14898ede75a 100644 --- a/specification/purview/data-plane/readme.md +++ b/specification/purview/data-plane/readme.md @@ -108,6 +108,22 @@ modelerfour: lenient-model-deduplication: true ``` +These are the global settings for the Azure Purview Workflow API. + +``` yaml +openapi-type: data-plane +tag: package-2022-05-01-preview +``` + +### Tag: package-2022-05-01-preview + +These settings apply only when `--tag=package-2022-05-01-preview` is specified on the command line. + +``` yaml $(tag) == 'package-2022-05-01-preview' +input-file: +- Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/purviewWorkflow.json +``` + These are the global settings for the Purview API. ```yaml @@ -225,6 +241,51 @@ where: - $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/xxx.get reason: It doesn't support file annotation in example file. ``` +``` yaml +directive: + - suppress: R3006 +where: + - $.definitions.WorkflowDefinition.properties +from: purviewWorkflow.json +reason: Currently systemData is not allowed. +``` + +``` yaml +directive: + - suppress: R2020 +where: + - $.definitions.WorkflowDefinition.properties +from: purviewWorkflow.json +reason: Workflow definition is not a resource. +``` + +``` yaml +directive: + - suppress: R3023 +where: + - $.definitions.WorkflowDefinition.properties +from: purviewWorkflow.json +reason: No operations endpoint as not ARM resource provider. +``` + + +``` yaml +directive: + - suppress: R2062 +where: + - $.definitions.WorkflowDefinition.properties +from: purviewWorkflow.json +reason: Workflow is not ARM resource. +``` + +``` yaml +directive: + - suppress: R4011 +where: + - $.definitions.WorkflowDefinition.properties +from: purviewWorkflow.json +reason: The delete workflow definition operation have the required responses. +``` # Code Generation