---
title: "Preview workflow"
method: POST
path: "/rest/api/3/workflows/preview"
tags: ["Workflows"]
---

# Preview workflow

`POST /rest/api/3/workflows/preview`

Returns a requested workflow within a given project. The response provides a read-only preview of the workflow, omitting full configuration details.

**[Permissions](#permissions) required:**

 *  At least one of the *Administer projects* and *View (read-only) workflow* project permissions

## Request body

- WorkflowPreviewRequest — The details of the preview workflow request.
  - `issueTypeIds` string[] — The list of issue type IDs. At most 25 issue type IDs can be specified.
  - `projectId` string, required — The projectId parameter is required and will be used for permission checks. In addition, you must supply at least one of the following lookup terms: *workflowNames*, *workflowIds*, or *issueTypeIds*. The specified workflows must be associated with the given project.
  - `workflowIds` string[] — The list of workflow IDs to be returned. At most 25 workflow IDs can be specified.
  - `workflowNames` string[] — The list of workflow names to be returned. At most 25 workflow names can be specified.

## Response `200`

Returned if the request is successful.

- WorkflowPreviewResponse — The preview workflow response containing workflows and statuses.
  - `statuses` JiraWorkflowPreviewStatus[] — The list of statuses referenced by the workflows.
    - `description` string — The description of the status.
    - `id` string — The ID of the status.
    - `name` string — The name of the status.
    - `rawName` string — The raw name of the status.
    - `scope` WorkflowPreviewScope — The scope of the workflow.
      - `project` WorkflowProjectIdScope, nullable — Project ID details.
        - `id` string — The ID of the project.
      - `type` 'PROJECT' | 'GLOBAL' — The scope of the workflow. `GLOBAL` for company-managed projects and `PROJECT` for team-managed projects.
    - `statusCategory` 'TODO' | 'IN_PROGRESS' | 'DONE' — The category of the status.
    - `statusReference` string — The reference of the status. Unique within this response but not guaranteed to be stable across requests.
  - `workflows` WorkflowPreview[] — The list of workflows. The workflows are returned in the same order as specified in the request.
    - `description` string — The description of the workflow.
    - `id` string — The ID of the workflow.
    - `loopedTransitionContainerLayout` WorkflowPreviewLayout — Layout coordinates for workflow elements.
      - `x` number, double — The X coordinate.
      - `y` number, double — The Y coordinate.
    - `name` string — The name of the workflow.
    - `queryContext` ProjectIssueTypeQueryContext[] — The project and issue type context for this workflow query.
      - `issueTypes` string[] — The set of issue type IDs.
      - `project` string — The ID of the project.
    - `scope` WorkflowPreviewScope — The scope of the workflow.
      - `project` WorkflowProjectIdScope, nullable — Project ID details.
        - `id` string — The ID of the project.
      - `type` 'PROJECT' | 'GLOBAL' — The scope of the workflow. `GLOBAL` for company-managed projects and `PROJECT` for team-managed projects.
    - `startPointLayout` WorkflowPreviewLayout — Layout coordinates for workflow elements.
      - `x` number, double — The X coordinate.
      - `y` number, double — The Y coordinate.
    - `statuses` WorkflowPreviewStatus[] — The statuses referenced in this workflow.
      - `approvalConfiguration` ApprovalConfigurationPreview — Approval configuration.
        - `active` string — The active approval configuration.
        - `transitionApproved` string — The transition ID for approved state.
        - `transitionRejected` string — The transition ID for rejected state.
      - `deprecated` boolean — Whether the status is deprecated.
      - `layout` WorkflowPreviewLayout — Layout coordinates for workflow elements.
        - `x` number, double — The X coordinate.
        - `y` number, double — The Y coordinate.
      - `statusReference` string — The reference of the status.
    - `transitions` TransitionPreview[] — The transitions of the workflow.
      - `actions` PreviewRuleConfiguration[] — The post-functions of the transition.
        - `id` string — A transient identifier for this element, unique within this response but not guaranteed to stable across requests.
        - `parameters` object — The parameters of the rule.
        - `ruleKey` string — The rule key of the rule.
      - `conditions` PreviewConditionGroupConfiguration, nullable — Condition group configuration for workflow transitions.
        - `conditionGroups` PreviewConditionGroupConfiguration[] — The nested conditions of the condition group.
        - `conditions` PreviewRuleConfiguration[] — The rules for this condition.
          - `id` string — A transient identifier for this element, unique within this response but not guaranteed to stable across requests.
          - `parameters` object — The parameters of the rule.
          - `ruleKey` string — The rule key of the rule.
        - `operation` 'ANY' | 'ALL' — Determines how the conditions in the group are evaluated. Accepts either `ANY` or `ALL`. If `ANY` is used, at least one condition in the group must be true for the group to evaluate to true. If `ALL` is used, all conditions in the group must be true for the group to evaluate to true.
      - `customIssueEventId` string — The custom issue event ID for the transition.
      - `description` string — The description of the transition.
      - `id` string — The ID of the transition.
      - `links` TransitionLink[] — The statuses the transition can start from, and the mapping of ports between the statuses.
        - `fromPort` integer — The from port number.
        - `fromStatusReference` string — The from status reference.
        - `toPort` integer — The to port number.
      - `name` string — The name of the transition.
      - `toStatusReference` string — The status the transition goes to.
      - `transitionScreen` PreviewRuleConfiguration, nullable — Rule configuration for workflow transitions.
        - `id` string — A transient identifier for this element, unique within this response but not guaranteed to stable across requests.
        - `parameters` object — The parameters of the rule.
        - `ruleKey` string — The rule key of the rule.
      - `triggers` PreviewTrigger[] — The triggers of the transition.
        - `id` string — The ID of the trigger.
        - `ruleKey` string — The key of the trigger rule.
      - `type` 'INITIAL' | 'GLOBAL' | 'DIRECTED' — The transition type.
      - `validators` PreviewRuleConfiguration[] — The validators of the transition.
        - `id` string — A transient identifier for this element, unique within this response but not guaranteed to stable across requests.
        - `parameters` object — The parameters of the rule.
        - `ruleKey` string — The rule key of the rule.
    - `version` WorkflowDocumentVersionBean — The version details of the workflow.
      - `id` string — The version UUID.
      - `versionNumber` integer — The version number.

## Other responses

- `400` — Returned if the request is not valid.
- `401` — Returned if the authentication credentials are incorrect or missing, or the caller doesn't have permissions to perform the operation.
- `404` — Returned if one or more previews are not found.

---

[API](https://skmtc.net/atlassian/apis/the-jira-cloud-platform-rest-api-2.md) · [All operations](https://skmtc.net/atlassian/apis/the-jira-cloud-platform-rest-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/atlassian/the-jira-cloud-platform-rest-api-2/versions/5a51740d7ab3/schema)
