Client providing access to Autodesk Forge APIs.

Hierarchy (view full)

Constructors

  • Initializes new client with specific authentication method.

    Parameters

    • auth: IAuthOptions

      Authentication object, containing either client_id and client_secret properties (for 2-legged authentication), or a single token property (for 2-legged or 3-legged authentication with pre-generated access token).

    • Optional host: string

      Forge API host.

    • Optional region: Region

      Forge availability region ("US" or "EMEA").

    Returns BIM360Client

Properties

axios: AxiosInstance
host: string
region: Region
root: string
token?: string

Methods

  • Creates next version of uploaded files (items).

    Parameters

    • projectId: string

      The project Id.

    • fileName: string

      The name of the file.

    • itemId: string

      The ID of the item.

    • storageId: string

      The storage location Id.

    • urns: string[]
    • Optional xUserId: string

      Optional API will act on behalf of specified user Id.

    Returns Promise<null | IVersion>

    Specific version of an item.

  • Creates a storage location in the OSS where data can be uploaded to.

    Parameters

    • projectId: string

      Project Id.

    • fileName: string

      Displayable name of the resource.

    • resourceType: ResourceType

      The type of this resource. Possible values: folders, items.

    • resourceId: string

      Id of the resource.

    • Optional xUserId: string

      Optional API will act on behalf of specified user Id.

    Returns Promise<IStorageLocation>

    A storage location.

    Async

  • Creates versions of uploaded files (items) and makes copies of existing files.

    Parameters

    • projectId: string

      The project Id.

    • fileName: string

      Displayable name of an item.

    • folderId: string

      The folder Id.

    • storageId: string

      The storage location Id.

    • Optional xUserId: string

      Optional API will act on behalf of specified user Id.

    Returns Promise<null | IVersion>

    Specific version of an item.

  • Parameters

    • endpoint: string
    • headers: {
          [name: string]: string;
      } = {}
      • [name: string]: string
    • scopes: string[]

    Returns Promise<any>

  • Parameters

    • config: AxiosRequestConfig<any>

    Returns Promise<AxiosResponse<any, any>>

  • Parameters

    • endpoint: string
    • headers: {
          [name: string]: string;
      } = {}
      • [name: string]: string
    • scopes: string[]

    Returns Promise<any>

  • Parameters

    • endpoint: string
    • headers: {
          [name: string]: string;
      } = {}
      • [name: string]: string
    • scopes: string[]

    Returns Promise<any>

  • Retrieves ID of container for issues of specific BIM360 project.

    Parameters

    • hubId: string

      Hub ID.

    • projectId: string

      Project ID.

    Returns Promise<null | string>

    Issue container ID if there is one, otherwise null.

    Async

  • Retrieves ID of container for locations of specific BIM360 project. Note: this API is not yet officially documented and supported!

    Parameters

    • hubId: string

      Hub ID.

    • projectId: string

      Project ID.

    Returns Promise<null | string>

    Location container ID if there is one, otherwise null.

    Async

  • Parameters

    • endpoint: string
    • headers: {
          [name: string]: string;
      } = {}
      • [name: string]: string
    • scopes: string[]

    Returns Promise<any>

  • Parameters

    • accountId: string

      The account ID of the users. This corresponds to hub ID in the Data Management API. To convert a hub ID into an account ID you need to remove the “b.” prefix. For example, a hub ID of b.c8b0c73d-3ae9 translates to an account ID of c8b0c73d-3ae9.

    • userId: string

      User ID.

    Returns Promise<IUser>

    User details.

  • Lists all attachments associated with a BIM360 issue. Requires 3-legged token. https://forge.autodesk.com/en/docs/bim360/v1/reference/http/field-issues-attachments-GET.

    Parameters

    • containerId: string

      ID of container storing all issues for a specific projects.

    • issueId: string

      Issue ID.

    • Optional page: IPage

      Optional page of issue attachments. If not defined, all attachments will be listed.

    Returns Promise<IIssueAttachment[]>

    Issue attachments.

    Async

  • Parameters

    • containerId: string

    Returns Promise<any[]>

  • Parameters

    • containerId: string

    Returns Promise<any[]>

  • Lists all comments associated with a BIM360 issue. Requires 3-legged token. https://forge.autodesk.com/en/docs/bim360/v1/reference/http/field-issues-:id-comments-GET.

    Parameters

    • containerId: string

      ID of container storing all issues for a specific projects.

    • issueId: string

      Issue ID.

    • Optional page: IPage

      Optional page of issue comments. If not defined, all comments will be listed.

    Returns Promise<IIssueComment[]>

    Issue comments.

    Async

  • Retrieves a list of supported root causes that you can allocate to an issue. https://forge.autodesk.com/en/docs/bim360/v1/reference/http/root-causes-GET.

    Parameters

    • containerId: string

      ID of container storing all issues for a specific projects.

    • Optional page: IPage

      Optional page of records. If not defined, all records will be listed.

    Returns Promise<IIssueRootCause[]>

    Issue root causes.

    Async

  • Lists all issues in a BIM360 project. Requires 3-legged token. https://forge.autodesk.com/en/docs/bim360/v1/reference/http/field-issues-GET.

    Parameters

    • containerId: string

      ID of container storing all issues for a specific projects.

    • Optional filter: IIssueFilter

      Optional set of filters.

    • Optional page: IPage

      Optional page of issues to retrieve. If not defined, all issues will be listed.

    Returns Promise<IIssue[]>

    List of matching issues.

    Async

  • Retrieves details about the locations (nodes) for a project. Note: this API is not yet officially documented and supported!

    Parameters

    • containerId: string

      Location container ID retrieved using getLocationContainerID.

    • Optional page: IPage

      Optional page of locations to retrieve. If not defined, all issues will be listed.

    Returns Promise<ILocationNode[]>

    Location nodes.

    Async

  • Parameters

    • endpoint: string
    • data: any
    • headers: {
          [name: string]: string;
      } = {}
      • [name: string]: string
    • scopes: string[]

    Returns Promise<any>

  • Parameters

    • endpoint: string
    • data: any
    • headers: {
          [name: string]: string;
      } = {}
      • [name: string]: string
    • scopes: string[]

    Returns Promise<any>

  • Parameters

    • endpoint: string
    • data: any
    • headers: {
          [name: string]: string;
      } = {}
      • [name: string]: string
    • scopes: string[]

    Returns Promise<any>

  • Resets client to specific authentication method, Forge host, and availability region.

    Parameters

    • Optional auth: IAuthOptions

      Authentication object, containing either client_id and client_secret properties (for 2-legged authentication), or a single token property (for 2-legged or 3-legged authentication with pre-generated access token).

    • Optional host: string

      Forge API host.

    • Optional region: Region

      Forge availability region ("US" or "EMEA").

    Returns void

Generated using TypeDoc