Updates the add-on configuration for a profile.
This route is deprecated.
Optional
filterObj: AuditLogFilterCreates a new audit log query for tracking profile activities.
https://help.tago.io/portal/en/kb/articles/audit-log Audit Log
const resources = new Resources({ token: "YOUR-PROFILE-TOKEN" });
const result = await resources.profiles.auditLog("profile-id-123", {
start_date: new Date("2024-12-01"),
end_date: new Date("2024-12-07")
});
console.log(result);
Optional
queryId: stringRetrieves audit log entries using a previously created query.
https://help.tago.io/portal/en/kb/articles/audit-log Audit Log
const resources = new Resources({ token: "YOUR-PROFILE-TOKEN" });
const result = await Resources.profiles.auditLogQuery("profile-id-123", "query-id-456");
console.log(result);
Optional
options: { Optional
allocate_Creates a new profile with the specified name and optional resource allocation settings.
https://help.tago.io/portal/en/kb/articles/198-profiles#Adding_Profiles Adding Profiles
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' }
Optional
pin_Permanently removes a profile from the account.
https://help.tago.io/portal/en/kb/articles/526-two-factor-authentication Two-Factor Authentication (2FA)
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
Removes a team member from the profile.
https://help.tago.io/portal/en/kb/articles/106-sharing-your-profile Team Management - Sharing your 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
Updates profile information with the provided data.
https://help.tago.io/portal/en/kb/articles/198-profiles#Renaming_your_Profiles Renaming your Profiles
const resources = new Resources({ token: "YOUR-PROFILE-TOKEN" });
const result = await resources.profiles.edit("profile-id-123", { name: "Updated Profile Name" });
console.log(result); // Successfully Updated
Retrieves detailed information about a specific profile using its ID or 'current' for the active profile.
https://help.tago.io/portal/en/kb/articles/198-profiles Profiles
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', ...}, ... }
Retrieves a list of all profiles associated with the current account.
https://help.tago.io/portal/en/kb/articles/198-profiles Profiles
If receive an error "Authorization Denied", check policy Account / Access profile in Access Management.
const result = await Resources.profiles.list();
console.log(result); // [ { id: 'profile-id-123', name: 'Profile Test', ... } ]
Removes an add-on from the profile at the end of the current billing cycle.
This route is deprecated.
Optional
options: { Optional
onlyRetrieves a summary of the profile's usage and statistics.
https://help.tago.io/portal/en/kb/articles/198-profiles Profiles
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, ... }, ... }
Retrieves a list of all team members that have access to the specified profile.
https://help.tago.io/portal/en/kb/articles/106-sharing-your-profile Team Management - Sharing your Profile
const resources = new Resources({ token: "YOUR-PROFILE-TOKEN" });
const result = await resources.profiles.teamList("profile-id-123");
console.log(result); // [ { id: 'account-id-123', active: false, name: 'John Doe', ... }, ... ]
Creates a new authentication token for the specified profile.
const resources = new Resources({ token: "YOUR-PROFILE-TOKEN" });
// The “pin_code” / "otp_type" field is required when 2FA is activated
const result = await resources.profiles.tokenCreate("profile-id-123", {
name: "API Access",
permission: "full",
email: "example@email.com",
password: "your-password"
});
console.log(result); // { token: 'token-value', name: 'API Access', ... }
Revokes and removes an authentication token from the profile.
https://help.tago.io/portal/en/kb/articles/495-account-token Account Token
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
Optional
queryObj: ListTokenQueryRetrieves a list of all tokens associated with a specific profile.
https://help.tago.io/portal/en/kb/articles/495-account-token Account Token
const resources = new Resources({ token: "YOUR-PROFILE-TOKEN" });
const result = await resources.profiles.tokenList("profile-id-123", {
page: 1,
amount: 20,
fields: ["name", "token", "permission"]
});
console.log(result); // [ { name: 'Token #1', token: 'token-value', permission: 'full', ... }, ... ]
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);
Optional
dateObj: StatisticsDateRetrieves 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, ... }, ... ]
Description
Adds a new team member to the profile using their email address.
See
https://help.tago.io/portal/en/kb/articles/106-sharing-your-profile Team Management - Sharing your Profile
Example