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

# Get workflowv1libraries workflows

> Gets a workflow by ID. (Deprecated) Use workflow API v2 workflow.workflows.get instead.



## OpenAPI

````yaml /openapis/workflow.json get /workflow/v1/libraries/{libraryId}/workflows/{workflowId}
openapi: 3.0.1
info:
  description: "The AODocs REST API exposes most of the features of AODocs. It can be used to implement custom applications, third-party integration, bulk tools, or\n\t\t\t\t\t\t\t\t\t\tjust to experiment with AODocs."
  version: '69.4'
  title: AODocs REST API
servers:
  - url: https://aodocs.altirnao.com/api
security: []
tags:
  - name: workflow
    description: >-
      Lets you perform workflow actions and access workflow configuration (beta
      version, subject to change)
paths:
  /workflow/v1/libraries/{libraryId}/workflows/{workflowId}:
    get:
      tags:
        - workflow
      description: >-
        Gets a workflow by ID. (Deprecated) Use workflow API v2
        workflow.workflows.get instead.
      operationId: workflow:v1beta1.Workflow.loadWorkflow
      parameters:
        - $ref: '#/components/parameters/libraryId_path_parameter'
        - $ref: '#/components/parameters/workflowId_path_parameter'
        - $ref: '#/components/parameters/securityCode_query_parameter'
        - $ref: '#/components/parameters/domain_query_parameter'
      responses:
        '200':
          description: A ApiWorkflow response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiWorkflow'
      security:
        - google_id_token-a99f12e0:
            - https://www.googleapis.com/auth/userinfo.email
        - google_id_token_legacy-a99f12e0:
            - https://www.googleapis.com/auth/userinfo.email
