REST API & Postman Cheat Sheet
Methods
GET read · POST create · PUT replace · PATCH update · DELETE remove
Idempotent: GET, PUT, DELETE
Status codes
200 OK · 201 Created · 204 No Content
400 Bad Request · 401 Unauthorized · 403 Forbidden · 404 Not Found · 409 Conflict
422 Validation · 429 Too Many Requests
500 Server Error · 502 Bad Gateway · 503 Unavailable · 504 Timeout
Postman tests
pm.test('ok', () => pm.response.to.have.status(200));
pm.expect(pm.response.json()).to.have.property('id');
pm.environment.set('token', pm.response.json().token);
curl
curl https://api.site.com/items
curl -X POST url -H "Content-Type: application/json" -d '{"a":1}'
curl -H "Authorization: Bearer $TOKEN" url
Full REST API & Postman documentation