Hierarchy

Constructors

Methods

  • Add a team member to a profile in a specific account

    Parameters

    • id: string
    • email: string

    Returns Promise<string>

    Success message.

    Throws

    If the email is not a valid TagoIO's account.

    Throws

    If the profile does not exists.

  • Sets the information of addons for the profile

    Parameters

    • profileID: string

      Profile identification

    • addonObj: Partial<AddonInfo>

    Returns Promise<string>

  • Fetches the information from an auditlog query

    Parameters

    • profileID: string

      Profile identification

    • Optional queryId: string

      auditlog queryId from auditLogCreate

    Returns Promise<AuditLog>

  • Create a profile.

    If allocate_free_resources is passed as an option, all the free resources available in allocation will be allocated to the new profile.

    Parameters

    • profileObj: {
          name: string;
      }

      Profile object with data to be created

      • name: string
    • Optional options: {
          allocate_free_resources?: boolean;
      }

      Options for the created profile.

      • Optional allocate_free_resources?: boolean

    Returns Promise<{
        id: string;
    }>

  • Delete profile

    Parameters

    • profileID: string

      Profile identification

    Returns Promise<string>

  • Remove an account from a profile shared team.

    Parameters

    • id: string
    • accountId: string

    Returns Promise<string>

    Success message.

    Throws

    If the accountId is not a valid TagoIO's account.

    Throws

    If the profile does not exists.

  • Edits a profile

    Parameters

    • profileID: string
    • profileObj: Partial<ProfileInfo>

      Profile object with data to be changed

    Returns Promise<string>

  • Get Profile info

    Parameters

    • profileID: string

      Profile identification or "current" for current profile example:

      • Resources.profiles.info("6126850f58ef8600184dd486");
      • Resources.profiles.info("current");

    Returns Promise<ProfileInfo>

  • Remove an add-on from a profile at the end of the billing cycle.

    Parameters

    Returns Promise<string>

    Success message.

    Throws

    If profile ID is invalid.

    Throws

    If profile doesn't have the add-on.

  • Sets the information of services for the profile. Services are the main resources in your profile, for example data input, data output, etc...

    Parameters

    • profileID: string

      Profile identification

    • serviceObj: object

    Returns Promise<string>

  • Deletes a token

    Parameters

    • profileId: string
    • token: string

      Token

    Returns Promise<string>

    Profile Id

    Profile ID

  • Transforms the current token to another profile. The current profile will no longer have the current token, as the current token will be acquired by the profile informed. After this call is done, other requests using this token will work solely for the new profile, and no longer for the current profile.

    Parameters

    • targetProfileID: string

      Profile identification

    Returns Promise<string>

  • List all the usage statistics of a profile.

    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.

    Parameters

    • profileID: string

      Profile identification

    • Optional dateObj: StatisticsDate

      Object with date and their timezone

    Returns Promise<UsageStatistic[]>

    Array of cumulative usage statistics.

    Example

    [
    { "time": "2022-01-01T00:00:00.000Z", "input": 5 },
    { "time": "2022-01-02T00:00:00.000Z", "input": 5, "output": 10 },
    { "time": "2022-01-03T00:00:00.000Z", "input": 10, "output": 15 },
    ]