components:
  parameters:
    libraryId_path_parameter:
      name: libraryId
      in: path
      description: The ID of the library
      required: true
      schema:
        type: string
    workflowId_path_parameter:
      name: workflowId
      in: path
      description: The ID of the workflow
      required: true
      schema:
        type: string
    securityCode_query_parameter:
      name: securityCode
      in: query
      description: The security code
      required: false
      schema:
        type: string
    domain_query_parameter:
      name: domain
      in: query
      description: The G Suite domain
      required: false
      schema:
        type: string
  schemas:
    ApiWorkflow:
      type: object
      properties:
        allowNotificationForAllExternalUsers:
          type: boolean
          description: >-
            Whether to allow sending notifications also for non-whitelisted
            external users/groups
        classId:
          type: string
          description: The ID of the document class (read-only field)
        className:
          type: string
          description: The name of the document class (read-only field)
        createdTime:
          type: string
          format: date-time
          description: The time at which the workflow was created (read-only field)
        id:
          type: string
          description: The ID of the workflow (read-only field)
        initialStateId:
          type: string
          description: The ID of the initial state (read-only field)
        kind:
          type: string
        lastModifiedTime:
          type: string
          format: date-time
          description: The time at which the workflow was last modified (read-only field)
        libraryId:
          type: string
          description: The ID of the library (read-only field)
        libraryName:
          type: string
          description: The name of the library (read-only field)
        muteNotifications:
          type: boolean
          description: Whether to mute email notifications
        name:
          type: string
          description: The name of the workflow
        states:
          type: array
          description: The list of workflow states
          items:
            $ref: '#/components/schemas/ApiWorkflowState'
    ApiWorkflowState:
      type: object
      properties:
        annotationEditors:
          type: array
          description: >-
            Users, groups, roles or Everybody allowed to edit annotations while
            the document is in this workflow state. Used when the document class
            aclSource is STATE. A user in editors but not in viewers may only
            view and edit annotations they authored.
          items:
            $ref: '#/components/schemas/ApiSecurityToken'
        annotationRestrictedViewers:
          type: array
          description: >-
            (Deprecated, no longer enforced) Users, groups, roles or Everybody
            previously denied annotation access while the document is in this
            workflow state. Use annotationViewers and annotationEditors instead.
          items:
            $ref: '#/components/schemas/ApiSecurityToken'
        annotationViewers:
          type: array
          description: >-
            Users, groups, roles or Everybody allowed to view annotations while
            the document is in this workflow state. Used when the document class
            aclSource is STATE.
          items:
            $ref: '#/components/schemas/ApiSecurityToken'
        applyActionToDocuments:
          type: string
          description: (Deprecated) The action to apply when entering the workflow state
          enum:
            - DO_NOTHING
            - NEW_VERSION
            - CHECK_IN
            - DISCARD
            - CHECK_OUT
        checkOutSettings:
          $ref: '#/components/schemas/ApiCheckOutSettings'
        classReadOnlyDocumentsNotCheckedOut:
          type: string
          description: >-
            The mode that defined whether documents are read-only if not
            checked-out at the document class level
          enum:
            - DISABLED
            - OPTIONAL
            - MANDATORY
        createdTime:
          type: string
          format: date-time
          description: The time at which the workflow state was created
        customActions:
          type: array
          description: The list of custom actions to apply on the workflow state
          items:
            $ref: '#/components/schemas/ApiCustomAction'
        description:
          type: string
          description: The description of the workflow state
        displayFlags:
          type: array
          description: >-
            The flags to control display of the workflow state in the
            application (HIDDEN_FROM_? where ? = WORKFLOW_TASKS, BROWSEBY or
            VIEW_FILTERS)
          items:
            type: string
            enum:
              - HIDDEN_FROM_WORKFLOW_TASKS
              - HIDDEN_FROM_BROWSEBY
              - HIDDEN_FROM_VIEW_FILTERS
        draftDocuments:
          type: boolean
          description: Whether the workflow state is a draft state
        hiddenFields:
          type: array
          description: >-
            The list of fields to be hidden in the workflow state (id is
            read/write, name is readonly)
          items:
            $ref: '#/components/schemas/ApiIdName'
        id:
          type: string
          description: The ID of the workflow state
        kind:
          type: string
        lastModifiedTime:
          type: string
          format: date-time
          description: The time at which the workflow state was last modified
        mandatoryFields:
          type: array
          description: >-
            The list of fields to be mandatory in the workflow state (id is
            read/write, name is readonly)
          items:
            $ref: '#/components/schemas/ApiIdName'
        name:
          type: string
          description: The name of the workflow state
        name_i18n:
          type: string
          description: The internationalized name of the workflow state
        notifications:
          $ref: '#/components/schemas/ApiWorkflowNotification'
        permissions:
          type: array
          description: The list of permissions when inheriting them from the workflow state
          items:
            $ref: '#/components/schemas/ApiPermissionV2'
        readOnlyDocumentsNotCheckedOut:
          type: boolean
          description: >-
            The mode to control whether the documents are read-only if not
            checked-out
        readOnlyFields:
          type: array
          description: >-
            The list of fields to be read-only in the workflow state (id is
            read/write, name is readonly)
          items:
            $ref: '#/components/schemas/ApiIdName'
        resetDocumentPermissions:
          type: boolean
          description: >-
            Whether to reset explicit permissions when entering the workflow
            state
        transitions:
          type: array
          description: The list of workflow transitions from this workflow state
          items:
            $ref: '#/components/schemas/ApiWorkflowTransition'
    ApiSecurityToken:
      type: object
      properties:
        classId:
          type: string
          description: The ID of the class when type = FIELD
        className:
          type: string
          description: The name of the class when type = FIELD
        description:
          type: string
          description: The description for type in GROUP, ROLE, FIELD
        displayName:
          type: string
          description: >-
            The display name of the user or group, the name of the role
            (read-only field)
        displayName_i18n:
          type: string
          description: >-
            The display name of the user or group, the internationalized name of
            the role (read-only field)
        thumbnailPictureUrl:
          type: string
          description: The URL of the thumbnail picture (especially for users)
        type:
          type: string
          description: >-
            The type of person (user, group, role, field based, domain i.e.
            everybody)
          enum:
            - USER
            - GROUP
            - ROLE
            - FIELD
            - DOMAIN
        value:
          type: string
          description: >-
            The email address if user or group, the ID of the role, the ID of
            the class/field (ignored if type = DOMAIN)
    ApiCheckOutSettings:
      type: object
      properties:
        addValidatorToPermissions:
          type: boolean
          description: Whether to add the workflow validator to the draft's permissions
        applyPreviousVersionPermissions:
          type: boolean
          description: Whether to apply the main version's permissions
        draftActionPrefix:
          type: string
          description: The prefix to apply to the draft version's title
        permissions:
          type: array
          description: The list of permissions to apply to the draft version
          items:
            $ref: '#/components/schemas/ApiPermissionV2'
    ApiCustomAction:
      type: object
      properties:
        event:
          type: string
          description: >-
            The type of event (in workflow transitions:
            ON_STATE_ENTER_BEFORE_TRANSITION, ON_ENTER_STATE_AFTER_TRANSITION,
            ON_LEAVE_STATE_BEFORE_TRANSITION or ON_STATE_LEAVE_AFTER_TRANSITION,
            in relations: ON_RELATION_FILTER or ON_RELATION_RENDER, in classes:
            ON_DOCUMENT_UPDATE or ON_DOCUMENT_DISPLAY)
          enum:
            - ON_STATE_ENTER_BEFORE_TRANSITION
            - ON_STATE_ENTER_AFTER_TRANSITION
            - ON_STATE_LEAVE_BEFORE_TRANSITION
            - ON_STATE_LEAVE_AFTER_TRANSITION
            - ON_RELATION_FILTER
            - ON_RELATION_RENDER
            - ON_DOCUMENT_DISPLAY
            - ON_DOCUMENT_UPDATE
        id:
          type: string
          description: The id of the action (read-only)
        kind:
          type: string
        name:
          type: string
          description: The name of the action
        params:
          type: object
          description: The map key/value of the parameters
          additionalProperties:
            type: string
        scriptId:
          type: string
          description: The ID of the custom script
        scriptName:
          type: string
          description: The name of the custom script (read-only field)
    ApiIdName:
      type: object
      properties:
        id:
          type: string
          description: The id
        name:
          type: string
          description: The name
    ApiWorkflowNotification:
      type: object
      properties:
        actionEmail:
          $ref: '#/components/schemas/ApiWorkflowEmail'
        notificationEmail:
          $ref: '#/components/schemas/ApiWorkflowEmail'
        notifyHumanActionPerformer:
          type: boolean
          description: Whether to notify the workflow validators
        recipients:
          type: array
          description: The list of person to notify
          items:
            $ref: '#/components/schemas/ApiSecurityToken'
    ApiPermissionV2:
      type: object
      properties:
        displayName:
          type: string
          description: The displayed name if type = USER, GROUP or ROLE
        kind:
          type: string
        role:
          type: string
          description: >-
            The level of the permission (READER, COMMENTER, WRITER,
            PROPERTY_EDITOR or ATTACHMENT_EDITOR)
          enum:
            - READER
            - COMMENTER
            - ATTACHMENT_EDITOR
            - PROPERTY_EDITOR
            - WRITER
        thumbnailPictureUrl:
          type: string
          description: The URL of the thumbnail picture (for users)
        type:
          type: string
          description: The type of permitted audience (ANYONE, DOMAIN, GROUP, USER or ROLE)
          enum:
            - ANYONE
            - DOMAIN
            - GROUP
            - USER
            - ROLE
        value:
          type: string
          description: >-
            The email address if type = USER or GROUP, the ID of the role if
            type = ROLE
        withLink:
          type: boolean
          description: Whether the audience will have access with the link
    ApiWorkflowTransition:
      type: object
      properties:
        createNewDocumentVersion:
          type: boolean
          description: >-
            Whether to create a new version of the documents via this transition
            (redundant with transitionType = VERSION)
        createdTime:
          type: string
          format: date-time
          description: The time at which the workflow transition was created
        discardCheckedOutDocument:
          type: boolean
          description: >-
            Whether to discard draft documents via this transition (redundant
            with transitionType = DISCARD)
        elapsedTime:
          $ref: '#/components/schemas/ApiElapsedTime'
        fixedTime:
          type: string
          format: date-time
          description: >-
            The date from which the transition should be triggered (if automatic
            transition based on static date/time)
        humanAction:
          $ref: '#/components/schemas/ApiHumanAction'
        id:
          type: string
          description: The ID of the workflow transition
        kind:
          type: string
        lastModifiedTime:
          type: string
          format: date-time
          description: The time at which the workflow transition was last modified
        propertyData:
          $ref: '#/components/schemas/ApiPropertyData'
        propertyTime:
          type: string
          description: >-
            The ID of the date (or date/time) property from whose value the
            transition should be triggered (if automatic transition based on
            property value)
        relativeTime:
          $ref: '#/components/schemas/ApiRelativeTime'
        targetStateId:
          type: string
          description: The ID of the target state of the transition
        targetStateName:
          type: string
          description: The name of the target state of the transition
        targetStateName_i18n:
          type: string
          description: The internationalized name of the target state of the transition
        transitionType:
          type: string
          description: The type of the transition
          enum:
            - NORMAL
            - CHECK_IN
            - CHECK_OUT
            - VERSION
            - DISCARD
    ApiWorkflowEmail:
      type: object
      properties:
        customEmail:
          $ref: '#/components/schemas/ApiWorkflowCustomEmail'
        templateEmail:
          $ref: '#/components/schemas/ApiWorkflowTemplateEmail'
    ApiElapsedTime:
      type: object
      properties:
        amount:
          type: integer
          format: int32
          description: The amount of units to wait until the transition is triggered
        unit:
          type: string
          description: The unit for the elapsed time to wait (minute, hour, day, month)
          enum:
            - MINUTE
            - HOUR
            - DAY
            - MONTH
    ApiHumanAction:
      type: object
      properties:
        actionId:
          type: string
          description: The ID of the human workflow action
        appliedName:
          type: string
          description: The applied name of the workflow action
        appliedName_i18n:
          type: string
          description: The internationalized applied name of the workflow action
        commentPlaceholderText:
          type: string
          description: The comment placeholder text (maximum of 80 characters)
        commentPlaceholderText_i18n:
          type: string
          description: The internationalized comment placeholder text (read-only field)
        commentPolicy:
          type: string
          description: >-
            The comment policy for this workflow action (FORBIDDEN, OPTIONAL,
            MANDATORY). Replaces mandatoryComment
          enum:
            - FORBIDDEN
            - OPTIONAL
            - MANDATORY
        mandatoryComment:
          type: boolean
          description: >-
            Deprecated: use commentPolicy. Whether a comment is mandatory when
            triggering the workflow action
        name:
          type: string
          description: The name of the workflow action
        name_i18n:
          type: string
          description: The internationalized workflow action
        performer:
          $ref: '#/components/schemas/ApiSecurityToken'
        reminders:
          type: array
          description: The list of reminders for the transition
          items:
            $ref: '#/components/schemas/ApiWorkflowTransitionReminder'
        validateByAll:
          type: boolean
          description: Whether the transition is a parallel transition
    ApiPropertyData:
      type: object
      properties:
        operator:
          type: string
          description: The operator of the condition
          enum:
            - EQUAL_TO
            - NOT_EQUAL_TO
            - GREATER_THAN
            - STRICTLY_GREATER_THAN
            - LESS_THAN
            - STRICTLY_LESS_THAN
            - EMPTY
            - NOT_EMPTY
            - CONTAINS
            - IN
        personValue:
          $ref: '#/components/schemas/ApiSecurityToken'
        propertyId:
          type: string
          description: The ID of the property for the condition
        value:
          type: string
          description: >-
            The value for the condition (if operator is neither EMPTY or
            NOT_EMPTY)
    ApiRelativeTime:
      type: object
      properties:
        after:
          type: boolean
          description: >-
            Whether the transition should be triggered from the property value
            plus the offset (vs. from the property value minus the offset)
        amount:
          type: integer
          format: int32
          description: >-
            The amount of units to wait before/after the property value to
            trigger the transition
        propertyId:
          type: string
          description: The ID of the property
        unit:
          type: string
          description: The unit for the offset (minute, hour, day, month)
          enum:
            - MINUTE
            - HOUR
            - DAY
            - MONTH
    ApiWorkflowCustomEmail:
      type: object
      properties:
        bodyTemplate:
          type: string
          description: The content of the email
        layout:
          type: string
          description: The layout mode (NO_LAYOUT or DEFAULT_LAYOUT)
          enum:
            - NO_LAYOUT
            - DEFAULT_LAYOUT
        senderTemplate:
          type: string
          description: The displayed sender of the email
        subjectTemplate:
          type: string
          description: The subject of the email
    ApiWorkflowTemplateEmail:
      type: object
      properties:
        id:
          type: string
          description: The ID of the workflow email template
        name:
          type: string
          description: The name of the workflow email template
    ApiWorkflowTransitionReminder:
      type: object
      properties:
        audience:
          type: string
          description: >-
            The mode of audience to remind: PENDING (everyone in the audience of
            the transition except those who validated it - if parallel
            transition), EXCLUSIVE (for simple transitions: only the users who
            haven't validated the parallel transition if any on the state, for
            parallel transition it's similar to PENDING)
          enum:
            - PENDING
            - EXCLUSIVE
        condition:
          $ref: '#/components/schemas/ApiCustomScriptBinding'
        emailTemplateId:
          type: string
          description: >-
            The ID of a workflow template email (type = ACTION_REMINDER) to
            format reminder email
        id:
          type: string
          description: The ID of the reminder (read-only field)
        name:
          type: string
          description: The name of the reminder
    ApiCustomScriptBinding:
      type: object
      properties:
        params:
          type: object
          description: The map key/value of the parameters
          additionalProperties:
            type: string
        scriptId:
          type: string
          description: The ID of the custom script
        scriptName:
          type: string
          description: The name of the custom script (read-only field)
  securitySchemes:
    google_id_token-a99f12e0:
      type: oauth2
      x-google-issuer: https://accounts.google.com
      x-google-jwks_uri: https://www.googleapis.com/oauth2/v1/certs
      x-google-audiences: >-
        755040865326-h5gomu85549lkh2qf9d3lku39vnaf6ii.apps.googleusercontent.com,563231141203-231sn7f6ptedncun5h00h7ktbe3o2nd5.apps.googleusercontent.com,993707107224.apps.googleusercontent.com,ao-docs,aodocs-core-eu-1,ao-docs-staging,ao-docs-dev,aodocs-core-dev-us,aodocs-total-poc-euw3
      flows:
        implicit:
          authorizationUrl: https://accounts.google.com/o/oauth2/v2/auth
          scopes:
            https://www.googleapis.com/auth/userinfo.email: View your email address
    google_id_token_legacy-a99f12e0:
      type: oauth2
      x-google-issuer: accounts.google.com
      x-google-jwks_uri: https://www.googleapis.com/oauth2/v1/certs
      x-google-audiences: >-
        755040865326-h5gomu85549lkh2qf9d3lku39vnaf6ii.apps.googleusercontent.com,563231141203-231sn7f6ptedncun5h00h7ktbe3o2nd5.apps.googleusercontent.com,993707107224.apps.googleusercontent.com,ao-docs,aodocs-core-eu-1,ao-docs-staging,ao-docs-dev,aodocs-core-dev-us,aodocs-total-poc-euw3
      flows:
        implicit:
          authorizationUrl: https://accounts.google.com/o/oauth2/v2/auth
          scopes:
            https://www.googleapis.com/auth/userinfo.email: View your email address

````