> ## Documentation Index
> Fetch the complete documentation index at: https://docs.oasm.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get workflow by ID

> Retrieves a specific workflow by its ID within the specified workspace.



## OpenAPI

````yaml /api-reference/openapi.json get /api/workflows/{id}
openapi: 3.0.0
info:
  title: Open Attack Surface Management
  description: Open-source platform for cybersecurity Attack Surface Management (ASM)
  version: '1.0'
  contact: {}
servers:
  - url: https://{baseUrl}/api/v1
    variables:
      baseUrl:
        default: localhost:3000
        description: API server hostname with port (e.g. localhost:3000, api.example.com)
security: []
tags: []
externalDocs:
  description: Authentication Docs
  url: auth/docs
paths:
  /api/workflows/{id}:
    get:
      tags:
        - Workflows
      summary: Get workflow by ID
      description: Retrieves a specific workflow by its ID within the specified workspace.
      operationId: WorkflowsController_getWorkspaceWorkflow
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: X-Workspace-Id
          in: header
          description: Workspace ID
          schema:
            type: string
      responses:
        '200':
          description: Workflow object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Workflow'
                allOf:
                  - $ref: '#/components/schemas/AppResponseSerialization'
components:
  schemas:
    Workflow:
      type: object
      properties:
        id:
          type: string
        createdAt:
          format: date-time
          type: string
        updatedAt:
          format: date-time
          type: string
        name:
          type: string
        content:
          $ref: '#/components/schemas/WorkflowContent'
        filePath:
          type: string
        isCanDelete:
          type: boolean
        isCanEdit:
          type: boolean
      required:
        - id
        - createdAt
        - updatedAt
        - name
        - content
        - filePath
        - isCanDelete
        - isCanEdit
    AppResponseSerialization:
      type: object
      properties: {}
    WorkflowContent:
      type: object
      properties:
        'on':
          $ref: '#/components/schemas/On'
        jobs:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/WorkflowJob'
          description: Jobs keyed by a unique job id; `needs` references those same ids
        name:
          type: string
      required:
        - jobs
        - name
    'On':
      type: object
      properties:
        target:
          type: array
          items:
            type: string
        schedule:
          type: array
          items:
            $ref: '#/components/schemas/ScheduleOn'
        assetsAdded:
          $ref: '#/components/schemas/AssetsAddedTriggerConfig'
    WorkflowJob:
      type: object
      properties:
        name:
          type: string
        run:
          type: string
        category:
          allOf:
            - $ref: '#/components/schemas/ToolCategory'
        input:
          type: array
          items:
            $ref: '#/components/schemas/DataKind'
        needs:
          type: array
          items:
            type: string
        allowFailure:
          type: boolean
        config:
          type: object
        configProfileId:
          type: string
      required:
        - run
    ScheduleOn:
      type: object
      properties:
        cron:
          type: string
          example: 0 2 * * 1
      required:
        - cron
    AssetsAddedTriggerConfig:
      type: object
      properties:
        windowMinutes:
          type: number
          minimum: 0
          maximum: 1440
        maxAssets:
          type: number
          minimum: 1
          maximum: 5000
        targetTypes:
          type: array
          items:
            type: string
    ToolCategory:
      type: string
      enum:
        - subdomains
        - http_probe
        - ports_scanner
        - vulnerabilities
        - screenshot
        - url_discovery
    DataKind:
      type: string
      enum:
        - target
        - host
        - service
        - web
        - url
        - repository
        - vulnerability

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.