Created
December 12, 2016 10:27
-
-
Save 58bits/aa14c7a8f525a074f7a6aaf5b9dd60b6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"uri": "http://0.0.0.0:9233/api/v1/users", | |
"links": { | |
"about": { | |
"href": "http://path.to/user/resource/1" | |
}, | |
"describes": { | |
"href": "http://path.to/describes" | |
}, | |
"help": { | |
"href": "http://path.to/help" | |
} | |
}, | |
"statusCode": 409, | |
"statusMessage": "Conflict", | |
"error": { | |
"id": "a682135b-cb0c-404b-a26b-c5c0e9145cb7", | |
"message": "Username is not available.", | |
"name": "UniqueViolation", | |
"length": 204, | |
"severity": "ERROR", | |
"code": "23505", | |
"detail": "Key (username)=(bob) already exists.", | |
"schema": "public", | |
"table": "users", | |
"constraint": "users_username_unique", | |
"file": "nbtinsert.c", | |
"line": "406", | |
"routine": "_bt_check_unique", | |
"isdbError": true | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"uri": "http://0.0.0.0:9233/api/v1/signin", | |
"statusCode": 400, | |
"statusMessage": "Bad Request", | |
"errors": [ | |
{ | |
"uri": "http://0.0.0.0:9233/api/v1/signin", | |
"links": { | |
"about": { | |
"href": "http://path.to/user/resource/1" | |
}, | |
"describes": { | |
"href": "http://path.to/describes" | |
}, | |
"help": { | |
"href": "http://path.to/help" | |
} | |
}, | |
"error": { | |
"message": "Username is required.", | |
"name": "Required" | |
} | |
}, | |
{ | |
"uri": "http://0.0.0.0:9233/api/v1/signin", | |
"links": { | |
"about": { | |
"href": "http://path.to/user/resource/1" | |
}, | |
"describes": { | |
"href": "http://path.to/describes" | |
}, | |
"help": { | |
"href": "http://path.to/help" | |
} | |
}, | |
"error": { | |
"message": "Password is required.", | |
"name": "Required" | |
} | |
} | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"data": { | |
"name": "Anthony Bouch", | |
"description": "Software, photo and language nerd living in S.E. Asia.", | |
"copyright": "Anthony Bouch", | |
"stories": { | |
"uri": "http://0.0.0.0:9233/api/v1/stories/ezrf97tg4bnd9035mbtonfav/all?page=2&size=2", | |
"page": 2, | |
"size": 2, | |
"total": 6, | |
"links": { | |
"next": { | |
"href": "http://0.0.0.0:9233/api/v1/stories/ezrf97tg4bnd9035mbtonfav/all?page=3&size=2" | |
}, | |
"previous": { | |
"href": "http://0.0.0.0:9233/api/v1/stories/ezrf97tg4bnd9035mbtonfav/all?page=1&size=2" | |
} | |
}, | |
"pageTotal": 3, | |
"data": [ | |
{ | |
"uri": "http://0.0.0.0:9233/api/v1/stories/ezrf97tg4bnd9035mbtonfav/41", | |
"data": { | |
"id": 41, | |
"lr_id": 909394, | |
"title": "Demo Story", | |
"published_title": "Another Demo Story", | |
"url": "another-story", | |
"date": "2015-10-24T15:03:00", | |
"description": "This is a test", | |
"copyright": null, | |
"keywords": null, | |
"image_id": "cp60s17jxb2zrrbylx", | |
"is_published": false, | |
"is_hidden": false, | |
"total": 6, | |
"formats": { | |
"thumbnail": { | |
"format": "200s", | |
"uri": "http://0.0.0.0:9233/api/v1/images/ezrf97tg4bnd9035mbtonfav/41/cp60s17jxb2zrrbylx/200s.jpg" | |
} | |
} | |
} | |
}, | |
{ | |
"uri": "http://0.0.0.0:9233/api/v1/stories/ezrf97tg4bnd9035mbtonfav/21", | |
"data": { | |
"id": 21, | |
"lr_id": 898317, | |
"title": "Luang Prabang", | |
"published_title": "Luang Prabang", | |
"url": "photos-of-luang-prabang", | |
"date": "2015-08-22T13:28:00", | |
"description": "Luang Prabang is a world heritage site. Despite the recent boom in tourism, the town has kept its charm, and the people there are still very friendly.", | |
"copyright": "Anthony Bouch", | |
"keywords": "laos,luang prabang", | |
"image_id": "lszv0v4lylk3qhkk", | |
"is_published": true, | |
"is_hidden": false, | |
"total": 6, | |
"formats": { | |
"thumbnail": { | |
"format": "200s", | |
"uri": "http://0.0.0.0:9233/api/v1/images/ezrf97tg4bnd9035mbtonfav/21/lszv0v4lylk3qhkk/200s.jpg" | |
} | |
} | |
} | |
} | |
] | |
} | |
}, | |
"uri": "http://0.0.0.0:9233/api/v1/stories/ezrf97tg4bnd9035mbtonfav/all?page=2&size=2", | |
"statusCode": 200, | |
"statusMessage": "OK" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment