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

# Get the scan schedule of a managed workflow

> Returns the state of the automatic scans of a managed workflow: scanning, catching up, scheduled with the time of the next scan, paused with the reason, or not scheduled.



## OpenAPI

````yaml https://api.app.chainloop.dev/openapi.yaml get /v1/operations/workflow-scan-schedule/{workflow_id}
openapi: 3.0.1
info:
  contact:
    email: support@chainloop.dev
    name: Chainloop Support
    url: https://chainloop.dev
  termsOfService: https://chainloop.dev/terms
  title: Chainloop Platform API
  version: '1.0'
servers:
  - url: https://api.app.chainloop.dev/
security:
  - bearerToken: []
tags:
  - description: AI-powered agent operations
    name: AgentsService
  - name: ArtifactService
  - name: AssessmentService
  - description: Service for polling the status of asynchronous operations
    name: AsyncOperationsService
  - name: AttestationsService
  - name: PolicyService
  - name: ComplianceService
  - name: ComponentService
  - name: EnvironmentsService
  - name: EvidenceService
  - name: LinearService
  - name: FindingService
  - name: LogicalEnvironmentsService
  - name: ProductsService
  - name: ProjectsService
  - name: UserService
  - name: WorkflowTemplateService
externalDocs:
  description: Chainloop Official Documentation
  url: https://docs.chainloop.dev
paths:
  /v1/operations/workflow-scan-schedule/{workflow_id}:
    get:
      tags:
        - AsyncOperationsService
      summary: Get the scan schedule of a managed workflow
      description: >-
        Returns the state of the automatic scans of a managed workflow:
        scanning, catching up, scheduled with the time of the next scan, paused
        with the reason, or not scheduled.
      operationId: AsyncOperationsService_GetWorkflowScanSchedule
      parameters:
        - description: Managed workflow to read the schedule of.
          in: path
          name: workflow_id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/v1AsyncOperationsServiceGetWorkflowScanScheduleResponse
          description: A successful response.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1BadRequestResponse'
          description: Bad Request - The request was invalid or cannot be served.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1UnauthorizedResponse'
          description: Unauthorized - Authentication is required.
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1PermissionDeniedResponse'
          description: Forbidden - You do not have permission to access this resource.
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1InternalServerErrorResponse'
          description: Internal Server Error - An unexpected error occurred on the server.
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googlerpcStatus'
          description: An unexpected error response.
