Search a user using atlas Search, that allows for relevance scoring, which is a ranking system that orders search results by relevance to the query.
This helps ensure that the most relevant data is returned first, just like how search engines prioritize results based on relevance. So here you can search by a 'user_text' and get the 10 best matches for that search criteria
GET /users/search/{userText}
Operation id: UserService_SearchUserByTextSearch
Description
Permission Level: Read
Tags: UserService
Parameters
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
userText | string | Yes | text for the user to search on this fields: firstName, lastName, email, userId. Required: true |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
pageSize | integer (int32) | No | The amount of data returned in a single response. Default: 10, Required: false |
pageToken | string | No | MongoDB Field, describes the encoded page token for page traversal, Required: false |
partialSearch | boolean | No | partial contains search on firstName, and lastName if entered in user_test, Default: false, Required: false |
resourceType | string | No | the common ResourceType that all users have access to, Required: false note using this filter will decrease performance of the endpoint |
roleFilter | string | No | This filter will only return users who have roles that meet a certain criteria - ALL_ROLES: All Roles - USER_ONLY: User Roles only - ADMIN_ONLY: Admin Roles only |
scope | string | No | scope of the user to fetch, Required: false |
sortField | array | No | List of sort fields, valid values: userId, firstName, lastName, email, lastUpdated, licenses or creationTime Default: userId, Required: false |
sortType | string | No | Sort Type for the results, Default: ASC, Required: false |
tenantId | string | No | tenant of the user, Required: false |
Security
- Authorization (apiKey)
- Bearer token
Responses
200 — A successful response.
Content type: application/json
default — An unexpected error response.
Content type: application/json
Response models
200 — A successful response.
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
users | array | No | |
nextPageToken | string | No |
{
"type": "object",
"properties": {
"users": {
"type": "array",
"items": {
"type": "object",
"properties": {
"userId": {
"type": "string"
},
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"email": {
"type": "string"
},
"roles": {
"type": "array",
"description": "The user's roles. Includes nested roles. Flat list. Read only.",
"items": {
"type": "object"
}
},
"workspaces": {
"type": "array",
"items": {
"type": "object"
}
},
"location": {
"type": "string"
},
"enabledScopes": {
"type": "object",
"description": "Scopes and status (enable, disable) for a user. Scope is optional. Typically applications will always pass their scope, but it is optional for admin purposes."
},
"primarySite": {
"type": "string"
},
"selectedDepartments": {
"type": "array",
"items": {
"type": "string"
}
},
"middleName": {
"type": "string"
},
"platformId": {
"type": "string"
},
"status": {
"type": "string"
},
"licenses": {
"type": "array",
"items": {
"type": "object"
}
},
"attributes": {
"type": "array",
"items": {
"type": "object"
}
},
"creationTime": {
"type": "string",
"format": "date-time"
},
"siteMapping": {
"type": "array",
"items": {
"type": "object"
}
}
}
}
},
"nextPageToken": {
"type": "string"
}
}
}
default — An unexpected error response.
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
code | integer (int32) | No | |
message | string | No | |
details | array | No |
{
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"type": "object",
"properties": {
"@type": {
"type": "string"
}
}
}
}
}
}