Skip to main content

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:

  1. An OAuth access token (an app's or a signed-in person's): its verified region claim picks your region.
  2. An X-Zaitrack-Region header (for example X-Zaitrack-Region: gcc), if you send one, picks that region.
  3. 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 answers 421 Misdirected Request with your region's host in Location:
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:

RegionHostResidency
gccapi.gcc.zaitrack.appGCC
eu-westapi.eu-west.zaitrack.appEU
us-eastapi.us-east.zaitrack.appUS
us-westapi.us-west.zaitrack.appUS
apac-southapi.apac-south.zaitrack.appAPAC

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.