Name | Type | Example Values | Description |
---|---|---|---|
page |
Integer | 2 |
Name | Type | Description |
---|---|---|
cakes | Array | |
cakes[].id | Integer | |
cakes[].name | String | |
cakes[].description | ||
cakes[].author | Integer | |
cakes[].category | Integer | |
cakes[].photos | Array | |
cakes[].photos[] | Integer | |
cakes[].createdAt | String (Time ISO8601) | |
cakes[].updatedAt | String (Time ISO8601) | |
users | Array | |
users[].id | Integer | |
users[].id | Integer | |
users[].name | String | |
users[].createdAt | String (Time ISO8601) | |
users[].updatedAt | String (Time ISO8601) | |
photos | Array | |
photos[].id | Integer | |
photos[].thumbUrl | String | |
photos[].largeUrl | String | |
photos[].originalUrl | String | |
photos[].createdAt | String (Time ISO8601) | |
photos[].updatedAt | String (Time ISO8601) | |
categories | Array | |
categories[].id | Integer | |
categories[].name | String | |
categories[].slug | String | |
categories[].createdAt | String (Time ISO8601) | |
categories[].updatedAt | String (Time ISO8601) | |
meta.page | Integer | |
meta.perPage | Integer | |
meta.totalPages | Integer |
shows the first page of cakes by default
2015-05-14 18:21:14 UTC
GET /api/v2/cakes.json
user-agent: curl/7.37.1
x-runtime: 0.140555 x-request-id: 3a45a05d-c205-4afd-aa23-7feab1eb5701 cache-control: max-age=0, private, must-revalidate etag: W/"5d2a1c8fb6f21b71b225f354b448fc4f" x-content-type-options: nosniff x-xss-protection: 1; mode=block x-frame-options: SAMEORIGIN strict-transport-security: max-age=31536000 status: 200 OK connection: close transfer-encoding: chunked content-type: application/json; charset=utf-8 date: Thu, 14 May 2015 18:21:15 GMT server: nginx/1.6.2
Shortened for readability
{ "cakes": [ { "id": 1862, "name": "Shuggah Shak", "description": null, "author": 364, "category": 15, "photos": [ 2762 ], "createdAt": "2015-02-12T00:12:29.587Z", "updatedAt": "2015-02-12T05:36:20.856Z" }, { "id": 1863, "name": "Shuggah Shak", "description": null, "author": 364, "category": 15, "photos": [ 2763 ], "createdAt": "2015-02-12T00:12:29.587Z", "updatedAt": "2015-02-12T05:36:20.884Z" } ], "users": [ { "id": 364, "name": "Carol Ann Shaw", "createdAt": "2013-04-30T13:17:30.823Z", "updatedAt": "2015-02-12T00:58:21.275Z" }, { "id": 364, "name": "Carol Ann Shaw", "createdAt": "2013-04-30T13:17:30.823Z", "updatedAt": "2015-02-12T00:58:21.275Z" } ], "photos": [ { "id": 2762, "thumbUrl": "//d1e6wensiewxxf.cloudfront.net/uploads/photo/image/2762/thumb_black_and_white_soccer_ball_cake_2.jpg", "largeUrl": "//d1e6wensiewxxf.cloudfront.net/uploads/photo/image/2762/large_black_and_white_soccer_ball_cake_2.jpg", "originalUrl": "//d1e6wensiewxxf.cloudfront.net/uploads/photo/image/2762/black_and_white_soccer_ball_cake_2.jpg", "createdAt": "2015-02-12T00:13:27.343Z", "updatedAt": "2015-02-12T00:13:31.353Z" }, { "id": 2763, "thumbUrl": "//d1e6wensiewxxf.cloudfront.net/uploads/photo/image/2763/thumb_baby_boy_slippers_cake.jpg", "largeUrl": "//d1e6wensiewxxf.cloudfront.net/uploads/photo/image/2763/large_baby_boy_slippers_cake.jpg", "originalUrl": "//d1e6wensiewxxf.cloudfront.net/uploads/photo/image/2763/baby_boy_slippers_cake.jpg", "createdAt": "2015-02-12T00:14:16.841Z", "updatedAt": "2015-02-12T00:14:22.546Z" } ], "categories": [ { "id": 15, "name": "Cake", "slug": "cake", "createdAt": "2013-03-10T06:07:20.320Z", "updatedAt": "2013-03-10T06:07:20.320Z" }, { "id": 12, "name": "Cake Pop", "slug": "cake-pop", "createdAt": "2012-06-17T05:24:16.373Z", "updatedAt": "2013-02-23T04:08:27.831Z" } ], "meta": { "page": 1, "perPage": 12, "totalPages": 189 } }
shows page 2 of cakes when the page parameter is 2
2015-05-14 18:21:16 UTC
GET /api/v2/cakes.json?page=2
page: 2
user-agent: curl/7.37.1
x-runtime: 0.127107 x-request-id: e2f48946-552d-4197-b555-37c86893ff89 cache-control: max-age=0, private, must-revalidate etag: W/"7416325c37bc2434ca4514446c55ef3b" x-content-type-options: nosniff x-xss-protection: 1; mode=block x-frame-options: SAMEORIGIN strict-transport-security: max-age=31536000 status: 200 OK connection: close transfer-encoding: chunked content-type: application/json; charset=utf-8 date: Thu, 14 May 2015 18:21:16 GMT server: nginx/1.6.2
Shortened for readability
{ "cakes": [ { "id": 1875, "name": "Shuggah Shak", "description": null, "author": 364, "category": 15, "photos": [ 2775 ], "createdAt": "2015-02-12T00:12:29.587Z", "updatedAt": "2015-02-12T05:36:21.054Z" }, { "id": 1876, "name": "Shuggah Shak", "description": null, "author": 364, "category": 15, "photos": [ 2776 ], "createdAt": "2015-02-12T00:12:29.587Z", "updatedAt": "2015-02-12T05:36:21.061Z" } ], "users": [ { "id": 364, "name": "Carol Ann Shaw", "createdAt": "2013-04-30T13:17:30.823Z", "updatedAt": "2015-02-12T00:58:21.275Z" }, { "id": 364, "name": "Carol Ann Shaw", "createdAt": "2013-04-30T13:17:30.823Z", "updatedAt": "2015-02-12T00:58:21.275Z" } ], "photos": [ { "id": 2775, "thumbUrl": "//d1e6wensiewxxf.cloudfront.net/uploads/photo/image/2775/thumb_easter_basket_cake.jpg", "largeUrl": "//d1e6wensiewxxf.cloudfront.net/uploads/photo/image/2775/large_easter_basket_cake.jpg", "originalUrl": "//d1e6wensiewxxf.cloudfront.net/uploads/photo/image/2775/easter_basket_cake.jpg", "createdAt": "2015-02-12T00:22:03.327Z", "updatedAt": "2015-02-12T00:22:09.347Z" }, { "id": 2776, "thumbUrl": "//d1e6wensiewxxf.cloudfront.net/uploads/photo/image/2776/thumb_graduation_cake.jpg", "largeUrl": "//d1e6wensiewxxf.cloudfront.net/uploads/photo/image/2776/large_graduation_cake.jpg", "originalUrl": "//d1e6wensiewxxf.cloudfront.net/uploads/photo/image/2776/graduation_cake.jpg", "createdAt": "2015-02-12T00:22:36.371Z", "updatedAt": "2015-02-12T00:22:40.764Z" } ], "categories": [ { "id": 15, "name": "Cake", "slug": "cake", "createdAt": "2013-03-10T06:07:20.320Z", "updatedAt": "2013-03-10T06:07:20.320Z" }, { "id": 12, "name": "Cake Pop", "slug": "cake-pop", "createdAt": "2012-06-17T05:24:16.373Z", "updatedAt": "2013-02-23T04:08:27.831Z" } ], "meta": { "page": 2, "perPage": 12, "totalPages": 189 } }