all
Users
all
The endpoint retrieves a list of users with pagination support. It accepts a query parameter ‘page’ to specify the page number and ‘limit’ to specify the number of users per page.
The response for this request can be documented as a JSON schema as follows:
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"users": {
"type": "object",
"properties": {
"docs": {
"type": "array",
"items": {
"type": "object",
"properties": {
"_id": { "type": "string" },
"firstName": { "type": "string" },
"lastName": { "type": "string" },
"userName": { "type": "string" },
"email": { "type": "string" },
"role": { "type": "string" },
"createdAt": { "type": "string" },
"updatedAt": { "type": "string" },
"__v": { "type": "number" }
}
}
},
"totalDocs": { "type": "number" },
"offset": { "type": "number" },
"limit": { "type": "number" },
"totalPages": { "type": "number" },
"page": { "type": "number" },
"pagingCounter": { "type": "number" },
"hasPrevPage": { "type": "boolean" },
"hasNextPage": { "type": "boolean" },
"prevPage": { "type": ["null", "number"] },
"nextPage": { "type": ["null", "number"] }
}
},
"error": { "type": ["null", "string"] }
}
}
}
}
GET
all