Files
api2/docs
2016-09-04 18:35:41 +02:00
..
2016-09-04 18:35:41 +02:00
2016-08-01 13:16:12 +02:00
2016-09-04 18:35:41 +02:00

Documentation

Welcome to the documentation for Photowall API 2.

Resources

Authentication

Authentication to the API is performed via HTTP Basic Auth. The user should provide her API key as the basic auth username parameter. An example request in cURL looks like this (adding a colon after the username prevents cURL from asking for a password):

$ curl https://api2.photowall.com/designers/ -u mykey:

API keys should be added to the API_KEYS configuration option

Pagination

All resources that returns a list of objects has support for pagination. Some examples are search results, product listings and so on. To use the pagination there are two (optional) query parameters that you need to know about:

  • page The page number starting from 1
  • per_page The maxium number of items per page (default is 10)

An example request looks like this:

$ curl -X GET https://api2.photowall.com/designers/page=5&per_page=10 -u mykey

The response will contain a pagination object with the following attributes:

  • page The current page number
  • pages The total number of pages
  • next_num Number of the next page
  • per_page The number of items to be displayed on a page
  • has_next True if a next page exists
  • has_prev True if a previous page exists
  • total The total number of items