> ## 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.

# Project workflows

> Workflows of the project with their triggers and last run.



## OpenAPI

````yaml /api-reference/openapi.json get /api/projects/{id}/workflows
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/projects/{id}/workflows:
    get:
      tags:
        - Projects
      summary: Project workflows
      description: Workflows of the project with their triggers and last run.
      operationId: ProjectsController_getWorkflows
      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: ''
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/AppResponseSerialization'
                type: array
                items:
                  $ref: '#/components/schemas/ProjectWorkflow'
components:
  schemas:
    AppResponseSerialization:
      type: object
      properties: {}
    ProjectWorkflow:
      type: object
      properties:
        id:
          type: string
        createdAt:
          format: date-time
          type: string
        updatedAt:
          format: date-time
          type: string
        projectId:
          type: string
        workflow:
          $ref: '#/components/schemas/Workflow'
        workflowId:
          type: string
        triggers:
          type: array
          items:
            $ref: '#/components/schemas/ProjectWorkflowTrigger'
        lastRun:
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/ProjectLastRunDto'
      required:
        - id
        - createdAt
        - updatedAt
        - projectId
        - workflow
        - workflowId
    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
    ProjectWorkflowTrigger:
      type: object
      properties:
        id:
          type: string
        createdAt:
          format: date-time
          type: string
        updatedAt:
          format: date-time
          type: string
        projectWorkflowId:
          type: string
        type:
          allOf:
            - $ref: '#/components/schemas/ProjectTriggerType'
        cron:
          type: string
          nullable: true
        config:
          $ref: '#/components/schemas/AssetsAddedTriggerConfig'
        enabled:
          type: boolean
        lastFiredAt:
          type: string
          format: date-time
          nullable: true
      required:
        - id
        - createdAt
        - updatedAt
        - projectWorkflowId
        - type
        - config
        - enabled
    ProjectLastRunDto:
      type: object
      properties:
        id:
          type: string
        createdAt:
          format: date-time
          type: string
        updatedAt:
          format: date-time
          type: string
        totalJobs:
          type: number
        status:
          type: string
          enum:
            - pending
            - in_progress
            - completed
            - failed
            - cancelled
            - skipped
        workflowName:
          type: string
        jobHistoryName:
          type: string
        jobRunType:
          type: string
          enum:
            - manual
            - scheduled
            - event
      required:
        - id
        - createdAt
        - updatedAt
        - totalJobs
        - status
        - workflowName
        - jobHistoryName
        - jobRunType
    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
    ProjectTriggerType:
      type: string
      enum:
        - cron
        - assets_added
    AssetsAddedTriggerConfig:
      type: object
      properties:
        windowMinutes:
          type: number
          minimum: 0
          maximum: 1440
        maxAssets:
          type: number
          minimum: 1
          maximum: 5000
        targetTypes:
          type: array
          items:
            type: string
    '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
    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.