GEListAllSites Explained: Parameters, Output, and Troubleshooting
What GEListAllSites does
GEListAllSites is a utility/function that returns a list of sites from a system or API (commonly seen in enterprise or content-management contexts). It enumerates site records so you can audit, filter, or integrate site data into scripts and tools.
Common parameters
- siteId — Filter by a specific site identifier. Returns one site when provided.
- status — Filter by site status (e.g., active, inactive, archived).
- createdAfter — ISO 8601 date/time; returns sites created after this timestamp.
- createdBefore — ISO 8601 date/time; returns sites created before this timestamp.
- limit — Maximum number of sites to return (pagination page size).
- offset / page — Pagination control to skip records or select page number.
- sortBy — Field to sort results by (e.g., name, createdAt).
- sortOrder — asc or desc.
- fields — Comma-separated list of fields to include in the response to reduce payload (e.g., id,name,status).
- includeChildren — Boolean; whether to include nested/subsite records.
- filter — Free-form filter expression for advanced queries (e.g., “region:us AND status:active”).
Typical output structure
- items — Array of site objects. Each object commonly contains:
- id — Unique site identifier.
- name — Human-readable site name.
- status — Current site status.
- createdAt — Creation timestamp (ISO 8601).
- updatedAt — Last-modified timestamp.
- owner — Owner or responsible team.
- metadata — Key/value map for custom attributes.
- children — (Optional) Array of nested site objects when includeChildren is true.
- total — Total number of matching sites across pages.
- limit — Echo of the requested page size.
- offset / page — Echo of pagination position.
- links — (Optional) HATEOAS links for next/prev pages.
Example JSON snippet:
Code
{ “items”: [{ "id": "site_123", "name": "Main Campus", "status": "active", "createdAt": "2024-05-12T14:23:00Z", "updatedAt": "2025-10-01T08:12:00Z", "owner": "ops-team", "metadata": {"region":"us-east"}, "children": [] }], “total”: 1, “limit”: 100, “offset”: 0 }
Usage examples
- Fetch first 50 active sites, only id and name:
Code
GEListAllSites?status=active&limit=50&fields=id,name
- Get sites created this year, sorted newest first:
Code
GEListAllSites?createdAfter=2026-01-01T00:00:00Z&sortBy=createdAt&sortOrder=desc
- Retrieve a single site by id:
Code
GEListAllSites?siteId=site_123Performance considerations
- Use pagination (limit/offset or cursor) for large inventories to avoid timeouts and high memory use.
- Request only required fields to reduce payload and parsing time.
- Prefer indexed filter fields (status, createdAt, owner) to improve query performance.
- Cache responses for short intervals when data is read-heavy and rarely changed.
Common errors and troubleshooting
- 400 Bad Request — Invalid parameter format (e.g., malformed ISO date, non-numeric limit). Check parameter types and URL encoding.
- 401 / 403 Unauthorized or Forbidden — Missing or insufficient permissions. Ensure valid credentials and correct scopes/roles.
- 404 Not Found — siteId not present; confirm identifier correctness.
- 413 Payload Too Large / Timeout — Requesting too many fields or items. Use smaller limit, fields filter, or server-side batching.
- 500 / 503 Server Error — Transient service issues. Retry with exponential backoff and log request details for support.
- Partial results / Inconsistent counts — Concurrent writes or eventual consistency. Use consistent snapshot APIs if available or retry after short delay.
Debugging tips
- Reproduce the request with curl or Postman to inspect raw headers and body.
- Log request IDs and timestamps; provide them to support when reporting server errors.
- Test with minimal parameters first, then add filters to isolate failures.
- Compare responses for different fields/limits to spot serialization or nested-object issues.
Best practices
- Use a cursor-based pagination if supported for stable paging under concurrent updates.
- Validate and sanitize filter inputs to prevent injection or malformed queries.
- Implement exponential backoff on 5xx responses and rate-limit responses on 429.
- Provide monitoring/alerts for sudden changes in total counts or error rates.
If you want, I can produce sample client code (curl, Python, or Node.js) for calling GEListAllSites.
Leave a Reply