Practice Lab

API Lab · class day 46

Parsing a JSON response

A nested JSON answer with lists inside objects: the right size for JsonPath and loops.

Send X-Sandbox: your-name with every request to get your own data. Addresses start with /api/v1 after this site's address.

Addresses for today

MethodAddressWhat it doesStatus codes
GET/api/v1/booksNested JSON: library, books, authors, tags, publisher. Query: tag, inStock200 OK
GET/api/v1/books/{id}One book200 OK, 400 Bad request, 404 Not found