Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BIM360Client

Client providing access to Autodesk Platform Services BIM360 APIs.

Hierarchy

Index

Constructors

constructor

  • 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
    • Optional region: US | EMEA

    Returns BIM360Client

Properties

Protected Optional auth

Protected axios

axios: AxiosInstance

Protected host

host: string

Protected region

region: Region

Protected root

root: string

Protected Optional token

token: string

Methods

createIssue

  • createIssue(containerId: string, attributes: INewIssue): Promise<IIssue>

createIssueAttachment

  • createIssueAttachment(containerId: string, attributes: INewIssueAttachment): Promise<IIssueAttachment>

createIssueComment

  • createIssueComment(containerId: string, issueId: string, body: string): Promise<IIssueComment>

createNextVersion

  • createNextVersion(projectId: string, fileName: string, itemId: string, storageId: string, urns: string[], xUserId?: string): Promise<null | IVersion>
  • 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

    Returns Promise<null | IVersion>

    Specific version of an item.

createStorageLocation

  • createStorageLocation(projectId: string, fileName: string, resourceType: ResourceType, resourceId: string, xUserId?: string): Promise<IStorageLocation>
  • Creates a storage location in the OSS where data can be uploaded to.

    async

    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

    Returns Promise<IStorageLocation>

    A storage location.

createVersion

  • createVersion(projectId: string, fileName: string, folderId: string, storageId: string, xUserId?: string): Promise<null | IVersion>
  • 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

    Returns Promise<null | IVersion>

    Specific version of an item.

Protected delete

  • delete(endpoint: string, headers?: {}, scopes: string[]): Promise<any>
  • Parameters

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

    Returns Promise<any>

Protected fetch

  • fetch(config: AxiosRequestConfig): Promise<AxiosResponse<any>>

Protected get

  • get(endpoint: string, headers?: {}, scopes: string[]): Promise<any>
  • Parameters

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

    Returns Promise<any>

Protected getBuffer

  • getBuffer(endpoint: string, headers?: {}, scopes: string[]): Promise<any>
  • Parameters

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

    Returns Promise<any>

getFolder

  • getFolder(projectId: string, folderId: string, xUserId?: string): Promise<IFolder>

getHubDetails

  • getHubDetails(hubId: string, xUserId?: string): Promise<IHub>

getIssueContainerID

  • getIssueContainerID(hubId: string, projectId: string): Promise<null | string>
  • Retrieves ID of container for issues of specific BIM360 project.

    async

    Parameters

    • hubId: string

      Hub ID.

    • projectId: string

      Project ID.

    Returns Promise<null | string>

    Issue container ID if there is one, otherwise null.

getIssueDetails

  • getIssueDetails(containerId: string, issueId: string): Promise<IIssue>

getItemDetails

  • getItemDetails(projectId: string, itemId: string, xUserId?: string): Promise<IItemDetails>

getLocationContainerID

  • getLocationContainerID(hubId: string, projectId: string): Promise<null | string>
  • Retrieves ID of container for locations of specific BIM360 project. Note: this API is not yet officially documented and supported!

    async

    Parameters

    • hubId: string

      Hub ID.

    • projectId: string

      Project ID.

    Returns Promise<null | string>

    Location container ID if there is one, otherwise null.

getProjectDetails

  • getProjectDetails(hubId: string, projectId: string, xUserId?: string): Promise<IProject>

Protected getStream

  • getStream(endpoint: string, headers?: {}, scopes: string[]): Promise<any>
  • Parameters

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

    Returns Promise<any>

getTipVersion

  • getTipVersion(projectId: string, itemId: string, xUserId?: string): Promise<IVersion>

getUserDetails

  • getUserDetails(accountId: string, userId: string): Promise<IUser>
  • 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.

getVersionDetails

  • getVersionDetails(projectId: string, itemId: string, versionId: string, xUserId?: string): Promise<IVersion>

listContents

  • listContents(projectId: string, folderId: string, xUserId?: string): Promise<IItem[]>

listHubs

  • listHubs(xUserId?: string): Promise<IHub[]>

listIssueAttachments

  • listIssueAttachments(containerId: string, issueId: string, page?: IPage): Promise<IIssueAttachment[]>

listIssueAttributeDefinitions

  • listIssueAttributeDefinitions(containerId: string): Promise<any[]>
  • Parameters

    • containerId: string

    Returns Promise<any[]>

listIssueAttributeMappings

  • listIssueAttributeMappings(containerId: string): Promise<any[]>
  • Parameters

    • containerId: string

    Returns Promise<any[]>

listIssueComments

  • listIssueComments(containerId: string, issueId: string, page?: IPage): Promise<IIssueComment[]>

listIssueRootCauses

  • listIssueRootCauses(containerId: string, page?: IPage): Promise<IIssueRootCause[]>

listIssueTypes

  • listIssueTypes(containerId: string, includeSubtypes?: boolean): Promise<IIssueType[]>

listIssues

  • listIssues(containerId: string, filter?: IIssueFilter, page?: IPage): Promise<IIssue[]>

listLocationNodes

  • listLocationNodes(containerId: string, page?: IPage): Promise<ILocationNode[]>
  • Retrieves details about the locations (nodes) for a project. Note: this API is not yet officially documented and supported!

    async

    Parameters

    Returns Promise<ILocationNode[]>

    Location nodes.

listProjects

  • listProjects(hubId: string, xUserId?: string): Promise<IProject[]>

listTopFolders

  • listTopFolders(hubId: string, projectId: string, xUserId?: string): Promise<IFolder[]>

listUsers

  • listUsers(accountId: string, filter?: IUserFilter): Promise<IUser[]>

listVersions

  • listVersions(projectId: string, itemId: string, xUserId?: string): Promise<IVersion[]>

Protected patch

  • patch(endpoint: string, data: any, headers?: {}, scopes: string[]): Promise<any>
  • Parameters

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

    Returns Promise<any>

Protected post

  • post(endpoint: string, data: any, headers?: {}, scopes: string[]): Promise<any>
  • Parameters

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

    Returns Promise<any>

Protected put

  • put(endpoint: string, data: any, headers?: {}, scopes: string[]): Promise<any>
  • Parameters

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

    Returns Promise<any>

reset

  • reset(auth?: { client_id: string; client_secret: string } | { token: string }, host?: string, region?: US | EMEA): void
  • Resets client to specific authentication method, APS host, and availability region.

    Parameters

    • Optional auth: { client_id: string; client_secret: string } | { token: string }
    • Optional host: string
    • Optional region: US | EMEA

    Returns void

Protected setAuthorization

  • setAuthorization(options: any, scopes: string[]): Promise<void>

updateIssue

  • updateIssue(containerId: string, issueId: string, attributes: IUpdateIssue): Promise<IIssue>

Generated using TypeDoc