What can a network API do?
A network API lets software inspect or change network resources, such as interfaces, routes, VLANs, and device settings.
Study 2 Network APIs and Data Models with 12 free online flashcards. Review key terms, definitions, and concepts with this interactive flashcard deck.
What can a network API do?
A network API lets software inspect or change network resources, such as interfaces, routes, VLANs, and device settings.
What does a data model define?
A data model defines which information exists, how it is organized, its data types, and constraints on valid values.
How does a data model differ from an encoding?
A model is a schema describing data; an encoding is the format used to represent that data for transport, such as JSON or Protocol Buffers.
What are YANG and OpenConfig used for?
YANG is a language for defining hierarchical network-management models. OpenConfig publishes vendor-neutral YANG models for common configuration and operational data.
What structures and values can JSON encode?
JSON is a text encoding composed of objects, arrays, strings, numbers, booleans, and null values. Its usual media type is application/json.
What operations do common HTTP methods express?
GET retrieves data; POST commonly creates a resource or starts an operation; PUT replaces a resource; PATCH applies a partial change when supported.
What do the HTTP status-code classes indicate?
An HTTP response has a status code, headers, and often a body. Status classes are 2xx success, 3xx redirection, 4xx client-side error, and 5xx server-side error.
How do HTTP 401, 403, and 404 differ?
A 401 indicates missing or invalid authentication; a 403 indicates insufficient permission; a 404 means the target was not found.
How is a bearer token typically sent, and why protect it?
A client typically sends a bearer token in the Authorization header as Authorization: Bearer <token>. Anyone possessing the token can use it, so protect it.
What practices protect API credentials?
Use HTTPS with certificate validation, keep credentials out of logs and code repositories, and grant only the permissions needed.
Why handle retries differently for PUT and POST?
A repeated PUT is intended to have the same effect as one successful PUT; a repeated POST may create duplicate operations or resources.
Why verify network state after an accepted change request?
After a configuration request, inspect the response and verify the resulting device or controller state; an accepted request does not prove the intended network outcome occurred.