Pagination
All list endpoints return paginated results. Admin API list endpoints use page-based
pagination; SCIM 2.0 endpoints (directory sync) use the startIndex/count scheme described below.
Page-based Pagination
Admin API list endpoints are paginated by page number:
- curl
- Node
- Python
- Go
curl "https://app.lumoauth.dev/orgs/acme-corp/api/v1/admin/users?page=3&limit=20" \
-H "Authorization: ApiKey lmk_abc123"
const resp = await fetch("https://app.lumoauth.dev/orgs/acme-corp/api/v1/admin/users?page=3&limit=20", {
method: "GET",
headers: { "Authorization": process.env.LUMO_AUTH, "Content-Type": "application/json" }
});
console.log(await resp.json());
import os, requests
resp = requests.get(
"https://app.lumoauth.dev/orgs/acme-corp/api/v1/admin/users?page=3&limit=20",
headers={"Authorization": os.environ["LUMO_AUTH"]}
)
print(resp.json())
import (
"io"
"net/http"
"os"
"strings"
)
req, _ := http.NewRequest("GET", "https://app.lumoauth.dev/orgs/acme-corp/api/v1/admin/users?page=3&limit=20", nil)
req.Header.Set("Authorization", os.Getenv("LUMO_AUTH"))
resp, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer resp.Body.Close()
out, _ := io.ReadAll(resp.Body)
fmt.Println(string(out))
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
page | integer | 1 | 1-based page number to return. |
limit | integer | 25 | Number of items per page. Maximum 100. |
Paginated Response
List responses wrap the page in a data array alongside a meta object and a top-level resourceType string identifying the listed resource:
{
"data": [ ... ],
"meta": {
"total": 1284,
"page": 3,
"limit": 20,
"totalPages": 65,
"hasNextPage": true,
"hasPreviousPage": true
},
"resourceType": "users"
}
Iterate through all pages by incrementing page until meta.hasNextPage is false (equivalently, until page >= meta.totalPages).
SCIM Pagination
SCIM endpoints use 1-based startIndex and count parameters, as the SCIM 2.0 protocol defines:
- curl
- Node
- Python
- Go
curl "https://app.lumoauth.dev/orgs/acme-corp/api/v1/scim2.0/Users?startIndex=1&count=100" \
-H "Authorization: Bearer <scim_token>"
const resp = await fetch("https://app.lumoauth.dev/orgs/acme-corp/api/v1/scim2.0/Users?startIndex=1&count=100", {
method: "GET",
headers: { "Authorization": process.env.LUMO_AUTH, "Content-Type": "application/json" }
});
console.log(await resp.json());
import os, requests
resp = requests.get(
"https://app.lumoauth.dev/orgs/acme-corp/api/v1/scim2.0/Users?startIndex=1&count=100",
headers={"Authorization": os.environ["LUMO_AUTH"]}
)
print(resp.json())
import (
"io"
"net/http"
"os"
"strings"
)
req, _ := http.NewRequest("GET", "https://app.lumoauth.dev/orgs/acme-corp/api/v1/scim2.0/Users?startIndex=1&count=100", nil)
req.Header.Set("Authorization", os.Getenv("LUMO_AUTH"))
resp, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer resp.Body.Close()
out, _ := io.ReadAll(resp.Body)
fmt.Println(string(out))
| Parameter | Type | Default | Description |
|---|---|---|---|
startIndex | integer | 1 | 1-based index of the first result. |
count | integer | 100 | Number of results to return. |
{
"schemas": ["urn:ietf:params:scim:api:messages:2.0:ListResponse"],
"totalResults": 542,
"startIndex": 1,
"itemsPerPage": 100,
"Resources": [ ... ]
}
Filtering and Sorting
List endpoints that support filtering accept a search query parameter for full-text search, and sortBy / sortDir for ordering:
- curl
- Node
- Python
- Go
curl "https://app.lumoauth.dev/orgs/acme-corp/api/v1/admin/users?search=alice&sortBy=createdAt&sortDir=desc&limit=20" \
-H "Authorization: ApiKey lmk_abc123"
const resp = await fetch("https://app.lumoauth.dev/orgs/acme-corp/api/v1/admin/users?search=alice&sortBy=createdAt&sortDir=desc&limit=20", {
method: "GET",
headers: { "Authorization": process.env.LUMO_AUTH, "Content-Type": "application/json" }
});
console.log(await resp.json());
import os, requests
resp = requests.get(
"https://app.lumoauth.dev/orgs/acme-corp/api/v1/admin/users?search=alice&sortBy=createdAt&sortDir=desc&limit=20",
headers={"Authorization": os.environ["LUMO_AUTH"]}
)
print(resp.json())
import (
"io"
"net/http"
"os"
"strings"
)
req, _ := http.NewRequest("GET", "https://app.lumoauth.dev/orgs/acme-corp/api/v1/admin/users?search=alice&sortBy=createdAt&sortDir=desc&limit=20", nil)
req.Header.Set("Authorization", os.Getenv("LUMO_AUTH"))
resp, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer resp.Body.Close()
out, _ := io.ReadAll(resp.Body)
fmt.Println(string(out))
| Parameter | Description |
|---|---|
search | Full-text search query |
sortBy | Field to sort on (e.g. createdAt, email) |
sortDir | asc or desc (default desc) |
Standards used on this page
| Plain name | Standard |
|---|---|
| SCIM 2.0 (user and group provisioning) | RFC 7642, RFC 7643 and RFC 7644 |
See the standards reference for what each one covers and how LumoAuth uses it.