components:
  schemas:
    v1AsyncOperationsServiceGetWorkflowScanScheduleResponse:
      example:
        schedule:
          paused_reason: PAUSED_REASON_UNSPECIFIED
          sweep_interval: sweep_interval
          state: STATE_UNSPECIFIED
          next_scan_at: '2000-01-23T04:56:07.000Z'
      properties:
        schedule:
          $ref: '#/components/schemas/v1WorkflowScanSchedule'
      type: object
    v1BadRequestResponse:
      description: Response for bad request
      example:
        code: 0
        details:
          - details
          - details
        message: message
      properties:
        code:
          default: 3
          description: >-
            The error code indicating the type of error. It's fixed to 3, which
            is the code for INVALID_ARGUMENT.
          format: int32
          type: integer
        message:
          description: A human-readable message providing more details about the error.
          type: string
        details:
          description: Additional details about the error.
          items:
            type: string
          type: array
      required:
        - code
        - message
      title: BadRequestResponse
      type: object
    v1UnauthorizedResponse:
      description: Response for unauthorized access
      example:
        code: 6
        details:
          - details
          - details
        message: message
      properties:
        code:
          default: 16
          description: >-
            The error code indicating the type of error. It's fixed to 16, which
            is the code for UNAUTHENTICATED.
          format: int32
          type: integer
        message:
          description: A human-readable message providing more details about the error.
          type: string
        details:
          description: Additional details about the error.
          items:
            type: string
          type: array
      required:
        - code
        - message
      title: UnauthorizedResponse
      type: object
    v1PermissionDeniedResponse:
      description: Response for permission denied
      example:
        code: 1
        details:
          - details
          - details
        message: message
      properties:
        code:
          default: 7
          description: >-
            The error code indicating the type of error. It's fixed to 7, which
            is the code for PERMISSION_DENIED.
          format: int32
          type: integer
        message:
          description: A human-readable message providing more details about the error.
          type: string
        details:
          description: Additional details about the error.
          items:
            type: string
          type: array
      required:
        - code
        - message
      title: PermissionDeniedResponse
      type: object
    v1InternalServerErrorResponse:
      description: Response for internal server error
      example:
        code: 5
        details:
          - details
          - details
        message: message
      properties:
        code:
          default: 13
          description: >-
            The error code indicating the type of error. It's fixed to 13, which
            is the code for INTERNAL_ERROR.
          format: int32
          type: integer
        message:
          description: A human-readable message providing more details about the error.
          type: string
        details:
          description: Additional details about the error.
          items:
            type: string
          type: array
      required:
        - code
        - message
      title: InternalServerErrorResponse
      type: object
    googlerpcStatus:
      example:
        code: 5
        details:
          - '@type': '@type'
          - '@type': '@type'
        message: message
      properties:
        code:
          format: int32
          type: integer
        message:
          type: string
        details:
          items:
            $ref: '#/components/schemas/protobufAny'
          type: array
      type: object
    v1WorkflowScanSchedule:
      description: >-
        WorkflowScanSchedule is the state of the automatic scans of a managed
        workflow.
      example:
        paused_reason: PAUSED_REASON_UNSPECIFIED
        sweep_interval: sweep_interval
        state: STATE_UNSPECIFIED
        next_scan_at: '2000-01-23T04:56:07.000Z'
      properties:
        state:
          $ref: '#/components/schemas/WorkflowScanScheduleState'
        next_scan_at:
          description: >-
            Set for STATE_SCHEDULED, and for STATE_CATCHING_UP when the next
            scan starts right

            after the last one: the earliest time of the next scan.
          format: date-time
          type: string
        sweep_interval:
          description: The interval of the sweep, so that a client can say "within 30 min".
          type: string
        paused_reason:
          $ref: '#/components/schemas/WorkflowScanSchedulePausedReason'
      type: object
    protobufAny:
      additionalProperties:
        type: object
      example:
        '@type': '@type'
      properties:
        '@type':
          type: string
      type: object
    WorkflowScanScheduleState:
      default: STATE_UNSPECIFIED
      description: |2-
         - STATE_SCANNING: A scan is pending, queued or running.
         - STATE_CATCHING_UP: The last scan left work. The next scan starts at next_scan_at when it is set,
        right after the last scan. Otherwise it starts within sweep_interval.
         - STATE_SCHEDULED: The next scan starts at next_scan_at, or up to sweep_interval later.
         - STATE_PAUSED: No automatic scan runs until paused_reason clears.
         - STATE_NOT_SCHEDULED: The workflow has no automatic scans.
      enum:
        - STATE_UNSPECIFIED
        - STATE_SCANNING
        - STATE_CATCHING_UP
        - STATE_SCHEDULED
        - STATE_PAUSED
        - STATE_NOT_SCHEDULED
      type: string
    WorkflowScanSchedulePausedReason:
      default: PAUSED_REASON_UNSPECIFIED
      description: ' - PAUSED_REASON_NOTHING_TO_SCAN: No linked source, no scannable SBOM, or no target version.'
      enum:
        - PAUSED_REASON_UNSPECIFIED
        - PAUSED_REASON_CREDITS_EXHAUSTED
        - PAUSED_REASON_ORG_SUSPENDED
        - PAUSED_REASON_NO_CAS_BACKEND
        - PAUSED_REASON_NOTHING_TO_SCAN
      type: string
  securitySchemes:
    bearerToken:
      description: Bearer token for authentication
      type: http
      scheme: bearer
      bearerFormat: JWT

````

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