latestOpenAPI 3.1.02026-08-194237902.5 MB

563848e0ecc0

EgressTemplate

List egress templates for a tenant

Returns a page of egress templates scoped to the tenant identified by the required tenant-id header. Use this to browse, filter, or search for a template before fetching a single record with GET /api/v1/egress-templates/{templateId}.

Preconditions: tenant-id header must be present and non-blank; omitting it returns 400.

Filtering: supply status and/or entityType to narrow results; both filters are combined with AND. status accepts active, inactive, or draft; when omitted, only active and draft templates are returned — soft-deleted (inactive) templates are hidden by default and must be requested explicitly via status=inactive. entityType accepts practitioner, facility, or group; when omitted, all entity types are returned. search performs a case-insensitive substring match on templateName. An unrecognised status or entityType value returns 400.

Pagination: page-based. page is the zero-based page number and defaults to 0 when omitted or negative. size is the page size and defaults to 25 when omitted or non-positive; there is no enforced upper bound on size.

Returns: a page of egress template objects for the tenant, plus total, page, size, and hasMore for pagination. Returns an empty templates array (not 404) when no templates match. This operation is read-only with no side effects.

get/api/v1/egress-templates

Query parameters

createdBystring

Restricts results to templates created by this user ID (exact match on the raw createdBy value). When omitted, no created-by filtering is applied.

entityTypestring

Restricts results to templates for this entity type. One of practitioner, facility, group. When omitted, templates for all entity types are returned.

pageinteger

Zero-based page number to return. Defaults to 0 when omitted or negative.

scheduleEnabledboolean

Restricts results by schedule state: true returns only templates with an enabled schedule, false only those without. When omitted, both are returned.

searchstring

Case-insensitive substring match against templateName. When omitted, no name filtering is applied.

sizeinteger

Number of templates per page. Defaults to 25 when omitted or non-positive; no enforced upper bound.

statusstring

Restricts results to templates in this status. One of active, inactive, draft. When omitted, inactive (soft-deleted) templates are excluded and only active/draft templates are returned.

Headers

tenant-idstring
x-user-idstring

Response

A page of egress templates matching the tenant, filters, and search term, with pagination metadata

totalinteger

Total number of templates matching the filters across all pages.

pageinteger

Zero-based page number returned, per the page query parameter.

sizeinteger

Number of templates requested per page, per the size query parameter.

hasMoreboolean

Whether at least one further page is available after this one.

Example response

{
  "templates": [
    {
      "createdAt": "2022-03-10T16:15:50Z",
      "updatedAt": "2022-03-10T16:15:50Z",
      "scheduleCron": "0 0 8 ? * MON",
      "scheduleDaysOfWeek": "2,4,6",
      "scheduleInterval": 6,
      "lastExportAt": "2022-03-10T16:15:50Z",
      "nextExportAt": "2022-03-10T16:15:50Z"
    }
  ]
}