openapi: 3.2.0 info: title: Opal Workflows API license: name: Opal API License url: https://www.workwithopal.com/api-license version: '1.0' description: 'Operations tagged Workflows across 2 of this provider''s published API definitions: opal-v2-openapi.yml, opal-v3-openapi.yml. Each path carries the servers of the definition it was published in.' servers: - url: https://login.ouropal.com tags: - name: Workflows description: "## Workflows Overview\nIn Opal, a workflow is an arrangement of tasks and approvals required to progress through the lifecycle of a \nStoryFirst resource. \n\n**Historical Note:**\n*The v2 Workflows API will supersede the v2 [Phase Items](#tag/Phase-Items) API, although initial rollout will only include support for\nWorkflow on Moments which means there will be a period of time during which the Phase Items API remains the API\nfor Content Workflows.*\n\n### Workflow / Phase Items Translations\nThe following resources described below for the v2 Workflows API have fairly direct translations to the older Phase Items API.\n\n- A _workflow_ was known as a _phase group_.\n- A _stage_ was known as a _phase_.\n- An _assignment_ was known as a _phase item_.\n\n### Context\nWorkflows from the v2 Workflow API have an optional `context` relationship. These contexts tie workflows to the resources against\nwhich the workflow is being performed. Currently only the **Moment** context is supported.\n\nA workflow without a `context` is a reasonable thing to think about: Such a workflow might have common stages that apply broadly\nin more than one context. Although a workflow can conceptually be created without a context, it must be given a context before it can\nbe started.\n\nCurrently, the capabilities supported by contextless workflows are not built out in the Opal Platform. API requests should be made to\ncreate contexts for all workflows before building them out or starting them.\n\n**Important:** Contexts tie workflows to resources from neighboring services; although Opal has one coherent v2 API, a client must\nrequest StoryFirst resources (like `moment`s) from other services rather than `including` them on Workflow requests. For example,\na Workflow might have a `context` with a `moment_id` of `'3432'`; the client would make a request to `moments/v2/3432` to retrieve\ndetails for that Moment.\n\nSee the documentation on [`POST` **Create a Context**](#tag/Workflows/operation/CreateContextV2) for more information.\n\n### Resources\nA `workflow` is arranged into `stage`s, each of which is a `circuit_breaker`, an `approval` stage, or a `task` stage.\nAll stages can optionally specify a `due_date`, but if `null` then the due date is left up to interpretation of the user\nof the workflow -- For a Moment Workflow, perhaps the due date is the `scheduled_date` of the Moment, or perhaps\nthe exact date is not important.\n\nAssignments are completed by `POST`ing `response`s. Circuit breakers and tasks can be completed and approvals can be\napproved or declined. An approved response can be superseded by a following declined response on the same assignment.\nSimilarly, tasks can be \"undone\" after being marked complete by sending a follow-up response. Responses are a ledger with\nthe most recent response representing the current state of the assignment.\n\n#### Circuit Breaker\nCircuit breakers generally just contain one assignment. When the assignment is completed, the circuit breaker is completed\nand the following stage becomes active. Circuit breakers allow workflows to pause between any two stages and they are used\nto create the initial pause before a workflow is started (giving users time to build a workflow out before beginning work\nagainst it).\n\n#### Approval\nApproval stages can contain any number of approval `assignment`s. They can be configured such that all of those approvals\nmust be given for the workflow to progress (`metadata.completion_rules.all`) or they can be configured such that the workflow\nprogresses after any one of the approvals is given (`metadata.completion_rules.one`).\n\n##### Approval Response\nEach approval `response` can be either `approved` or `declined` and it can optionally contain a message from the approver.\n\nAs noted above, any number of responses can be given on a single assignment; the most recent response represents the state\nof the approval: approved, declined, or in the absence of a response, simply incomplete.\n\n#### Task\nTask stages can contain any number of task `assignment`s. A task stage is complete after all assignments within it have been\ncompleted.\n\n##### Task Response\nEach task `response` can be either _complete_ (`complete: true`) or _incomplete_ (`complete: false`).\n\nAs noted above, any number of responses can be given on a single task; the most recent response represents the state of the\ntask: complete or incomplete.\n\n### Templates\nCreation of a new workflow often involves creating a handful of the same resources every time. For this reason, there are templates\nthe allow you to create one of two types of workflows more easily. You always get a `circuit_breaker` with one assignment at the start\nand then you get either an `approval` or a `task` `stage` next, again with one assignment. All assignments start out unassigned.\n\nSee the documentation on [`POST` **Create a Workflow**](#tag/Workflows/operation/CreateWorkflowsV2) for more information.\n\n### Rewinding\nWorkflows can be \"rewound\" to undo some portion of them. \n\n**The big caveat being:** You are not allowed to rewind back to the start of (or before) a completed final approvel stage. Final approval\nstages (i.e. the last approval stage in a workflow) are special because they can have side effects that cannot be taken back --\nif workflow completion resulted in publishing to a third party platform, for example, then rewinding back to an unapproved state for the\nworkflow would leave the workflow unrepresentative of the fact that something had already been published.\n\nSee the documentation on [`PATCH` **Rewind a Workflow**](#tag/Workflows/operation/RewindWorkflowV2) for more information.\n" paths: /workflows/v2/contexts: post: tags: - Workflows operationId: CreateContextV2 summary: Create a Context description: 'You create a context to tie a Workflow to a particular resource the workflow should operate on. Currently, only `moment` resource is supported. Additionally, the `workflow` relationship is required. ' security: - oauth2: - offline_access - api_key: - Session-Token parameters: - name: include in: query required: false description: A comma separated value of related objects to include. schema: type: array items: type: string enum: - workflow - workflow.stages - workflow.stages.assignments style: form explode: false requestBody: content: application/json: schema: type: object required: - data properties: data: type: object required: - type - attributes - relationships properties: type: type: string enum: - context attributes: type: object properties: {} relationships: type: object required: - workflow - moment properties: workflow: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - workflow moment: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - moment example: data: id: 4ac02fc7-705c-467e-933e-8bf16fc3ebf1 type: context attributes: {} relationships: workflow: data: id: d7a0168b-edc6-4737-85b6-8b551d1faf99 type: workflow moment: data: id: '1' type: moment responses: '201': description: Context created content: application/json: schema: type: object required: - data properties: data: title: context type: object additionalProperties: false required: - id - type - attributes - relationships properties: id: type: string format: uuid type: type: string enum: - context attributes: type: object additionalProperties: false required: - created_at - deleted_at - updated_at properties: created_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true relationships: type: object additionalProperties: false required: - created_by_user properties: created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user workflow: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - workflow moment: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - moment included: type: array items: oneOf: - title: workflow type: object required: - id - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow meta: type: object description: "Optionally calculated workflow status metadata. **Not part of responses by default.**\n\nThis is currently only available when requesting workflow resources from the\n`/workflows/v2/workflows` and `/workflows/v2/workflows/{id}` `GET` endpoints.\nYou request that this metadata be included in responses with the `expose` query \nparameter like: `/workflows/v2/workflows?expose[workflow][meta]`.\n\nThe \"latest active stage\" is either the stage that is currently active or it is the\nlast stage of a completed workflow.\n" required: - latest_active_stage - completed_stages - stage_type_count additionalProperties: false properties: latest_active_stage: oneOf: - title: Stage Status Metadata allOf: - required: - stage_type - resource_identifier properties: stage_type: type: string enum: - approval - task - circuit_breaker title: type: - string - 'null' description: The title of the stage. due_date: type: - string - 'null' format: date-time description: The due date of the stage if set. resource_identifier: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - stage - type: object description: The status metadata of a stage. required: - assignment_counts properties: assignment_counts: type: object description: "Assignment counts broken down in three ways.\n\nFirst, the number of complete/incomplete assignments for\nall users (both approvals and tasks).\n\nSecond, the number of complete/incomplete assignments for\nthe current user (both approvals and tasks).\n\nThird, the number of declined approvals.\n\nIn the first two cases, both approvals and tasks can be \ncomplete or incomplete where both approved and declined responses\non an approval assignment count as completion.\n" required: - all - current_user - declined additionalProperties: false properties: all: type: object required: - incomplete - complete additionalProperties: false properties: incomplete: type: integer minimum: 0 complete: type: integer minimum: 0 current_user: type: object required: - incomplete - complete additionalProperties: false properties: incomplete: type: integer minimum: 0 complete: type: integer minimum: 0 declined: type: integer minimum: 0 - title: 'null' type: - object - 'null' enum: - null completed_stages: type: integer minimum: 0 stage_type_count: type: object required: - approval - task - circuit_breaker additionalProperties: false properties: approval: type: integer minimum: 0 task: type: integer minimum: 0 circuit_breaker: type: integer minimum: 0 attributes: type: object required: - created_at - status - is_approved - updated_at - deleted_at additionalProperties: false properties: created_at: type: string format: date-time description: An ISO8601 date-time indicating when the workflow was created. readOnly: true status: type: string description: A string indicating the current status of the workflow. enum: - active - complete - inactive - paused readOnly: true is_approved: type: boolean description: Indicative of whether the latest approval stage has been completed. Workflows with only task stages will never result in `is_approved=true`. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time indicating when the workflow was last updated. readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time indicating when the workflow was deleted (if it was deleted). readOnly: true relationships: type: object additionalProperties: false required: - created_by_user - stages properties: created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user context: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - context stages: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - stage example: data: id: 4ac02fc7-705c-467e-933e-8bf16fc3ebf1 type: context attributes: created_at: '2021-01-04T22:23:51Z' deleted_at: null updated_at: '2021-01-04T22:23:51Z' relationships: moment: data: id: '1' type: moment created_by_user: data: id: '1' type: user '400': description: Bad request content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status '401': description: Unauthorized content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status '404': description: Not found content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status '422': description: Unprocessable entity content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status servers: - url: https://login.ouropal.com /workflows/v2/workflows: get: tags: - Workflows operationId: ReadWorkflowsV2 summary: Get a collection of workflows description: "This endpoint gets a response of created workflows. To be included, \na workflow will need to be put in the context of a StoryFirst resource \n(like a moment) using the `/workflows/v2/contexts` endpoint.\n\nIf you do not specify a pagination limit, a default page limit of 150 workflows will be\nused.\n" security: - oauth2: - offline_access - api_key: - Session-Token parameters: - name: include in: query required: false description: A comma separated value of related objects to include. schema: type: array items: type: string enum: - context - stages - stages.assignments - stages.assignments.responses style: form explode: false - name: filter in: query required: false description: Filter the resulting workflows. schema: type: object properties: context.moment_id: type: array items: type: integer description: 'Filter workflows by their context''s `moment_id`. Uses syntax `filter[context.moment_id]=1,2,3`. ' context.created_at: allOf: - type: object properties: eq: type: string description: 'Equal to filter. If no other filter is specified, `eq` will be assumed. ' gt: type: string description: Greater than filter gteq: type: string description: Greater than or equal to filter lt: type: string description: Less than filter lteq: type: string description: Less than or equal to filter - format: date-time - description: 'Filter workflows by when their context was created. Uses syntax `filter[context.created_at][gt]=2020-01-01T00:00:00-07:00` You can filter to a particular day by omitting the `gt`/`lt`/etc.: `filter[context.created_at]=2020-01-01`. The distinction between when a workflow was created and when its context was created may seem subtle but if you want to know e.g. "when Moment x''s workflow was created" then this is the filter to use. ' workflow_status: type: array items: type: string enum: - not_started description: The status of the Workflows to retrieve. style: deepObject explode: true - name: sort in: query required: false description: 'A comma separated value specifying how a collection in the response body should be sorted, where each value is an attribute of the workflow. If no sort order is provided, resources will be default sorted by created_at, ascending. When specifying multiple values, each value in the sequence determines the ordering precedence. Lastly, each workflow in the collection will appear in ascending order, unless any of the enumerated values are prefixed with a minus "-" sign, in which case each workflow will appear in descending order for the specified values. ' schema: type: string enum: - created_at - updated_at - name: expose in: query required: false description: Expose response data that is only provided by request. schema: type: object properties: workflow: type: object properties: meta: type: - string - 'null' description: 'Expose the workflow status metadata on each workflow resource. Use this parameter as: `?expose[workflow][meta]` ' style: deepObject explode: true - name: page in: query required: false description: 'Request a particular page using `offset` and `limit`. When not specified, the `offset` defaults to 0 and the `limit` defaults to 150. ' schema: type: object properties: offset: type: integer minimum: 0 limit: type: integer minimum: 0 maximum: 800 style: deepObject explode: true responses: '200': description: A list of workflows content: application/json: schema: type: object required: - data properties: data: type: array items: title: workflow type: object required: - id - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow meta: type: object description: "Optionally calculated workflow status metadata. **Not part of responses by default.**\n\nThis is currently only available when requesting workflow resources from the\n`/workflows/v2/workflows` and `/workflows/v2/workflows/{id}` `GET` endpoints.\nYou request that this metadata be included in responses with the `expose` query \nparameter like: `/workflows/v2/workflows?expose[workflow][meta]`.\n\nThe \"latest active stage\" is either the stage that is currently active or it is the\nlast stage of a completed workflow.\n" required: - latest_active_stage - completed_stages - stage_type_count additionalProperties: false properties: latest_active_stage: oneOf: - title: Stage Status Metadata allOf: - required: - stage_type - resource_identifier properties: stage_type: type: string enum: - approval - task - circuit_breaker title: type: - string - 'null' description: The title of the stage. due_date: type: - string - 'null' format: date-time description: The due date of the stage if set. resource_identifier: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - stage - type: object description: The status metadata of a stage. required: - assignment_counts properties: assignment_counts: type: object description: "Assignment counts broken down in three ways.\n\nFirst, the number of complete/incomplete assignments for\nall users (both approvals and tasks).\n\nSecond, the number of complete/incomplete assignments for\nthe current user (both approvals and tasks).\n\nThird, the number of declined approvals.\n\nIn the first two cases, both approvals and tasks can be \ncomplete or incomplete where both approved and declined responses\non an approval assignment count as completion.\n" required: - all - current_user - declined additionalProperties: false properties: all: type: object required: - incomplete - complete additionalProperties: false properties: incomplete: type: integer minimum: 0 complete: type: integer minimum: 0 current_user: type: object required: - incomplete - complete additionalProperties: false properties: incomplete: type: integer minimum: 0 complete: type: integer minimum: 0 declined: type: integer minimum: 0 - title: 'null' type: - object - 'null' enum: - null completed_stages: type: integer minimum: 0 stage_type_count: type: object required: - approval - task - circuit_breaker additionalProperties: false properties: approval: type: integer minimum: 0 task: type: integer minimum: 0 circuit_breaker: type: integer minimum: 0 attributes: type: object required: - created_at - status - is_approved - updated_at - deleted_at additionalProperties: false properties: created_at: type: string format: date-time description: An ISO8601 date-time indicating when the workflow was created. readOnly: true status: type: string description: A string indicating the current status of the workflow. enum: - active - complete - inactive - paused readOnly: true is_approved: type: boolean description: Indicative of whether the latest approval stage has been completed. Workflows with only task stages will never result in `is_approved=true`. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time indicating when the workflow was last updated. readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time indicating when the workflow was deleted (if it was deleted). readOnly: true relationships: type: object additionalProperties: false required: - created_by_user - stages properties: created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user context: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - context stages: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - stage included: type: array items: oneOf: - title: context type: object additionalProperties: false required: - id - type - attributes - relationships properties: id: type: string format: uuid type: type: string enum: - context attributes: type: object additionalProperties: false required: - created_at - deleted_at - updated_at properties: created_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true relationships: type: object additionalProperties: false required: - created_by_user properties: created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user workflow: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - workflow moment: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - moment - title: stage type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - stage attributes: type: object required: - created_at - activated_at - deleted_at - due_date - metadata - position - stage_type - status - updated_at additionalProperties: false properties: created_at: type: string format: date-time readOnly: true description: An ISO8601 date-time. activated_at: type: - string - 'null' format: date-time readOnly: true description: 'An ISO8601 date-time set to the time when this stage gained the `status` "active". Naturally, this field is `null` prior to the stage becoming active. It is also `null` _after_ a rollback if the rollback targets a stage earlier than the one currently active. ' deleted_at: type: - string - 'null' format: date-time readOnly: true description: An ISO8601 date-time. due_date: type: - string - 'null' format: date-time description: An ISO8601 date-time. metadata: type: - object - 'null' oneOf: - type: - object - 'null' title: Approval Stage Metadata additionalProperties: false required: - completion_rules properties: title: type: string description: The title of the Stage. Will default to "Approval Phase" completion_rules: type: string enum: - all - one - type: object title: Task/Circuit Breaker Stage Metadata additionalProperties: false properties: title: type: string description: The title of the Stage. Will default to "Task Phase" or "Pause" position: type: integer stage_type: type: string enum: - approval - task - circuit_breaker status: type: string enum: - active - complete - inactive updated_at: type: string format: date-time description: An ISO8601 date-time. relationships: type: object additionalProperties: false required: - workflow - assignments properties: workflow: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - workflow assignments: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - assignment - title: assignment type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - assignment relationships: type: object required: - created_by_user - assigned_user - stage - responses additionalProperties: false properties: created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user assigned_user: type: object required: - data additionalProperties: false properties: data: type: - object - 'null' required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user stage: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - stage responses: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - response attributes: type: object required: - assignment_type - created_at - deleted_at - metadata - position - updated_at additionalProperties: false properties: assignment_type: type: string enum: - approval - task - circuit_breaker created_at: type: string format: date-time readOnly: true updated_at: type: string format: date-time readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time. readOnly: true position: type: integer description: The sequential position (starting at 1) of the assignment within its stage. readOnly: true metadata: type: - object - 'null' anyOf: - type: - object - 'null' title: Approval Assignment Metadata additionalProperties: false properties: title: type: string description: The title of the Assignment. Will default to "Approval". - type: object title: Task/Circuit Breaker Assignment Metadata additionalProperties: false properties: title: type: string description: The title of the Assignment. Will default to "Task" or "Pause". is_starred: type: boolean - title: response type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - response attributes: type: object additionalProperties: false required: - created_at - deleted_at - updated_at - details properties: created_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time. readOnly: true details: type: - object - 'null' oneOf: - type: - object - 'null' title: Approval Response Details additionalProperties: false required: - approved properties: approved: type: string enum: - approved - declined reasoning: type: - string - 'null' - type: object title: Task/Circuit Breaker Response Details additionalProperties: false required: - complete properties: complete: type: boolean - type: object title: Rewind Response Details additionalProperties: false required: - rewind properties: rewind: type: boolean relationships: type: object required: - assignment - created_by_user additionalProperties: false properties: assignment: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - assignment created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user meta: type: object required: - total - page - resource_type properties: resource_type: type: string total: type: integer page: type: object required: - limit - offset properties: limit: type: integer offset: type: integer example: data: - id: 4ac02fc7-705c-467e-933e-8bf16fc3ebf1 type: workflow attributes: created_at: '2020-09-11T15:27:01.881-08:00' updated_at: '2020-09-11T15:27:01.881-08:00' deleted_at: null status: active is_approved: false relationships: created_by_user: data: id: '1' type: user stages: data: - id: 186ad497-b8a7-43d6-bd95-cde8f9a02cdc type: stage assignments: data: - id: d7a0168b-edc6-4737-85b6-8b551d1faf99 type: assignment '400': description: Bad request content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status '401': description: Unauthorized content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status '404': description: Not found content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status post: tags: - Workflows operationId: CreateWorkflowsV2 summary: Create a workflow description: 'This endpoint creates a workflow without a context. Before being used by an end-user of the Opal Platform, the workflow will need to be put in the context of a StoryFirst resource (like a moment) using the `/workflows/v2/contexts` endpoint. If you use the `template` parameter to create a workflow that is pre-populated with stages & assignments, you may also want to use the `include` parameter to include `stages` and `stages.assignment` in the response. ' security: - oauth2: - offline_access - api_key: - Session-Token parameters: - name: template in: query required: false description: 'Optionally create a workflow with a template. Using templates creates a few workflow resources with one request. You cannot use multiple templates at once. The "approval" template creates a circuit breaker followed by an approval stage. Both contain one unassigned assignment. The "task" template creates a circuit breaker followed by a task stage. Both contain one unassigned assignment. ' schema: type: string enum: - approval - task style: form - name: include in: query required: false description: A comma separated value of related objects to include. schema: type: array items: type: string enum: - context - stages - stages.assignments - stages.assignments.responses style: form explode: false requestBody: content: application/json: schema: type: object required: - data properties: data: type: object required: - type properties: type: type: string enum: - workflow attributes: type: object properties: lock_inherited_phases: type: boolean example: data: type: workflow responses: '201': description: Workflow created content: application/json: schema: type: object required: - data properties: data: title: workflow type: object required: - id - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow meta: type: object description: "Optionally calculated workflow status metadata. **Not part of responses by default.**\n\nThis is currently only available when requesting workflow resources from the\n`/workflows/v2/workflows` and `/workflows/v2/workflows/{id}` `GET` endpoints.\nYou request that this metadata be included in responses with the `expose` query \nparameter like: `/workflows/v2/workflows?expose[workflow][meta]`.\n\nThe \"latest active stage\" is either the stage that is currently active or it is the\nlast stage of a completed workflow.\n" required: - latest_active_stage - completed_stages - stage_type_count additionalProperties: false properties: latest_active_stage: oneOf: - title: Stage Status Metadata allOf: - required: - stage_type - resource_identifier properties: stage_type: type: string enum: - approval - task - circuit_breaker title: type: - string - 'null' description: The title of the stage. due_date: type: - string - 'null' format: date-time description: The due date of the stage if set. resource_identifier: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - stage - type: object description: The status metadata of a stage. required: - assignment_counts properties: assignment_counts: type: object description: "Assignment counts broken down in three ways.\n\nFirst, the number of complete/incomplete assignments for\nall users (both approvals and tasks).\n\nSecond, the number of complete/incomplete assignments for\nthe current user (both approvals and tasks).\n\nThird, the number of declined approvals.\n\nIn the first two cases, both approvals and tasks can be \ncomplete or incomplete where both approved and declined responses\non an approval assignment count as completion.\n" required: - all - current_user - declined additionalProperties: false properties: all: type: object required: - incomplete - complete additionalProperties: false properties: incomplete: type: integer minimum: 0 complete: type: integer minimum: 0 current_user: type: object required: - incomplete - complete additionalProperties: false properties: incomplete: type: integer minimum: 0 complete: type: integer minimum: 0 declined: type: integer minimum: 0 - title: 'null' type: - object - 'null' enum: - null completed_stages: type: integer minimum: 0 stage_type_count: type: object required: - approval - task - circuit_breaker additionalProperties: false properties: approval: type: integer minimum: 0 task: type: integer minimum: 0 circuit_breaker: type: integer minimum: 0 attributes: type: object required: - created_at - status - is_approved - updated_at - deleted_at additionalProperties: false properties: created_at: type: string format: date-time description: An ISO8601 date-time indicating when the workflow was created. readOnly: true status: type: string description: A string indicating the current status of the workflow. enum: - active - complete - inactive - paused readOnly: true is_approved: type: boolean description: Indicative of whether the latest approval stage has been completed. Workflows with only task stages will never result in `is_approved=true`. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time indicating when the workflow was last updated. readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time indicating when the workflow was deleted (if it was deleted). readOnly: true relationships: type: object additionalProperties: false required: - created_by_user - stages properties: created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user context: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - context stages: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - stage included: type: array items: oneOf: - title: context type: object additionalProperties: false required: - id - type - attributes - relationships properties: id: type: string format: uuid type: type: string enum: - context attributes: type: object additionalProperties: false required: - created_at - deleted_at - updated_at properties: created_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true relationships: type: object additionalProperties: false required: - created_by_user properties: created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user workflow: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - workflow moment: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - moment - title: stage type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - stage attributes: type: object required: - created_at - activated_at - deleted_at - due_date - metadata - position - stage_type - status - updated_at additionalProperties: false properties: created_at: type: string format: date-time readOnly: true description: An ISO8601 date-time. activated_at: type: - string - 'null' format: date-time readOnly: true description: 'An ISO8601 date-time set to the time when this stage gained the `status` "active". Naturally, this field is `null` prior to the stage becoming active. It is also `null` _after_ a rollback if the rollback targets a stage earlier than the one currently active. ' deleted_at: type: - string - 'null' format: date-time readOnly: true description: An ISO8601 date-time. due_date: type: - string - 'null' format: date-time description: An ISO8601 date-time. metadata: type: - object - 'null' oneOf: - type: - object - 'null' title: Approval Stage Metadata additionalProperties: false required: - completion_rules properties: title: type: string description: The title of the Stage. Will default to "Approval Phase" completion_rules: type: string enum: - all - one - type: object title: Task/Circuit Breaker Stage Metadata additionalProperties: false properties: title: type: string description: The title of the Stage. Will default to "Task Phase" or "Pause" position: type: integer stage_type: type: string enum: - approval - task - circuit_breaker status: type: string enum: - active - complete - inactive updated_at: type: string format: date-time description: An ISO8601 date-time. relationships: type: object additionalProperties: false required: - workflow - assignments properties: workflow: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - workflow assignments: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - assignment - title: assignment type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - assignment relationships: type: object required: - created_by_user - assigned_user - stage - responses additionalProperties: false properties: created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user assigned_user: type: object required: - data additionalProperties: false properties: data: type: - object - 'null' required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user stage: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - stage responses: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - response attributes: type: object required: - assignment_type - created_at - deleted_at - metadata - position - updated_at additionalProperties: false properties: assignment_type: type: string enum: - approval - task - circuit_breaker created_at: type: string format: date-time readOnly: true updated_at: type: string format: date-time readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time. readOnly: true position: type: integer description: The sequential position (starting at 1) of the assignment within its stage. readOnly: true metadata: type: - object - 'null' anyOf: - type: - object - 'null' title: Approval Assignment Metadata additionalProperties: false properties: title: type: string description: The title of the Assignment. Will default to "Approval". - type: object title: Task/Circuit Breaker Assignment Metadata additionalProperties: false properties: title: type: string description: The title of the Assignment. Will default to "Task" or "Pause". is_starred: type: boolean - title: response type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - response attributes: type: object additionalProperties: false required: - created_at - deleted_at - updated_at - details properties: created_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time. readOnly: true details: type: - object - 'null' oneOf: - type: - object - 'null' title: Approval Response Details additionalProperties: false required: - approved properties: approved: type: string enum: - approved - declined reasoning: type: - string - 'null' - type: object title: Task/Circuit Breaker Response Details additionalProperties: false required: - complete properties: complete: type: boolean - type: object title: Rewind Response Details additionalProperties: false required: - rewind properties: rewind: type: boolean relationships: type: object required: - assignment - created_by_user additionalProperties: false properties: assignment: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - assignment created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user example: data: id: 4ac02fc7-705c-467e-933e-8bf16fc3ebf1 type: workflow attributes: created_at: '2020-09-11T15:27:01.881-08:00' updated_at: '2020-09-11T15:27:01.881-08:00' deleted_at: null status: active is_approved: false relationships: created_by_user: data: id: '1' type: user stages: data: - id: 186ad497-b8a7-43d6-bd95-cde8f9a02cdc type: stage assignments: data: - id: d7a0168b-edc6-4737-85b6-8b551d1faf99 type: assignment '400': description: Bad request content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status '401': description: Unauthorized content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status '404': description: Not found content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status servers: - url: https://login.ouropal.com /workflows/v2/workflows/{workflow_id}: get: tags: - Workflows operationId: ReadWorkflowV2 summary: Get a Workflow security: - oauth2: - offline_access - api_key: - Session-Token parameters: - name: workflow_id in: path required: true description: The ID of the workflow schema: type: string format: uuid - name: include in: query required: false description: A comma separated value of related objects to include. schema: type: array items: type: string enum: - context - stages - stages.assignments - stages.assignments.responses style: form explode: false - name: expose in: query required: false description: Expose response data that is only provided by request. schema: type: object properties: workflow: type: object properties: meta: type: - string - 'null' description: 'Expose the workflow status metadata on each workflow resource. Use this parameter as: `?expose[workflow][meta]` ' style: deepObject explode: true responses: '200': description: A single Workflow content: application/json: schema: type: object required: - data properties: data: title: workflow type: object required: - id - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow meta: type: object description: "Optionally calculated workflow status metadata. **Not part of responses by default.**\n\nThis is currently only available when requesting workflow resources from the\n`/workflows/v2/workflows` and `/workflows/v2/workflows/{id}` `GET` endpoints.\nYou request that this metadata be included in responses with the `expose` query \nparameter like: `/workflows/v2/workflows?expose[workflow][meta]`.\n\nThe \"latest active stage\" is either the stage that is currently active or it is the\nlast stage of a completed workflow.\n" required: - latest_active_stage - completed_stages - stage_type_count additionalProperties: false properties: latest_active_stage: oneOf: - title: Stage Status Metadata allOf: - required: - stage_type - resource_identifier properties: stage_type: type: string enum: - approval - task - circuit_breaker title: type: - string - 'null' description: The title of the stage. due_date: type: - string - 'null' format: date-time description: The due date of the stage if set. resource_identifier: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - stage - type: object description: The status metadata of a stage. required: - assignment_counts properties: assignment_counts: type: object description: "Assignment counts broken down in three ways.\n\nFirst, the number of complete/incomplete assignments for\nall users (both approvals and tasks).\n\nSecond, the number of complete/incomplete assignments for\nthe current user (both approvals and tasks).\n\nThird, the number of declined approvals.\n\nIn the first two cases, both approvals and tasks can be \ncomplete or incomplete where both approved and declined responses\non an approval assignment count as completion.\n" required: - all - current_user - declined additionalProperties: false properties: all: type: object required: - incomplete - complete additionalProperties: false properties: incomplete: type: integer minimum: 0 complete: type: integer minimum: 0 current_user: type: object required: - incomplete - complete additionalProperties: false properties: incomplete: type: integer minimum: 0 complete: type: integer minimum: 0 declined: type: integer minimum: 0 - title: 'null' type: - object - 'null' enum: - null completed_stages: type: integer minimum: 0 stage_type_count: type: object required: - approval - task - circuit_breaker additionalProperties: false properties: approval: type: integer minimum: 0 task: type: integer minimum: 0 circuit_breaker: type: integer minimum: 0 attributes: type: object required: - created_at - status - is_approved - updated_at - deleted_at additionalProperties: false properties: created_at: type: string format: date-time description: An ISO8601 date-time indicating when the workflow was created. readOnly: true status: type: string description: A string indicating the current status of the workflow. enum: - active - complete - inactive - paused readOnly: true is_approved: type: boolean description: Indicative of whether the latest approval stage has been completed. Workflows with only task stages will never result in `is_approved=true`. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time indicating when the workflow was last updated. readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time indicating when the workflow was deleted (if it was deleted). readOnly: true relationships: type: object additionalProperties: false required: - created_by_user - stages properties: created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user context: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - context stages: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - stage included: type: array items: oneOf: - title: context type: object additionalProperties: false required: - id - type - attributes - relationships properties: id: type: string format: uuid type: type: string enum: - context attributes: type: object additionalProperties: false required: - created_at - deleted_at - updated_at properties: created_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true relationships: type: object additionalProperties: false required: - created_by_user properties: created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user workflow: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - workflow moment: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - moment - title: stage type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - stage attributes: type: object required: - created_at - activated_at - deleted_at - due_date - metadata - position - stage_type - status - updated_at additionalProperties: false properties: created_at: type: string format: date-time readOnly: true description: An ISO8601 date-time. activated_at: type: - string - 'null' format: date-time readOnly: true description: 'An ISO8601 date-time set to the time when this stage gained the `status` "active". Naturally, this field is `null` prior to the stage becoming active. It is also `null` _after_ a rollback if the rollback targets a stage earlier than the one currently active. ' deleted_at: type: - string - 'null' format: date-time readOnly: true description: An ISO8601 date-time. due_date: type: - string - 'null' format: date-time description: An ISO8601 date-time. metadata: type: - object - 'null' oneOf: - type: - object - 'null' title: Approval Stage Metadata additionalProperties: false required: - completion_rules properties: title: type: string description: The title of the Stage. Will default to "Approval Phase" completion_rules: type: string enum: - all - one - type: object title: Task/Circuit Breaker Stage Metadata additionalProperties: false properties: title: type: string description: The title of the Stage. Will default to "Task Phase" or "Pause" position: type: integer stage_type: type: string enum: - approval - task - circuit_breaker status: type: string enum: - active - complete - inactive updated_at: type: string format: date-time description: An ISO8601 date-time. relationships: type: object additionalProperties: false required: - workflow - assignments properties: workflow: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - workflow assignments: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - assignment - title: assignment type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - assignment relationships: type: object required: - created_by_user - assigned_user - stage - responses additionalProperties: false properties: created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user assigned_user: type: object required: - data additionalProperties: false properties: data: type: - object - 'null' required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user stage: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - stage responses: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - response attributes: type: object required: - assignment_type - created_at - deleted_at - metadata - position - updated_at additionalProperties: false properties: assignment_type: type: string enum: - approval - task - circuit_breaker created_at: type: string format: date-time readOnly: true updated_at: type: string format: date-time readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time. readOnly: true position: type: integer description: The sequential position (starting at 1) of the assignment within its stage. readOnly: true metadata: type: - object - 'null' anyOf: - type: - object - 'null' title: Approval Assignment Metadata additionalProperties: false properties: title: type: string description: The title of the Assignment. Will default to "Approval". - type: object title: Task/Circuit Breaker Assignment Metadata additionalProperties: false properties: title: type: string description: The title of the Assignment. Will default to "Task" or "Pause". is_starred: type: boolean - title: response type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - response attributes: type: object additionalProperties: false required: - created_at - deleted_at - updated_at - details properties: created_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time. readOnly: true details: type: - object - 'null' oneOf: - type: - object - 'null' title: Approval Response Details additionalProperties: false required: - approved properties: approved: type: string enum: - approved - declined reasoning: type: - string - 'null' - type: object title: Task/Circuit Breaker Response Details additionalProperties: false required: - complete properties: complete: type: boolean - type: object title: Rewind Response Details additionalProperties: false required: - rewind properties: rewind: type: boolean relationships: type: object required: - assignment - created_by_user additionalProperties: false properties: assignment: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - assignment created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user example: data: id: 4ac02fc7-705c-467e-933e-8bf16fc3ebf1 type: workflow attributes: created_at: '2020-09-11T15:27:01.881-08:00' updated_at: '2020-09-11T15:27:01.881-08:00' deleted_at: null status: active is_approved: false relationships: created_by_user: data: id: '1' type: user stages: data: - id: 186ad497-b8a7-43d6-bd95-cde8f9a02cdc type: stage assignments: data: - id: d7a0168b-edc6-4737-85b6-8b551d1faf99 type: assignment '400': description: Bad request content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status '401': description: Unauthorized content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status '404': description: Not found content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status servers: - url: https://login.ouropal.com /workflows/v2/workflows/{workflow_id}/rewind: patch: tags: - Workflows operationId: RewindWorkflowV2 summary: Rewind a Workflow security: - oauth2: - offline_access - api_key: - Session-Token description: 'Rewinds a Workflow to the start of the given Stage. Note that a Workflow cannot be rewound to the start of, or earlier than, the final completed Approval Stage. Any Task Stages following the final completed approval Stage may still be rewound. ' parameters: - name: workflow_id in: path required: true description: The ID of the workflow schema: type: string format: uuid - name: include in: query required: false description: A comma separated value of related objects to include. schema: type: array items: type: string enum: - context - stages - stages.assignments - stages.assignments.responses style: form explode: false requestBody: content: application/json: schema: type: object required: - data properties: data: type: object required: - id - type - relationships properties: id: type: string type: type: string enum: - workflow relationships: type: object required: - stage properties: stage: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - stage example: data: id: 586e3547-6798-419a-b5e6-39db937e1cbc type: workflow relationships: stage: data: type: stage id: 0ba3f4a3-9f6b-4204-a233-25b377f19861 responses: '200': description: Workflow rewound content: application/json: schema: type: object required: - data properties: data: title: workflow type: object required: - id - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow meta: type: object description: "Optionally calculated workflow status metadata. **Not part of responses by default.**\n\nThis is currently only available when requesting workflow resources from the\n`/workflows/v2/workflows` and `/workflows/v2/workflows/{id}` `GET` endpoints.\nYou request that this metadata be included in responses with the `expose` query \nparameter like: `/workflows/v2/workflows?expose[workflow][meta]`.\n\nThe \"latest active stage\" is either the stage that is currently active or it is the\nlast stage of a completed workflow.\n" required: - latest_active_stage - completed_stages - stage_type_count additionalProperties: false properties: latest_active_stage: oneOf: - title: Stage Status Metadata allOf: - required: - stage_type - resource_identifier properties: stage_type: type: string enum: - approval - task - circuit_breaker title: type: - string - 'null' description: The title of the stage. due_date: type: - string - 'null' format: date-time description: The due date of the stage if set. resource_identifier: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - stage - type: object description: The status metadata of a stage. required: - assignment_counts properties: assignment_counts: type: object description: "Assignment counts broken down in three ways.\n\nFirst, the number of complete/incomplete assignments for\nall users (both approvals and tasks).\n\nSecond, the number of complete/incomplete assignments for\nthe current user (both approvals and tasks).\n\nThird, the number of declined approvals.\n\nIn the first two cases, both approvals and tasks can be \ncomplete or incomplete where both approved and declined responses\non an approval assignment count as completion.\n" required: - all - current_user - declined additionalProperties: false properties: all: type: object required: - incomplete - complete additionalProperties: false properties: incomplete: type: integer minimum: 0 complete: type: integer minimum: 0 current_user: type: object required: - incomplete - complete additionalProperties: false properties: incomplete: type: integer minimum: 0 complete: type: integer minimum: 0 declined: type: integer minimum: 0 - title: 'null' type: - object - 'null' enum: - null completed_stages: type: integer minimum: 0 stage_type_count: type: object required: - approval - task - circuit_breaker additionalProperties: false properties: approval: type: integer minimum: 0 task: type: integer minimum: 0 circuit_breaker: type: integer minimum: 0 attributes: type: object required: - created_at - status - is_approved - updated_at - deleted_at additionalProperties: false properties: created_at: type: string format: date-time description: An ISO8601 date-time indicating when the workflow was created. readOnly: true status: type: string description: A string indicating the current status of the workflow. enum: - active - complete - inactive - paused readOnly: true is_approved: type: boolean description: Indicative of whether the latest approval stage has been completed. Workflows with only task stages will never result in `is_approved=true`. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time indicating when the workflow was last updated. readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time indicating when the workflow was deleted (if it was deleted). readOnly: true relationships: type: object additionalProperties: false required: - created_by_user - stages properties: created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user context: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - context stages: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - stage included: type: array items: oneOf: - title: context type: object additionalProperties: false required: - id - type - attributes - relationships properties: id: type: string format: uuid type: type: string enum: - context attributes: type: object additionalProperties: false required: - created_at - deleted_at - updated_at properties: created_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true relationships: type: object additionalProperties: false required: - created_by_user properties: created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user workflow: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - workflow moment: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - moment - title: stage type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - stage attributes: type: object required: - created_at - activated_at - deleted_at - due_date - metadata - position - stage_type - status - updated_at additionalProperties: false properties: created_at: type: string format: date-time readOnly: true description: An ISO8601 date-time. activated_at: type: - string - 'null' format: date-time readOnly: true description: 'An ISO8601 date-time set to the time when this stage gained the `status` "active". Naturally, this field is `null` prior to the stage becoming active. It is also `null` _after_ a rollback if the rollback targets a stage earlier than the one currently active. ' deleted_at: type: - string - 'null' format: date-time readOnly: true description: An ISO8601 date-time. due_date: type: - string - 'null' format: date-time description: An ISO8601 date-time. metadata: type: - object - 'null' oneOf: - type: - object - 'null' title: Approval Stage Metadata additionalProperties: false required: - completion_rules properties: title: type: string description: The title of the Stage. Will default to "Approval Phase" completion_rules: type: string enum: - all - one - type: object title: Task/Circuit Breaker Stage Metadata additionalProperties: false properties: title: type: string description: The title of the Stage. Will default to "Task Phase" or "Pause" position: type: integer stage_type: type: string enum: - approval - task - circuit_breaker status: type: string enum: - active - complete - inactive updated_at: type: string format: date-time description: An ISO8601 date-time. relationships: type: object additionalProperties: false required: - workflow - assignments properties: workflow: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - workflow assignments: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - assignment - title: assignment type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - assignment relationships: type: object required: - created_by_user - assigned_user - stage - responses additionalProperties: false properties: created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user assigned_user: type: object required: - data additionalProperties: false properties: data: type: - object - 'null' required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user stage: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - stage responses: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - response attributes: type: object required: - assignment_type - created_at - deleted_at - metadata - position - updated_at additionalProperties: false properties: assignment_type: type: string enum: - approval - task - circuit_breaker created_at: type: string format: date-time readOnly: true updated_at: type: string format: date-time readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time. readOnly: true position: type: integer description: The sequential position (starting at 1) of the assignment within its stage. readOnly: true metadata: type: - object - 'null' anyOf: - type: - object - 'null' title: Approval Assignment Metadata additionalProperties: false properties: title: type: string description: The title of the Assignment. Will default to "Approval". - type: object title: Task/Circuit Breaker Assignment Metadata additionalProperties: false properties: title: type: string description: The title of the Assignment. Will default to "Task" or "Pause". is_starred: type: boolean - title: response type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - response attributes: type: object additionalProperties: false required: - created_at - deleted_at - updated_at - details properties: created_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time. readOnly: true details: type: - object - 'null' oneOf: - type: - object - 'null' title: Approval Response Details additionalProperties: false required: - approved properties: approved: type: string enum: - approved - declined reasoning: type: - string - 'null' - type: object title: Task/Circuit Breaker Response Details additionalProperties: false required: - complete properties: complete: type: boolean - type: object title: Rewind Response Details additionalProperties: false required: - rewind properties: rewind: type: boolean relationships: type: object required: - assignment - created_by_user additionalProperties: false properties: assignment: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - assignment created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user example: data: id: 4ac02fc7-705c-467e-933e-8bf16fc3ebf1 type: workflow attributes: created_at: '2020-09-11T15:27:01.881-08:00' updated_at: '2020-09-11T15:27:01.881-08:00' deleted_at: null status: active is_approved: false relationships: created_by_user: data: id: '1' type: user stages: data: - id: 186ad497-b8a7-43d6-bd95-cde8f9a02cdc type: stage assignments: data: - id: d7a0168b-edc6-4737-85b6-8b551d1faf99 type: assignment '400': description: Bad request content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status '401': description: Unauthorized content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status '404': description: Not found content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status '422': description: Unprocessable entity content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status servers: - url: https://login.ouropal.com /workflows/v2/workflows/{workflow_id}/duplicate: post: tags: - Workflows operationId: DuplicateWorkflowV2 summary: Duplicate a Workflow security: - oauth2: - offline_access - api_key: - Session-Token description: 'Duplicates a Workflow with its associated Stages and Assignments. Note that all due dates will be omitted on duplicate. ' parameters: - name: workflow_id in: path required: true description: The ID of the workflow schema: type: string format: uuid - name: include in: query required: false description: A comma separated value of related objects to include. schema: type: array items: type: string enum: - stages - stages.assignments explode: false requestBody: content: application/json: schema: type: object required: - data properties: data: type: object required: - type properties: type: type: string enum: - workflow example: data: type: workflow responses: '201': description: Workflow duplicated content: application/json: schema: type: object required: - data properties: data: title: workflow type: object required: - id - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow meta: type: object description: "Optionally calculated workflow status metadata. **Not part of responses by default.**\n\nThis is currently only available when requesting workflow resources from the\n`/workflows/v2/workflows` and `/workflows/v2/workflows/{id}` `GET` endpoints.\nYou request that this metadata be included in responses with the `expose` query \nparameter like: `/workflows/v2/workflows?expose[workflow][meta]`.\n\nThe \"latest active stage\" is either the stage that is currently active or it is the\nlast stage of a completed workflow.\n" required: - latest_active_stage - completed_stages - stage_type_count additionalProperties: false properties: latest_active_stage: oneOf: - title: Stage Status Metadata allOf: - required: - stage_type - resource_identifier properties: stage_type: type: string enum: - approval - task - circuit_breaker title: type: - string - 'null' description: The title of the stage. due_date: type: - string - 'null' format: date-time description: The due date of the stage if set. resource_identifier: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - stage - type: object description: The status metadata of a stage. required: - assignment_counts properties: assignment_counts: type: object description: "Assignment counts broken down in three ways.\n\nFirst, the number of complete/incomplete assignments for\nall users (both approvals and tasks).\n\nSecond, the number of complete/incomplete assignments for\nthe current user (both approvals and tasks).\n\nThird, the number of declined approvals.\n\nIn the first two cases, both approvals and tasks can be \ncomplete or incomplete where both approved and declined responses\non an approval assignment count as completion.\n" required: - all - current_user - declined additionalProperties: false properties: all: type: object required: - incomplete - complete additionalProperties: false properties: incomplete: type: integer minimum: 0 complete: type: integer minimum: 0 current_user: type: object required: - incomplete - complete additionalProperties: false properties: incomplete: type: integer minimum: 0 complete: type: integer minimum: 0 declined: type: integer minimum: 0 - title: 'null' type: - object - 'null' enum: - null completed_stages: type: integer minimum: 0 stage_type_count: type: object required: - approval - task - circuit_breaker additionalProperties: false properties: approval: type: integer minimum: 0 task: type: integer minimum: 0 circuit_breaker: type: integer minimum: 0 attributes: type: object required: - created_at - status - is_approved - updated_at - deleted_at additionalProperties: false properties: created_at: type: string format: date-time description: An ISO8601 date-time indicating when the workflow was created. readOnly: true status: type: string description: A string indicating the current status of the workflow. enum: - active - complete - inactive - paused readOnly: true is_approved: type: boolean description: Indicative of whether the latest approval stage has been completed. Workflows with only task stages will never result in `is_approved=true`. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time indicating when the workflow was last updated. readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time indicating when the workflow was deleted (if it was deleted). readOnly: true relationships: type: object additionalProperties: false required: - created_by_user - stages properties: created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user context: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - context stages: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - stage included: type: array items: oneOf: - title: context type: object additionalProperties: false required: - id - type - attributes - relationships properties: id: type: string format: uuid type: type: string enum: - context attributes: type: object additionalProperties: false required: - created_at - deleted_at - updated_at properties: created_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true relationships: type: object additionalProperties: false required: - created_by_user properties: created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user workflow: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - workflow moment: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - moment - title: stage type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - stage attributes: type: object required: - created_at - activated_at - deleted_at - due_date - metadata - position - stage_type - status - updated_at additionalProperties: false properties: created_at: type: string format: date-time readOnly: true description: An ISO8601 date-time. activated_at: type: - string - 'null' format: date-time readOnly: true description: 'An ISO8601 date-time set to the time when this stage gained the `status` "active". Naturally, this field is `null` prior to the stage becoming active. It is also `null` _after_ a rollback if the rollback targets a stage earlier than the one currently active. ' deleted_at: type: - string - 'null' format: date-time readOnly: true description: An ISO8601 date-time. due_date: type: - string - 'null' format: date-time description: An ISO8601 date-time. metadata: type: - object - 'null' oneOf: - type: - object - 'null' title: Approval Stage Metadata additionalProperties: false required: - completion_rules properties: title: type: string description: The title of the Stage. Will default to "Approval Phase" completion_rules: type: string enum: - all - one - type: object title: Task/Circuit Breaker Stage Metadata additionalProperties: false properties: title: type: string description: The title of the Stage. Will default to "Task Phase" or "Pause" position: type: integer stage_type: type: string enum: - approval - task - circuit_breaker status: type: string enum: - active - complete - inactive updated_at: type: string format: date-time description: An ISO8601 date-time. relationships: type: object additionalProperties: false required: - workflow - assignments properties: workflow: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - workflow assignments: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - assignment - title: assignment type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - assignment relationships: type: object required: - created_by_user - assigned_user - stage - responses additionalProperties: false properties: created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user assigned_user: type: object required: - data additionalProperties: false properties: data: type: - object - 'null' required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user stage: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - stage responses: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - response attributes: type: object required: - assignment_type - created_at - deleted_at - metadata - position - updated_at additionalProperties: false properties: assignment_type: type: string enum: - approval - task - circuit_breaker created_at: type: string format: date-time readOnly: true updated_at: type: string format: date-time readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time. readOnly: true position: type: integer description: The sequential position (starting at 1) of the assignment within its stage. readOnly: true metadata: type: - object - 'null' anyOf: - type: - object - 'null' title: Approval Assignment Metadata additionalProperties: false properties: title: type: string description: The title of the Assignment. Will default to "Approval". - type: object title: Task/Circuit Breaker Assignment Metadata additionalProperties: false properties: title: type: string description: The title of the Assignment. Will default to "Task" or "Pause". is_starred: type: boolean - title: response type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - response attributes: type: object additionalProperties: false required: - created_at - deleted_at - updated_at - details properties: created_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time. readOnly: true details: type: - object - 'null' oneOf: - type: - object - 'null' title: Approval Response Details additionalProperties: false required: - approved properties: approved: type: string enum: - approved - declined reasoning: type: - string - 'null' - type: object title: Task/Circuit Breaker Response Details additionalProperties: false required: - complete properties: complete: type: boolean - type: object title: Rewind Response Details additionalProperties: false required: - rewind properties: rewind: type: boolean relationships: type: object required: - assignment - created_by_user additionalProperties: false properties: assignment: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - assignment created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user example: data: id: 4ac02fc7-705c-467e-933e-8bf16fc3ebf1 type: workflow attributes: created_at: '2020-09-11T15:27:01.881-08:00' updated_at: '2020-09-11T15:27:01.881-08:00' deleted_at: null status: active is_approved: false relationships: created_by_user: data: id: '1' type: user stages: data: - id: 186ad497-b8a7-43d6-bd95-cde8f9a02cdc type: stage assignments: data: - id: d7a0168b-edc6-4737-85b6-8b551d1faf99 type: assignment '400': description: Bad request content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status '401': description: Unauthorized content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status '404': description: Not found content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status '422': description: Unprocessable entity content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status servers: - url: https://login.ouropal.com /workflows/v2/stages: post: tags: - Workflows operationId: CreateStageV2 summary: Create a stage security: - oauth2: - offline_access - api_key: - Session-Token parameters: - name: include in: query required: false description: A comma separated value of related objects to include. schema: type: array items: type: string enum: - workflow - workflow.context - workflow.stages - assignments - assignments.responses style: form explode: false requestBody: content: application/json: schema: type: object required: - data properties: data: type: object required: - type - attributes - relationships properties: type: type: string enum: - stage attributes: type: object required: - due_date - stage_type - position - metadata properties: due_date: type: - string - 'null' format: date-time description: An ISO8601 date-time metadata: type: - object - 'null' oneOf: - type: - object - 'null' title: Approval Stage Metadata additionalProperties: false required: - completion_rules properties: title: type: string description: The title of the Stage. Will default to "Approval Phase" completion_rules: type: string enum: - all - one - type: object title: Task/Circuit Breaker Stage Metadata additionalProperties: false properties: title: type: string description: The title of the Stage. Will default to "Task Phase" or "Pause" position: type: integer stage_type: type: string enum: - approval - task - circuit_breaker relationships: type: object required: - workflow properties: workflow: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - workflow examples: approval: value: data: type: stage attributes: due_date: '2020-09-12T21:25:40.000Z' position: 1 metadata: title: First Approval Stage completion_rules: all stage_type: approval relationships: workflow: data: type: workflow id: 586e3547-6798-419a-b5e6-39db937e1cbc assignments: data: [] task: value: data: type: stage attributes: due_date: '2020-09-12T21:25:40.000Z' position: 1 metadata: title: First Task Stage stage_type: task relationships: workflow: data: type: workflow id: 586e3547-6798-419a-b5e6-39db937e1cbc assignments: data: [] circuit_breaker: value: data: type: stage attributes: due_date: null position: 1 metadata: title: Pause stage_type: circuit_breaker relationships: workflow: data: type: workflow id: 586e3547-6798-419a-b5e6-39db937e1cbc assignments: data: [] responses: '200': description: A workflow Stage content: application/json: schema: type: object required: - data properties: data: title: stage type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - stage attributes: type: object required: - created_at - activated_at - deleted_at - due_date - metadata - position - stage_type - status - updated_at additionalProperties: false properties: created_at: type: string format: date-time readOnly: true description: An ISO8601 date-time. activated_at: type: - string - 'null' format: date-time readOnly: true description: 'An ISO8601 date-time set to the time when this stage gained the `status` "active". Naturally, this field is `null` prior to the stage becoming active. It is also `null` _after_ a rollback if the rollback targets a stage earlier than the one currently active. ' deleted_at: type: - string - 'null' format: date-time readOnly: true description: An ISO8601 date-time. due_date: type: - string - 'null' format: date-time description: An ISO8601 date-time. metadata: type: - object - 'null' oneOf: - type: - object - 'null' title: Approval Stage Metadata additionalProperties: false required: - completion_rules properties: title: type: string description: The title of the Stage. Will default to "Approval Phase" completion_rules: type: string enum: - all - one - type: object title: Task/Circuit Breaker Stage Metadata additionalProperties: false properties: title: type: string description: The title of the Stage. Will default to "Task Phase" or "Pause" position: type: integer stage_type: type: string enum: - approval - task - circuit_breaker status: type: string enum: - active - complete - inactive updated_at: type: string format: date-time description: An ISO8601 date-time. relationships: type: object additionalProperties: false required: - workflow - assignments properties: workflow: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - workflow assignments: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - assignment included: type: array items: oneOf: - title: workflow type: object required: - id - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow meta: type: object description: "Optionally calculated workflow status metadata. **Not part of responses by default.**\n\nThis is currently only available when requesting workflow resources from the\n`/workflows/v2/workflows` and `/workflows/v2/workflows/{id}` `GET` endpoints.\nYou request that this metadata be included in responses with the `expose` query \nparameter like: `/workflows/v2/workflows?expose[workflow][meta]`.\n\nThe \"latest active stage\" is either the stage that is currently active or it is the\nlast stage of a completed workflow.\n" required: - latest_active_stage - completed_stages - stage_type_count additionalProperties: false properties: latest_active_stage: oneOf: - title: Stage Status Metadata allOf: - required: - stage_type - resource_identifier properties: stage_type: type: string enum: - approval - task - circuit_breaker title: type: - string - 'null' description: The title of the stage. due_date: type: - string - 'null' format: date-time description: The due date of the stage if set. resource_identifier: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - stage - type: object description: The status metadata of a stage. required: - assignment_counts properties: assignment_counts: type: object description: "Assignment counts broken down in three ways.\n\nFirst, the number of complete/incomplete assignments for\nall users (both approvals and tasks).\n\nSecond, the number of complete/incomplete assignments for\nthe current user (both approvals and tasks).\n\nThird, the number of declined approvals.\n\nIn the first two cases, both approvals and tasks can be \ncomplete or incomplete where both approved and declined responses\non an approval assignment count as completion.\n" required: - all - current_user - declined additionalProperties: false properties: all: type: object required: - incomplete - complete additionalProperties: false properties: incomplete: type: integer minimum: 0 complete: type: integer minimum: 0 current_user: type: object required: - incomplete - complete additionalProperties: false properties: incomplete: type: integer minimum: 0 complete: type: integer minimum: 0 declined: type: integer minimum: 0 - title: 'null' type: - object - 'null' enum: - null completed_stages: type: integer minimum: 0 stage_type_count: type: object required: - approval - task - circuit_breaker additionalProperties: false properties: approval: type: integer minimum: 0 task: type: integer minimum: 0 circuit_breaker: type: integer minimum: 0 attributes: type: object required: - created_at - status - is_approved - updated_at - deleted_at additionalProperties: false properties: created_at: type: string format: date-time description: An ISO8601 date-time indicating when the workflow was created. readOnly: true status: type: string description: A string indicating the current status of the workflow. enum: - active - complete - inactive - paused readOnly: true is_approved: type: boolean description: Indicative of whether the latest approval stage has been completed. Workflows with only task stages will never result in `is_approved=true`. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time indicating when the workflow was last updated. readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time indicating when the workflow was deleted (if it was deleted). readOnly: true relationships: type: object additionalProperties: false required: - created_by_user - stages properties: created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user context: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - context stages: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - stage - title: context type: object additionalProperties: false required: - id - type - attributes - relationships properties: id: type: string format: uuid type: type: string enum: - context attributes: type: object additionalProperties: false required: - created_at - deleted_at - updated_at properties: created_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true relationships: type: object additionalProperties: false required: - created_by_user properties: created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user workflow: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - workflow moment: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - moment - title: stage type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - stage attributes: type: object required: - created_at - activated_at - deleted_at - due_date - metadata - position - stage_type - status - updated_at additionalProperties: false properties: created_at: type: string format: date-time readOnly: true description: An ISO8601 date-time. activated_at: type: - string - 'null' format: date-time readOnly: true description: 'An ISO8601 date-time set to the time when this stage gained the `status` "active". Naturally, this field is `null` prior to the stage becoming active. It is also `null` _after_ a rollback if the rollback targets a stage earlier than the one currently active. ' deleted_at: type: - string - 'null' format: date-time readOnly: true description: An ISO8601 date-time. due_date: type: - string - 'null' format: date-time description: An ISO8601 date-time. metadata: type: - object - 'null' oneOf: - type: - object - 'null' title: Approval Stage Metadata additionalProperties: false required: - completion_rules properties: title: type: string description: The title of the Stage. Will default to "Approval Phase" completion_rules: type: string enum: - all - one - type: object title: Task/Circuit Breaker Stage Metadata additionalProperties: false properties: title: type: string description: The title of the Stage. Will default to "Task Phase" or "Pause" position: type: integer stage_type: type: string enum: - approval - task - circuit_breaker status: type: string enum: - active - complete - inactive updated_at: type: string format: date-time description: An ISO8601 date-time. relationships: type: object additionalProperties: false required: - workflow - assignments properties: workflow: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - workflow assignments: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - assignment - title: assignment type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - assignment relationships: type: object required: - created_by_user - assigned_user - stage - responses additionalProperties: false properties: created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user assigned_user: type: object required: - data additionalProperties: false properties: data: type: - object - 'null' required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user stage: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - stage responses: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - response attributes: type: object required: - assignment_type - created_at - deleted_at - metadata - position - updated_at additionalProperties: false properties: assignment_type: type: string enum: - approval - task - circuit_breaker created_at: type: string format: date-time readOnly: true updated_at: type: string format: date-time readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time. readOnly: true position: type: integer description: The sequential position (starting at 1) of the assignment within its stage. readOnly: true metadata: type: - object - 'null' anyOf: - type: - object - 'null' title: Approval Assignment Metadata additionalProperties: false properties: title: type: string description: The title of the Assignment. Will default to "Approval". - type: object title: Task/Circuit Breaker Assignment Metadata additionalProperties: false properties: title: type: string description: The title of the Assignment. Will default to "Task" or "Pause". is_starred: type: boolean - title: response type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - response attributes: type: object additionalProperties: false required: - created_at - deleted_at - updated_at - details properties: created_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time. readOnly: true details: type: - object - 'null' oneOf: - type: - object - 'null' title: Approval Response Details additionalProperties: false required: - approved properties: approved: type: string enum: - approved - declined reasoning: type: - string - 'null' - type: object title: Task/Circuit Breaker Response Details additionalProperties: false required: - complete properties: complete: type: boolean - type: object title: Rewind Response Details additionalProperties: false required: - rewind properties: rewind: type: boolean relationships: type: object required: - assignment - created_by_user additionalProperties: false properties: assignment: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - assignment created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user examples: approval: value: data: id: 0ba3f4a3-9f6b-4204-a233-25b377f19861 type: stage attributes: activated_at: '2020-09-11T22:25:40.000Z' created_at: '2020-09-11T21:25:40.000Z' updated_at: '2020-09-11T22:25:40.000Z' deleted_at: null due_date: '2020-09-12T21:25:40.000Z' stage_type: approval position: 1 metadata: title: First Approval Stage completion_rules: all status: active relationships: workflow: data: id: 586e3547-6798-419a-b5e6-39db937e1cbc type: workflow assignments: data: [] task: value: data: id: 0ba3f4a3-9f6b-4204-a233-25b377f19862 type: stage attributes: activated_at: '2020-09-11T22:25:40.000Z' created_at: '2020-09-11T21:25:40.000Z' updated_at: '2020-09-11T22:25:40.000Z' deleted_at: null due_date: '2020-09-12T21:25:40.000Z' stage_type: task position: 2 metadata: title: First Task Stage status: active relationships: workflow: data: id: 586e3547-6798-419a-b5e6-39db937e1cbc type: workflow assignments: data: [] circuit_breaker: value: data: id: 0ba3f4a3-9f6b-4204-a233-25b377f19863 type: stage attributes: activated_at: '2020-09-11T22:25:40.000Z' created_at: '2020-09-11T21:25:40.000Z' updated_at: '2020-09-11T22:25:40.000Z' deleted_at: null due_date: null stage_type: circuit_breaker position: 3 metadata: title: Pause status: active relationships: workflow: data: id: 586e3547-6798-419a-b5e6-39db937e1cbc type: workflow assignments: data: [] '400': description: Bad request content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status '401': description: Unauthorized content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status '422': description: Unprocessable entity content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status servers: - url: https://login.ouropal.com /workflows/v2/stages/{stage_id}: get: tags: - Workflows operationId: ReadStageV2 summary: Get a stage by ID security: - oauth2: - offline_access - api_key: - Session-Token parameters: - name: stage_id in: path required: true description: The ID of the stage schema: type: string format: uuid - name: include in: query required: false description: A comma separated value of related objects to include. schema: type: array items: type: string enum: - workflow - workflow.context - workflow.stages - assignments - assignments.responses style: form explode: false responses: '200': description: A workflow Stage content: application/json: schema: type: object required: - data properties: data: title: stage type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - stage attributes: type: object required: - created_at - activated_at - deleted_at - due_date - metadata - position - stage_type - status - updated_at additionalProperties: false properties: created_at: type: string format: date-time readOnly: true description: An ISO8601 date-time. activated_at: type: - string - 'null' format: date-time readOnly: true description: 'An ISO8601 date-time set to the time when this stage gained the `status` "active". Naturally, this field is `null` prior to the stage becoming active. It is also `null` _after_ a rollback if the rollback targets a stage earlier than the one currently active. ' deleted_at: type: - string - 'null' format: date-time readOnly: true description: An ISO8601 date-time. due_date: type: - string - 'null' format: date-time description: An ISO8601 date-time. metadata: type: - object - 'null' oneOf: - type: - object - 'null' title: Approval Stage Metadata additionalProperties: false required: - completion_rules properties: title: type: string description: The title of the Stage. Will default to "Approval Phase" completion_rules: type: string enum: - all - one - type: object title: Task/Circuit Breaker Stage Metadata additionalProperties: false properties: title: type: string description: The title of the Stage. Will default to "Task Phase" or "Pause" position: type: integer stage_type: type: string enum: - approval - task - circuit_breaker status: type: string enum: - active - complete - inactive updated_at: type: string format: date-time description: An ISO8601 date-time. relationships: type: object additionalProperties: false required: - workflow - assignments properties: workflow: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - workflow assignments: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - assignment included: type: array items: oneOf: - title: workflow type: object required: - id - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow meta: type: object description: "Optionally calculated workflow status metadata. **Not part of responses by default.**\n\nThis is currently only available when requesting workflow resources from the\n`/workflows/v2/workflows` and `/workflows/v2/workflows/{id}` `GET` endpoints.\nYou request that this metadata be included in responses with the `expose` query \nparameter like: `/workflows/v2/workflows?expose[workflow][meta]`.\n\nThe \"latest active stage\" is either the stage that is currently active or it is the\nlast stage of a completed workflow.\n" required: - latest_active_stage - completed_stages - stage_type_count additionalProperties: false properties: latest_active_stage: oneOf: - title: Stage Status Metadata allOf: - required: - stage_type - resource_identifier properties: stage_type: type: string enum: - approval - task - circuit_breaker title: type: - string - 'null' description: The title of the stage. due_date: type: - string - 'null' format: date-time description: The due date of the stage if set. resource_identifier: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - stage - type: object description: The status metadata of a stage. required: - assignment_counts properties: assignment_counts: type: object description: "Assignment counts broken down in three ways.\n\nFirst, the number of complete/incomplete assignments for\nall users (both approvals and tasks).\n\nSecond, the number of complete/incomplete assignments for\nthe current user (both approvals and tasks).\n\nThird, the number of declined approvals.\n\nIn the first two cases, both approvals and tasks can be \ncomplete or incomplete where both approved and declined responses\non an approval assignment count as completion.\n" required: - all - current_user - declined additionalProperties: false properties: all: type: object required: - incomplete - complete additionalProperties: false properties: incomplete: type: integer minimum: 0 complete: type: integer minimum: 0 current_user: type: object required: - incomplete - complete additionalProperties: false properties: incomplete: type: integer minimum: 0 complete: type: integer minimum: 0 declined: type: integer minimum: 0 - title: 'null' type: - object - 'null' enum: - null completed_stages: type: integer minimum: 0 stage_type_count: type: object required: - approval - task - circuit_breaker additionalProperties: false properties: approval: type: integer minimum: 0 task: type: integer minimum: 0 circuit_breaker: type: integer minimum: 0 attributes: type: object required: - created_at - status - is_approved - updated_at - deleted_at additionalProperties: false properties: created_at: type: string format: date-time description: An ISO8601 date-time indicating when the workflow was created. readOnly: true status: type: string description: A string indicating the current status of the workflow. enum: - active - complete - inactive - paused readOnly: true is_approved: type: boolean description: Indicative of whether the latest approval stage has been completed. Workflows with only task stages will never result in `is_approved=true`. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time indicating when the workflow was last updated. readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time indicating when the workflow was deleted (if it was deleted). readOnly: true relationships: type: object additionalProperties: false required: - created_by_user - stages properties: created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user context: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - context stages: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - stage - title: context type: object additionalProperties: false required: - id - type - attributes - relationships properties: id: type: string format: uuid type: type: string enum: - context attributes: type: object additionalProperties: false required: - created_at - deleted_at - updated_at properties: created_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true relationships: type: object additionalProperties: false required: - created_by_user properties: created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user workflow: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - workflow moment: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - moment - title: stage type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - stage attributes: type: object required: - created_at - activated_at - deleted_at - due_date - metadata - position - stage_type - status - updated_at additionalProperties: false properties: created_at: type: string format: date-time readOnly: true description: An ISO8601 date-time. activated_at: type: - string - 'null' format: date-time readOnly: true description: 'An ISO8601 date-time set to the time when this stage gained the `status` "active". Naturally, this field is `null` prior to the stage becoming active. It is also `null` _after_ a rollback if the rollback targets a stage earlier than the one currently active. ' deleted_at: type: - string - 'null' format: date-time readOnly: true description: An ISO8601 date-time. due_date: type: - string - 'null' format: date-time description: An ISO8601 date-time. metadata: type: - object - 'null' oneOf: - type: - object - 'null' title: Approval Stage Metadata additionalProperties: false required: - completion_rules properties: title: type: string description: The title of the Stage. Will default to "Approval Phase" completion_rules: type: string enum: - all - one - type: object title: Task/Circuit Breaker Stage Metadata additionalProperties: false properties: title: type: string description: The title of the Stage. Will default to "Task Phase" or "Pause" position: type: integer stage_type: type: string enum: - approval - task - circuit_breaker status: type: string enum: - active - complete - inactive updated_at: type: string format: date-time description: An ISO8601 date-time. relationships: type: object additionalProperties: false required: - workflow - assignments properties: workflow: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - workflow assignments: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - assignment - title: assignment type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - assignment relationships: type: object required: - created_by_user - assigned_user - stage - responses additionalProperties: false properties: created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user assigned_user: type: object required: - data additionalProperties: false properties: data: type: - object - 'null' required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user stage: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - stage responses: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - response attributes: type: object required: - assignment_type - created_at - deleted_at - metadata - position - updated_at additionalProperties: false properties: assignment_type: type: string enum: - approval - task - circuit_breaker created_at: type: string format: date-time readOnly: true updated_at: type: string format: date-time readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time. readOnly: true position: type: integer description: The sequential position (starting at 1) of the assignment within its stage. readOnly: true metadata: type: - object - 'null' anyOf: - type: - object - 'null' title: Approval Assignment Metadata additionalProperties: false properties: title: type: string description: The title of the Assignment. Will default to "Approval". - type: object title: Task/Circuit Breaker Assignment Metadata additionalProperties: false properties: title: type: string description: The title of the Assignment. Will default to "Task" or "Pause". is_starred: type: boolean - title: response type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - response attributes: type: object additionalProperties: false required: - created_at - deleted_at - updated_at - details properties: created_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time. readOnly: true details: type: - object - 'null' oneOf: - type: - object - 'null' title: Approval Response Details additionalProperties: false required: - approved properties: approved: type: string enum: - approved - declined reasoning: type: - string - 'null' - type: object title: Task/Circuit Breaker Response Details additionalProperties: false required: - complete properties: complete: type: boolean - type: object title: Rewind Response Details additionalProperties: false required: - rewind properties: rewind: type: boolean relationships: type: object required: - assignment - created_by_user additionalProperties: false properties: assignment: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - assignment created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user examples: approval: value: data: id: 0ba3f4a3-9f6b-4204-a233-25b377f19861 type: stage attributes: activated_at: '2020-09-11T22:25:40.000Z' created_at: '2020-09-11T21:25:40.000Z' updated_at: '2020-09-11T22:25:40.000Z' deleted_at: null due_date: '2020-09-12T21:25:40.000Z' stage_type: approval position: 1 metadata: title: First Approval Stage completion_rules: all status: active relationships: workflow: data: id: 586e3547-6798-419a-b5e6-39db937e1cbc type: workflow assignments: data: [] task: value: data: id: 0ba3f4a3-9f6b-4204-a233-25b377f19862 type: stage attributes: activated_at: '2020-09-11T22:25:40.000Z' created_at: '2020-09-11T21:25:40.000Z' updated_at: '2020-09-11T22:25:40.000Z' deleted_at: null due_date: '2020-09-12T21:25:40.000Z' stage_type: task position: 2 metadata: title: First Task Stage status: active relationships: workflow: data: id: 586e3547-6798-419a-b5e6-39db937e1cbc type: workflow assignments: data: [] circuit_breaker: value: data: id: 0ba3f4a3-9f6b-4204-a233-25b377f19863 type: stage attributes: activated_at: '2020-09-11T22:25:40.000Z' created_at: '2020-09-11T21:25:40.000Z' updated_at: '2020-09-11T22:25:40.000Z' deleted_at: null due_date: null stage_type: circuit_breaker position: 3 metadata: title: Pause status: active relationships: workflow: data: id: 586e3547-6798-419a-b5e6-39db937e1cbc type: workflow assignments: data: [] '400': description: Bad request content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status '401': description: Unauthorized content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status '422': description: Unprocessable entity content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status patch: tags: - Workflows operationId: UpdateStageV2 summary: Update a Stage by id security: - oauth2: - offline_access - api_key: - Session-Token parameters: - name: stage_id in: path required: true description: The ID of the stage schema: type: string format: uuid - name: include in: query required: false description: A comma separated value of related objects to include. schema: type: array items: type: string enum: - workflow - workflow.context - workflow.stages - assignments - assignments.responses style: form explode: false requestBody: content: application/json: schema: type: object required: - data properties: data: type: object required: - type - attributes - id properties: id: type: string type: type: string enum: - stage attributes: type: object properties: due_date: type: - string - 'null' format: date-time description: An ISO8601 date-time metadata: type: - object - 'null' properties: title: type: string description: The title of the stage completion_rules: type: string enum: - all - one position: type: - integer - 'null' example: data: id: 586e3547-6798-419a-b5e6-39db937e1cbc type: stage attributes: position: 2 responses: '200': description: A Stage resource. content: application/json: schema: type: object required: - data properties: data: title: stage type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - stage attributes: type: object required: - created_at - activated_at - deleted_at - due_date - metadata - position - stage_type - status - updated_at additionalProperties: false properties: created_at: type: string format: date-time readOnly: true description: An ISO8601 date-time. activated_at: type: - string - 'null' format: date-time readOnly: true description: 'An ISO8601 date-time set to the time when this stage gained the `status` "active". Naturally, this field is `null` prior to the stage becoming active. It is also `null` _after_ a rollback if the rollback targets a stage earlier than the one currently active. ' deleted_at: type: - string - 'null' format: date-time readOnly: true description: An ISO8601 date-time. due_date: type: - string - 'null' format: date-time description: An ISO8601 date-time. metadata: type: - object - 'null' oneOf: - type: - object - 'null' title: Approval Stage Metadata additionalProperties: false required: - completion_rules properties: title: type: string description: The title of the Stage. Will default to "Approval Phase" completion_rules: type: string enum: - all - one - type: object title: Task/Circuit Breaker Stage Metadata additionalProperties: false properties: title: type: string description: The title of the Stage. Will default to "Task Phase" or "Pause" position: type: integer stage_type: type: string enum: - approval - task - circuit_breaker status: type: string enum: - active - complete - inactive updated_at: type: string format: date-time description: An ISO8601 date-time. relationships: type: object additionalProperties: false required: - workflow - assignments properties: workflow: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - workflow assignments: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - assignment included: type: array items: oneOf: - title: workflow type: object required: - id - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow meta: type: object description: "Optionally calculated workflow status metadata. **Not part of responses by default.**\n\nThis is currently only available when requesting workflow resources from the\n`/workflows/v2/workflows` and `/workflows/v2/workflows/{id}` `GET` endpoints.\nYou request that this metadata be included in responses with the `expose` query \nparameter like: `/workflows/v2/workflows?expose[workflow][meta]`.\n\nThe \"latest active stage\" is either the stage that is currently active or it is the\nlast stage of a completed workflow.\n" required: - latest_active_stage - completed_stages - stage_type_count additionalProperties: false properties: latest_active_stage: oneOf: - title: Stage Status Metadata allOf: - required: - stage_type - resource_identifier properties: stage_type: type: string enum: - approval - task - circuit_breaker title: type: - string - 'null' description: The title of the stage. due_date: type: - string - 'null' format: date-time description: The due date of the stage if set. resource_identifier: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - stage - type: object description: The status metadata of a stage. required: - assignment_counts properties: assignment_counts: type: object description: "Assignment counts broken down in three ways.\n\nFirst, the number of complete/incomplete assignments for\nall users (both approvals and tasks).\n\nSecond, the number of complete/incomplete assignments for\nthe current user (both approvals and tasks).\n\nThird, the number of declined approvals.\n\nIn the first two cases, both approvals and tasks can be \ncomplete or incomplete where both approved and declined responses\non an approval assignment count as completion.\n" required: - all - current_user - declined additionalProperties: false properties: all: type: object required: - incomplete - complete additionalProperties: false properties: incomplete: type: integer minimum: 0 complete: type: integer minimum: 0 current_user: type: object required: - incomplete - complete additionalProperties: false properties: incomplete: type: integer minimum: 0 complete: type: integer minimum: 0 declined: type: integer minimum: 0 - title: 'null' type: - object - 'null' enum: - null completed_stages: type: integer minimum: 0 stage_type_count: type: object required: - approval - task - circuit_breaker additionalProperties: false properties: approval: type: integer minimum: 0 task: type: integer minimum: 0 circuit_breaker: type: integer minimum: 0 attributes: type: object required: - created_at - status - is_approved - updated_at - deleted_at additionalProperties: false properties: created_at: type: string format: date-time description: An ISO8601 date-time indicating when the workflow was created. readOnly: true status: type: string description: A string indicating the current status of the workflow. enum: - active - complete - inactive - paused readOnly: true is_approved: type: boolean description: Indicative of whether the latest approval stage has been completed. Workflows with only task stages will never result in `is_approved=true`. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time indicating when the workflow was last updated. readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time indicating when the workflow was deleted (if it was deleted). readOnly: true relationships: type: object additionalProperties: false required: - created_by_user - stages properties: created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user context: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - context stages: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - stage - title: context type: object additionalProperties: false required: - id - type - attributes - relationships properties: id: type: string format: uuid type: type: string enum: - context attributes: type: object additionalProperties: false required: - created_at - deleted_at - updated_at properties: created_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true relationships: type: object additionalProperties: false required: - created_by_user properties: created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user workflow: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - workflow moment: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - moment - title: stage type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - stage attributes: type: object required: - created_at - activated_at - deleted_at - due_date - metadata - position - stage_type - status - updated_at additionalProperties: false properties: created_at: type: string format: date-time readOnly: true description: An ISO8601 date-time. activated_at: type: - string - 'null' format: date-time readOnly: true description: 'An ISO8601 date-time set to the time when this stage gained the `status` "active". Naturally, this field is `null` prior to the stage becoming active. It is also `null` _after_ a rollback if the rollback targets a stage earlier than the one currently active. ' deleted_at: type: - string - 'null' format: date-time readOnly: true description: An ISO8601 date-time. due_date: type: - string - 'null' format: date-time description: An ISO8601 date-time. metadata: type: - object - 'null' oneOf: - type: - object - 'null' title: Approval Stage Metadata additionalProperties: false required: - completion_rules properties: title: type: string description: The title of the Stage. Will default to "Approval Phase" completion_rules: type: string enum: - all - one - type: object title: Task/Circuit Breaker Stage Metadata additionalProperties: false properties: title: type: string description: The title of the Stage. Will default to "Task Phase" or "Pause" position: type: integer stage_type: type: string enum: - approval - task - circuit_breaker status: type: string enum: - active - complete - inactive updated_at: type: string format: date-time description: An ISO8601 date-time. relationships: type: object additionalProperties: false required: - workflow - assignments properties: workflow: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - workflow assignments: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - assignment - title: assignment type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - assignment relationships: type: object required: - created_by_user - assigned_user - stage - responses additionalProperties: false properties: created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user assigned_user: type: object required: - data additionalProperties: false properties: data: type: - object - 'null' required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user stage: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - stage responses: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - response attributes: type: object required: - assignment_type - created_at - deleted_at - metadata - position - updated_at additionalProperties: false properties: assignment_type: type: string enum: - approval - task - circuit_breaker created_at: type: string format: date-time readOnly: true updated_at: type: string format: date-time readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time. readOnly: true position: type: integer description: The sequential position (starting at 1) of the assignment within its stage. readOnly: true metadata: type: - object - 'null' anyOf: - type: - object - 'null' title: Approval Assignment Metadata additionalProperties: false properties: title: type: string description: The title of the Assignment. Will default to "Approval". - type: object title: Task/Circuit Breaker Assignment Metadata additionalProperties: false properties: title: type: string description: The title of the Assignment. Will default to "Task" or "Pause". is_starred: type: boolean - title: response type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - response attributes: type: object additionalProperties: false required: - created_at - deleted_at - updated_at - details properties: created_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time. readOnly: true details: type: - object - 'null' oneOf: - type: - object - 'null' title: Approval Response Details additionalProperties: false required: - approved properties: approved: type: string enum: - approved - declined reasoning: type: - string - 'null' - type: object title: Task/Circuit Breaker Response Details additionalProperties: false required: - complete properties: complete: type: boolean - type: object title: Rewind Response Details additionalProperties: false required: - rewind properties: rewind: type: boolean relationships: type: object required: - assignment - created_by_user additionalProperties: false properties: assignment: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - assignment created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user examples: approval: value: data: id: 0ba3f4a3-9f6b-4204-a233-25b377f19861 type: stage attributes: activated_at: '2020-09-11T22:25:40.000Z' created_at: '2020-09-11T21:25:40.000Z' updated_at: '2020-09-11T22:25:40.000Z' deleted_at: null due_date: '2020-09-12T21:25:40.000Z' stage_type: approval position: 1 metadata: title: First Approval Stage completion_rules: all status: active relationships: workflow: data: id: 586e3547-6798-419a-b5e6-39db937e1cbc type: workflow assignments: data: [] task: value: data: id: 0ba3f4a3-9f6b-4204-a233-25b377f19862 type: stage attributes: activated_at: '2020-09-11T22:25:40.000Z' created_at: '2020-09-11T21:25:40.000Z' updated_at: '2020-09-11T22:25:40.000Z' deleted_at: null due_date: '2020-09-12T21:25:40.000Z' stage_type: task position: 2 metadata: title: First Task Stage status: active relationships: workflow: data: id: 586e3547-6798-419a-b5e6-39db937e1cbc type: workflow assignments: data: [] circuit_breaker: value: data: id: 0ba3f4a3-9f6b-4204-a233-25b377f19863 type: stage attributes: activated_at: '2020-09-11T22:25:40.000Z' created_at: '2020-09-11T21:25:40.000Z' updated_at: '2020-09-11T22:25:40.000Z' deleted_at: null due_date: null stage_type: circuit_breaker position: 3 metadata: title: Pause status: active relationships: workflow: data: id: 586e3547-6798-419a-b5e6-39db937e1cbc type: workflow assignments: data: [] '400': description: Bad request content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status '401': description: Unauthorized content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status '403': description: Forbidden content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status '404': description: Not found content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status '409': description: Conflict content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status '422': description: Unprocessable entity content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status delete: tags: - Workflows operationId: DeleteStageV2 summary: Delete a stage security: - oauth2: - offline_access - api_key: - Session-Token parameters: - name: stage_id in: path required: true description: The ID of the stage schema: type: string format: uuid - name: include in: query required: false description: A comma separated value of related objects to include. schema: type: array items: type: string enum: - workflow - workflow.context - workflow.stages - assignments - assignments.responses style: form explode: false responses: '200': description: Stage successfully updated with deleted_at date/time content: application/json: schema: type: object required: - data properties: data: title: stage type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - stage attributes: type: object required: - created_at - activated_at - deleted_at - due_date - metadata - position - stage_type - status - updated_at additionalProperties: false properties: created_at: type: string format: date-time readOnly: true description: An ISO8601 date-time. activated_at: type: - string - 'null' format: date-time readOnly: true description: 'An ISO8601 date-time set to the time when this stage gained the `status` "active". Naturally, this field is `null` prior to the stage becoming active. It is also `null` _after_ a rollback if the rollback targets a stage earlier than the one currently active. ' deleted_at: type: - string - 'null' format: date-time readOnly: true description: An ISO8601 date-time. due_date: type: - string - 'null' format: date-time description: An ISO8601 date-time. metadata: type: - object - 'null' oneOf: - type: - object - 'null' title: Approval Stage Metadata additionalProperties: false required: - completion_rules properties: title: type: string description: The title of the Stage. Will default to "Approval Phase" completion_rules: type: string enum: - all - one - type: object title: Task/Circuit Breaker Stage Metadata additionalProperties: false properties: title: type: string description: The title of the Stage. Will default to "Task Phase" or "Pause" position: type: integer stage_type: type: string enum: - approval - task - circuit_breaker status: type: string enum: - active - complete - inactive updated_at: type: string format: date-time description: An ISO8601 date-time. relationships: type: object additionalProperties: false required: - workflow - assignments properties: workflow: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - workflow assignments: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - assignment included: type: array items: oneOf: - title: workflow type: object required: - id - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow meta: type: object description: "Optionally calculated workflow status metadata. **Not part of responses by default.**\n\nThis is currently only available when requesting workflow resources from the\n`/workflows/v2/workflows` and `/workflows/v2/workflows/{id}` `GET` endpoints.\nYou request that this metadata be included in responses with the `expose` query \nparameter like: `/workflows/v2/workflows?expose[workflow][meta]`.\n\nThe \"latest active stage\" is either the stage that is currently active or it is the\nlast stage of a completed workflow.\n" required: - latest_active_stage - completed_stages - stage_type_count additionalProperties: false properties: latest_active_stage: oneOf: - title: Stage Status Metadata allOf: - required: - stage_type - resource_identifier properties: stage_type: type: string enum: - approval - task - circuit_breaker title: type: - string - 'null' description: The title of the stage. due_date: type: - string - 'null' format: date-time description: The due date of the stage if set. resource_identifier: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - stage - type: object description: The status metadata of a stage. required: - assignment_counts properties: assignment_counts: type: object description: "Assignment counts broken down in three ways.\n\nFirst, the number of complete/incomplete assignments for\nall users (both approvals and tasks).\n\nSecond, the number of complete/incomplete assignments for\nthe current user (both approvals and tasks).\n\nThird, the number of declined approvals.\n\nIn the first two cases, both approvals and tasks can be \ncomplete or incomplete where both approved and declined responses\non an approval assignment count as completion.\n" required: - all - current_user - declined additionalProperties: false properties: all: type: object required: - incomplete - complete additionalProperties: false properties: incomplete: type: integer minimum: 0 complete: type: integer minimum: 0 current_user: type: object required: - incomplete - complete additionalProperties: false properties: incomplete: type: integer minimum: 0 complete: type: integer minimum: 0 declined: type: integer minimum: 0 - title: 'null' type: - object - 'null' enum: - null completed_stages: type: integer minimum: 0 stage_type_count: type: object required: - approval - task - circuit_breaker additionalProperties: false properties: approval: type: integer minimum: 0 task: type: integer minimum: 0 circuit_breaker: type: integer minimum: 0 attributes: type: object required: - created_at - status - is_approved - updated_at - deleted_at additionalProperties: false properties: created_at: type: string format: date-time description: An ISO8601 date-time indicating when the workflow was created. readOnly: true status: type: string description: A string indicating the current status of the workflow. enum: - active - complete - inactive - paused readOnly: true is_approved: type: boolean description: Indicative of whether the latest approval stage has been completed. Workflows with only task stages will never result in `is_approved=true`. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time indicating when the workflow was last updated. readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time indicating when the workflow was deleted (if it was deleted). readOnly: true relationships: type: object additionalProperties: false required: - created_by_user - stages properties: created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user context: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - context stages: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - stage - title: context type: object additionalProperties: false required: - id - type - attributes - relationships properties: id: type: string format: uuid type: type: string enum: - context attributes: type: object additionalProperties: false required: - created_at - deleted_at - updated_at properties: created_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true relationships: type: object additionalProperties: false required: - created_by_user properties: created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user workflow: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - workflow moment: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - moment - title: stage type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - stage attributes: type: object required: - created_at - activated_at - deleted_at - due_date - metadata - position - stage_type - status - updated_at additionalProperties: false properties: created_at: type: string format: date-time readOnly: true description: An ISO8601 date-time. activated_at: type: - string - 'null' format: date-time readOnly: true description: 'An ISO8601 date-time set to the time when this stage gained the `status` "active". Naturally, this field is `null` prior to the stage becoming active. It is also `null` _after_ a rollback if the rollback targets a stage earlier than the one currently active. ' deleted_at: type: - string - 'null' format: date-time readOnly: true description: An ISO8601 date-time. due_date: type: - string - 'null' format: date-time description: An ISO8601 date-time. metadata: type: - object - 'null' oneOf: - type: - object - 'null' title: Approval Stage Metadata additionalProperties: false required: - completion_rules properties: title: type: string description: The title of the Stage. Will default to "Approval Phase" completion_rules: type: string enum: - all - one - type: object title: Task/Circuit Breaker Stage Metadata additionalProperties: false properties: title: type: string description: The title of the Stage. Will default to "Task Phase" or "Pause" position: type: integer stage_type: type: string enum: - approval - task - circuit_breaker status: type: string enum: - active - complete - inactive updated_at: type: string format: date-time description: An ISO8601 date-time. relationships: type: object additionalProperties: false required: - workflow - assignments properties: workflow: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - workflow assignments: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - assignment - title: assignment type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - assignment relationships: type: object required: - created_by_user - assigned_user - stage - responses additionalProperties: false properties: created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user assigned_user: type: object required: - data additionalProperties: false properties: data: type: - object - 'null' required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user stage: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - stage responses: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - response attributes: type: object required: - assignment_type - created_at - deleted_at - metadata - position - updated_at additionalProperties: false properties: assignment_type: type: string enum: - approval - task - circuit_breaker created_at: type: string format: date-time readOnly: true updated_at: type: string format: date-time readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time. readOnly: true position: type: integer description: The sequential position (starting at 1) of the assignment within its stage. readOnly: true metadata: type: - object - 'null' anyOf: - type: - object - 'null' title: Approval Assignment Metadata additionalProperties: false properties: title: type: string description: The title of the Assignment. Will default to "Approval". - type: object title: Task/Circuit Breaker Assignment Metadata additionalProperties: false properties: title: type: string description: The title of the Assignment. Will default to "Task" or "Pause". is_starred: type: boolean - title: response type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - response attributes: type: object additionalProperties: false required: - created_at - deleted_at - updated_at - details properties: created_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time. readOnly: true details: type: - object - 'null' oneOf: - type: - object - 'null' title: Approval Response Details additionalProperties: false required: - approved properties: approved: type: string enum: - approved - declined reasoning: type: - string - 'null' - type: object title: Task/Circuit Breaker Response Details additionalProperties: false required: - complete properties: complete: type: boolean - type: object title: Rewind Response Details additionalProperties: false required: - rewind properties: rewind: type: boolean relationships: type: object required: - assignment - created_by_user additionalProperties: false properties: assignment: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - assignment created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user examples: approval: value: data: id: 0ba3f4a3-9f6b-4204-a233-25b377f19861 type: stage attributes: activated_at: '2020-09-11T22:25:40.000Z' created_at: '2020-09-11T21:25:40.000Z' updated_at: '2020-09-11T22:25:40.000Z' deleted_at: null due_date: '2020-09-12T21:25:40.000Z' stage_type: approval position: 1 metadata: title: First Approval Stage completion_rules: all status: active relationships: workflow: data: id: 586e3547-6798-419a-b5e6-39db937e1cbc type: workflow assignments: data: [] task: value: data: id: 0ba3f4a3-9f6b-4204-a233-25b377f19862 type: stage attributes: activated_at: '2020-09-11T22:25:40.000Z' created_at: '2020-09-11T21:25:40.000Z' updated_at: '2020-09-11T22:25:40.000Z' deleted_at: null due_date: '2020-09-12T21:25:40.000Z' stage_type: task position: 2 metadata: title: First Task Stage status: active relationships: workflow: data: id: 586e3547-6798-419a-b5e6-39db937e1cbc type: workflow assignments: data: [] circuit_breaker: value: data: id: 0ba3f4a3-9f6b-4204-a233-25b377f19863 type: stage attributes: activated_at: '2020-09-11T22:25:40.000Z' created_at: '2020-09-11T21:25:40.000Z' updated_at: '2020-09-11T22:25:40.000Z' deleted_at: null due_date: null stage_type: circuit_breaker position: 3 metadata: title: Pause status: active relationships: workflow: data: id: 586e3547-6798-419a-b5e6-39db937e1cbc type: workflow assignments: data: [] '404': description: Stage not found content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status '409': description: Stage has already been completed and cannot be deleted content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status servers: - url: https://login.ouropal.com /workflows/v2/assignments/{assignment_id}: get: tags: - Workflows operationId: ReadAssignmentV2 summary: Get an Assignment security: - oauth2: - offline_access - api_key: - Session-Token parameters: - name: assignment_id in: path required: true description: The ID of the assignment schema: type: string format: uuid - name: include in: query required: false description: 'A comma separated value of related resource objects on the assignment to include. Note that user resources are not available as includes on this endpoint; the client must make subsequent API requests `api/v1/users` to request additional information on related users. ' schema: type: array items: type: string enum: - stage - stage.workflow - stage.workflow.context - responses style: form explode: false responses: '200': description: Assignment successfully retrieved content: application/json: schema: type: object required: - data properties: data: title: assignment type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - assignment relationships: type: object required: - created_by_user - assigned_user - stage - responses additionalProperties: false properties: created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user assigned_user: type: object required: - data additionalProperties: false properties: data: type: - object - 'null' required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user stage: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - stage responses: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - response attributes: type: object required: - assignment_type - created_at - deleted_at - metadata - position - updated_at additionalProperties: false properties: assignment_type: type: string enum: - approval - task - circuit_breaker created_at: type: string format: date-time readOnly: true updated_at: type: string format: date-time readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time. readOnly: true position: type: integer description: The sequential position (starting at 1) of the assignment within its stage. readOnly: true metadata: type: - object - 'null' anyOf: - type: - object - 'null' title: Approval Assignment Metadata additionalProperties: false properties: title: type: string description: The title of the Assignment. Will default to "Approval". - type: object title: Task/Circuit Breaker Assignment Metadata additionalProperties: false properties: title: type: string description: The title of the Assignment. Will default to "Task" or "Pause". is_starred: type: boolean included: type: array items: oneOf: - title: response type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - response attributes: type: object additionalProperties: false required: - created_at - deleted_at - updated_at - details properties: created_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time. readOnly: true details: type: - object - 'null' oneOf: - type: - object - 'null' title: Approval Response Details additionalProperties: false required: - approved properties: approved: type: string enum: - approved - declined reasoning: type: - string - 'null' - type: object title: Task/Circuit Breaker Response Details additionalProperties: false required: - complete properties: complete: type: boolean - type: object title: Rewind Response Details additionalProperties: false required: - rewind properties: rewind: type: boolean relationships: type: object required: - assignment - created_by_user additionalProperties: false properties: assignment: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - assignment created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user - title: stage type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - stage attributes: type: object required: - created_at - activated_at - deleted_at - due_date - metadata - position - stage_type - status - updated_at additionalProperties: false properties: created_at: type: string format: date-time readOnly: true description: An ISO8601 date-time. activated_at: type: - string - 'null' format: date-time readOnly: true description: 'An ISO8601 date-time set to the time when this stage gained the `status` "active". Naturally, this field is `null` prior to the stage becoming active. It is also `null` _after_ a rollback if the rollback targets a stage earlier than the one currently active. ' deleted_at: type: - string - 'null' format: date-time readOnly: true description: An ISO8601 date-time. due_date: type: - string - 'null' format: date-time description: An ISO8601 date-time. metadata: type: - object - 'null' oneOf: - type: - object - 'null' title: Approval Stage Metadata additionalProperties: false required: - completion_rules properties: title: type: string description: The title of the Stage. Will default to "Approval Phase" completion_rules: type: string enum: - all - one - type: object title: Task/Circuit Breaker Stage Metadata additionalProperties: false properties: title: type: string description: The title of the Stage. Will default to "Task Phase" or "Pause" position: type: integer stage_type: type: string enum: - approval - task - circuit_breaker status: type: string enum: - active - complete - inactive updated_at: type: string format: date-time description: An ISO8601 date-time. relationships: type: object additionalProperties: false required: - workflow - assignments properties: workflow: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - workflow assignments: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - assignment - title: workflow type: object required: - id - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow meta: type: object description: "Optionally calculated workflow status metadata. **Not part of responses by default.**\n\nThis is currently only available when requesting workflow resources from the\n`/workflows/v2/workflows` and `/workflows/v2/workflows/{id}` `GET` endpoints.\nYou request that this metadata be included in responses with the `expose` query \nparameter like: `/workflows/v2/workflows?expose[workflow][meta]`.\n\nThe \"latest active stage\" is either the stage that is currently active or it is the\nlast stage of a completed workflow.\n" required: - latest_active_stage - completed_stages - stage_type_count additionalProperties: false properties: latest_active_stage: oneOf: - title: Stage Status Metadata allOf: - required: - stage_type - resource_identifier properties: stage_type: type: string enum: - approval - task - circuit_breaker title: type: - string - 'null' description: The title of the stage. due_date: type: - string - 'null' format: date-time description: The due date of the stage if set. resource_identifier: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - stage - type: object description: The status metadata of a stage. required: - assignment_counts properties: assignment_counts: type: object description: "Assignment counts broken down in three ways.\n\nFirst, the number of complete/incomplete assignments for\nall users (both approvals and tasks).\n\nSecond, the number of complete/incomplete assignments for\nthe current user (both approvals and tasks).\n\nThird, the number of declined approvals.\n\nIn the first two cases, both approvals and tasks can be \ncomplete or incomplete where both approved and declined responses\non an approval assignment count as completion.\n" required: - all - current_user - declined additionalProperties: false properties: all: type: object required: - incomplete - complete additionalProperties: false properties: incomplete: type: integer minimum: 0 complete: type: integer minimum: 0 current_user: type: object required: - incomplete - complete additionalProperties: false properties: incomplete: type: integer minimum: 0 complete: type: integer minimum: 0 declined: type: integer minimum: 0 - title: 'null' type: - object - 'null' enum: - null completed_stages: type: integer minimum: 0 stage_type_count: type: object required: - approval - task - circuit_breaker additionalProperties: false properties: approval: type: integer minimum: 0 task: type: integer minimum: 0 circuit_breaker: type: integer minimum: 0 attributes: type: object required: - created_at - status - is_approved - updated_at - deleted_at additionalProperties: false properties: created_at: type: string format: date-time description: An ISO8601 date-time indicating when the workflow was created. readOnly: true status: type: string description: A string indicating the current status of the workflow. enum: - active - complete - inactive - paused readOnly: true is_approved: type: boolean description: Indicative of whether the latest approval stage has been completed. Workflows with only task stages will never result in `is_approved=true`. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time indicating when the workflow was last updated. readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time indicating when the workflow was deleted (if it was deleted). readOnly: true relationships: type: object additionalProperties: false required: - created_by_user - stages properties: created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user context: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - context stages: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - stage - title: context type: object additionalProperties: false required: - id - type - attributes - relationships properties: id: type: string format: uuid type: type: string enum: - context attributes: type: object additionalProperties: false required: - created_at - deleted_at - updated_at properties: created_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true relationships: type: object additionalProperties: false required: - created_by_user properties: created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user workflow: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - workflow moment: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - moment examples: approval: value: data: id: 4ac02fc7-705c-467e-933e-8bf16fc3ebf1 type: assignment attributes: created_at: '2020-09-11T15:27:01.881-08:00' updated_at: '2020-09-11T15:27:01.881-08:00' deleted_at: null assignment_type: approval position: 1 metadata: title: Approval relationships: created_by_user: data: id: '13' type: user stage: data: id: 186ad497-b8a7-43d6-bd95-cde8f9a02cdc type: stage assigned_user: data: id: '15' type: user responses: data: - id: 5d806729-5a08-4e31-8b8e-17bea992ec69 type: response task: value: data: id: 4ac02fc7-705c-467e-933e-8bf16fc3ebf1 type: assignment attributes: created_at: '2020-09-11T15:27:01.881-08:00' updated_at: '2020-09-11T15:27:01.881-08:00' deleted_at: null assignment_type: task position: 1 metadata: title: Task is_starred: false relationships: created_by_user: data: id: '13' type: user stage: data: id: 186ad497-b8a7-43d6-bd95-cde8f9a02cdc type: stage assigned_user: data: id: '15' type: user responses: data: - id: 5d806729-5a08-4e31-8b8e-17bea992ec69 type: response circuit_breaker: value: data: id: 4ac02fc7-705c-467e-933e-8bf16fc3ebf1 type: assignment attributes: created_at: '2020-09-11T15:27:01.881-08:00' updated_at: '2020-09-11T15:27:01.881-08:00' deleted_at: null assignment_type: circuit_breaker position: 1 metadata: title: Pause relationships: created_by_user: data: id: '13' type: user stage: data: id: 186ad497-b8a7-43d6-bd95-cde8f9a02cdc type: stage assigned_user: data: id: '15' type: user responses: data: - id: 5d806729-5a08-4e31-8b8e-17bea992ec69 type: response '400': description: Bad request content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status '401': description: Unauthorized content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status '404': description: Not found content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status '422': description: Unprocessable entity content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status patch: tags: - Workflows operationId: UpdateAssignmentV2 summary: Update an assignment by id security: - oauth2: - offline_access - api_key: - Session-Token parameters: - name: assignment_id in: path required: true description: The ID of the assignment schema: type: string format: uuid requestBody: content: application/json: schema: type: object required: - data properties: data: type: object required: - type - attributes - id properties: id: type: string type: type: string enum: - assignment attributes: type: object properties: metadata: type: - object - 'null' properties: title: type: string is_starred: type: boolean relationships: type: object properties: assigned_user: type: object required: - data additionalProperties: false properties: data: type: - object - 'null' required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user stage: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - stage example: data: id: 586e3547-6798-419a-b5e6-39db937e1cbc type: assignment attributes: assigned_user_id: 2 responses: '200': description: An assignment resource. content: application/json: schema: type: object required: - data properties: data: title: assignment type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - assignment relationships: type: object required: - created_by_user - assigned_user - stage - responses additionalProperties: false properties: created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user assigned_user: type: object required: - data additionalProperties: false properties: data: type: - object - 'null' required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user stage: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - stage responses: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - response attributes: type: object required: - assignment_type - created_at - deleted_at - metadata - position - updated_at additionalProperties: false properties: assignment_type: type: string enum: - approval - task - circuit_breaker created_at: type: string format: date-time readOnly: true updated_at: type: string format: date-time readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time. readOnly: true position: type: integer description: The sequential position (starting at 1) of the assignment within its stage. readOnly: true metadata: type: - object - 'null' anyOf: - type: - object - 'null' title: Approval Assignment Metadata additionalProperties: false properties: title: type: string description: The title of the Assignment. Will default to "Approval". - type: object title: Task/Circuit Breaker Assignment Metadata additionalProperties: false properties: title: type: string description: The title of the Assignment. Will default to "Task" or "Pause". is_starred: type: boolean included: type: array items: oneOf: - title: response type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - response attributes: type: object additionalProperties: false required: - created_at - deleted_at - updated_at - details properties: created_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time. readOnly: true details: type: - object - 'null' oneOf: - type: - object - 'null' title: Approval Response Details additionalProperties: false required: - approved properties: approved: type: string enum: - approved - declined reasoning: type: - string - 'null' - type: object title: Task/Circuit Breaker Response Details additionalProperties: false required: - complete properties: complete: type: boolean - type: object title: Rewind Response Details additionalProperties: false required: - rewind properties: rewind: type: boolean relationships: type: object required: - assignment - created_by_user additionalProperties: false properties: assignment: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - assignment created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user - title: stage type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - stage attributes: type: object required: - created_at - activated_at - deleted_at - due_date - metadata - position - stage_type - status - updated_at additionalProperties: false properties: created_at: type: string format: date-time readOnly: true description: An ISO8601 date-time. activated_at: type: - string - 'null' format: date-time readOnly: true description: 'An ISO8601 date-time set to the time when this stage gained the `status` "active". Naturally, this field is `null` prior to the stage becoming active. It is also `null` _after_ a rollback if the rollback targets a stage earlier than the one currently active. ' deleted_at: type: - string - 'null' format: date-time readOnly: true description: An ISO8601 date-time. due_date: type: - string - 'null' format: date-time description: An ISO8601 date-time. metadata: type: - object - 'null' oneOf: - type: - object - 'null' title: Approval Stage Metadata additionalProperties: false required: - completion_rules properties: title: type: string description: The title of the Stage. Will default to "Approval Phase" completion_rules: type: string enum: - all - one - type: object title: Task/Circuit Breaker Stage Metadata additionalProperties: false properties: title: type: string description: The title of the Stage. Will default to "Task Phase" or "Pause" position: type: integer stage_type: type: string enum: - approval - task - circuit_breaker status: type: string enum: - active - complete - inactive updated_at: type: string format: date-time description: An ISO8601 date-time. relationships: type: object additionalProperties: false required: - workflow - assignments properties: workflow: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - workflow assignments: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - assignment - title: workflow type: object required: - id - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow meta: type: object description: "Optionally calculated workflow status metadata. **Not part of responses by default.**\n\nThis is currently only available when requesting workflow resources from the\n`/workflows/v2/workflows` and `/workflows/v2/workflows/{id}` `GET` endpoints.\nYou request that this metadata be included in responses with the `expose` query \nparameter like: `/workflows/v2/workflows?expose[workflow][meta]`.\n\nThe \"latest active stage\" is either the stage that is currently active or it is the\nlast stage of a completed workflow.\n" required: - latest_active_stage - completed_stages - stage_type_count additionalProperties: false properties: latest_active_stage: oneOf: - title: Stage Status Metadata allOf: - required: - stage_type - resource_identifier properties: stage_type: type: string enum: - approval - task - circuit_breaker title: type: - string - 'null' description: The title of the stage. due_date: type: - string - 'null' format: date-time description: The due date of the stage if set. resource_identifier: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - stage - type: object description: The status metadata of a stage. required: - assignment_counts properties: assignment_counts: type: object description: "Assignment counts broken down in three ways.\n\nFirst, the number of complete/incomplete assignments for\nall users (both approvals and tasks).\n\nSecond, the number of complete/incomplete assignments for\nthe current user (both approvals and tasks).\n\nThird, the number of declined approvals.\n\nIn the first two cases, both approvals and tasks can be \ncomplete or incomplete where both approved and declined responses\non an approval assignment count as completion.\n" required: - all - current_user - declined additionalProperties: false properties: all: type: object required: - incomplete - complete additionalProperties: false properties: incomplete: type: integer minimum: 0 complete: type: integer minimum: 0 current_user: type: object required: - incomplete - complete additionalProperties: false properties: incomplete: type: integer minimum: 0 complete: type: integer minimum: 0 declined: type: integer minimum: 0 - title: 'null' type: - object - 'null' enum: - null completed_stages: type: integer minimum: 0 stage_type_count: type: object required: - approval - task - circuit_breaker additionalProperties: false properties: approval: type: integer minimum: 0 task: type: integer minimum: 0 circuit_breaker: type: integer minimum: 0 attributes: type: object required: - created_at - status - is_approved - updated_at - deleted_at additionalProperties: false properties: created_at: type: string format: date-time description: An ISO8601 date-time indicating when the workflow was created. readOnly: true status: type: string description: A string indicating the current status of the workflow. enum: - active - complete - inactive - paused readOnly: true is_approved: type: boolean description: Indicative of whether the latest approval stage has been completed. Workflows with only task stages will never result in `is_approved=true`. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time indicating when the workflow was last updated. readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time indicating when the workflow was deleted (if it was deleted). readOnly: true relationships: type: object additionalProperties: false required: - created_by_user - stages properties: created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user context: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - context stages: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - stage - title: context type: object additionalProperties: false required: - id - type - attributes - relationships properties: id: type: string format: uuid type: type: string enum: - context attributes: type: object additionalProperties: false required: - created_at - deleted_at - updated_at properties: created_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true relationships: type: object additionalProperties: false required: - created_by_user properties: created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user workflow: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - workflow moment: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - moment examples: approval: value: data: id: 4ac02fc7-705c-467e-933e-8bf16fc3ebf1 type: assignment attributes: created_at: '2020-09-11T15:27:01.881-08:00' updated_at: '2020-09-11T15:27:01.881-08:00' deleted_at: null assignment_type: approval position: 1 metadata: title: Approval relationships: created_by_user: data: id: '13' type: user stage: data: id: 186ad497-b8a7-43d6-bd95-cde8f9a02cdc type: stage assigned_user: data: id: '15' type: user responses: data: - id: 5d806729-5a08-4e31-8b8e-17bea992ec69 type: response task: value: data: id: 4ac02fc7-705c-467e-933e-8bf16fc3ebf1 type: assignment attributes: created_at: '2020-09-11T15:27:01.881-08:00' updated_at: '2020-09-11T15:27:01.881-08:00' deleted_at: null assignment_type: task position: 1 metadata: title: Task is_starred: false relationships: created_by_user: data: id: '13' type: user stage: data: id: 186ad497-b8a7-43d6-bd95-cde8f9a02cdc type: stage assigned_user: data: id: '15' type: user responses: data: - id: 5d806729-5a08-4e31-8b8e-17bea992ec69 type: response circuit_breaker: value: data: id: 4ac02fc7-705c-467e-933e-8bf16fc3ebf1 type: assignment attributes: created_at: '2020-09-11T15:27:01.881-08:00' updated_at: '2020-09-11T15:27:01.881-08:00' deleted_at: null assignment_type: circuit_breaker position: 1 metadata: title: Pause relationships: created_by_user: data: id: '13' type: user stage: data: id: 186ad497-b8a7-43d6-bd95-cde8f9a02cdc type: stage assigned_user: data: id: '15' type: user responses: data: - id: 5d806729-5a08-4e31-8b8e-17bea992ec69 type: response '400': description: Bad request content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status '401': description: Unauthorized content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status '403': description: Forbidden content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status '404': description: Not found content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status '409': description: Conflict content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status '422': description: Unprocessable entity content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status delete: tags: - Workflows operationId: DeleteAssignmentV2 summary: Delete an Assignment security: - oauth2: - offline_access - api_key: - Session-Token parameters: - name: assignment_id in: path required: true description: The ID of the assignment schema: type: string format: uuid responses: '200': description: Assignment successfully updated with deleted_at date/time content: application/json: schema: type: object required: - data properties: data: title: assignment type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - assignment relationships: type: object required: - created_by_user - assigned_user - stage - responses additionalProperties: false properties: created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user assigned_user: type: object required: - data additionalProperties: false properties: data: type: - object - 'null' required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user stage: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - stage responses: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - response attributes: type: object required: - assignment_type - created_at - deleted_at - metadata - position - updated_at additionalProperties: false properties: assignment_type: type: string enum: - approval - task - circuit_breaker created_at: type: string format: date-time readOnly: true updated_at: type: string format: date-time readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time. readOnly: true position: type: integer description: The sequential position (starting at 1) of the assignment within its stage. readOnly: true metadata: type: - object - 'null' anyOf: - type: - object - 'null' title: Approval Assignment Metadata additionalProperties: false properties: title: type: string description: The title of the Assignment. Will default to "Approval". - type: object title: Task/Circuit Breaker Assignment Metadata additionalProperties: false properties: title: type: string description: The title of the Assignment. Will default to "Task" or "Pause". is_starred: type: boolean included: type: array items: oneOf: - title: response type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - response attributes: type: object additionalProperties: false required: - created_at - deleted_at - updated_at - details properties: created_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time. readOnly: true details: type: - object - 'null' oneOf: - type: - object - 'null' title: Approval Response Details additionalProperties: false required: - approved properties: approved: type: string enum: - approved - declined reasoning: type: - string - 'null' - type: object title: Task/Circuit Breaker Response Details additionalProperties: false required: - complete properties: complete: type: boolean - type: object title: Rewind Response Details additionalProperties: false required: - rewind properties: rewind: type: boolean relationships: type: object required: - assignment - created_by_user additionalProperties: false properties: assignment: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - assignment created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user - title: stage type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - stage attributes: type: object required: - created_at - activated_at - deleted_at - due_date - metadata - position - stage_type - status - updated_at additionalProperties: false properties: created_at: type: string format: date-time readOnly: true description: An ISO8601 date-time. activated_at: type: - string - 'null' format: date-time readOnly: true description: 'An ISO8601 date-time set to the time when this stage gained the `status` "active". Naturally, this field is `null` prior to the stage becoming active. It is also `null` _after_ a rollback if the rollback targets a stage earlier than the one currently active. ' deleted_at: type: - string - 'null' format: date-time readOnly: true description: An ISO8601 date-time. due_date: type: - string - 'null' format: date-time description: An ISO8601 date-time. metadata: type: - object - 'null' oneOf: - type: - object - 'null' title: Approval Stage Metadata additionalProperties: false required: - completion_rules properties: title: type: string description: The title of the Stage. Will default to "Approval Phase" completion_rules: type: string enum: - all - one - type: object title: Task/Circuit Breaker Stage Metadata additionalProperties: false properties: title: type: string description: The title of the Stage. Will default to "Task Phase" or "Pause" position: type: integer stage_type: type: string enum: - approval - task - circuit_breaker status: type: string enum: - active - complete - inactive updated_at: type: string format: date-time description: An ISO8601 date-time. relationships: type: object additionalProperties: false required: - workflow - assignments properties: workflow: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - workflow assignments: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - assignment - title: workflow type: object required: - id - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow meta: type: object description: "Optionally calculated workflow status metadata. **Not part of responses by default.**\n\nThis is currently only available when requesting workflow resources from the\n`/workflows/v2/workflows` and `/workflows/v2/workflows/{id}` `GET` endpoints.\nYou request that this metadata be included in responses with the `expose` query \nparameter like: `/workflows/v2/workflows?expose[workflow][meta]`.\n\nThe \"latest active stage\" is either the stage that is currently active or it is the\nlast stage of a completed workflow.\n" required: - latest_active_stage - completed_stages - stage_type_count additionalProperties: false properties: latest_active_stage: oneOf: - title: Stage Status Metadata allOf: - required: - stage_type - resource_identifier properties: stage_type: type: string enum: - approval - task - circuit_breaker title: type: - string - 'null' description: The title of the stage. due_date: type: - string - 'null' format: date-time description: The due date of the stage if set. resource_identifier: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - stage - type: object description: The status metadata of a stage. required: - assignment_counts properties: assignment_counts: type: object description: "Assignment counts broken down in three ways.\n\nFirst, the number of complete/incomplete assignments for\nall users (both approvals and tasks).\n\nSecond, the number of complete/incomplete assignments for\nthe current user (both approvals and tasks).\n\nThird, the number of declined approvals.\n\nIn the first two cases, both approvals and tasks can be \ncomplete or incomplete where both approved and declined responses\non an approval assignment count as completion.\n" required: - all - current_user - declined additionalProperties: false properties: all: type: object required: - incomplete - complete additionalProperties: false properties: incomplete: type: integer minimum: 0 complete: type: integer minimum: 0 current_user: type: object required: - incomplete - complete additionalProperties: false properties: incomplete: type: integer minimum: 0 complete: type: integer minimum: 0 declined: type: integer minimum: 0 - title: 'null' type: - object - 'null' enum: - null completed_stages: type: integer minimum: 0 stage_type_count: type: object required: - approval - task - circuit_breaker additionalProperties: false properties: approval: type: integer minimum: 0 task: type: integer minimum: 0 circuit_breaker: type: integer minimum: 0 attributes: type: object required: - created_at - status - is_approved - updated_at - deleted_at additionalProperties: false properties: created_at: type: string format: date-time description: An ISO8601 date-time indicating when the workflow was created. readOnly: true status: type: string description: A string indicating the current status of the workflow. enum: - active - complete - inactive - paused readOnly: true is_approved: type: boolean description: Indicative of whether the latest approval stage has been completed. Workflows with only task stages will never result in `is_approved=true`. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time indicating when the workflow was last updated. readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time indicating when the workflow was deleted (if it was deleted). readOnly: true relationships: type: object additionalProperties: false required: - created_by_user - stages properties: created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user context: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - context stages: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - stage - title: context type: object additionalProperties: false required: - id - type - attributes - relationships properties: id: type: string format: uuid type: type: string enum: - context attributes: type: object additionalProperties: false required: - created_at - deleted_at - updated_at properties: created_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true relationships: type: object additionalProperties: false required: - created_by_user properties: created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user workflow: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - workflow moment: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - moment example: data: id: 4ac02fc7-705c-467e-933e-8bf16fc3ebf1 type: assignment attributes: created_at: '2020-09-11T15:27:01.881-08:00' updated_at: '2020-09-11T15:27:01.881-08:00' deleted_at: '2020-10-11T15:27:01.881-08:00' assignment_type: approval position: 1 metadata: null relationships: created_by_user: data: id: '13' type: user stage: data: id: 186ad497-b8a7-43d6-bd95-cde8f9a02cdc type: stage assigned_user: data: id: '15' type: user responses: data: [] '400': description: Bad request content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status '401': description: Unauthorized content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status '404': description: Not found content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status '422': description: Unprocessable entity content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status servers: - url: https://login.ouropal.com /workflows/v2/assignments: get: tags: - Workflows operationId: ReadAssignmentsV2 summary: Get a collection of assignments description: 'Get assignments to which the authenticated user has access. These are not necessarily assignments assigned to the requesting user; if you wish to get assignments that are assigned to the user making the API request, pass the `assigned_user_id` filter set to the current user''s ID. If you do not specify a pagination limit, a default page limit of 150 assignments will be used. ' security: - oauth2: - offline_access - api_key: - Session-Token parameters: - name: filter in: query description: Filter the resulting assignments. required: false schema: type: object properties: activated_at: allOf: - type: object properties: eq: type: string description: 'Equal to filter. If no other filter is specified, `eq` will be assumed. ' gt: type: string description: Greater than filter gteq: type: string description: Greater than or equal to filter lt: type: string description: Less than filter lteq: type: string description: Less than or equal to filter - format: date-time - description: 'Filter assignments by when the stage transitioned to an "active" status. Uses syntax `filter[activated_at][gt]=2020-01-01T00:00:00-07:00`. You can filter to a particular day by omitting the `gt`/`lt`/etc.: `filter[activated_at]=2020-01-01`. ' assigned_user_id: type: array items: type: integer description: The ID(s) of the users to which assignments are given. assignment_type: type: array items: type: string enum: - approval - task - circuit_breaker - none description: The types of assignments to retrieve. brand_id: type: array description: 'The IDs of the workspaces to which results should be filtered. "Workspace ID" and "Brand ID" are synonymous. Comma separated list of IDs. If included, will only fetch resources associated with these brands. If not included, will return resources associated with all brands that the user belongs to. For example, `filter[brand_id]=1` will fetch all resources associated with brand 1, while `filter[brand_id]=1,2,3` will fetch any resources associated with brands 1, 2, or 3. ' items: type: integer created_at: allOf: - type: object properties: eq: type: string description: 'Equal to filter. If no other filter is specified, `eq` will be assumed. ' gt: type: string description: Greater than filter gteq: type: string description: Greater than or equal to filter lt: type: string description: Less than filter lteq: type: string description: Less than or equal to filter - format: date-time - description: 'Filter assignments by when they were created. Uses syntax `filter[created_at][gt]=2020-01-01T00:00:00-07:00`. You can filter to a particular day by omitting the `gt`/`lt`/etc.: `filter[created_at]=2020-01-01`. ' created_by_user_id: type: array items: type: integer description: The ID(s) of the users that created the assignment. due_date: allOf: - type: object properties: eq: type: string description: 'Equal to filter. If no other filter is specified, `eq` will be assumed. ' gt: type: string description: Greater than filter gteq: type: string description: Greater than or equal to filter lt: type: string description: Less than filter lteq: type: string description: Less than or equal to filter - format: date-time - description: 'Filter assignments by when they are due. Uses syntax `filter[due_date][gt]=2020-01-01T00:00:00-07:00` You can filter to a particular day by omitting the `gt`/`lt`/etc.: `filter[due_date]=2020-01-01`. You can filter to only assignments without a set due date by ommiting the `gt`/`lt`/etc. and filtering for null: `filter[due_date]=null`. Assignment due date is based on the stage containing the assignment. See Stage resource metadata. ' status: type: array items: type: string enum: - complete - incomplete description: 'The status of the assignment. This is dictated by the responses (if any) to this assignment. Note that an incomplete assignment _can_ exist within a completed stage if the criteria for completing the stage was met without all assignments in the stage having been completed. ' stage_status: type: array items: type: string enum: - inactive - active - complete description: 'The status of the stage containing this assignment. Note that an incomplete assignment _can_ exist within a completed stage if the criteria for completing the stage was met without all assignments in the stage having been completed. ' style: deepObject explode: true - name: include in: query required: false description: 'A comma separated value of related resource objects on the assignment to include. Note that user resources are not available as includes on this endpoint; the client must make subsequent API requests `api/v1/users` to request additional information on related users. ' schema: type: array items: type: string enum: - stage - stage.workflow - stage.workflow.context - responses style: form explode: false - name: sort in: query required: false description: 'A comma separated value specifying how a collection in the response body should be sorted, where each value is an attribute of the assignment. If no sort order is provided, resources will be default sorted by created_at, ascending. When specifying multiple values, each value in the sequence determines the ordering precedence. Lastly, each assignment in the collection will appear in ascending order, unless any of the enumerated values are prefixed with a minus "-" sign, in which case each assignment will appear in descending order for the specified values. Assignment due date is based on the stage containing the assignment. See Stage resource metadata. ' schema: type: string enum: - activated_at - assigned_user_id - created_at - created_by_user_id - due_date - position - updated_at - name: page in: query required: false description: 'Request a particular page using `offset` and `limit`. When not specified, the `offset` defaults to 0 and the `limit` defaults to 150. ' schema: type: object properties: offset: type: integer minimum: 0 limit: type: integer minimum: 0 maximum: 800 style: deepObject explode: true responses: '200': description: An array of assignments. content: application/json: schema: type: object required: - data - meta properties: data: type: array items: title: assignment type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - assignment relationships: type: object required: - created_by_user - assigned_user - stage - responses additionalProperties: false properties: created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user assigned_user: type: object required: - data additionalProperties: false properties: data: type: - object - 'null' required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user stage: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - stage responses: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - response attributes: type: object required: - assignment_type - created_at - deleted_at - metadata - position - updated_at additionalProperties: false properties: assignment_type: type: string enum: - approval - task - circuit_breaker created_at: type: string format: date-time readOnly: true updated_at: type: string format: date-time readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time. readOnly: true position: type: integer description: The sequential position (starting at 1) of the assignment within its stage. readOnly: true metadata: type: - object - 'null' anyOf: - type: - object - 'null' title: Approval Assignment Metadata additionalProperties: false properties: title: type: string description: The title of the Assignment. Will default to "Approval". - type: object title: Task/Circuit Breaker Assignment Metadata additionalProperties: false properties: title: type: string description: The title of the Assignment. Will default to "Task" or "Pause". is_starred: type: boolean included: type: array items: oneOf: - title: response type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - response attributes: type: object additionalProperties: false required: - created_at - deleted_at - updated_at - details properties: created_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time. readOnly: true details: type: - object - 'null' oneOf: - type: - object - 'null' title: Approval Response Details additionalProperties: false required: - approved properties: approved: type: string enum: - approved - declined reasoning: type: - string - 'null' - type: object title: Task/Circuit Breaker Response Details additionalProperties: false required: - complete properties: complete: type: boolean - type: object title: Rewind Response Details additionalProperties: false required: - rewind properties: rewind: type: boolean relationships: type: object required: - assignment - created_by_user additionalProperties: false properties: assignment: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - assignment created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user - title: stage type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - stage attributes: type: object required: - created_at - activated_at - deleted_at - due_date - metadata - position - stage_type - status - updated_at additionalProperties: false properties: created_at: type: string format: date-time readOnly: true description: An ISO8601 date-time. activated_at: type: - string - 'null' format: date-time readOnly: true description: 'An ISO8601 date-time set to the time when this stage gained the `status` "active". Naturally, this field is `null` prior to the stage becoming active. It is also `null` _after_ a rollback if the rollback targets a stage earlier than the one currently active. ' deleted_at: type: - string - 'null' format: date-time readOnly: true description: An ISO8601 date-time. due_date: type: - string - 'null' format: date-time description: An ISO8601 date-time. metadata: type: - object - 'null' oneOf: - type: - object - 'null' title: Approval Stage Metadata additionalProperties: false required: - completion_rules properties: title: type: string description: The title of the Stage. Will default to "Approval Phase" completion_rules: type: string enum: - all - one - type: object title: Task/Circuit Breaker Stage Metadata additionalProperties: false properties: title: type: string description: The title of the Stage. Will default to "Task Phase" or "Pause" position: type: integer stage_type: type: string enum: - approval - task - circuit_breaker status: type: string enum: - active - complete - inactive updated_at: type: string format: date-time description: An ISO8601 date-time. relationships: type: object additionalProperties: false required: - workflow - assignments properties: workflow: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - workflow assignments: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - assignment - title: workflow type: object required: - id - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow meta: type: object description: "Optionally calculated workflow status metadata. **Not part of responses by default.**\n\nThis is currently only available when requesting workflow resources from the\n`/workflows/v2/workflows` and `/workflows/v2/workflows/{id}` `GET` endpoints.\nYou request that this metadata be included in responses with the `expose` query \nparameter like: `/workflows/v2/workflows?expose[workflow][meta]`.\n\nThe \"latest active stage\" is either the stage that is currently active or it is the\nlast stage of a completed workflow.\n" required: - latest_active_stage - completed_stages - stage_type_count additionalProperties: false properties: latest_active_stage: oneOf: - title: Stage Status Metadata allOf: - required: - stage_type - resource_identifier properties: stage_type: type: string enum: - approval - task - circuit_breaker title: type: - string - 'null' description: The title of the stage. due_date: type: - string - 'null' format: date-time description: The due date of the stage if set. resource_identifier: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - stage - type: object description: The status metadata of a stage. required: - assignment_counts properties: assignment_counts: type: object description: "Assignment counts broken down in three ways.\n\nFirst, the number of complete/incomplete assignments for\nall users (both approvals and tasks).\n\nSecond, the number of complete/incomplete assignments for\nthe current user (both approvals and tasks).\n\nThird, the number of declined approvals.\n\nIn the first two cases, both approvals and tasks can be \ncomplete or incomplete where both approved and declined responses\non an approval assignment count as completion.\n" required: - all - current_user - declined additionalProperties: false properties: all: type: object required: - incomplete - complete additionalProperties: false properties: incomplete: type: integer minimum: 0 complete: type: integer minimum: 0 current_user: type: object required: - incomplete - complete additionalProperties: false properties: incomplete: type: integer minimum: 0 complete: type: integer minimum: 0 declined: type: integer minimum: 0 - title: 'null' type: - object - 'null' enum: - null completed_stages: type: integer minimum: 0 stage_type_count: type: object required: - approval - task - circuit_breaker additionalProperties: false properties: approval: type: integer minimum: 0 task: type: integer minimum: 0 circuit_breaker: type: integer minimum: 0 attributes: type: object required: - created_at - status - is_approved - updated_at - deleted_at additionalProperties: false properties: created_at: type: string format: date-time description: An ISO8601 date-time indicating when the workflow was created. readOnly: true status: type: string description: A string indicating the current status of the workflow. enum: - active - complete - inactive - paused readOnly: true is_approved: type: boolean description: Indicative of whether the latest approval stage has been completed. Workflows with only task stages will never result in `is_approved=true`. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time indicating when the workflow was last updated. readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time indicating when the workflow was deleted (if it was deleted). readOnly: true relationships: type: object additionalProperties: false required: - created_by_user - stages properties: created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user context: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - context stages: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - stage - title: context type: object additionalProperties: false required: - id - type - attributes - relationships properties: id: type: string format: uuid type: type: string enum: - context attributes: type: object additionalProperties: false required: - created_at - deleted_at - updated_at properties: created_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true relationships: type: object additionalProperties: false required: - created_by_user properties: created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user workflow: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - workflow moment: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - moment meta: allOf: - type: object required: - total - page - resource_type properties: resource_type: type: string total: type: integer page: type: object required: - limit - offset properties: limit: type: integer offset: type: integer - type: object required: - filtered_out_by_due_date properties: filtered_out_by_due_date: description: 'The number of assignments that were filtered out of the responses due to the `due_date` filter. Note that this number applies across all pages. ' type: integer minimum: 0 example: data: - id: 4ac02fc7-705c-467e-933e-8bf16fc3ebf1 type: assignment attributes: created_at: '2020-09-11T15:27:01.881-08:00' updated_at: '2020-09-11T15:27:01.881-08:00' deleted_at: null assignment_type: observer metadata: null position: 1 relationships: created_by_user: data: id: '13' type: user stage: data: id: 186ad497-b8a7-43d6-bd95-cde8f9a02cdc type: stage assigned_user: data: id: '15' type: user responses: data: - id: 5d806729-5a08-4e31-8b8e-17bea992ec69 type: response '400': description: Bad request content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status '401': description: Unauthorized content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status '404': description: Not found content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status post: tags: - Workflows operationId: CreateAssignmentV2 summary: Create an assignment security: - oauth2: - offline_access - api_key: - Session-Token requestBody: content: application/json: schema: type: object required: - data properties: data: type: object required: - type - attributes - relationships properties: type: type: string enum: - assignment attributes: type: object required: - assignment_type properties: metadata: type: - object - 'null' properties: title: type: string assignment_type: type: string enum: - approval - task - circuit_breaker relationships: type: object required: - stage - assigned_user properties: stage: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - stage assigned_user: type: object required: - data additionalProperties: false properties: data: type: - object - 'null' required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user example: data: type: assignment attributes: assignment_type: approval metadata: title: Do the thing plz relationships: assigned_user: data: id: '2' type: user stage: data: id: 186ad497-b8a7-43d6-bd95-cde8f9a02cdc type: stage responses: '201': description: Assignment created content: application/json: schema: type: object required: - data properties: data: title: assignment type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - assignment relationships: type: object required: - created_by_user - assigned_user - stage - responses additionalProperties: false properties: created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user assigned_user: type: object required: - data additionalProperties: false properties: data: type: - object - 'null' required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user stage: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - stage responses: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - response attributes: type: object required: - assignment_type - created_at - deleted_at - metadata - position - updated_at additionalProperties: false properties: assignment_type: type: string enum: - approval - task - circuit_breaker created_at: type: string format: date-time readOnly: true updated_at: type: string format: date-time readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time. readOnly: true position: type: integer description: The sequential position (starting at 1) of the assignment within its stage. readOnly: true metadata: type: - object - 'null' anyOf: - type: - object - 'null' title: Approval Assignment Metadata additionalProperties: false properties: title: type: string description: The title of the Assignment. Will default to "Approval". - type: object title: Task/Circuit Breaker Assignment Metadata additionalProperties: false properties: title: type: string description: The title of the Assignment. Will default to "Task" or "Pause". is_starred: type: boolean included: type: array items: oneOf: - title: response type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - response attributes: type: object additionalProperties: false required: - created_at - deleted_at - updated_at - details properties: created_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time. readOnly: true details: type: - object - 'null' oneOf: - type: - object - 'null' title: Approval Response Details additionalProperties: false required: - approved properties: approved: type: string enum: - approved - declined reasoning: type: - string - 'null' - type: object title: Task/Circuit Breaker Response Details additionalProperties: false required: - complete properties: complete: type: boolean - type: object title: Rewind Response Details additionalProperties: false required: - rewind properties: rewind: type: boolean relationships: type: object required: - assignment - created_by_user additionalProperties: false properties: assignment: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - assignment created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user - title: stage type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - stage attributes: type: object required: - created_at - activated_at - deleted_at - due_date - metadata - position - stage_type - status - updated_at additionalProperties: false properties: created_at: type: string format: date-time readOnly: true description: An ISO8601 date-time. activated_at: type: - string - 'null' format: date-time readOnly: true description: 'An ISO8601 date-time set to the time when this stage gained the `status` "active". Naturally, this field is `null` prior to the stage becoming active. It is also `null` _after_ a rollback if the rollback targets a stage earlier than the one currently active. ' deleted_at: type: - string - 'null' format: date-time readOnly: true description: An ISO8601 date-time. due_date: type: - string - 'null' format: date-time description: An ISO8601 date-time. metadata: type: - object - 'null' oneOf: - type: - object - 'null' title: Approval Stage Metadata additionalProperties: false required: - completion_rules properties: title: type: string description: The title of the Stage. Will default to "Approval Phase" completion_rules: type: string enum: - all - one - type: object title: Task/Circuit Breaker Stage Metadata additionalProperties: false properties: title: type: string description: The title of the Stage. Will default to "Task Phase" or "Pause" position: type: integer stage_type: type: string enum: - approval - task - circuit_breaker status: type: string enum: - active - complete - inactive updated_at: type: string format: date-time description: An ISO8601 date-time. relationships: type: object additionalProperties: false required: - workflow - assignments properties: workflow: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - workflow assignments: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - assignment - title: workflow type: object required: - id - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow meta: type: object description: "Optionally calculated workflow status metadata. **Not part of responses by default.**\n\nThis is currently only available when requesting workflow resources from the\n`/workflows/v2/workflows` and `/workflows/v2/workflows/{id}` `GET` endpoints.\nYou request that this metadata be included in responses with the `expose` query \nparameter like: `/workflows/v2/workflows?expose[workflow][meta]`.\n\nThe \"latest active stage\" is either the stage that is currently active or it is the\nlast stage of a completed workflow.\n" required: - latest_active_stage - completed_stages - stage_type_count additionalProperties: false properties: latest_active_stage: oneOf: - title: Stage Status Metadata allOf: - required: - stage_type - resource_identifier properties: stage_type: type: string enum: - approval - task - circuit_breaker title: type: - string - 'null' description: The title of the stage. due_date: type: - string - 'null' format: date-time description: The due date of the stage if set. resource_identifier: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - stage - type: object description: The status metadata of a stage. required: - assignment_counts properties: assignment_counts: type: object description: "Assignment counts broken down in three ways.\n\nFirst, the number of complete/incomplete assignments for\nall users (both approvals and tasks).\n\nSecond, the number of complete/incomplete assignments for\nthe current user (both approvals and tasks).\n\nThird, the number of declined approvals.\n\nIn the first two cases, both approvals and tasks can be \ncomplete or incomplete where both approved and declined responses\non an approval assignment count as completion.\n" required: - all - current_user - declined additionalProperties: false properties: all: type: object required: - incomplete - complete additionalProperties: false properties: incomplete: type: integer minimum: 0 complete: type: integer minimum: 0 current_user: type: object required: - incomplete - complete additionalProperties: false properties: incomplete: type: integer minimum: 0 complete: type: integer minimum: 0 declined: type: integer minimum: 0 - title: 'null' type: - object - 'null' enum: - null completed_stages: type: integer minimum: 0 stage_type_count: type: object required: - approval - task - circuit_breaker additionalProperties: false properties: approval: type: integer minimum: 0 task: type: integer minimum: 0 circuit_breaker: type: integer minimum: 0 attributes: type: object required: - created_at - status - is_approved - updated_at - deleted_at additionalProperties: false properties: created_at: type: string format: date-time description: An ISO8601 date-time indicating when the workflow was created. readOnly: true status: type: string description: A string indicating the current status of the workflow. enum: - active - complete - inactive - paused readOnly: true is_approved: type: boolean description: Indicative of whether the latest approval stage has been completed. Workflows with only task stages will never result in `is_approved=true`. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time indicating when the workflow was last updated. readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time indicating when the workflow was deleted (if it was deleted). readOnly: true relationships: type: object additionalProperties: false required: - created_by_user - stages properties: created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user context: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - context stages: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - stage - title: context type: object additionalProperties: false required: - id - type - attributes - relationships properties: id: type: string format: uuid type: type: string enum: - context attributes: type: object additionalProperties: false required: - created_at - deleted_at - updated_at properties: created_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true relationships: type: object additionalProperties: false required: - created_by_user properties: created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user workflow: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - workflow moment: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - moment examples: approval: value: data: id: 4ac02fc7-705c-467e-933e-8bf16fc3ebf1 type: assignment attributes: created_at: '2020-09-11T15:27:01.881-08:00' updated_at: '2020-09-11T15:27:01.881-08:00' deleted_at: null assignment_type: approval position: 1 metadata: title: Approval relationships: created_by_user: data: id: '13' type: user stage: data: id: 186ad497-b8a7-43d6-bd95-cde8f9a02cdc type: stage assigned_user: data: id: '15' type: user responses: data: - id: 5d806729-5a08-4e31-8b8e-17bea992ec69 type: response task: value: data: id: 4ac02fc7-705c-467e-933e-8bf16fc3ebf1 type: assignment attributes: created_at: '2020-09-11T15:27:01.881-08:00' updated_at: '2020-09-11T15:27:01.881-08:00' deleted_at: null assignment_type: task position: 1 metadata: title: Task is_starred: false relationships: created_by_user: data: id: '13' type: user stage: data: id: 186ad497-b8a7-43d6-bd95-cde8f9a02cdc type: stage assigned_user: data: id: '15' type: user responses: data: - id: 5d806729-5a08-4e31-8b8e-17bea992ec69 type: response circuit_breaker: value: data: id: 4ac02fc7-705c-467e-933e-8bf16fc3ebf1 type: assignment attributes: created_at: '2020-09-11T15:27:01.881-08:00' updated_at: '2020-09-11T15:27:01.881-08:00' deleted_at: null assignment_type: circuit_breaker position: 1 metadata: title: Pause relationships: created_by_user: data: id: '13' type: user stage: data: id: 186ad497-b8a7-43d6-bd95-cde8f9a02cdc type: stage assigned_user: data: id: '15' type: user responses: data: - id: 5d806729-5a08-4e31-8b8e-17bea992ec69 type: response '400': description: Bad request content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status '401': description: Unauthorized content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status '404': description: Not found content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status servers: - url: https://login.ouropal.com /workflows/v2/responses: post: tags: - Workflows operationId: CreateResponseV2 summary: Create a Response for an Assignment security: - oauth2: - offline_access - api_key: - Session-Token parameters: - name: include in: query required: false description: 'A comma separated value of related resource objects on the assignment to include. Note that user resources are not available as includes on this endpoint; the client must make subsequent API requests `api/v1/users` to request additional information on related users. ' schema: type: array items: type: string enum: - assignment style: form explode: false requestBody: content: application/json: schema: type: object required: - data properties: data: type: object required: - type - attributes - relationships properties: type: type: string enum: - response attributes: type: object required: - details properties: details: type: - object - 'null' oneOf: - type: - object - 'null' title: Approval Response Details additionalProperties: false required: - approved properties: approved: type: string enum: - approved - declined reasoning: type: - string - 'null' - type: object title: Task/Circuit Breaker Response Details additionalProperties: false required: - complete properties: complete: type: boolean - type: object title: Rewind Response Details additionalProperties: false required: - rewind properties: rewind: type: boolean relationships: type: object required: - assignment properties: assignment: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - assignment example: data: id: 4ac02fc7-705c-467e-933e-8bf16fc3ebf1 type: response attributes: details: approved: declined resoning: not quite there yet relationships: assignment: data: id: d7a0168b-edc6-4737-85b6-8b551d1faf99 type: assignment responses: '201': description: Response created content: application/json: schema: type: object required: - data properties: data: title: response type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - response attributes: type: object additionalProperties: false required: - created_at - deleted_at - updated_at - details properties: created_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time. readOnly: true details: type: - object - 'null' oneOf: - type: - object - 'null' title: Approval Response Details additionalProperties: false required: - approved properties: approved: type: string enum: - approved - declined reasoning: type: - string - 'null' - type: object title: Task/Circuit Breaker Response Details additionalProperties: false required: - complete properties: complete: type: boolean - type: object title: Rewind Response Details additionalProperties: false required: - rewind properties: rewind: type: boolean relationships: type: object required: - assignment - created_by_user additionalProperties: false properties: assignment: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - assignment created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user included: type: array items: oneOf: - title: assignment type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - assignment relationships: type: object required: - created_by_user - assigned_user - stage - responses additionalProperties: false properties: created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user assigned_user: type: object required: - data additionalProperties: false properties: data: type: - object - 'null' required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user stage: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - stage responses: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - response attributes: type: object required: - assignment_type - created_at - deleted_at - metadata - position - updated_at additionalProperties: false properties: assignment_type: type: string enum: - approval - task - circuit_breaker created_at: type: string format: date-time readOnly: true updated_at: type: string format: date-time readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time. readOnly: true position: type: integer description: The sequential position (starting at 1) of the assignment within its stage. readOnly: true metadata: type: - object - 'null' anyOf: - type: - object - 'null' title: Approval Assignment Metadata additionalProperties: false properties: title: type: string description: The title of the Assignment. Will default to "Approval". - type: object title: Task/Circuit Breaker Assignment Metadata additionalProperties: false properties: title: type: string description: The title of the Assignment. Will default to "Task" or "Pause". is_starred: type: boolean - title: stage type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - stage attributes: type: object required: - created_at - activated_at - deleted_at - due_date - metadata - position - stage_type - status - updated_at additionalProperties: false properties: created_at: type: string format: date-time readOnly: true description: An ISO8601 date-time. activated_at: type: - string - 'null' format: date-time readOnly: true description: 'An ISO8601 date-time set to the time when this stage gained the `status` "active". Naturally, this field is `null` prior to the stage becoming active. It is also `null` _after_ a rollback if the rollback targets a stage earlier than the one currently active. ' deleted_at: type: - string - 'null' format: date-time readOnly: true description: An ISO8601 date-time. due_date: type: - string - 'null' format: date-time description: An ISO8601 date-time. metadata: type: - object - 'null' oneOf: - type: - object - 'null' title: Approval Stage Metadata additionalProperties: false required: - completion_rules properties: title: type: string description: The title of the Stage. Will default to "Approval Phase" completion_rules: type: string enum: - all - one - type: object title: Task/Circuit Breaker Stage Metadata additionalProperties: false properties: title: type: string description: The title of the Stage. Will default to "Task Phase" or "Pause" position: type: integer stage_type: type: string enum: - approval - task - circuit_breaker status: type: string enum: - active - complete - inactive updated_at: type: string format: date-time description: An ISO8601 date-time. relationships: type: object additionalProperties: false required: - workflow - assignments properties: workflow: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - workflow assignments: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - assignment example: data: id: 4ac02fc7-705c-467e-933e-8bf16fc3ebf1 type: response attributes: created_at: '2020-09-11T15:27:01.881-08:00' updated_at: '2020-09-11T15:27:01.881-08:00' deleted_at: null details: approved: approved reasoning: a-good-response relationships: created_by_user: data: id: '1' type: user assignment: data: id: d7a0168b-edc6-4737-85b6-8b551d1faf99 type: assignment '400': description: Bad request content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status '401': description: Unauthorized content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status '404': description: Not found content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status servers: - url: https://login.ouropal.com /workflows/v2/responses/{response_id}: get: tags: - Workflows operationId: ReadResponseV2 summary: Fetch a Response for an Assignment security: - oauth2: - offline_access - api_key: - Session-Token parameters: - name: response_id in: path required: true description: The ID of the response schema: type: string format: uuid - name: include in: query required: false description: 'A comma separated value of related resource objects on the assignment to include. Note that user resources are not available as includes on this endpoint; the client must make subsequent API requests `api/v1/users` to request additional information on related users. ' schema: type: array items: type: string enum: - assignment style: form explode: false responses: '200': description: Successfully fetched response content: application/json: schema: type: object required: - data properties: data: title: response type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - response attributes: type: object additionalProperties: false required: - created_at - deleted_at - updated_at - details properties: created_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time. readOnly: true details: type: - object - 'null' oneOf: - type: - object - 'null' title: Approval Response Details additionalProperties: false required: - approved properties: approved: type: string enum: - approved - declined reasoning: type: - string - 'null' - type: object title: Task/Circuit Breaker Response Details additionalProperties: false required: - complete properties: complete: type: boolean - type: object title: Rewind Response Details additionalProperties: false required: - rewind properties: rewind: type: boolean relationships: type: object required: - assignment - created_by_user additionalProperties: false properties: assignment: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - assignment created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user included: type: array items: oneOf: - title: assignment type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - assignment relationships: type: object required: - created_by_user - assigned_user - stage - responses additionalProperties: false properties: created_by_user: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user assigned_user: type: object required: - data additionalProperties: false properties: data: type: - object - 'null' required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - user stage: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - stage responses: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - response attributes: type: object required: - assignment_type - created_at - deleted_at - metadata - position - updated_at additionalProperties: false properties: assignment_type: type: string enum: - approval - task - circuit_breaker created_at: type: string format: date-time readOnly: true updated_at: type: string format: date-time readOnly: true deleted_at: type: - string - 'null' format: date-time description: An ISO8601 date-time. readOnly: true position: type: integer description: The sequential position (starting at 1) of the assignment within its stage. readOnly: true metadata: type: - object - 'null' anyOf: - type: - object - 'null' title: Approval Assignment Metadata additionalProperties: false properties: title: type: string description: The title of the Assignment. Will default to "Approval". - type: object title: Task/Circuit Breaker Assignment Metadata additionalProperties: false properties: title: type: string description: The title of the Assignment. Will default to "Task" or "Pause". is_starred: type: boolean - title: stage type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - stage attributes: type: object required: - created_at - activated_at - deleted_at - due_date - metadata - position - stage_type - status - updated_at additionalProperties: false properties: created_at: type: string format: date-time readOnly: true description: An ISO8601 date-time. activated_at: type: - string - 'null' format: date-time readOnly: true description: 'An ISO8601 date-time set to the time when this stage gained the `status` "active". Naturally, this field is `null` prior to the stage becoming active. It is also `null` _after_ a rollback if the rollback targets a stage earlier than the one currently active. ' deleted_at: type: - string - 'null' format: date-time readOnly: true description: An ISO8601 date-time. due_date: type: - string - 'null' format: date-time description: An ISO8601 date-time. metadata: type: - object - 'null' oneOf: - type: - object - 'null' title: Approval Stage Metadata additionalProperties: false required: - completion_rules properties: title: type: string description: The title of the Stage. Will default to "Approval Phase" completion_rules: type: string enum: - all - one - type: object title: Task/Circuit Breaker Stage Metadata additionalProperties: false properties: title: type: string description: The title of the Stage. Will default to "Task Phase" or "Pause" position: type: integer stage_type: type: string enum: - approval - task - circuit_breaker status: type: string enum: - active - complete - inactive updated_at: type: string format: date-time description: An ISO8601 date-time. relationships: type: object additionalProperties: false required: - workflow - assignments properties: workflow: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - workflow assignments: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string type: type: string enum: - assignment example: data: id: 4ac02fc7-705c-467e-933e-8bf16fc3ebf1 type: response attributes: created_at: '2020-09-11T15:27:01.881-08:00' updated_at: '2020-09-11T15:27:01.881-08:00' deleted_at: null details: approved: approved reasoning: a-good-response relationships: created_by_user: data: id: '1' type: user assignment: data: id: d7a0168b-edc6-4737-85b6-8b551d1faf99 type: assignment '400': description: Bad request content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status '401': description: Unauthorized content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status '404': description: Not found content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status '422': description: Unprocessable entity content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string title: type: string detail: type: string required: - status servers: - url: https://login.ouropal.com /v3/workflows: get: tags: - Workflows operationId: ReadWorkflowsV3 summary: Get a collection of workflows security: - oauth2: - offline_access - api_key: [] parameters: - name: include in: query required: false description: A comma separated value of related objects to include. schema: type: array items: type: string enum: - context - stages - stages.assignments - stages.assignments.responses style: form explode: false - name: filter in: query required: false description: Filter the resulting workflows. schema: type: object properties: context.moment_id: type: array items: type: string format: uuid description: 'Filter workflows by their workflow_context''s `moment_id`. ' context.created_at: allOf: - type: object properties: eq: type: string description: 'Equal to filter. If no other filter is specified, `eq` will be assumed. ' gt: type: string description: Greater than filter gteq: type: string description: Greater than or equal to filter lt: type: string description: Less than filter lteq: type: string description: Less than or equal to filter - format: date-time - description: 'Filter workflows by when their workflow_context was created. Uses syntax `filter[context.created_at][gt]=2020-01-01T00:00:00-07:00` You can filter to a particular day by omitting the `gt`/`lt`/etc.: `filter[context.created_at]=2020-01-01`. The distinction between when a workflow was created and when its workflow_context was created may seem subtle but if you want to know e.g. "when Moment x''s workflow was created" then this is the filter to use. ' workflow_status: type: array items: type: string enum: - not_started description: The status of the Workflows to retrieve. style: deepObject explode: true - name: sort in: query required: false description: 'A comma separated value specifying how a collection in the response body should be sorted, where each value is an attribute of the workflow. If no sort order is provided, resources will be default sorted by created_at, ascending. When specifying multiple values, each value in the sequence determines the ordering precedence. Lastly, each workflow in the collection will appear in ascending order, unless any of the enumerated values are prefixed with a minus "-" sign, in which case each workflow will appear in descending order for the specified values. ' schema: type: string enum: - created_at - updated_at - name: expose in: query required: false description: 'Expose response data that is only provided by request. ' schema: type: object properties: workflow: type: object properties: meta: type: - string - 'null' description: 'Expose the workflow status metadata on each workflow resource. Use this parameter as: `?expose[workflow][meta]` ' style: deepObject explode: true - name: page description: Specify an offset and limit for pagination in: query required: false schema: type: object properties: limit: type: integer default: 50 offset: type: integer style: deepObject explode: true responses: '200': description: A list of workflows content: application/json: schema: type: object required: - data properties: data: type: array items: title: workflow type: object required: - id - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow meta: type: object description: 'Optionally calculated workflow status metadata. **Not part of responses by default.** This is currently only available when requesting workflow resources from the `/workflows/v2/workflows` and `/workflows/v2/workflows/{id}` `GET` endpoints. You request that this metadata be included in responses with the `expose` query parameter like: `/workflows/v2/workflows?expose[workflow][meta]`. The "latest active stage" is either the stage that is currently active or it is the last stage of a completed workflow. ' required: - latest_active_stage - completed_stages - stage_type_count additionalProperties: false properties: latest_active_stage: oneOf: - title: Stage Status Metadata allOf: - required: - stage_type - resource_identifier properties: stage_type: type: string enum: - approval - task - circuit_breaker title: type: - string - 'null' description: The title of the stage. due_date: type: - string - 'null' format: date-time description: The due date of the stage if set. resource_identifier: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow_stage - type: object description: The status metadata of a workflow_stage. required: - assignment_counts properties: assignment_counts: type: object description: 'Assignment counts broken down in three ways. First, the number of complete/incomplete assignments for all users (both approvals and tasks). Second, the number of complete/incomplete assignments for the current user (both approvals and tasks). Third, the number of declined approvals. In the first two cases, both approvals and tasks can be complete or incomplete where both approved and declined responses on an approval assignment count as completion. ' required: - all - current_user - declined additionalProperties: false properties: all: type: object required: - incomplete - complete additionalProperties: false properties: incomplete: type: integer minimum: 0 complete: type: integer minimum: 0 current_user: type: object required: - incomplete - complete additionalProperties: false properties: incomplete: type: integer minimum: 0 complete: type: integer minimum: 0 declined: type: integer minimum: 0 - title: 'null' type: - object - 'null' enum: - null completed_stages: type: integer minimum: 0 stage_type_count: type: object required: - approval - task - circuit_breaker additionalProperties: false properties: approval: type: integer minimum: 0 task: type: integer minimum: 0 circuit_breaker: type: integer minimum: 0 attributes: type: object required: - created_at - status - is_approved - updated_at additionalProperties: false properties: created_at: type: string format: date-time description: An ISO8601 date-time indicating when the workflow was created. readOnly: true status: type: string description: A string indicating the current status of the workflow. enum: - active - complete - inactive - paused readOnly: true is_approved: type: boolean description: 'Indicative of whether the latest approval workflow_stage has been completed. Workflows with only task workflow_stages will never result in `is_approved=true`. ' readOnly: true updated_at: type: string format: date-time description: 'An ISO8601 date-time indicating when the workflow was last updated. ' readOnly: true relationships: type: object additionalProperties: false required: - context - created_by_user - stages properties: context: type: object required: - data additionalProperties: false properties: data: type: - object - 'null' required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow_context created_by_user: title: User type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - user stages: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow_stage included: type: array items: oneOf: - title: workflow_context type: object additionalProperties: false required: - id - type - attributes - relationships properties: id: type: string format: uuid type: type: string enum: - workflow_context attributes: type: object additionalProperties: false required: - created_at - updated_at properties: created_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true relationships: type: object additionalProperties: false required: - block - created_by_user - moment - workflow properties: block: type: object required: - data additionalProperties: false properties: data: type: - object - 'null' required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - block created_by_user: title: User type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - user moment: type: object required: - data additionalProperties: false properties: data: type: - object - 'null' required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - moment workflow: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow - title: workflow_stage type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow_stage attributes: type: object required: - activated_at - created_at - due_date - metadata - position - stage_type - status - updated_at additionalProperties: false properties: activated_at: type: - string - 'null' format: date-time readOnly: true description: 'An ISO8601 date-time set to the time when this workflow_stage gained the `status` "active". Naturally, this field is `null` prior to the workflow_stage becoming active. It is also `null` _after_ a rollback if the rollback targets a workflow_stage earlier than the one currently active. ' created_at: type: string format: date-time readOnly: true description: An ISO8601 date-time. due_date: type: - string - 'null' format: date-time description: An ISO8601 date-time. metadata: type: - object - 'null' oneOf: - type: - object - 'null' title: Approval Workflow Stage Metadata additionalProperties: false required: - completion_rules properties: title: type: string description: The title of the workflow_stage. Will default to "Approval Phase" completion_rules: type: string enum: - all - one - type: object title: Task/Circuit Breaker Workflow Stage Metadata additionalProperties: false properties: title: type: string description: The title of the workflow_stage. Will default to "Task Phase" or "Pause" position: type: integer stage_type: type: string enum: - approval - task - circuit_breaker status: type: string enum: - active - complete - inactive updated_at: type: string format: date-time description: An ISO8601 date-time. relationships: type: object additionalProperties: false required: - assignments - workflow properties: assignments: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow_assignment workflow: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow - title: workflow_assignment type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow_assignment relationships: type: object required: - created_by_user - assigned_user - stage - responses additionalProperties: false properties: created_by_user: title: User type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - user assigned_user: title: User type: object required: - data additionalProperties: false properties: data: type: - object - 'null' required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - user stage: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow_stage responses: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow_response attributes: type: object required: - assignment_type - created_at - metadata - position - updated_at additionalProperties: false properties: assignment_type: type: string enum: - approval - task - circuit_breaker created_at: type: string format: date-time readOnly: true metadata: type: - object - 'null' anyOf: - type: - object - 'null' title: Approval Workflow Assignment Metadata additionalProperties: false properties: title: type: string description: The title of the workflow_assignment. Will default to "Approval". - type: object title: Task/Circuit Breaker Workflow Assignment Metadata additionalProperties: false properties: title: type: string description: The title of the workflow_assignment. Will default to "Task" or "Pause". is_starred: type: boolean position: type: integer description: 'The sequential position (starting at 1) of the workflow_assignment within its workflow_stage. ' readOnly: true updated_at: type: string format: date-time readOnly: true - title: workflow_response type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow_response attributes: type: object additionalProperties: false required: - created_at - details - updated_at properties: created_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true details: type: - object - 'null' oneOf: - type: - object - 'null' title: Approval Workflow Response Details additionalProperties: false required: - approved properties: approved: type: string enum: - approved - declined reasoning: type: - string - 'null' - type: object title: Task/Circuit Breaker Workflow Response Details additionalProperties: false required: - complete properties: complete: type: boolean - type: object title: Rewind Workflow Response Details additionalProperties: false required: - rewind properties: rewind: type: boolean updated_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true relationships: type: object required: - assignment - created_by_user additionalProperties: false properties: assignment: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow_assignment created_by_user: title: User type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - user meta: type: object required: - total - page - resource_type properties: resource_type: type: string total: type: integer page: type: object required: - limit - offset properties: limit: type: integer offset: type: integer example: data: - id: 4ac02fc7-705c-467e-933e-8bf16fc3ebf1 type: workflow attributes: created_at: '2020-09-11T15:27:01.881-08:00' updated_at: '2020-09-11T15:27:01.881-08:00' status: active is_approved: false relationships: context: data: id: 4ac02fc7-705c-467e-933e-8bf16fc3ebf1 type: workflow_context created_by_user: data: id: ada0d59f-9f8c-4df3-ae9c-d6997ab48645 type: user stages: data: - id: 186ad497-b8a7-43d6-bd95-cde8f9a02cdc type: workflow_stage assignments: data: - id: d7a0168b-edc6-4737-85b6-8b551d1faf99 type: workflow_assignment '400': description: Bad request content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string description: The http status code of the error response. title: type: string description: A short, human-readable summary of the error. detail: type: string description: A human-readable explanation of the error. code: type: string description: 'An system-readable error code to provide additional specificity for the error. ' required: - status '401': description: Unauthorized content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string description: The http status code of the error response. title: type: string description: A short, human-readable summary of the error. detail: type: string description: A human-readable explanation of the error. code: type: string description: 'An system-readable error code to provide additional specificity for the error. ' required: - status '404': description: Not found content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string description: The http status code of the error response. title: type: string description: A short, human-readable summary of the error. detail: type: string description: A human-readable explanation of the error. code: type: string description: 'An system-readable error code to provide additional specificity for the error. ' required: - status post: tags: - Workflows operationId: CreateWorkflowsV3 summary: Create a workflow description: 'This endpoint creates a workflow without a workflow_context. Before being used by an end-user of the Opal Platform, the workflow will need to be associated with a resource via a `workflow_context` using the `v3/workflow_contexts` endpoint. If you use the `template` parameter to create a workflow that is pre-populated with workflow_stages & workflow_assignments, you may also want to use the `include` parameter to include `stages` or `stages.assignments` in the response. ' security: - oauth2: - offline_access - api_key: [] parameters: - name: template in: query required: false description: 'Optionally create a workflow with a template. Using templates creates a few workflow resources with one request. You cannot use multiple templates at once. The "approval" template creates a circuit breaker followed by an approval stage. Both contain one unassigned workflow_assignment. The "task" template creates a circuit breaker followed by a task stage. Both contain one unassigned workflow_assignment. ' schema: type: string enum: - approval - task style: form - name: include in: query required: false description: A comma separated value of related objects to include. schema: type: array items: type: string enum: - context - stages - stages.assignments - stages.assignments.responses style: form explode: false requestBody: content: application/json: schema: type: object required: - data properties: data: type: object required: - type properties: type: type: string enum: - workflow attributes: type: object properties: lock_inherited_phases: type: boolean example: data: type: workflow responses: '201': description: Workflow created content: application/json: schema: type: object required: - data properties: data: title: workflow type: object required: - id - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow meta: type: object description: 'Optionally calculated workflow status metadata. **Not part of responses by default.** This is currently only available when requesting workflow resources from the `/workflows/v2/workflows` and `/workflows/v2/workflows/{id}` `GET` endpoints. You request that this metadata be included in responses with the `expose` query parameter like: `/workflows/v2/workflows?expose[workflow][meta]`. The "latest active stage" is either the stage that is currently active or it is the last stage of a completed workflow. ' required: - latest_active_stage - completed_stages - stage_type_count additionalProperties: false properties: latest_active_stage: oneOf: - title: Stage Status Metadata allOf: - required: - stage_type - resource_identifier properties: stage_type: type: string enum: - approval - task - circuit_breaker title: type: - string - 'null' description: The title of the stage. due_date: type: - string - 'null' format: date-time description: The due date of the stage if set. resource_identifier: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow_stage - type: object description: The status metadata of a workflow_stage. required: - assignment_counts properties: assignment_counts: type: object description: 'Assignment counts broken down in three ways. First, the number of complete/incomplete assignments for all users (both approvals and tasks). Second, the number of complete/incomplete assignments for the current user (both approvals and tasks). Third, the number of declined approvals. In the first two cases, both approvals and tasks can be complete or incomplete where both approved and declined responses on an approval assignment count as completion. ' required: - all - current_user - declined additionalProperties: false properties: all: type: object required: - incomplete - complete additionalProperties: false properties: incomplete: type: integer minimum: 0 complete: type: integer minimum: 0 current_user: type: object required: - incomplete - complete additionalProperties: false properties: incomplete: type: integer minimum: 0 complete: type: integer minimum: 0 declined: type: integer minimum: 0 - title: 'null' type: - object - 'null' enum: - null completed_stages: type: integer minimum: 0 stage_type_count: type: object required: - approval - task - circuit_breaker additionalProperties: false properties: approval: type: integer minimum: 0 task: type: integer minimum: 0 circuit_breaker: type: integer minimum: 0 attributes: type: object required: - created_at - status - is_approved - updated_at additionalProperties: false properties: created_at: type: string format: date-time description: An ISO8601 date-time indicating when the workflow was created. readOnly: true status: type: string description: A string indicating the current status of the workflow. enum: - active - complete - inactive - paused readOnly: true is_approved: type: boolean description: 'Indicative of whether the latest approval workflow_stage has been completed. Workflows with only task workflow_stages will never result in `is_approved=true`. ' readOnly: true updated_at: type: string format: date-time description: 'An ISO8601 date-time indicating when the workflow was last updated. ' readOnly: true relationships: type: object additionalProperties: false required: - context - created_by_user - stages properties: context: type: object required: - data additionalProperties: false properties: data: type: - object - 'null' required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow_context created_by_user: title: User type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - user stages: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow_stage included: type: array items: oneOf: - title: workflow_context type: object additionalProperties: false required: - id - type - attributes - relationships properties: id: type: string format: uuid type: type: string enum: - workflow_context attributes: type: object additionalProperties: false required: - created_at - updated_at properties: created_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true relationships: type: object additionalProperties: false required: - block - created_by_user - moment - workflow properties: block: type: object required: - data additionalProperties: false properties: data: type: - object - 'null' required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - block created_by_user: title: User type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - user moment: type: object required: - data additionalProperties: false properties: data: type: - object - 'null' required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - moment workflow: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow - title: workflow_stage type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow_stage attributes: type: object required: - activated_at - created_at - due_date - metadata - position - stage_type - status - updated_at additionalProperties: false properties: activated_at: type: - string - 'null' format: date-time readOnly: true description: 'An ISO8601 date-time set to the time when this workflow_stage gained the `status` "active". Naturally, this field is `null` prior to the workflow_stage becoming active. It is also `null` _after_ a rollback if the rollback targets a workflow_stage earlier than the one currently active. ' created_at: type: string format: date-time readOnly: true description: An ISO8601 date-time. due_date: type: - string - 'null' format: date-time description: An ISO8601 date-time. metadata: type: - object - 'null' oneOf: - type: - object - 'null' title: Approval Workflow Stage Metadata additionalProperties: false required: - completion_rules properties: title: type: string description: The title of the workflow_stage. Will default to "Approval Phase" completion_rules: type: string enum: - all - one - type: object title: Task/Circuit Breaker Workflow Stage Metadata additionalProperties: false properties: title: type: string description: The title of the workflow_stage. Will default to "Task Phase" or "Pause" position: type: integer stage_type: type: string enum: - approval - task - circuit_breaker status: type: string enum: - active - complete - inactive updated_at: type: string format: date-time description: An ISO8601 date-time. relationships: type: object additionalProperties: false required: - assignments - workflow properties: assignments: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow_assignment workflow: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow - title: workflow_assignment type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow_assignment relationships: type: object required: - created_by_user - assigned_user - stage - responses additionalProperties: false properties: created_by_user: title: User type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - user assigned_user: title: User type: object required: - data additionalProperties: false properties: data: type: - object - 'null' required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - user stage: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow_stage responses: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow_response attributes: type: object required: - assignment_type - created_at - metadata - position - updated_at additionalProperties: false properties: assignment_type: type: string enum: - approval - task - circuit_breaker created_at: type: string format: date-time readOnly: true metadata: type: - object - 'null' anyOf: - type: - object - 'null' title: Approval Workflow Assignment Metadata additionalProperties: false properties: title: type: string description: The title of the workflow_assignment. Will default to "Approval". - type: object title: Task/Circuit Breaker Workflow Assignment Metadata additionalProperties: false properties: title: type: string description: The title of the workflow_assignment. Will default to "Task" or "Pause". is_starred: type: boolean position: type: integer description: 'The sequential position (starting at 1) of the workflow_assignment within its workflow_stage. ' readOnly: true updated_at: type: string format: date-time readOnly: true - title: workflow_response type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow_response attributes: type: object additionalProperties: false required: - created_at - details - updated_at properties: created_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true details: type: - object - 'null' oneOf: - type: - object - 'null' title: Approval Workflow Response Details additionalProperties: false required: - approved properties: approved: type: string enum: - approved - declined reasoning: type: - string - 'null' - type: object title: Task/Circuit Breaker Workflow Response Details additionalProperties: false required: - complete properties: complete: type: boolean - type: object title: Rewind Workflow Response Details additionalProperties: false required: - rewind properties: rewind: type: boolean updated_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true relationships: type: object required: - assignment - created_by_user additionalProperties: false properties: assignment: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow_assignment created_by_user: title: User type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - user example: data: id: 4ac02fc7-705c-467e-933e-8bf16fc3ebf1 type: workflow attributes: created_at: '2020-09-11T15:27:01.881-08:00' updated_at: '2020-09-11T15:27:01.881-08:00' status: active is_approved: false relationships: context: data: id: 4ac02fc7-705c-467e-933e-8bf16fc3ebf1 type: workflow_context created_by_user: data: id: ada0d59f-9f8c-4df3-ae9c-d6997ab48645 type: user stages: data: - id: 186ad497-b8a7-43d6-bd95-cde8f9a02cdc type: workflow_stage assignments: data: - id: d7a0168b-edc6-4737-85b6-8b551d1faf99 type: workflow_assignment '400': description: Bad request content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string description: The http status code of the error response. title: type: string description: A short, human-readable summary of the error. detail: type: string description: A human-readable explanation of the error. code: type: string description: 'An system-readable error code to provide additional specificity for the error. ' required: - status '401': description: Unauthorized content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string description: The http status code of the error response. title: type: string description: A short, human-readable summary of the error. detail: type: string description: A human-readable explanation of the error. code: type: string description: 'An system-readable error code to provide additional specificity for the error. ' required: - status '404': description: Not found content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string description: The http status code of the error response. title: type: string description: A short, human-readable summary of the error. detail: type: string description: A human-readable explanation of the error. code: type: string description: 'An system-readable error code to provide additional specificity for the error. ' required: - status servers: - url: https://login.ouropal.com /v3/workflows/{workflow_id}: get: tags: - Workflows operationId: ReadWorkflowV3 summary: Get a Workflow by ID security: - oauth2: - offline_access - api_key: [] parameters: - name: workflow_id in: path required: true description: The ID of the workflow schema: type: string format: uuid - name: include in: query required: false description: A comma separated value of related objects to include. schema: type: array items: type: string enum: - context - stages - stages.assignments - stages.assignments.responses style: form explode: false - name: expose in: query required: false description: 'Expose response data that is only provided by request. ' schema: type: object properties: workflow: type: object properties: meta: type: - string - 'null' description: 'Expose the workflow status metadata on each workflow resource. Use this parameter as: `?expose[workflow][meta]` ' style: deepObject explode: true responses: '200': description: A single Workflow content: application/json: schema: type: object required: - data properties: data: title: workflow type: object required: - id - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow meta: type: object description: 'Optionally calculated workflow status metadata. **Not part of responses by default.** This is currently only available when requesting workflow resources from the `/workflows/v2/workflows` and `/workflows/v2/workflows/{id}` `GET` endpoints. You request that this metadata be included in responses with the `expose` query parameter like: `/workflows/v2/workflows?expose[workflow][meta]`. The "latest active stage" is either the stage that is currently active or it is the last stage of a completed workflow. ' required: - latest_active_stage - completed_stages - stage_type_count additionalProperties: false properties: latest_active_stage: oneOf: - title: Stage Status Metadata allOf: - required: - stage_type - resource_identifier properties: stage_type: type: string enum: - approval - task - circuit_breaker title: type: - string - 'null' description: The title of the stage. due_date: type: - string - 'null' format: date-time description: The due date of the stage if set. resource_identifier: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow_stage - type: object description: The status metadata of a workflow_stage. required: - assignment_counts properties: assignment_counts: type: object description: 'Assignment counts broken down in three ways. First, the number of complete/incomplete assignments for all users (both approvals and tasks). Second, the number of complete/incomplete assignments for the current user (both approvals and tasks). Third, the number of declined approvals. In the first two cases, both approvals and tasks can be complete or incomplete where both approved and declined responses on an approval assignment count as completion. ' required: - all - current_user - declined additionalProperties: false properties: all: type: object required: - incomplete - complete additionalProperties: false properties: incomplete: type: integer minimum: 0 complete: type: integer minimum: 0 current_user: type: object required: - incomplete - complete additionalProperties: false properties: incomplete: type: integer minimum: 0 complete: type: integer minimum: 0 declined: type: integer minimum: 0 - title: 'null' type: - object - 'null' enum: - null completed_stages: type: integer minimum: 0 stage_type_count: type: object required: - approval - task - circuit_breaker additionalProperties: false properties: approval: type: integer minimum: 0 task: type: integer minimum: 0 circuit_breaker: type: integer minimum: 0 attributes: type: object required: - created_at - status - is_approved - updated_at additionalProperties: false properties: created_at: type: string format: date-time description: An ISO8601 date-time indicating when the workflow was created. readOnly: true status: type: string description: A string indicating the current status of the workflow. enum: - active - complete - inactive - paused readOnly: true is_approved: type: boolean description: 'Indicative of whether the latest approval workflow_stage has been completed. Workflows with only task workflow_stages will never result in `is_approved=true`. ' readOnly: true updated_at: type: string format: date-time description: 'An ISO8601 date-time indicating when the workflow was last updated. ' readOnly: true relationships: type: object additionalProperties: false required: - context - created_by_user - stages properties: context: type: object required: - data additionalProperties: false properties: data: type: - object - 'null' required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow_context created_by_user: title: User type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - user stages: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow_stage included: type: array items: oneOf: - title: workflow_context type: object additionalProperties: false required: - id - type - attributes - relationships properties: id: type: string format: uuid type: type: string enum: - workflow_context attributes: type: object additionalProperties: false required: - created_at - updated_at properties: created_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true relationships: type: object additionalProperties: false required: - block - created_by_user - moment - workflow properties: block: type: object required: - data additionalProperties: false properties: data: type: - object - 'null' required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - block created_by_user: title: User type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - user moment: type: object required: - data additionalProperties: false properties: data: type: - object - 'null' required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - moment workflow: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow - title: workflow_stage type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow_stage attributes: type: object required: - activated_at - created_at - due_date - metadata - position - stage_type - status - updated_at additionalProperties: false properties: activated_at: type: - string - 'null' format: date-time readOnly: true description: 'An ISO8601 date-time set to the time when this workflow_stage gained the `status` "active". Naturally, this field is `null` prior to the workflow_stage becoming active. It is also `null` _after_ a rollback if the rollback targets a workflow_stage earlier than the one currently active. ' created_at: type: string format: date-time readOnly: true description: An ISO8601 date-time. due_date: type: - string - 'null' format: date-time description: An ISO8601 date-time. metadata: type: - object - 'null' oneOf: - type: - object - 'null' title: Approval Workflow Stage Metadata additionalProperties: false required: - completion_rules properties: title: type: string description: The title of the workflow_stage. Will default to "Approval Phase" completion_rules: type: string enum: - all - one - type: object title: Task/Circuit Breaker Workflow Stage Metadata additionalProperties: false properties: title: type: string description: The title of the workflow_stage. Will default to "Task Phase" or "Pause" position: type: integer stage_type: type: string enum: - approval - task - circuit_breaker status: type: string enum: - active - complete - inactive updated_at: type: string format: date-time description: An ISO8601 date-time. relationships: type: object additionalProperties: false required: - assignments - workflow properties: assignments: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow_assignment workflow: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow - title: workflow_assignment type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow_assignment relationships: type: object required: - created_by_user - assigned_user - stage - responses additionalProperties: false properties: created_by_user: title: User type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - user assigned_user: title: User type: object required: - data additionalProperties: false properties: data: type: - object - 'null' required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - user stage: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow_stage responses: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow_response attributes: type: object required: - assignment_type - created_at - metadata - position - updated_at additionalProperties: false properties: assignment_type: type: string enum: - approval - task - circuit_breaker created_at: type: string format: date-time readOnly: true metadata: type: - object - 'null' anyOf: - type: - object - 'null' title: Approval Workflow Assignment Metadata additionalProperties: false properties: title: type: string description: The title of the workflow_assignment. Will default to "Approval". - type: object title: Task/Circuit Breaker Workflow Assignment Metadata additionalProperties: false properties: title: type: string description: The title of the workflow_assignment. Will default to "Task" or "Pause". is_starred: type: boolean position: type: integer description: 'The sequential position (starting at 1) of the workflow_assignment within its workflow_stage. ' readOnly: true updated_at: type: string format: date-time readOnly: true - title: workflow_response type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow_response attributes: type: object additionalProperties: false required: - created_at - details - updated_at properties: created_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true details: type: - object - 'null' oneOf: - type: - object - 'null' title: Approval Workflow Response Details additionalProperties: false required: - approved properties: approved: type: string enum: - approved - declined reasoning: type: - string - 'null' - type: object title: Task/Circuit Breaker Workflow Response Details additionalProperties: false required: - complete properties: complete: type: boolean - type: object title: Rewind Workflow Response Details additionalProperties: false required: - rewind properties: rewind: type: boolean updated_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true relationships: type: object required: - assignment - created_by_user additionalProperties: false properties: assignment: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow_assignment created_by_user: title: User type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - user example: data: id: 4ac02fc7-705c-467e-933e-8bf16fc3ebf1 type: workflow attributes: created_at: '2020-09-11T15:27:01.881-08:00' updated_at: '2020-09-11T15:27:01.881-08:00' status: active is_approved: false relationships: context: data: id: 4ac02fc7-705c-467e-933e-8bf16fc3ebf1 type: workflow_context created_by_user: data: id: ada0d59f-9f8c-4df3-ae9c-d6997ab48645 type: user stages: data: - id: 186ad497-b8a7-43d6-bd95-cde8f9a02cdc type: workflow_stage assignments: data: - id: d7a0168b-edc6-4737-85b6-8b551d1faf99 type: workflow_assignment '400': description: Bad request content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string description: The http status code of the error response. title: type: string description: A short, human-readable summary of the error. detail: type: string description: A human-readable explanation of the error. code: type: string description: 'An system-readable error code to provide additional specificity for the error. ' required: - status '401': description: Unauthorized content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string description: The http status code of the error response. title: type: string description: A short, human-readable summary of the error. detail: type: string description: A human-readable explanation of the error. code: type: string description: 'An system-readable error code to provide additional specificity for the error. ' required: - status '404': description: Not found content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string description: The http status code of the error response. title: type: string description: A short, human-readable summary of the error. detail: type: string description: A human-readable explanation of the error. code: type: string description: 'An system-readable error code to provide additional specificity for the error. ' required: - status servers: - url: https://login.ouropal.com /v3/workflows/{workflow_id}/duplicate: post: tags: - Workflows operationId: DuplicateWorkflowV3 summary: Duplicate a Workflow security: - oauth2: - offline_access - api_key: [] description: 'Duplicates a Workflow with its associated Stages and Assignments. Note that all due dates will be omitted on duplicate. ' parameters: - name: include in: query required: false description: A comma separated value of related objects to include. schema: type: array items: type: string enum: - context - stages - stages.assignments - stages.assignments.responses style: form explode: false - name: workflow_id in: path required: true description: The ID of the workflow schema: type: string format: uuid requestBody: content: application/json: schema: type: object required: - data properties: data: type: object required: - type properties: type: type: string enum: - workflow example: data: type: workflow responses: '201': description: Workflow duplicated content: application/json: schema: type: object required: - data properties: data: title: workflow type: object required: - id - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow meta: type: object description: 'Optionally calculated workflow status metadata. **Not part of responses by default.** This is currently only available when requesting workflow resources from the `/workflows/v2/workflows` and `/workflows/v2/workflows/{id}` `GET` endpoints. You request that this metadata be included in responses with the `expose` query parameter like: `/workflows/v2/workflows?expose[workflow][meta]`. The "latest active stage" is either the stage that is currently active or it is the last stage of a completed workflow. ' required: - latest_active_stage - completed_stages - stage_type_count additionalProperties: false properties: latest_active_stage: oneOf: - title: Stage Status Metadata allOf: - required: - stage_type - resource_identifier properties: stage_type: type: string enum: - approval - task - circuit_breaker title: type: - string - 'null' description: The title of the stage. due_date: type: - string - 'null' format: date-time description: The due date of the stage if set. resource_identifier: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow_stage - type: object description: The status metadata of a workflow_stage. required: - assignment_counts properties: assignment_counts: type: object description: 'Assignment counts broken down in three ways. First, the number of complete/incomplete assignments for all users (both approvals and tasks). Second, the number of complete/incomplete assignments for the current user (both approvals and tasks). Third, the number of declined approvals. In the first two cases, both approvals and tasks can be complete or incomplete where both approved and declined responses on an approval assignment count as completion. ' required: - all - current_user - declined additionalProperties: false properties: all: type: object required: - incomplete - complete additionalProperties: false properties: incomplete: type: integer minimum: 0 complete: type: integer minimum: 0 current_user: type: object required: - incomplete - complete additionalProperties: false properties: incomplete: type: integer minimum: 0 complete: type: integer minimum: 0 declined: type: integer minimum: 0 - title: 'null' type: - object - 'null' enum: - null completed_stages: type: integer minimum: 0 stage_type_count: type: object required: - approval - task - circuit_breaker additionalProperties: false properties: approval: type: integer minimum: 0 task: type: integer minimum: 0 circuit_breaker: type: integer minimum: 0 attributes: type: object required: - created_at - status - is_approved - updated_at additionalProperties: false properties: created_at: type: string format: date-time description: An ISO8601 date-time indicating when the workflow was created. readOnly: true status: type: string description: A string indicating the current status of the workflow. enum: - active - complete - inactive - paused readOnly: true is_approved: type: boolean description: 'Indicative of whether the latest approval workflow_stage has been completed. Workflows with only task workflow_stages will never result in `is_approved=true`. ' readOnly: true updated_at: type: string format: date-time description: 'An ISO8601 date-time indicating when the workflow was last updated. ' readOnly: true relationships: type: object additionalProperties: false required: - context - created_by_user - stages properties: context: type: object required: - data additionalProperties: false properties: data: type: - object - 'null' required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow_context created_by_user: title: User type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - user stages: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow_stage included: type: array items: oneOf: - title: workflow_context type: object additionalProperties: false required: - id - type - attributes - relationships properties: id: type: string format: uuid type: type: string enum: - workflow_context attributes: type: object additionalProperties: false required: - created_at - updated_at properties: created_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true updated_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true relationships: type: object additionalProperties: false required: - block - created_by_user - moment - workflow properties: block: type: object required: - data additionalProperties: false properties: data: type: - object - 'null' required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - block created_by_user: title: User type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - user moment: type: object required: - data additionalProperties: false properties: data: type: - object - 'null' required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - moment workflow: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow - title: workflow_stage type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow_stage attributes: type: object required: - activated_at - created_at - due_date - metadata - position - stage_type - status - updated_at additionalProperties: false properties: activated_at: type: - string - 'null' format: date-time readOnly: true description: 'An ISO8601 date-time set to the time when this workflow_stage gained the `status` "active". Naturally, this field is `null` prior to the workflow_stage becoming active. It is also `null` _after_ a rollback if the rollback targets a workflow_stage earlier than the one currently active. ' created_at: type: string format: date-time readOnly: true description: An ISO8601 date-time. due_date: type: - string - 'null' format: date-time description: An ISO8601 date-time. metadata: type: - object - 'null' oneOf: - type: - object - 'null' title: Approval Workflow Stage Metadata additionalProperties: false required: - completion_rules properties: title: type: string description: The title of the workflow_stage. Will default to "Approval Phase" completion_rules: type: string enum: - all - one - type: object title: Task/Circuit Breaker Workflow Stage Metadata additionalProperties: false properties: title: type: string description: The title of the workflow_stage. Will default to "Task Phase" or "Pause" position: type: integer stage_type: type: string enum: - approval - task - circuit_breaker status: type: string enum: - active - complete - inactive updated_at: type: string format: date-time description: An ISO8601 date-time. relationships: type: object additionalProperties: false required: - assignments - workflow properties: assignments: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow_assignment workflow: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow - title: workflow_assignment type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow_assignment relationships: type: object required: - created_by_user - assigned_user - stage - responses additionalProperties: false properties: created_by_user: title: User type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - user assigned_user: title: User type: object required: - data additionalProperties: false properties: data: type: - object - 'null' required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - user stage: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow_stage responses: type: object required: - data additionalProperties: false properties: data: type: array items: type: object required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow_response attributes: type: object required: - assignment_type - created_at - metadata - position - updated_at additionalProperties: false properties: assignment_type: type: string enum: - approval - task - circuit_breaker created_at: type: string format: date-time readOnly: true metadata: type: - object - 'null' anyOf: - type: - object - 'null' title: Approval Workflow Assignment Metadata additionalProperties: false properties: title: type: string description: The title of the workflow_assignment. Will default to "Approval". - type: object title: Task/Circuit Breaker Workflow Assignment Metadata additionalProperties: false properties: title: type: string description: The title of the workflow_assignment. Will default to "Task" or "Pause". is_starred: type: boolean position: type: integer description: 'The sequential position (starting at 1) of the workflow_assignment within its workflow_stage. ' readOnly: true updated_at: type: string format: date-time readOnly: true - title: workflow_response type: object required: - id - type - attributes - relationships additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow_response attributes: type: object additionalProperties: false required: - created_at - details - updated_at properties: created_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true details: type: - object - 'null' oneOf: - type: - object - 'null' title: Approval Workflow Response Details additionalProperties: false required: - approved properties: approved: type: string enum: - approved - declined reasoning: type: - string - 'null' - type: object title: Task/Circuit Breaker Workflow Response Details additionalProperties: false required: - complete properties: complete: type: boolean - type: object title: Rewind Workflow Response Details additionalProperties: false required: - rewind properties: rewind: type: boolean updated_at: type: string format: date-time description: An ISO8601 date-time. readOnly: true relationships: type: object required: - assignment - created_by_user additionalProperties: false properties: assignment: type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - workflow_assignment created_by_user: title: User type: object required: - data additionalProperties: false properties: data: type: object required: - id - type additionalProperties: false properties: id: type: string format: uuid type: type: string enum: - user example: data: id: 4ac02fc7-705c-467e-933e-8bf16fc3ebf1 type: workflow attributes: created_at: '2020-09-11T15:27:01.881-08:00' updated_at: '2020-09-11T15:27:01.881-08:00' status: active is_approved: false relationships: context: data: id: 4ac02fc7-705c-467e-933e-8bf16fc3ebf1 type: workflow_context created_by_user: data: id: ada0d59f-9f8c-4df3-ae9c-d6997ab48645 type: user stages: data: - id: 186ad497-b8a7-43d6-bd95-cde8f9a02cdc type: workflow_stage assignments: data: - id: d7a0168b-edc6-4737-85b6-8b551d1faf99 type: workflow_assignment '400': description: Bad request content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string description: The http status code of the error response. title: type: string description: A short, human-readable summary of the error. detail: type: string description: A human-readable explanation of the error. code: type: string description: 'An system-readable error code to provide additional specificity for the error. ' required: - status '401': description: Unauthorized content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string description: The http status code of the error response. title: type: string description: A short, human-readable summary of the error. detail: type: string description: A human-readable explanation of the error. code: type: string description: 'An system-readable error code to provide additional specificity for the error. ' required: - status '404': description: Not found content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string description: The http status code of the error response. title: type: string description: A short, human-readable summary of the error. detail: type: string description: A human-readable explanation of the error. code: type: string description: 'An system-readable error code to provide additional specificity for the error. ' required: - status '422': description: Unprocessable entity content: application/json: schema: type: object required: - errors properties: errors: type: array items: type: object properties: status: type: string description: The http status code of the error response. title: type: string description: A short, human-readable summary of the error. detail: type: string description: A human-readable explanation of the error. code: type: string description: 'An system-readable error code to provide additional specificity for the error. ' required: - status servers: - url: https://login.ouropal.com components: securitySchemes: oauth2: type: oauth2 description: This API uses OAuth 2.0 with the authorization code grant flow. You can find more detailed authentication instructions in the [Authentication Strategies](/api/documentation#section/Authentication-Strategies/OAuth-2.0) section. flows: authorizationCode: authorizationUrl: /oauth2/auth tokenUrl: /oauth2/token scopes: offline_access: Include this scope if you wish to receive a refresh token api_key: type: apiKey description: (Deprecated) This API also supports authentication via an API or session token set in the request headers. in: header name: Session-Token anonymous_oauth: type: oauth2 description: 'The OAuth 2.0 client credentials flow is used for secure server-server requests when Opal does not need to associate a request with a particular Opal user. These anonymous requests are instead authorized based on the OAuth scope. ' flows: clientCredentials: tokenUrl: /oauth/token scopes: write:onboarding: Include this scope if you wish to make API requests to onboard new Opals. presentation_share_cookie: type: apiKey description: 'A cookie set and read by the Monolith service that authorizes a non-opal user to view a presentation and the resources within it. Other services can rely on this cookie by asking Monolith to authenticate it. ' in: cookie name: share_token x-refined-from: - opal-v2-openapi.yml - opal-v3-openapi.yml x-tagGroups: - name: ⚠️ Unstable tags: - Plans - Blocks - Custom Fields - name: ℹ️ Proposed tags: - Moments - Smart Blocks - In Market - name: 🔮 Experimental tags: - Experimental