---
title: "Get a GitOps workflow by ID"
method: GET
path: "/gitops/workflows/{id}"
tags: ["gitops"]
---

# Get a GitOps workflow by ID

`GET /gitops/workflows/{id}`

Returns the detail view of a single GitOps workflow, with one entry per backing
stack or edge stack artifact.
**Access policy**: authenticated

## Path parameters

- `id` integer, required

## Response `200`

OK

- WorkflowsWorkflow
  - `artifacts` WorkflowsArtifactDetail[]
    - `autoUpdate` PortainerAutoUpdateSettings
      - `ForcePullImage` boolean — Pull latest image
      - `ForceUpdate` boolean — Force update ignores repo changes
      - `Interval` string — Auto update interval Deprecated: polling interval now lives on the associated Source (Source.Interval). Kept for DB backwards-compatibility only; new code must not read or write this field.
      - `JobID` string — Autoupdate job id
      - `Webhook` string — A UUID generated from client
    - `creationDate` integer
    - `files` WorkflowsArtifactFileDetail[]
      - `hash` string
      - `path` string
      - `pathError` string
      - `pathStatus` 'unknown' | 'healthy' | 'error'
      - `ref` string
      - `refError` string
      - `refStatus` 'unknown' | 'healthy' | 'error'
      - `sourceId` integer
    - `id` integer, required
    - `lastSyncDate` integer
    - `name` string, required
    - `platform` 'dockerStandalone' | 'dockerSwarm' | 'kubernetes'
    - `status` WorkflowsWorkflowStatusObject
      - `artifact` WorkflowsWorkflowPhaseStatus
        - `error` string
        - `status` 'healthy' | 'syncing' | 'error' | 'paused' | 'unknown'
      - `source` WorkflowsWorkflowPhaseStatus
        - `error` string
        - `status` 'healthy' | 'syncing' | 'error' | 'paused' | 'unknown'
      - `target` WorkflowsWorkflowPhaseStatus
        - `error` string
        - `status` 'healthy' | 'syncing' | 'error' | 'paused' | 'unknown'
    - `target` WorkflowsTarget
      - `edgeGroupIds` integer[]
      - `endpointId` integer
      - `groupStatus` object
      - `namespace` string
      - `resolvedEndpointIds` integer[]
    - `type` 'stack' | 'edgeStack', required
  - `creationDate` integer
  - `id` integer, required
  - `lastSyncDate` integer
  - `name` string, required
  - `status` WorkflowsWorkflowStatusObject, required
    - `artifact` WorkflowsWorkflowPhaseStatus
      - `error` string
      - `status` 'healthy' | 'syncing' | 'error' | 'paused' | 'unknown'
    - `source` WorkflowsWorkflowPhaseStatus
      - `error` string
      - `status` 'healthy' | 'syncing' | 'error' | 'paused' | 'unknown'
    - `target` WorkflowsWorkflowPhaseStatus
      - `error` string
      - `status` 'healthy' | 'syncing' | 'error' | 'paused' | 'unknown'

## Other responses

- `400` — Invalid request
- `404` — Workflow not found
- `500` — Server error

---

[API](https://skmtc.net/portainer/apis/portainerce-api.md) · [All operations](https://skmtc.net/portainer/apis/portainerce-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/portainer/portainerce-api/versions/c0b0975cd11b/schema)
