Search users (GET)
This API allows you to retrieve a list of users, matching the specified criteria, from the alumni platform.
Call
In this call, you can select none, one, or multiple criteria to search users by and how you want the data organized in the response. If there are no criteria provided, the call will return a list of all the users in the platform, if more than one criterion is provided, then the system will use a logical AND for matches. The options available to use in this call are:
- Search Criteria: The available criteria to search users with.
- Payload Organization: The available options to organize the payload.
Search Criteria
- Email: This field refers to the user’s email addresses. When this criterion is entered, the system will look for an exact match with either the login email or the communication email.
- firstName: This field refers to the user’s first name. When this criterion is entered, the system will look for a partial match.
- lastName: This field refers to the user’s last name. When this criterion is entered, the system will look for a partial match.
- membershipNumber: This field refers to the user’s Membership Number. When this criterion is entered, the system expects a number and will look for an exact match.
- userRecourceGuid: This field refers to the user’s unique identifier. When this criterion is entered, the system will look for an exact match.
- approvalStatus: This field refers to the users’ approval status in the alumni platform. When this criterion is entered, the system will return all the users with the selected status. Options are APPROVED, PENDING, and REJECTED. Other values will result in an error.
- userType: This field refers to the users’ user type in the Alumni platform. When this criterion is entered, the system will return all the users with the selected type. Options are USER and SUBSCRIBER. Other values will result in an error.
- dateJoinedFrom: This field refers to the date the users joined the Alumni platform. When this criterion is entered, the system will return all the users who joined on the specified day or after, until the current day. If a date is also provided in the “dateJoinedTo” field, then the search will only include users inside that range. The expected format is yyyy-MM-dd (1998-10-01).
- dateJoinedTo: This field refers to the date the users joined the Alumni platform. When this criterion is entered, the system will return all the users who joined on the specified day or before, until the creation of the platform. If a date is also provided in the “dateJoinedFrom” field, then the search will only include users inside that range. The expected format is yyyy-MM-dd (1998-10-01).
- lastLoginFrom: This field refers to the date the users last logged into the Alumni platform. When this criterion is entered, the system will return all the users who logged in on the specified day or after, until the current day. If a date is also provided in the “lastLoginTo” field, then the search will only include users inside that range. The expected format is yyyy-MM-dd (1998-10-01).
- lastLoginTo: This field refers to the date the users last logged into the Alumni platform. When this criterion is entered, the system will return all the users who logged in on the specified day or before, until the creation of the platform. If a date is also provided in the “lastLoginFrom” field, then the search will only include users inside that range. The expected format is yyyy-MM-dd (1998-10-01).
- Country: This field refers to the user’s country. When this criterion is entered, the system will look for an exact match.
- State: This field refers to the state the user entered as their current location. When this criterion is used, the system will look for an exact match.
- City: This field refers to the user’s city. When this criterion is entered, the system will look for an exact match.
Payload Organization
- Page: This field refers to the result page you want to be shown. In other words, the responses for this API are divided into pages that go from 0 to the number of pages needed to show all the records, this parameter allows you to select which page you will have in your response. The default value is page 0.
- Size: This field refers to the number of records you want to be displayed on each page. In other words, each response consists of 1 page and several records on that page, this parameter allows you to select the number of records that will be displayed per page. The default value is 1000 records per page. The maximum value possible is 2000 records per page.
- Sort: This field refers to the sorting order you want for the records in the response. If no sort parameters are provided, the response will not be sorted. To use this parameter you must follow this format:
- For integer and String fields: [field name].keyword,asc/desc
- For example: firstName.keyword,desc
- For date fields: [field name],asc/desc
- For Example: signUpDate,asc
- For integer and String fields: [field name].keyword,asc/desc
Response
This API will return a payload in JSON format, listing all the users that matched the search and their information. Ends with the information about the number of records returned, the page that was returned, and the size of the page.
Example
{
"content": [
{
"userResourceGuid": "af132b23-a2fc-40c9-aa42-ddefe6bfc9bc",
"firstName": "Ignacio",
"...",
},
{
"userResourceGuid": "145be8f0-7a42-4b2a-b8a3-3301f277601c",
"firstName": "Ignacio",
"...",
},
{
"userResourceGuid": "9530c460-660b-4ad5-80ce-2353ca8c83fd",
"firstName": "Ignacio",
"...",
}
],
"pageable": {
"sort": {
"sorted": false,
"unsorted": true,
"empty": true
},
"pageNumber": 0,
"pageSize": 1000,
"offset": 0,
"paged": true,
"unpaged": false
},
"totalPages": 1,
"totalElements": 3,
"last": true,
"first": true,
"sort": {
"sorted": false,
"unsorted": true,
"empty": true
},
"number": 0,
"numberOfElements": 3,
"size": 1000,
"empty": false
}
*Use gateway-us for the United States region and gateway-uk for the UK region. For the Frankfurt region, simply use gateway.
Updated 19 days ago