URL
GET https://{api-url}/pi/v2/tenants/{tenantId}/users/search
Sample URLs
To search for partner-level users:
https://{api-url}/api/v2/tenants/msp_15/users/search?pageNo=1&pageSize=5&isDescendingOrder=true&sortName=id&queryString=loginName:brocade+lastName:inc+status:inactive
To search for client-level users:
https://{api-url}/api/v2/tenants/client_16/users/search?pageNo=1&pageSize=5&isDescendingOrder=true&sortName=id&queryString=loginName:brocade+lastName:lab+status:active
Note
- This API provides minimal user details.
- To retrieve the complete details of a user, use the Get User API.
Parameters
The parameters are optional:
Field | Default Value |
---|---|
pageNo={pageNo} | 1 |
pageSize={pageSize} | 100 |
isDescendingOrder={true/false} | true |
sortName={field} | id |
queryString={queryString} | NA |
NA indicates that the value is not applicable.
Query variables
Query Variables | Description |
---|---|
uniqueId | ID of user. |
loginName | Login name of user. |
firstName | First name of user. |
lastName | Last name of user. |
mailId | User email. |
startCreationDate | Filter the users created within a date range. Provide the from date. Example: 2016-11-01T11:54:24 0000 |
endCreationDate | Filter the users created within a date range. Provide the to date. Example: 2016-11-03T11:54:24 0000 |
startUpdationDate | Filter the users updated within a date range. Provide the to date. Example: 2016-11-01T11:54:24 0000 |
endUpdationDate | Filter the users updated within a date range. Provide the to date. Example: 2016-11-03T11:54:24 0000 |
status |
|
Notes
There are special characters that can be used in a query string:
- (+) represents the next field and must be URL-encoded.
- (:) represents equals. An example is
key : value
. - Space characters must be URL-encoded.
- Date format must be yyyy-MM-ddTHH:mm:ssZ (GMT).
Sample response
{
"results" : [
{
"id" : "USR0000000028",
"loginName" : "ScarletJohn",
"lastName" : "John",
"firstName" : "Scarlet",
"email" : "scarlet@gmail.com",
"phoneNumber" : "408-555-1234 Extn 1",
"mobileNumber" : "8337311540",
"timeZone" : {
"id" : "12",
"name" : "GMT",
"label" : "Greenwich Mean Time",
"code" : "GMT"
},
"roles" : [
{
"id" : 4,
"name" : "Client Administrator"
},
{
"id" : 5,
"name" : "Client User"
},
{
"id" : 6,
"name" : "Customer"
},
{
"id" : 9,
"name" : "End User View"
},
{
"id" : 10,
"name" : "ACS Client Administrator"
},
{
"id" : 14,
"name" : "IM Link Client Administrator"
},
{
"id" : 15,
"name" : "IM Link Client User"
}
],
"orgId" : "client_16",
"organizationName" : "Luminalto",
"createdTime" : "2016-11-01T11:54:24+0000",
"updatedTime" : "2016-11-01T11:54:24+0000"
},
{
"id" : "USR0000000027",
"loginName" : "MaryRoe",
"lastName" : "ROE",
"firstName" : "MARY",
"email" : "maryroe@gmail.com",
"phoneNumber" : "5232324543 Extn 1",
"mobileNumber" : "8932329531",
"timeZone" : {
"id" : "12",
"name" : "GMT",
"label" : "Greenwich Mean Time",
"code" : "GMT"
},
"roles" : [
{
"id" : 4,
"name" : "Client Administrator"
},
{
"id" : 5,
"name" : "Client User"
},
{
"id" : 6,
"name" : "Customer"
},
{
"id" : 9,
"name" : "End User View"
},
{
"id" : 10,
"name" : "ACS Client Administrator"
},
{
"id" : 14,
"name" : "IM Link Client Administrator"
},
{
"id" : 15,
"name" : "IM Link Client User"
}
],
"orgId" : "client_16",
"organizationName" : "Luminalto",
"createdTime" : "2016-11-01T11:35:20+0000",
"updatedTime" : "2016-11-01T11:35:20+0000"
}
],
"totalResults" : 2,
"orderBy" : "user.id",
"pageNo" : 1,
"pageSize" : 10,
"totalPages" : 1,
"nextPage" : false,
"previousPageNo" : 0,
"descendingOrder" : true
}