Search for Objects in the System¶
Retrieve main profile data of objects¶
-
GET
/api/v1/search/objects/
¶ Search for objects Tenant, Group, Service/End User based on their ids to get basic profile information.
This API has been designed to be used by a user (entity) to get information on himself and on his “upper levels” in the organization.
Authorization Right:minimum End User. However an End User will not be allowed to access to details of an IVR of a Hunt Group of his own Group and not to other End Users of his Group.
Example request:
GET /api/v1/search/objects/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "tenant_id": "Foo", "group_id": "FooGroup", "user_id": "FooUser", "type": "user" }
- Request JSON Object:
tenant_id (string) – The tenant Id. It must always be present
group_id (conditional) (string) – The Group Id, it must be present if the entity displayed in the Group or one of its Service/End Users.
user_id (conditional) (string) – The User Id, it must be present if the entity displayed in a Service/End Users. It should contains the domain, if no the default one configured in APIO Settings will be appended.
type (conditional) (string) – The type of User. It can be “user” (End User), “ivr” (IVR), “call queue”/ “call center”/ “premium call center” (Call Center), “hunt group” (Hunt Group) or “route point” (Route Point). If not present and the user_id is present then “user” will be used as default value.
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "tenant": { "type": "ServiceProvider", "useCustomRoutingProfile": true, "defaultDomain": "sip.netaxis.be", "tenantId": "foo", "id": "foo", "name": "", "supportEmail": "", "useTenantLanguages": false }, "group": { "groupId": "fooGroup", "id": "fooGroup", "groupName": "APIO Group Test", "defaultDomain": "sip.netaxis.be", "userLimit": 25, "userCount": 8, "cliName": "", "cliPhoneNumber": "+3225126777", "timeZone": "Europe/Berlin", "locationDialingCode": "", "addressInformation": { "addressLine1": "via Bruxelles, 33", "addressLine2": "", "city": "Milano", "state": "", "stateDisplayName": "", "postalCode": "20124", "country": "Italy" } }, "user": { "userId": "fooUser@sip.netaxis.be", "id": "fooUser@sip.netaxis.be", "userType": "user", "name": "Test Test", "lastName": "Test", "firstName": "Test", "cliLastName": "Test", "cliFirstName": "Test", "phoneNumber": "", "extension": "4000", "cliPhoneNumber": "", "department": { "tenantId": "foo", "groupId": "fooGroup", "departmentName": "test_department_initial", "fullPathName": "test_department_parent_1 \\ test_department_initial" }, "language": "English", "timeZone": "Europe/Berlin", "title": "Title Test", "pagerPhoneNumber": "+321234567789", "mobilePhoneNumber": "+32498765431", "emailAddress": "test_mail@test.netaxis.be", "yahooId": "test.yahoo@yahoo.it", "addressLocation": "Location Test", "address": { "addressLine1": "Add Test 1", "addressLine2": "Add Test 2", "city": "City Test", "state": "Utah", "stateDisplayName": "", "postalCode": "10211", "country": "CC Test" }, "networkClassOfService": "4" } }
- Response JSON Object:
tenant (object) – The profile of the tenant as defined in Tenant Detail Attributes with id that is an alias on tenantId
group (optional) (object) – The profile of the tenant as defined in Group attributes with always the groupId (string) and id that is an alias on groupId
user (optional) (object) – the profile of the Service/End User. It is a transformed version of the User Profile Attributes, Call Center Instance, IVR Instance attributes and Hunt Group Instance in order to try to have a similar structure in all cases. The user id is always provided as userId and id that is an alias on userId.
- Status Codes:
200 OK – no error
404 Not Found – not founb. Either some of the object are not found, the requester does not have the right to get the info or there is a mismatch between ids (for example the Group Id is not part of the Tenant). A 404 is returned in all these cases to avoid using different results for user enumeration.
400 Bad Request – Either for invalid data according the the schema or for missing conditional parameters.
user object in case of End User¶
- The information provided are a copy of User Profile Attributes with the following differences:
no device information
no trunking information
the userId is present
“userType”: “user” is present
name is present. It is build based on the First and Last names, see below. It is done in order to have a similar field as the one in the Service Users.
The APIO behaviour for the end user name generation is controlled by the following setting:
"AUTOMATIC_ID_RULES": {
"END_USER_NAME": "{first_name}} {{last_name}}"
}
- Settings description:
END_USER_NAME: the formatting rule for name of the End User. Default is “{first_name}} {{last_name}}”. Only these 2 parameters are available in the rule.
user object in case of Call Center¶
- The information provided is based on Call Center Instance with the following rules:
userId is present (instead of serviceUserId)
all the fields of serviceInstanceProfile are provided but directly at root level (no on in the sub-object serviceInstanceProfile)
“userType” is present with one of the values “call queue”/”call center”/”call center”
type is present
All other fields of the Call Center Instance are not present
user object in case of Hunt Group¶
- The information provided is based on Call Center Instance with the following rules:
userId is present (instead of serviceUserId)
all the fields of serviceInstanceProfile are provided but directly at root level (no on in the sub-object serviceInstanceProfile)
“userType”: “hunt group” is present
All other fields of the Call Center Instance are not present
user object in case of IVR¶
- The information provided is based on IVR Instance attributes with the following rules:
userId is present (instead of serviceUserId)
all the fields of serviceInstanceProfile are provided but directly at root level (no on in the sub-object serviceInstanceProfile)
“userType”: “ivr” is present
type is present
All other fields of the IVR Instance attributes are not present