connectwise-rest
    Preparing search index...

    Class AutomateAPI

    Top-level Automate client. Section clients are exposed as lazy getters so you pay for each only when first accessed. Each access caches the instance in place.

    All sub-APIs share this single Automate instance (and therefore a single axios client, auth state, and connection pool).

    Hierarchy

    • default
      • AutomateAPI
    Index

    Constructors

    Properties

    config: AutomateConfig
    paginate: (
        apiMethod: Function,
        paginateArgs: PaginationOptions,
        ...methodArgs: Record<string, unknown>[],
    ) => Promise<unknown[]>

    Pass the function to be paginated first, then arguments to paginate itself, then any additional arguments to the function in order

     cwa.paginate(cwa.ComputersAPI.getComputerList, {startPage: 1, pageSize: 1000}, {conditions: 'inactiveFlag = false'})
    request: (args: RequestOptions) => Promise<any>

    Accessors

    • get token(): string | undefined

      Returns string | undefined

    • set token(token: string | undefined): void

      Parameters

      • token: string | undefined

      Returns void

    Methods

    • Returns Promise<boolean>

    • Parameters

      • __namedParameters: {
            password?: string;
            serverUrl: string;
            twoFactorPasscode?: string;
            username?: string;
        }

      Returns Promise<
          {
              AbsoluteExpirationDate?: string;
              AccessToken?: string;
              ExpirationDate?: string;
              InternalUserName?: string;
              IsInternalTwoFactorRequired?: boolean;
              IsTwoFactorRequired?: boolean;
              SSOAccessToken?: string;
              TokenType?: string;
              UserId?: string;
          },
      >