> For the complete documentation index, see [llms.txt](https://docs.licensespring.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.licensespring.com/sdks/node.js-sdk/floating-api.md).

# Floating API

```typescript
class FloatingAPIv2 {

  constructor(config: FloatingAPIConfig);

  get tokenExpiryDate(): Dayjs;

  setLogLevel(level: LogLevel);

  getHardwareID(algorithm: HardwareIdAlgorithm = this.config.hardwareIDMethod ?? 0): string;
  
  async ping(): boolean;

  async authAddUser(user: User);

  async authChangePassword(body: ChangePasswordReq): boolean;

  async authInitialPassword(body: SetPasswordReq): boolean;

  async authLogin(body: LoginUser): LoginResponse;

  async authUsersList(): User[];

  async authUserDelete(id: number): boolean;

  async getConfig(): CloudConfig;

  async patchConfig(input: CloudConfigUpdate): boolean;

  async bundleActivate(body: BundleRequest): ActivateBundleResponse;

  async bundleDeactivate(id: number): DeactivateBundleResponse;

  async bundleOfflineActivationGenerate(body: OfflineRequestInput): GenerateOfflineRequestResponse;

  async bundleOfflineDeactivationGenerate(body: OfflineRequestInput): GenerateOfflineRequestResponse;

  async bundleOfflineActivationUpload(product: string, file: File | Blob): ActivateBundleResponse;

  async listLicenses(params?: { product?: string }): LicenseData[];

  async activateLicense(body: AddLicenseRequest): ActivateLicenseResponse;

  async getLicenseById(id: string): LicenseData;

  async deactivateLicense(id: number): boolean;

  async addLicenseConsumption(id: number, body: AddConsumptionRequest): ConsumptionResponse;

  async addFeatureConsumption(id: number, body: AddFeatureConsumptionRequest): FeatureConsumptionResponse;

  async listLicenseFeatureUsers(id: number): AllFeatureUsersResponse;

  async registerFeatureForUser(id: number, body: RegisterFeatureRequest): RegisterFeatureResponse;

  async releaseFeatureForUser(id: number, body: UnregisterFeatureRequest): boolean;

  async releaseFeatureForAllUsers(id: number, body: AllFeatureUsersRequest): FeatureReleasedAllResponse;

  async listLicenseUsers(id: number): FloatingUser[];

  async registerUserToLicense(id: number, body: RegisterRequestBody): LicenseData;

  async unregisterUserFromLicense(id: number, body: UsernameRequest): boolean;

  async unregisterAllUsersFromLicense(id: number): UnregisterAllUsersResponse;

  async borrowLicenseForUser(id: number, body: BorrowUserRequest): BorrowResponse;

  async offlineActivationGenerate(body: OfflineRequestInput): GenerateOfflineRequestResponse;

  async offlineActivationUpload(product: string, file: File | Blob): ActivateBundleResponse | ActivateLicenseResponse;

  async offlineDeactivationGenerate(body: OfflineRequestInput): GenerateOfflineRequestResponse;

  async airgapGenerateActivation(body: GenerateAirgapRequestBody): AirgapActivationCodeResponse;

  async airgapGenerateDeactivation(body: GenerateAirgapDeactivationRequestBody): AirgapDeactivationCodeResponse;

  async airgapDeactivate(body: DeactivateAirgapRequestBody): AirgapeDeactivatedResponse;

  async airgapActivate(file: File | Blob, jsonFile: File | Blob): AirgapActivatedResponse;

  async getSyncConfig(): SyncConfig;

  async setSyncMode(body: SyncEnableReq): boolean;

  async triggerSync(): boolean;
}

type FloatingAPIConfig = {
  apiPath: string,
  hardwareID?: string,
  hardwareIDMethod?: number,
  logLevel?: LogLevel,
  proxy?: AxiosProxyConfig,
  certChain: string,
  disableUserAuth?: boolean,
} & (
    {
      apiKey: string,
      sharedKey: string
    } | {
      clientID: string,
      clientSecret: string,
      tokenUrl: string
    }
  );
  
```

For declarations of types referenced here see: [**Type Declarations**](/sdks/node.js-sdk/type-declarations.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.licensespring.com/sdks/node.js-sdk/floating-api.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
