List Users
POST/user-svc/users
Fetches a list of users with optional query filters and pagination.
Request
- application/json
Body
Get Users Request
Array [
]
Array [
]
query
object
Count true means return the count of the dataset filtered by Filters without after or limit.
filters
object[]
Filters are filtering options of a query. It is advised to use
It's advised to use helper functions in your respective client library such as filter constructors (all
, equal
, contains
, startsWith
) and field selectors (field
, fields
, id
) for easier access.
JSONValues is a JSON marshalled array of values. It's JSON marhalled due to the limitations of the Swaggo -> OpenAPI 2.0 -> OpenAPI Go generator toolchain.
Possible values: [equals
, containsSubstring
, startsWith
, intersects
, isInList
]
JSONAfter is used for cursor-based pagination, which is more effective in scalable and distributed environments compared to offset-based pagination.
JSONAfter is a JSON encoded string due to limitations of Swaggo (ie. []interface{} generates []map[stirng]interface{}).
Limit the number of records in the result set.
orderBys
object[]
OrderBys order the result set.
Desc indicates whether the sorting should be in descending order.
The field by which to order the results
Randomize indicates that the results should be randomized instead of ordered by the field
and desc
criteria
Responses
- 200
- 400
- 401
- 500
List of users retrieved successfully
- application/json
- Schema
- Example (from schema)
Schema
Array [
Array [
]
]
users
object[]
contacts
object[]
Contacts are used for login and identification purposes.
The unique identifier, which can be a URL.
Example values: "joe12" (singulatron username), "twitter.com/thejoe" (twitter url), "joe@joesdomain.com" (email)
If this is the primary contact method
Platform of the contact (e.g., "email", "phone", "twitter")
Value is the platform local unique identifier.
Ie. while the id
of a Twitter contact is twitter.com/thejoe
, the value will be only thejoe
.
For email and phones the id
and the value
will be the same.
This field mostly exists for display purposes.
Example values: "joe12" (singulatron username), "thejoe" (twitter username), "joe@joesdomain.com" (email)
Whether the contact is verified
Full name of the organization.
URL-friendly unique (inside the Singularon platform) identifier for the user
.
{
"after": "string",
"count": 0,
"users": [
{
"contacts": [
{
"createdAt": "string",
"deletedAt": "string",
"id": "twitter.com/thejoe",
"isPrimary": true,
"platform": "twitter",
"updatedAt": "string",
"userId": "string",
"value": "thejoe",
"verified": true
}
],
"createdAt": "string",
"deletedAt": "string",
"id": "string",
"name": "Jane Doe",
"passwordHash": "string",
"slug": "jane-doe",
"updatedAt": "string"
}
]
}
Invalid JSON
- application/json
- Schema
- Example (from schema)
Schema
{
"error": "string"
}
Unauthorized
- application/json
- Schema
- Example (from schema)
Schema
{
"error": "string"
}
Internal Server Error
- application/json
- Schema
- Example (from schema)
Schema
{
"error": "string"
}