Regions
Your organisation's data lives in one region and stays there. Organisations in the GCC (Saudi Arabia, the
United Arab Emirates, Qatar, Kuwait, Bahrain and Oman) are in the gcc region.
The global name
Call https://api.zaitrack.app, as every example here does. The edge picks the region for each request:
- An OAuth access token (an app's or a signed-in person's): its verified
regionclaim picks your region. - An
X-Zaitrack-Regionheader (for exampleX-Zaitrack-Region: gcc), if you send one, picks that region. - An API key or a personal access token carries no region, so the request goes to the default region,
gcc. If your organisation lives in another region, that gateway answers421 Misdirected Requestwith your region's host inLocation:
HTTP/2 421
Location: https://api.eu-west.zaitrack.app/v1/vehicles
Content-Type: application/problem+json
Follow it once; from then on call your region's host directly, or send X-Zaitrack-Region. A GCC organisation
needs neither. When it is the edge that refuses a request (an unknown host, or a token whose region disagrees
with the host), the 421 also carries X-Zaitrack-Reason: region.misroute.
Every response names the region that served it in X-Zaitrack-Region.
Region hosts
Each region's host still works directly. Use it to pin requests to one region for data residency:
| Region | Host | Residency |
|---|---|---|
gcc | api.gcc.zaitrack.app | GCC |
eu-west | api.eu-west.zaitrack.app | EU |
us-east | api.us-east.zaitrack.app | US |
us-west | api.us-west.zaitrack.app | US |
apac-south | api.apac-south.zaitrack.app | APAC |
The paths, scopes and limits are the same on every host; a region host's responses also carry
X-Zaitrack-Residency. On a region host the edge checks an OAuth token's region and an X-Zaitrack-Region header
against the host, and answers 421 with the right host in Location when they disagree.
Sign-in
Sign-in is global: auth.zaitrack.app serves every region.