Practice Lab

API Lab · class day 48

Schemas, serialization and deserialization

A JSON schema and an XML schema (XSD) to validate answers against, and objects that turn into JSON and back.

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/schemas/user.jsonJSON schema of one user200 OK
GET/api/v1/schemas/users-list.jsonJSON schema of a page of users200 OK
GET/api/v1/schemas/books.xsdXML schema (XSD) of /books.xml200 OK