TagoIO SDK for JavaScript and TypeScript
    Preparing search index...

    Class Profile

    Hierarchy

    Index

    Constructors

    Methods

    • Parameters

      • profileID: string
      • addonObj: Partial<AddonInfo>

      Returns Promise<string>

      Updates the add-on configuration for a profile.

      This route is deprecated.

    • Parameters

      • profileID: string

      Returns Promise<AddonInfo>

      Retrieves a list of all add-ons associated with the profile.

      This route is deprecated.

    • Parameters

      • id: string
      • email: string

      Returns Promise<string>

      Adds a new team member to the profile using their email address.

      const resources = new Resources({ token: "YOUR-PROFILE-TOKEN" });
      const result = await resources.profiles.addTeamMember("profile-id-123", "user@example.com");
      console.log(result); // User invited
    • Parameters

      • profileID: string
      • OptionalqueryId: string

      Returns Promise<AuditLog>

      Retrieves audit log entries using a previously created query.

      const resources = new Resources({ token: "YOUR-PROFILE-TOKEN" });
      const result = await Resources.profiles.auditLogQuery("profile-id-123", "query-id-456");
      console.log(result);
    • Parameters

      • profileObj: { name: string }
      • Optionaloptions: { allocate_free_resources?: boolean }

      Returns Promise<{ id: string }>

      Creates a new profile with the specified name and optional resource allocation settings.

      const resources = new Resources({ token: "YOUR-PROFILE-TOKEN" });
      const result = await resources.profiles.create({ name: "New Profile" }, { allocate_free_resources: true });
      console.log(result); // { id: 'profile-id-123' }
    • Parameters

      • profileID: string
      • credentials: { password: string; pin_code?: string }

      Returns Promise<string>

      Permanently removes a profile from the account.

      const resources = new Resources({ token: "YOUR-PROFILE-TOKEN" });
      // The “pin_code” field is required when 2FA is activated
      const result = await resources.profiles.delete("profile-id-123", { password: "your-password", pin_code: "123456" });
      console.log(result); // Successfully Removed
    • Parameters

      • id: string
      • accountId: string

      Returns Promise<string>

      Removes a team member from the profile.

      If receive an error "Authorization Denied", check policy in Access Management.

      const resources = new Resources({ token: "YOUR-PROFILE-TOKEN" });
      const result = await resources.profiles.deleteTeamMember("profile-id-123", "account-id-456");
      console.log(result); // Account Successfully Removed
    • Parameters

      • profileID: string

      Returns Promise<ProfileInfo>

      Retrieves detailed information about a specific profile using its ID or 'current' for the active profile.

      If receive an error "Authorization Denied", check policy Account / Access profile in Access Management.

      const profileInfo = await Resources.profiles.info("profile-id-123");
      // Or get current profile
      const currentProfile = await Resources.profiles.info("current");
      console.log(profileInfo); // { info { id: 'profile-id-123', account: 'account-id-123', ...}, ... }
    • Parameters

      Returns Promise<string>

      Removes an add-on from the profile at the end of the current billing cycle.

      This route is deprecated.

    • Parameters

      • profileID: string
      • serviceObj: object

      Returns Promise<string>

      Updates service configuration and resource limits for a profile.

    • Parameters

      • profileID: string
      • Optionaloptions: { onlyAmount?: boolean }

      Returns Promise<ProfileSummary>

      Retrieves a summary of the profile's usage and statistics.

      If receive an error "Authorization Denied", check policy Account / Access profile in Access Management.

      const result = await Resources.profiles.summary("profile-id-123");
      console.log(result); // { amount: { device: 10, bucket: 10, dashboard: 5, ... }, ... }
    • Parameters

      • profileId: string
      • token: string

      Returns Promise<string>

      Revokes and removes an authentication token from the profile.

      const resources = new Resources({ token: "YOUR-PROFILE-TOKEN" });
      const result = await resources.profiles.tokenDelete("profile-id-123", "token-xyz");
      console.log(result); // Token Successfully Removed
    • Parameters

      • targetProfileID: string

      Returns Promise<string>

      Transfers the current authentication token to another profile.

      const resources = new Resources({ token: "YOUR-PROFILE-TOKEN" });
      const result = await resources.profiles.transferTokenToAnotherProfile("target-profile-123");
      console.log(result);
    • Parameters

      Returns Promise<UsageStatistic[]>

      Retrieves usage statistics for a profile within a specified time period.

      Usage statistics are cumulative: if a service was not used in a time period, the statistics for that time period will not be in the object.

      If receive an error "Authorization Denied", check policy Account / Access profile statistics in Access Management.

      const result = await Resources.profiles.usageStatisticList("profile-id-123", {
      start_date: "2024-09-01",
      end_date: "2024-12-31",
      periodicity: "day"
      });
      console.log(result); // [ { time: '2024-09-02T00:01:29.749Z', analysis: 0.07, data_records: 67254, ... }, ... ]