Search Users
Returns a paginated list of users
This endpoint should be used if there are more than 30 values for any given filter.
Body
Required
-
search
object -
limit
integer(int32) The maximum number of results to return per page.
Minimum value is
1
, maximum value is100
. Default value is100
. -
offset
integer(int32) Indicates the starting position or index (offset)
Default value is
0
. -
cursor
string(byte) | null The cursor for pagination. Encoded byte string used to navigate between pages.
-
sort
object
POST
/users/search
curl \
--request POST 'https://connect.century.tech/api/v1/users/search' \
--header "x-api-key: $API_KEY" \
--header "Content-Type: application/json" \
--data '{"search":{"userIds":["string"],"upns":["Y89421121401A"],"externalIds":["string"],"usernames":["john_doe"],"email":"john.doe@email.com","name":"John","role":"student"},"limit":30,"offset":100,"cursor":"eyJsaW1pdCI6MSxiZWZvcmU6IiIsc29ydDpbWyJlbmREYXRlIiwiZGVzYyJdXX0=","sort":{"field":"createdAt","direction":"asc"}}'
Request examples
{
"search": {
"userIds": [
"string"
],
"upns": [
"Y89421121401A"
],
"externalIds": [
"string"
],
"usernames": [
"john_doe"
],
"email": "john.doe@email.com",
"name": "John",
"role": "student"
},
"limit": 30,
"offset": 100,
"cursor": "eyJsaW1pdCI6MSxiZWZvcmU6IiIsc29ydDpbWyJlbmREYXRlIiwiZGVzYyJdXX0=",
"sort": {
"field": "createdAt",
"direction": "asc"
}
}
Response examples (200)
{
"data": [
{
"upn": "Y89421121401A",
"roles": [
"student"
],
"emails": [
"john.doe@email.com"
],
"gender": "male",
"userId": "68f06c66-702a-4c26-b8c5-b6dc4f81f25d",
"fullName": "John Doe",
"lastName": "Doe",
"username": "john_doe",
"createdAt": "2024-01-01T12:00:00Z",
"firstName": "John",
"updatedAt": "2024-01-01T12:00:00Z",
"externalId": "External_ID_123",
"dateOfBirth": "2010-07-01"
}
],
"pagination": {
"limit": 30,
"total": 300,
"offset": 100,
"nextCursor": "eyJsaW1pdCI6MSxiZWZvcmU6IiIsc29ydDpbWyJlbmREYXRlIiwiZGVzYyJdXX0=",
"previousCursor": "eyJsaW1pdCI6MSxiZWZvcmU6IiIsc29ydDpbWyJlbmREYXRlIiwiZGVzYyJdXX0="
}
}