🌍 Backend Development · flashcards
Backend Development APIs and Web Services Flashcards
51 question-and-answer cards covering APIs and Web Services as it is examined in Backend Development. 24 of them are printed below, taken from across the deck — no signup, no paywall on the preview.
24 sample cards from the APIs and Web Services deck
Sampled from the end of the deck, so these are different cards from the ones shown on the syllabus page.
In consumer-driven contract testing (e.g., Pact), who defines the contract and how is it verified?
The consumer defines expectations of the provider by writing a contract (pact) from its tests. The provider then runs those contracts against its real implementation to verify it satisfies every consumer's expectations.
What is a Postman Collection?
A Postman Collection is a saved, shareable group of API requests (with folders, variables, scripts, and tests) used to organize, document, and automate API testing and workflows.
In Postman, what are pre-request scripts versus test scripts?
Pre-request scripts run before a request is sent (e.g., to set variables, generate auth tokens). Test scripts run after the response is received to assert on status, body, headers, and set environment variables.
What is GraphQL, and what defines the shape of its API?
GraphQL is a query language and runtime for APIs where clients request exactly the data they need. Its Schema Definition Language (SDL) defines the types, fields, queries, mutations, and subscriptions the API exposes—the schema is a strongly-typed contract.
In GraphQL SDL, what are the three special root operation types?
Query (read operations), Mutation (write/side-effecting operations), and Subscription (real-time streaming of updates, typically over WebSockets).
What is the difference between a scalar type and an object type in GraphQL?
Scalar types are leaf values with no sub-fields (Int, Float, String, Boolean, ID, plus custom scalars). Object types are composite, containing fields that resolve to other objects or scalars.
In GraphQL SDL, what do the symbols ! and [] mean in a field type like [User!]!?
! denotes non-null. [] denotes a list. [User!]! means a non-null list (the list itself can't be null) whose elements are each non-null User objects.
What is a resolver in GraphQL?
A resolver is a function that returns the value for a particular field in the schema. It typically receives arguments (parent/source, args, context, info) and fetches or computes the field's data.
What is the GraphQL N+1 problem?
When resolving a list of N parent items and then a related field on each, the naive implementation issues 1 query for the list plus N separate queries for the children—N+1 total round-trips—causing severe performance degradation.
How does a DataLoader solve the N+1 problem?
A DataLoader batches individual key requests made within a single tick of the event loop into one bulk fetch and caches results per request, turning N+1 queries into 1 (list) + 1 (batched) queries.
What two core capabilities does DataLoader provide?
Batching (collecting many individual load(key) calls into a single batched backend call) and Caching (memoizing results per key within a request to avoid duplicate fetches).
Give two advantages of GraphQL over REST.
1) Clients fetch exactly the fields they need in a single request, avoiding over-fetching and under-fetching. 2) A strongly-typed schema with introspection enables tooling, validation, and combining multiple resources in one round-trip.
Give two advantages of REST over GraphQL.
1) Native HTTP caching (via GET + cache headers/CDNs) is straightforward, whereas GraphQL POST queries are harder to cache. 2) Simpler operational model—no risk of expensive arbitrary nested queries, easier monitoring, and lower learning curve.
How does error handling differ between REST and GraphQL by default?
REST signals errors via HTTP status codes (4xx/5xx). GraphQL typically returns HTTP 200 even on errors, placing problem details in a top-level 'errors' array alongside partial 'data'.
What is gRPC, and what serialization format and transport does it use?
gRPC is a high-performance RPC framework from Google. It uses Protocol Buffers (protobuf) as its Interface Definition Language and binary serialization, and runs over HTTP/2 for multiplexing and streaming.
What are Protocol Buffers?
Protocol Buffers (protobuf) are a language-neutral, platform-neutral binary serialization format. Messages are defined in .proto files with typed fields and unique field numbers (tags), then compiled into code for many languages.
Why are field numbers (tags) in a .proto message important?
Field numbers identify fields in the binary wire format instead of names, enabling compact encoding and backward/forward compatibility. Existing field numbers must never be reused or changed to preserve compatibility.
What four kinds of RPC methods does gRPC support?
1) Unary (single request, single response), 2) Server streaming, 3) Client streaming, and 4) Bidirectional streaming.
Give two reasons gRPC often outperforms JSON/REST over HTTP/1.1.
1) Protobuf binary encoding is smaller and faster to (de)serialize than text JSON. 2) HTTP/2 provides multiplexed streams, header compression, and persistent connections, reducing latency and overhead.
What is JSON-RPC and how does it differ from REST?
JSON-RPC is a stateless, transport-agnostic remote procedure call protocol that encodes method calls as JSON objects (method, params, id). Unlike REST, it is action/verb-oriented rather than resource-oriented and typically uses a single endpoint with POST.
What fields make up a JSON-RPC 2.0 request object?
jsonrpc (must be "2.0"), method (the procedure name), params (arguments, by-position array or by-name object; optional), and id (a client-set identifier; omitted for notifications).
What is a JSON-RPC notification?
A JSON-RPC request that omits the 'id' member, signaling the client expects no response. The server processes it but must not reply, making it fire-and-forget.
What are WebSockets and how do they differ from HTTP request/response?
WebSockets provide a persistent, full-duplex, bidirectional communication channel over a single TCP connection. Unlike HTTP's request/response model, either party can send messages at any time without polling, enabling real-time push.
How is a WebSocket connection established?
Via an HTTP Upgrade handshake: the client sends a GET with headers Upgrade: websocket, Connection: Upgrade, and Sec-WebSocket-Key. The server replies with 101 Switching Protocols and a computed Sec-WebSocket-Accept, after which the connection switches to the ws:// (or wss://) protocol.
What this deck covers
The APIs and Web Services deck follows the Backend Development APIs and Web Services syllabus — 6 chapters and 28 topics — so questions land on material that is genuinely examinable rather than trivia around it. That works out to roughly 8.5 cards per chapter.
Answers are written to be recallable, not just readable — averaging about 204 characters, which is long enough to carry the reasoning and short enough to say out loud.
A deck like this earns its keep on the second and third pass. Read the syllabus first so you know the shape of the subject, then use the cards to find the specific facts that have not stuck.
APIs and Web Services flashcards FAQ
How many APIs and Web Services flashcards are in this Backend Development deck?
51 cards. This page previews 24 of them, sampled evenly across the deck so you can judge the difficulty before installing anything.
Are these Backend Development flashcards free?
Yes. The preview here is free to read with no signup, and the full 51-card deck is free inside the Examius app.
What do the APIs and Web Services cards cover?
They follow the Backend Development APIs and Web Services syllabus — 6 chapters and 28 topics — so the questions track what is actually examinable.
How should I use these flashcards?
Read the syllabus first so you know the shape of the subject, then drill the deck. Examius schedules each card with spaced repetition, so cards you keep missing come back sooner and ones you know drift further apart.