ReleaseEngineering/Mozpool/How To Access the Mozpool API

From MozillaWiki
Jump to: navigation, search

The mozpool API is a regular old HTTP API, with documentation in API.txt.

The full API is available on any imaging server on the HTTP port.

Resiliency and scaling for this API are the client's responsibility, so some caution is in order. There are only two rules:

  • A request belongs to the server where it was initiated. Keep talking to the same server about that request until it's closed.
  • A device belongs to its assigned imaging server, as seen in the BMM UI. If you're talking about a device (/api/device/{id}/{whatever}), do it on its assigned imaging server.

You will get 301 redirects if you try to talk to the wrong server.

Outside of those requirements, the ideal client will select randomly among a list of imaging servers, trying another if it finds one down.

It's OK to optimize this for cases where only one imaging server will do, e.g., requesting a specific device.