D2: REST APIs & JSON
Claude Certified Developer – Foundations exam practice questions · 10 flashcards
Question
What is a REST API?
1 / 10
Tip: Space flips the card, ← / → navigate.
Show all 10 REST APIs & JSON practice questions and answers
- What is a REST API?An HTTP interface where resources are accessed with methods like GET, POST, PUT and DELETE.
- Which HTTP method does the Messages API use?POST.
- What do 2xx, 4xx and 5xx status codes mean?2xx success, 4xx client error (fix the request), 5xx server error (often retryable).
- What is JSON?A text data format of objects, arrays, strings, numbers, booleans and null; the format of Claude API requests and responses.
- What is JSON Schema?A vocabulary for describing JSON structure: types, required fields, enums and constraints. Used for tool input schemas.
- Why validate JSON before using it?Malformed or unexpected data can crash or corrupt downstream systems.
- What is idempotency?Repeating a request has the same effect as doing it once. Important when retrying actions.
- Why set timeouts on HTTP calls?To avoid hanging requests and allow controlled retries.
- What is pagination?Returning large result sets in pages (e.g. listing batches) using cursors or IDs.
- Why parse responses by field name, not position?Responses can contain several content blocks; select blocks by type rather than index.