From MozillaWiki
Jump to: navigation, search

Using Funsize

So you've heard about this amazing new update service and want to give it a whirl, eh?
Alright, you'll find the instructions and hopefully, the first draft of the current API here.

This service is currently hosted at

I'll begin by describing the API Endpoints, and then go on to describe easy ways to access and use the service.

API Endpoints

Please note, this is API v0.1

This means that the API is still a prototype, is unstable, and can change frequently.
It is not the responsibility of the developers to be backwards compatible until the API has been
declared stable, please check back often in case you plan to use the API.

Trigger Partial Generation

<service url>/partial

# Example

This API Endpoint is used for triggering or kicking off the generation of a partial.
A partial is essentially defined by the two versions of Firefox it helps transition between; A
source and a Destination.

To trigger generation you need to send a POST request to the URL end points with the following

  1. mar_from : URL to the complete MAR for the source Firefox Version
  2. mar_to: URL to the complete MAR for the destination Firefox Version
  3. mar_from_hash: SHA512 Hash of the complete MAR for the source Firefox Version
  4. mar_to_hash : SHA512 Hash of the complete MAR for the destination Firefox Version
  5. channel_id : Channel-ID typically refers to the release channel you're in
    Possible values are one of firefox-mozilla-{release,beta,aurora,central}
  6. product_version : Product version typically refers to destination Firefox's version.

Once a correct request has been made, you will receive a JSON response with an HTTP 201 response
code. The response contains a URL path relative to the base URL. The client can then poll on this URL.

Getting the Partial


# Example Partial Download URL for Firefox 27 to Firefox 29 (en-US, linux64) transition

You can use this endpoint to access the actual Partial MARs that have been generated by this
service. The identifier is any valid identifier returned by a POST request to the /partial/ end

While the application is still generating the partial it will return an HTTP 202 response. Once
done, the application will return an HTTP 200 response with the Partial in the response body.

In case of failure in the process of generating the Partial, the service might abort the request and
in such a case the client is informed of the same with an HTTP 500 response.

In case the where the client request is malformed the service will respond with an HTTP 400 response

Currently the identifier is simply a concatenation of the SHA512 hashes of the complete MARs
(SrcHash-DstHash), but this is subject to change. Do not rely on this behaviour, instead post a
request for the partial you need and use the URL returned by that request. You can re-request the
generation of the partial as many times as you like, the service exhibits idempotent behvaiour in
such a case.

Using the Service

If you're writing a client that will be using this service, you can use the above API docs for
fairly accurate behaviour description.

If you're a human testing out the service, it is recommended you use curl to send the POST requests.
Various scripts exist to help you out. See: # Trigger a pre-defined partial # Poll on the above URL # To generate the required paramaters in the required order, best used with the following script

A usable web interface is also on the cards, but it's low down in our deck.