XML-RPC Methods

Get a list of currently active browsers.

Return value

  • active list (browser version identifiers)

Each identifier consists of 4 parts joined with underscores:

  • platform string (e.g. linux / windows / mac-os)
  • browser string (e.g. firefox / msie / opera / safari)
  • major int (major version, e.g. 1)
  • minor int (minor version, e.g. 5)

Generate SQL WHERE clause to match requests for this factory.

Arguments

  • factory_name string (lowercase, normally from hostname)

Return value

  • where string (SQL WHERE clause)

Generate a nonce for authentication.

Arguments

  • factory_name string (lowercase, normally from hostname)

Return value

  • challenge dict

The return value is a dict with the following keys:

  • algorithm string (sha1 or md5)
  • salt string (few random characters)
  • nonce string (random lowercase hexadecimal, length 32)

See nonces.verify for how to encrypt your password with the nonce.

Generate a nonce for authentication.

Arguments

  • username string (your user account on the server)

Return value

  • challenge dict

The return value is a dict with the following keys:

  • algorithm string (sha1 or md5)
  • salt string (few random characters)
  • nonce string (random lowercase hexadecimal, length 32)

See nonces.verifyUser for how to encrypt your password with the nonce.

Test authentication with an encrypted password.

Arguments

  • factory_name string (lowercase, normally from hostname)
  • encrypted_password string (lowercase hexadecimal, length 32)

Return value

  • success boolean (or XML-RPC fault with error message)

Password encryption

To encrypt the password, you must first generate a nonce and get the encryption algorithm and salt (see nonces.challenge). Then you can compute the encrypted password like this:

encrypted_password = md5(sha1(salt + password) + nonce)

If requested by the challenge, you must use md5 rather than sha1 for the inner hash. The result of each hash function call must be formatted as lowercase hexadecimal. The calls to nonces.challenge and nonces.verify must be made from the same IP address.

Test authentication with an encrypted password.

Arguments

  • username string (your user account on the server)
  • encrypted_password string (lowercase hexadecimal, length 32)

Return value

  • success boolean (or XML-RPC fault with error message)

Password encryption

To encrypt the password, you must first generate a nonce and get the encryption algorithm and salt (see nonces.challengeUser). Then you can compute the encrypted password like this:

encrypted_password = md5(sha1(salt + password) + nonce)

If requested by the challenge, you must use md5 rather than sha1 for the inner hash. The result of each hash function call must be formatted as lowercase hexadecimal. The calls to nonces.challengeUser and nonces.verifyUser must be made from the same IP address.

Try to find a matching screenshot request for a given factory.

Arguments

  • factory_name string (lowercase, normally from hostname)
  • encrypted_password string (lowercase hexadecimal, length 32)

See nonces.verify for how to encrypt your password.

Return value

  • options dict (screenshot request configuration)

If successful, the options dict will have the following keys:

  • request int (for redirect and screenshots.upload)
  • browser string (browser name)
  • version string (browser version)
  • major int (major browser version number)
  • minor int (minor browser version number)
  • command string (browser command to run, empty for default)
  • width int (screen width in pixels)
  • height int (screen height in pixels)
  • bpp int (color depth in bits per pixel)
  • javascript string (javascript version)
  • java string (java version)
  • flash string (flash version)

Locking

The matching screenshot request is locked for five minutes. This is to make sure that no requests are processed by two factories at the same time. If your factory takes longer to process a request, it is possible that somebody else will lock it. In this case, your upload will fail.

List the status of all screenshot requests in a group.

Arguments

Return value

  • status list (request status for each requested browser)

The list will contain a dictionary for each browser, with the following entries:

  • browser string (browser name)
  • status string (pending / starting / loading / uploaded / failed)
  • seconds int (estimated or actual time between request and upload)
  • hashkey string (after the screenshot is uploaded)

You can use the hashkey to generate the resulting PNG file URL, for example if the hashkey is beef1234:

The /be/ part is the first two characters of the hashkey. Normally, the hashkey consists of 32 random lowercase hex characters.

Submit a new group of screenshot requests.

Arguments

  • username string (your user account on the server)
  • encrypted_password string (lowercase hexadecimal, length 32)
  • url string (request screenshots of this website)
  • browsers list (platform, name and version for each browser)

Return value

  • id int (request group id)

You can use the returned request group id to check the progress of the screenshot requests with requests.status.

Submit a multi-page screenshot as a lossless PNG file.

Arguments

  • factory_name string (lowercase, normally from hostname)
  • encrypted_password string (lowercase hexadecimal, length 32)
  • request int (from requests.poll)
  • screenshot binary (BASE64-encoded PNG file)

See nonces.verify for how to encrypt your password.

Return value

  • hashkey string (lowercase hexadecimal, length 32)

Users can see the resulting uploaded screenshot at http://browsershots.org/screenshots/hashkey/

Returns a list of the methods supported by the server.

Returns a string containing documentation for the specified method.

Returns a list describing the possible signatures of the method.

Allows the caller to package multiple XML-RPC calls into a single request.