Onshape Workflow API

Access and modify workflows.

OpenAPI Specification

onshape-workflow-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Onshape REST Account Workflow API
  description: '## Welcome to the Onshape REST API Explorer


    **See the [API Explorer Guide](https://onshape-public.github.io/docs/api-intro/explorer/) for help navigating this page.**


    ### Using this page

    1. Sign in to your [Onshape](https://cad.onshape.com) account in another tab.

    2. Click the `Try it out` button below. It toggles to a `Cancel` button when selected.


    ### Authenticating

    To authenticate your calls, click the `Authorize` button. See [API Explorer Guide: Authentication](https://onshape-public.github.io/docs/api-intro/explorer/#authentication) for details. Calls made when authenticated via API Keys or OAuth count against your annual [API limits](https://onshape-public.github.io/docs/auth/limits/#annual-api-call-limits).

    * **Tip:** To ensure the current session isn''t used when trying other authentication techniques, make sure to [remove the Onshape cookie](https://support.google.com/chrome/answer/95647#zippy=%2Cdelete-cookies-from-a-site) as per the instructions for your browser, or use a private or incognito window.


    ### Additional resources


    * [Onshape API Guide](https://onshape-public.github.io/docs/): Our full suite of developer guides, to be used as an accompaniment to this API Explorer.

    * [Onshape Developer Portal](https://cad.onshape.com/appstore/dev-portal): The Onshape portal for managing your API keys, OAuth2 credentials, your Onshape applications, and your Onshape App Store entries.

    * [Authentication Guide](https://onshape-public.github.io/docs/auth/): Our guide to using API keys, request signatures, and OAuth2 in your Onshape applications.'
  termsOfService: https://www.onshape.com/legal/terms-of-use
  contact:
    email: api-support@onshape.zendesk.com
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.218.84032-34acba44be17
  x-logo:
    url: images/logo-onshape-gray-green-nav-bar.svg
    backgroundColor: '#ffffff'
    altText: Onshape
    href: images/logo-onshape-gray-green-nav-bar.svg
  x-indeterministic-schemas:
  - BTDiffInfo
  - BTParameterSpecArray-2600
  - BTSplineDescription-2118
  - NodeModel
  - BTPFunctionDeclaration-246
  - BTPFunctionOrPredicateDeclaration-247
  - BTPExpression-9
  - SkinModel
  - BTMAnnotation-4664
  x-filter-info: ?restUserRole=PUBLIC
servers:
- url: https://cad.onshape.com/api/v16
  description: Current
security:
- BasicAuth: []
tags:
- name: Workflow
  description: Access and modify workflows.
paths:
  /workflow/active:
    get:
      tags:
      - Workflow
      summary: Get all active workflows for the currently logged in user's company.
      description: Optionally takes a document ID to return all workflows for that document's owning company.
      operationId: getActiveWorkflow
      parameters:
      - name: documentId
        in: query
        schema:
          type: string
          default: ''
      responses:
        default:
          description: default response
          content:
            application/json;charset=UTF-8; qs=0.09:
              schema:
                $ref: '#/components/schemas/BTActiveWorkflowInfo'
      deprecated: false
      security:
      - OAuth2:
        - OAuth2Read
        BasicAuth:
        - OAuth2Read
      x-BTVisibility: PRODUCTION
  /workflow/c/{companyId}/approvers:
    get:
      tags:
      - Workflow
      summary: Get all identities allowed to be approvers on a workflow object.
      description: "* Identities can be users and/or teams. \n* For Enterprise accounts, also includes roles and any aliases that contain allowed users/teams. \n* Not object- or property-specific. \n* Used for delegation and company settings."
      operationId: getAllowedApprovers
      parameters:
      - name: companyId
        in: path
        required: true
        schema:
          type: string
      - name: q
        in: query
        schema:
          type: string
          default: ''
      - name: expandTeams
        in: query
        schema:
          type: boolean
          default: true
      - name: includeSelf
        in: query
        schema:
          type: boolean
          default: true
      - name: excludeConnections
        in: query
        schema:
          type: boolean
          default: false
      responses:
        default:
          description: default response
          content:
            application/json;charset=UTF-8; qs=0.09:
              schema:
                $ref: '#/components/schemas/BTListResponseBTWorkflowObserverOptionInfo'
      deprecated: false
      security:
      - OAuth2:
        - OAuth2Read
        BasicAuth:
        - OAuth2Read
      x-BTVisibility: PRODUCTION
  /workflow/companies/{cid}/objects:
    get:
      tags:
      - Workflow
      summary: Enumerate all of a company's workflowable objects.
      description: "* For example, you can enumerate RELEASES, TASKS, etc in a company by last modified time. \n* Caller must be a company admin. \n* Specify `modifiedAfter` and use the `next` URI for complete enumeration."
      operationId: enumerateObjectWorkflows
      parameters:
      - name: cid
        in: path
        description: The company or enterprise ID that owns the resource.
        required: true
        schema:
          type: string
      - name: objectTypes
        in: query
        description: Optionally filter for specific workflowable types. Defaults to RELEASE and OBSOLETION
        schema:
          type: array
          items:
            $ref: '#/components/schemas/BTAPIWorkflowableType'
      - name: states
        in: query
        description: Optionally filter for specific workflow states like PENDING, RELEASED
        schema:
          uniqueItems: true
          type: array
          items:
            type: string
      - name: limit
        in: query
        description: The number of list entries to return in a single API call.
        schema:
          maximum: 100
          minimum: 1
          type: integer
          format: int32
          default: 20
      - name: modifiedAfter
        in: query
        description: The earliest modification date of workflowable object to find.
        schema:
          type: string
          format: date-time
          default: '2000-01-01T00:00:00Z'
      responses:
        default:
          description: default response
          content:
            application/json;charset=UTF-8; qs=0.09:
              schema:
                $ref: '#/components/schemas/BTListResponseBTObjectWorkflowInfo'
      deprecated: false
      security:
      - OAuth2:
        - OAuth2Read
        BasicAuth:
        - OAuth2Read
      x-BTVisibility: PRODUCTION
  /workflow/obj/{objectId}:
    get:
      tags:
      - Workflow
      summary: Lightweight information about the current state of a workflowable object like release package.
      description: Caller must be a company admin as this api allows access to all company owned workflowable objects.
      operationId: getWorkflowById
      parameters:
      - name: objectId
        in: path
        description: Id of a workflowable object like release package, task etc.
        required: true
        schema:
          type: string
      - name: requestId
        in: query
        description: Optional request ID to filter error messages. If provided, returns the most recent error associated with that specific request.
        schema:
          type: string
      - name: afterDateTime
        in: query
        description: Optional date-time (ISO-8601 format) to filter error messages. If provided (and requestId is not), returns the most recent error after this date.
        schema:
          type: string
          format: date-time
      responses:
        default:
          description: default response
          content:
            application/json;charset=UTF-8; qs=0.09:
              schema:
                $ref: '#/components/schemas/BTObjectWorkflowInfo'
      deprecated: false
      security:
      - OAuth2:
        - OAuth2Read
        BasicAuth:
        - OAuth2Read
      x-BTVisibility: PRODUCTION
  /workflow/obj/{objectId}/auditlog:
    get:
      tags:
      - Workflow
      summary: Get all audit log entries for a workflowable object.
      operationId: getAuditLog
      parameters:
      - name: objectId
        in: path
        description: Id of a workflowable object like release package, task etc.
        required: true
        schema:
          type: string
      responses:
        default:
          description: default response
          content:
            application/json;charset=UTF-8; qs=0.09:
              schema:
                $ref: '#/components/schemas/BTWorkflowAuditLogInfo'
      deprecated: false
      security:
      - OAuth2:
        - OAuth2Read
        BasicAuth:
        - OAuth2Read
      x-BTVisibility: PRODUCTION
components:
  schemas:
    BTMetadataStateType:
      type: string
      description: The current state metadata values if applicable.
      enum:
      - IN_PROGRESS
      - PENDING
      - RELEASED
      - OBSOLETE
      - REJECTED
      - DISCARDED
    BTWorkflowAuditLogEntryInfo:
      type: object
      properties:
        approvalOverride:
          type: boolean
        approverIds:
          type: array
          items:
            type: string
        commentId:
          type: string
        date:
          type: string
          format: date-time
        entryType:
          type: integer
          format: int32
        errorMessage:
          type: string
        featureScriptConsole:
          type: string
        featureScriptNotices:
          type: array
          items:
            type: string
        featureScriptResponse:
          type: object
        id:
          type: string
        objectId:
          type: string
        propertyUpdates:
          type: array
          items:
            $ref: '#/components/schemas/BTPropertyUpdateInfo'
        supportCode:
          type: string
        transitionsSkipped:
          type: array
          items:
            type: string
        userId:
          type: string
        workflowAction:
          type: string
        workflowState:
          type: string
        workflowTransition:
          type: string
    BTActiveWorkflowInfo:
      type: object
      properties:
        allowReleaseItemsFromOtherDocuments:
          type: boolean
        canCurrentUserCreateReleases:
          type: boolean
        canCurrentUserEditStandardContent:
          type: boolean
        canCurrentUserManageWorkflows:
          type: boolean
        canCurrentUserSeeArenaItemLink:
          type: boolean
          description: Deprecated, use canCurrentUserSeePLMItemLink
        canCurrentUserSeePLMItemLink:
          type: boolean
        canCurrentUserSyncBomToArena:
          type: boolean
          description: Deprecated, use canCurrentUserSyncBomToPLM
        canCurrentUserSyncBomToPLM:
          type: boolean
        canCurrentUserSyncDrawingToPLM:
          type: boolean
        canCurrentUserSyncRevisionsToArena:
          type: boolean
          description: Deprecated, use canCurrentUserSyncRevisionsToPLM
        canCurrentUserSyncRevisionsToPLM:
          type: boolean
        canCurrentUserSyncStandardContentToArena:
          type: boolean
          description: Deprecated, use canCurrentUserSyncStandardContentToPLM
        canCurrentUserSyncStandardContentToPLM:
          type: boolean
        canCurrentUserSyncToArena:
          type: boolean
          description: Deprecated, use canCurrentUserSyncToPLM
        canCurrentUserSyncToPLM:
          type: boolean
        companyId:
          type: string
        documentId:
          type: string
        drawingCanDuplicatePartNumber:
          type: boolean
        enabledActiveMultipleWorkflows:
          type: boolean
          description: Deprecated, can be determined by checking if the length of releaseWorkflowInfo.pickableWorkflows > 1
        hasInactiveCustomWorkflows:
          type: boolean
          description: Deprecated, use hasInactiveCustomWorkflows field on the workflowInfo object
        isCurrentUserLoggedIntoToPLM:
          type: boolean
          description: Whether user has authenticated against PLM. Used to trigger OAuth handshake
        obsoletionWorkflow:
          $ref: '#/components/schemas/BTPublishedWorkflowInfo'
        obsoletionWorkflowId:
          type: string
          description: Deprecated, use obsoletionWorkflowInfo.workflow.id instead
        obsoletionWorkflowInfo:
          $ref: '#/components/schemas/BTActiveWorkflowTypeInfo'
        osCategoryIdToArenaNumberFormatId:
          type: object
          additionalProperties:
            type: string
            description: Deprecated, no current alternative
          description: Deprecated, no current alternative
        partNumberingSchemeId:
          type: string
        pickableWorkflows:
          type: array
          description: Deprecated, use the pickableWorkflows field on the workflowInfo object
          items:
            $ref: '#/components/schemas/BTPublishedWorkflowInfo'
        plmIntegrationType:
          type: integer
          format: int32
        plmName:
          type: string
        releaseWorkflow:
          $ref: '#/components/schemas/BTPublishedWorkflowInfo'
        releaseWorkflowId:
          type: string
          description: Deprecated, use releaseWorkflowInfo.workflow.id instead
        releaseWorkflowInfo:
          $ref: '#/components/schemas/BTActiveWorkflowTypeInfo'
        releaseableApplications:
          type: array
          description: Deprecated, no current alternative
          items:
            type: string
            description: Deprecated, no current alternative
        standardContentNumberingSchemeId:
          type: string
        standardContentUsingAutoNumbering:
          type: boolean
        standardContentUsingThirdPartyPartNumbering:
          type: boolean
        taskWorkflow:
          $ref: '#/components/schemas/BTPublishedWorkflowInfo'
        taskWorkflowInfo:
          $ref: '#/components/schemas/BTActiveWorkflowTypeInfo'
        usingAutoPartNumbering:
          type: boolean
        usingManagedWorkflow:
          type: boolean
        usingThirdPartyPartNumbering:
          type: boolean
    BTCompanySummaryInfo:
      type: object
      properties:
        admin:
          type: boolean
        description:
          type: string
        domainPrefix:
          type: string
        enterpriseBaseUrl:
          type: string
        enterpriseSubtype:
          type: integer
          format: int32
        href:
          type: string
          description: URI to fetch complete information of the resource.
          format: uri
        id:
          type: string
          description: Id of the resource.
        image:
          type: string
        name:
          type: string
          description: Name of the resource.
        noPublicDocuments:
          type: boolean
        ownerId:
          type: string
        secondaryDomainPrefixes:
          uniqueItems: true
          type: array
          items:
            type: string
        state:
          type: integer
          format: int32
        type:
          type: integer
          format: int32
        viewRef:
          type: string
          description: URI to visualize the resource in a webclient if applicable.
          format: uri
    BTActiveWorkflowTypeInfo:
      type: object
      properties:
        hasInactiveCustomWorkflows:
          type: boolean
        pickableWorkflows:
          type: array
          items:
            $ref: '#/components/schemas/BTPublishedWorkflowInfo'
        workflow:
          $ref: '#/components/schemas/BTPublishedWorkflowInfo'
    BTTeamSummaryInfo:
      type: object
      properties:
        active:
          type: boolean
        canMove:
          type: boolean
        connectionName:
          type: string
        connectionNames:
          type: array
          items:
            type: string
        createdAt:
          type: string
          format: date-time
        createdBy:
          $ref: '#/components/schemas/BTUserBasicSummaryInfo'
        description:
          type: string
        href:
          type: string
          description: URI to fetch complete information of the resource.
          format: uri
        id:
          type: string
          description: Id of the resource.
        isContainer:
          type: boolean
        isEnterpriseOwned:
          type: boolean
        isExternalConnectionResource:
          type: boolean
        isMutable:
          type: boolean
        modifiedAt:
          type: string
          format: date-time
        modifiedBy:
          $ref: '#/components/schemas/BTUserBasicSummaryInfo'
        name:
          type: string
          description: Name of the resource.
        owner:
          $ref: '#/components/schemas/BTOwnerInfo'
        parentId:
          type: string
        predefinedTeam:
          type: integer
          format: int32
        predefinedTeamMutable:
          type: boolean
        projectId:
          type: string
        resourceType:
          type: string
        treeHref:
          type: string
        unparentHref:
          type: string
        viewRef:
          type: string
          description: URI to visualize the resource in a webclient if applicable.
          format: uri
      discriminator:
        propertyName: jsonType
        mapping:
          team: '#/components/schemas/BTTeamInfo'
    BTWorkflowAuditLogInfo:
      type: object
      properties:
        companyId:
          type: string
        debugMicroversionId:
          type: string
        entries:
          type: array
          items:
            $ref: '#/components/schemas/BTWorkflowAuditLogEntryInfo'
        objectId:
          type: string
        objectType:
          type: integer
          format: int32
        publishedWorkflowId:
          $ref: '#/components/schemas/BTPublishedWorkflowId'
    BTUserDetailSummaryInfo:
      type: object
      discriminator:
        propertyName: jsonType
        mapping:
          user-detail-summary: '#/components/schemas/BTUserDetailSummaryInfo'
          user-summary: '#/components/schemas/BTUserSummaryInfo'
      allOf:
      - $ref: '#/components/schemas/BTUserBasicSummaryInfo'
      - type: object
        properties:
          documentationName:
            type: string
          email:
            type: string
          firstName:
            type: string
          lastName:
            type: string
    BTListResponseBTWorkflowObserverOptionInfo:
      type: object
      properties:
        href:
          type: string
          description: URI for current page of resources.
          format: uri
        items:
          type: array
          description: Array of items in the current page.
          items:
            $ref: '#/components/schemas/BTWorkflowObserverOptionInfo'
        next:
          type: string
          description: URI for next page of the resources if more are available.
          format: uri
        previous:
          type: string
          description: URI for previous page of the resources.
          format: uri
      description: A list of resources that typically supports paging.
    BTListResponseBTObjectWorkflowInfo:
      type: object
      properties:
        href:
          type: string
          description: URI for current page of resources.
          format: uri
        items:
          type: array
          description: Array of items in the current page.
          items:
            $ref: '#/components/schemas/BTObjectWorkflowInfo'
        next:
          type: string
          description: URI for next page of the resources if more are available.
          format: uri
        previous:
          type: string
          description: URI for previous page of the resources.
          format: uri
      description: A list of resources that typically supports paging.
    BTPublishedWorkflowId:
      type: object
      properties:
        companyId:
          type: string
        versionId:
          type: string
        workflowId:
          type: string
    BTIdentityInfo:
      type: object
      properties:
        company:
          $ref: '#/components/schemas/BTCompanySummaryInfo'
        href:
          type: string
          description: URI to fetch complete information of the resource.
          format: uri
        id:
          type: string
          description: Id of the resource.
        identityType:
          type: integer
          format: int32
        team:
          $ref: '#/components/schemas/BTTeamSummaryInfo'
        user:
          $ref: '#/components/schemas/BTUserSummaryInfo'
        viewRef:
          type: string
          description: URI to visualize the resource in a webclient if applicable.
          format: uri
    BTUserSummaryInfo:
      type: object
      discriminator:
        propertyName: jsonType
        mapping:
          user-summary: '#/components/schemas/BTUserSummaryInfo'
          companyuser: '#/components/schemas/BTCompanyUserSummaryInfo'
          BTUserAdminSummaryInfo: '#/components/schemas/BTUserAdminSummaryInfo'
          userinfo: '#/components/schemas/BTUserInfo'
          BTUserOAuth2SummaryInfo: '#/components/schemas/BTUserOAuth2SummaryInfo'
      allOf:
      - $ref: '#/components/schemas/BTUserDetailSummaryInfo'
      - type: object
        properties:
          company:
            $ref: '#/components/schemas/BTCompanySummaryInfo'
          companyUserState:
            type: integer
            format: int32
          confirmationRequested:
            type: boolean
          documentationNameOverride:
            type: string
          globalPermissions:
            $ref: '#/components/schemas/GlobalPermissionInfo'
          invitationState:
            type: integer
            format: int32
          isExternal:
            type: boolean
          isGuest:
            type: boolean
          isLight:
            type: boolean
          lastLoginTime:
            type: string
            format: date-time
          personalMessageAllowed:
            type: boolean
          source:
            type: integer
            format: int32
    BTWorkflowObserverOptionInfo:
      type: object
      properties:
        alias:
          $ref: '#/components/schemas/BTAliasInfo'
        company:
          $ref: '#/components/schemas/BTCompanySummaryInfo'
        href:
          type: string
          description: URI to fetch complete information of the resource.
          format: uri
        id:
          type: string
          description: Id of the resource.
        identityType:
          type: integer
          format: int32
        role:
          $ref: '#/components/schemas/BTRbacRoleInfo'
        team:
          $ref: '#/components/schemas/BTTeamSummaryInfo'
        user:
          $ref: '#/components/schemas/BTUserSummaryInfo'
        viewRef:
          type: string
          description: URI to visualize the resource in a webclient if applicable.
          format: uri
      description: Array of items in the current page.
    BTPublishedWorkflowInfo:
      type: object
      properties:
        activeState:
          type: integer
          format: int32
        companyId:
          type: string
        description:
          type: string
        documentId:
          type: string
        elementId:
          type: string
        id:
          type: string
        imageSrc:
          type: string
        isPickable:
          type: boolean
        json:
          type: string
        name:
          type: string
        objectType:
          type: integer
          format: int32
        ownerType:
          type: integer
          format: int32
        publishedDate:
          type: string
          description: The date of publication of workflow
          format: date-time
        usesExternalPlm:
          type: boolean
          description: Whether the workflow connects to an external PLM service like Arena
        versionId:
          type: string
      description: Captures information about a published workflow
    BTPropertyUpdateInfo:
      type: object
      properties:
        errorMessage:
          type: string
        itemHref:
          type: string
        newValue:
          type: object
        oldValue:
          type: object
        propertyId:
          type: string
    BTBaseInfo:
      type: object
      properties:
        href:
          type: string
          description: URI to fetch complete information of the resource.
          format: uri
        id:
          type: string
          description: Id of the resource.
        name:
          type: string
          description: Name of the resource.
        viewRef:
          type: string
          description: URI to visualize the resource in a webclient if applicable.
          format: uri
    BTAliasInfo:
      type: object
      properties:
        companyId:
          type: string
        createdAt:
          type: string
          format: date-time
        description:
          type: string
        entries:
          type: array
          items:
            $ref: '#/components/schemas/BTAliasEntryInfo'
        href:
          type: string
          description: URI to fetch complete information of the resource.
          format: uri
        id:
          type: string
          description: Id of the resource.
        identities:
          type: array
          items:
            $ref: '#/components/schemas/BTIdentityInfo'
        name:
          type: string
          description: Name of the resource.
        viewRef:
          type: string
          description: URI to visualize the resource in a webclient if applicable.
          format: uri
    GlobalPermissionInfo:
      type: object
      properties:
        accessReports:
          type: boolean
        adminEnterprise:
          type: boolean
        allowAppStoreAccess:
          type: boolean
        allowPublicDocumentsAccess:
          type: boolean
        approveReleases:
          type: boolean
        branchLockPermissions:
          type: boolean
        createDocumentsInRoot:
          type: boolean
        createProject:
          type: boolean
        createReleases:
          type: boolean
        createTasks:
          type: boolean
        deletePermanently:
          type: boolean
        enableLabs:
          type: boolean
        exportFiles:
          type: boolean
        importFiles:
          type: boolean
        manageGuestUsers:
          type: boolean
        manageNonGeometricItems:
          type: boolean
        manageRbac:
          type: boolean
        manageStandardContentMetadata:
          type: boolean
        manageUsers:
          type: boolean
        manageWorkflows:
          type: boolean
        shareForAnonymousAccess:
          type: boolean
        transferDocumentsFromEnterprise:
          type: boolean
        useRevisionTools:
          type: boolean
    BTRbacRoleInfo:
      type: object
      properties:
        active:
          type: boolean
        description:
          type: string
        href:
          type: string
          description: URI to fetch complete information of the resource.
          format: uri
        id:
          type: string
          description: Id of the resource.
        name:
          type: string
          description: Name of the resource.
        predefinedRole:
          type: integer
          format: int32
        viewRef:
          type: string
          description: URI to visualize the resource in a webclient if applicable.
          format: uri
    BTUserBasicSummaryInfo:
      required:
      - jsonType
      type: object
      properties:
        jsonType:
          type: string
      discriminator:
        propertyName: jsonType
        mapping:
          user-summary: '#/components/schemas/BTUserBasicSummaryInfo'
          user-detail-summary: '#/components/schemas/BTUserDetailSummaryInfo'
      allOf:
      - $ref: '#/components/schemas/BTBaseInfo'
      - type: object
        properties:
          href:
            type: string
            description: URI to fetch complete information of the resource.
            format: uri
          id:
            type: string
            description: Id of the resource.
          image:
            type: string
          isOnshapeSupport:
            type: boolean
          name:
            type: string
            description: Name of the resource.
          state:
            type: integer
            format: int32
          viewRef:
            type: string
            description: URI to visualize the resource in a webclient if applicable.
            format: uri
    BTOwnerInfo:
      type: object
      properties:
        href:
          type: string
          description: URI to fetch complete information of the resource.
          format: uri
        id:
          type: string
          description: Id of the resource.
        image:
          type: string
        isEnterpriseOwnedResource:
          type: boolean
        name:
          type: string
          description: Name of the resource.
        type:
          type: integer
          format: int32
        viewRef:
          type: string
          description: URI to visualize the resource in a webclient if applicable.
          format: uri
    BTAliasEntryInfo:
      type: object
      properties:
        createdAt:
          type: string
          format: date-time
        href:
          type: string
          description: URI to fetch complete information of the resource.
          format: uri
        id:
          type: string
          description: Id of the resource.
        identity:
          $ref: '#/components/schemas/BTIdentityInfo'
        name:
          type: string
          description: Name of the resource.
        viewRef:
          type: string
          description: URI to visualize the resource in a webclient if applicable.
          format: uri
    BTAPIWorkflowableType:
      type: string
      description: All workflowable types that can be enumerated.
      enum:
      - RELEASE
      - TASK
      - ASSIGNMENT
      - OBSOLETION
    BTObjectWorkflowInfo:
      type: object
      properties:
        canBeDiscarded:
          type: boolean
          description: Whether workflowable object can be discarded.
        href:
          type: string
          description: URI to fetch complete information of the resource.
          format: uri
        id:
          type: string
          description: Id of the resource.
        isDiscarded:
          type: boolean
          description: Whether workflowable object has been discarded.
        isFrozen:
          type: boolean
          description: Whether workflowable object has reached terminal state and is frozen.
        lastAttemptTimestamp:
          type: string
          description: The timestamp of the last workflow action.
          format: date-time
        lastEncounteredErrorMessage:
          type: string
          description: The error message from the last failed workflow action, if any.
        metadataState:
          $ref: '#/components/schemas/BTMetadataStateType'
        name:
          type: string
          description: Name of the resource.
        objectType:
          $ref: '#/components/schemas/BTAPIWorkflowableType'
        stateId:
          type: string
          description: The current state of object like SETUP, REJECTED etc. Custom workflows can have any declared state.
        viewRef:
          type: string
          description: URI to visualize the resource in a webclient if applicable.
          format: uri
        workflowId:
          type: string
          description: The workflow definition id that governs this object's states and transitions.
      description: An workflowable object like Release or Task that supports states and transitions.
  securitySchemes:
    OAuth2:
      type: oauth2
      description: Use OAuth 2.0 to authenticate requests.
      flows:
        authorizationCode:
          authorizationUrl: /oauth/authorize
          tokenUrl: /oauth/token
          refreshUrl: /oauth/token
          scopes:
            OAuth2Internal: Application is Onshape Internal
            OAuth2ReadPII: Application can read your profile information
            OAuth2Read: Application can read your documents
            OAuth2Write: Application can write to your documents
            OAuth2Delete: Application can delete your documen

# --- truncated at 32 KB (33 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/onshape/refs/heads/main/openapi/onshape-workflow-api-openapi.yml