Requires any of the roles: | SystemAdministrator, Manager |
GET | /users |
---|
"use strict";
/** @typedef {'Ascend'|'Descend'} */
export var SortOrders;
(function (SortOrders) {
SortOrders["Ascend"] = "Ascend"
SortOrders["Descend"] = "Descend"
})(SortOrders || (SortOrders = {}));
/** @typedef T {any} */
export class ListRequest {
/** @param {{page?:number,all?:boolean,countPerPage?:number,specificIds?:string[],sortField?:string,sortOrder?:SortOrders,simplifiedPaging?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {number}
* @description The page of data to retrieve */
page;
/**
* @type {boolean}
* @description If you want all objects to be returned. This should be used with care */
all;
/**
* @type {number}
* @description The number per page to retrieve */
countPerPage;
/**
* @type {string[]}
* @description Specific IDs */
specificIds;
/**
* @type {string}
* @description Specify a sort field */
sortField;
/**
* @type {SortOrders}
* @description Specify a sort order */
sortOrder;
/**
* @type {boolean}
* @description Disables total / page counts - improves performance. Returns only data. If there is no more data, Items will be empty array */
simplifiedPaging;
}
/** @typedef {'ViewFiles'|'ViewNotifications'|'ViewSessions'|'ViewEndpoints'|'ViewReports'|'ViewCustomers'|'ViewFlows'} */
export var DashboardPermissions;
(function (DashboardPermissions) {
DashboardPermissions["ViewFiles"] = "ViewFiles"
DashboardPermissions["ViewNotifications"] = "ViewNotifications"
DashboardPermissions["ViewSessions"] = "ViewSessions"
DashboardPermissions["ViewEndpoints"] = "ViewEndpoints"
DashboardPermissions["ViewReports"] = "ViewReports"
DashboardPermissions["ViewCustomers"] = "ViewCustomers"
DashboardPermissions["ViewFlows"] = "ViewFlows"
})(DashboardPermissions || (DashboardPermissions = {}));
export class UserInfo {
/** @param {{id?:string,isAuthenticated?:boolean,firstName?:string,lastName?:string,name?:string,avatarUrl?:string,emailAddress?:string,roles?:string[],accountIds?:string[],accountNames?:string[],dashboardPermissions?:DashboardPermissions[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
id;
/** @type {boolean} */
isAuthenticated;
/** @type {string} */
firstName;
/** @type {string} */
lastName;
/** @type {string} */
name;
/** @type {string} */
avatarUrl;
/** @type {string} */
emailAddress;
/** @type {string[]} */
roles;
/** @type {string[]} */
accountIds;
/** @type {string[]} */
accountNames;
/** @type {DashboardPermissions[]} */
dashboardPermissions;
}
export class ListUsers extends ListRequest {
/** @param {{accountIds?:string[],emailFilter?:string,page?:number,all?:boolean,countPerPage?:number,specificIds?:string[],sortField?:string,sortOrder?:SortOrders,simplifiedPaging?:boolean}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/**
* @type {string[]}
* @description The account IDs whose users you want to retrieve */
accountIds;
/**
* @type {string}
* @description Filter by email */
emailFilter;
}
export class EntityInfo {
/** @param {{id?:string,dateCreated?:string,dateLastModified?:string,createdBy?:string,lastModifiedBy?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description The ID of the object */
id;
/**
* @type {string}
* @description The date the object was created */
dateCreated;
/**
* @type {string}
* @description The date the object was last modified */
dateLastModified;
/**
* @type {string}
* @description The user that created this object */
createdBy;
/**
* @type {string}
* @description The user that last modified this object */
lastModifiedBy;
}
export class BillingItem {
/** @param {{baseCost?:number,rawUnitMultiplier?:number,unitCost?:number,allowance?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
baseCost;
/** @type {number} */
rawUnitMultiplier;
/** @type {number} */
unitCost;
/** @type {number} */
allowance;
}
export class BillingSettings {
/** @param {{base?:BillingItem,localNumbers?:BillingItem,tollFreeNumbers?:BillingItem,inboundVoiceCalls?:BillingItem,outboundVoiceCalls?:BillingItem,inboundFaxes?:BillingItem,outboundFaxes?:BillingItem,inboundSmsMessages?:BillingItem,outboundSmsMessages?:BillingItem,aiInsights?:BillingItem,aiLiveMinutes?:BillingItem}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {BillingItem} */
base;
/** @type {BillingItem} */
localNumbers;
/** @type {BillingItem} */
tollFreeNumbers;
/** @type {BillingItem} */
inboundVoiceCalls;
/** @type {BillingItem} */
outboundVoiceCalls;
/** @type {BillingItem} */
inboundFaxes;
/** @type {BillingItem} */
outboundFaxes;
/** @type {BillingItem} */
inboundSmsMessages;
/** @type {BillingItem} */
outboundSmsMessages;
/** @type {BillingItem} */
aiInsights;
/** @type {BillingItem} */
aiLiveMinutes;
}
export class AccountInfo extends EntityInfo {
/** @param {{name?:string,parentAccountId?:string,twilioAccountSid?:string,ancestorIds?:string[],maxPhoneNumbers?:number,isBYOA?:boolean,trustHubProfileSid?:string,logoId?:string,logoUri?:string,billingSettings?:BillingSettings,id?:string,dateCreated?:string,dateLastModified?:string,createdBy?:string,lastModifiedBy?:string}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/**
* @type {string}
* @description The name of this account */
name;
/**
* @type {string}
* @description The ID of this account's parent */
parentAccountId;
/**
* @type {string}
* @description The twilio account SID */
twilioAccountSid;
/**
* @type {string[]}
* @description The ancestors of this account. Useful for breadcrumbs */
ancestorIds;
/**
* @type {number}
* @description The max number of phone numbers this account can have */
maxPhoneNumbers;
/**
* @type {boolean}
* @description This account is BYOA */
isBYOA;
/**
* @type {string}
* @description TrustHub Profile Sid */
trustHubProfileSid;
/**
* @type {string}
* @description The ID of the logo file */
logoId;
/**
* @type {string}
* @description The URI of the logo file */
logoUri;
/**
* @type {BillingSettings}
* @description The billing settings for this account */
billingSettings;
}
/** @typedef T {any} */
export class ListResponse {
/** @param {{items?:AccountInfo[],totalCount?:number,totalPages?:number,hasMorePages?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {AccountInfo[]}
* @description The items */
items;
/**
* @type {number}
* @description The total number of items */
totalCount;
/**
* @type {number}
* @description The total number of pages */
totalPages;
/**
* @type {boolean}
* @description Are there more pages of items? Used with simplified paging */
hasMorePages;
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /users HTTP/1.1 Host: team.evovoice.io Accept: application/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <ListResponseOfUserInfoARNYmvUm xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Voice.Api"> <HasMorePages>false</HasMorePages> <Items xmlns:d2p1="http://schemas.datacontract.org/2004/07/Voice.Api.Authentication"> <d2p1:UserInfo> <d2p1:AccountIds xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d4p1:string>String</d4p1:string> </d2p1:AccountIds> <d2p1:AccountNames xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d4p1:string>String</d4p1:string> </d2p1:AccountNames> <d2p1:AvatarUrl>String</d2p1:AvatarUrl> <d2p1:DashboardPermissions> <d2p1:DashboardPermissions>ViewFiles</d2p1:DashboardPermissions> </d2p1:DashboardPermissions> <d2p1:EmailAddress>String</d2p1:EmailAddress> <d2p1:FirstName>String</d2p1:FirstName> <d2p1:Id>String</d2p1:Id> <d2p1:IsAuthenticated>false</d2p1:IsAuthenticated> <d2p1:LastName>String</d2p1:LastName> <d2p1:Name>String</d2p1:Name> <d2p1:Roles xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d4p1:string>String</d4p1:string> </d2p1:Roles> </d2p1:UserInfo> </Items> <TotalCount>0</TotalCount> <TotalPages>0</TotalPages> </ListResponseOfUserInfoARNYmvUm>