Timedora
Free Practice Quiz Question List

2 Network APIs and Data Models Online Quiz Questions

Use this free practice quiz with 20 questions to review 2 Network APIs and Data Models, test your knowledge, and prepare for your next test or exam.

20 questions
01
Choose one
1 point

A client uses a YANG-defined interface model and sends its values in JSON. Which statement correctly describes the roles of YANG and JSON?

  1. A

    JSON is the schema that defines network fields; YANG is a text encoding.

  2. B

    YANG can define a network-management model; JSON can encode data that follows a model.

  3. C

    YANG and JSON are both HTTP methods.

  4. D

    JSON defines which network resources exist, while YANG carries their values over the wire.

02
Choose one
1 point

An API returns 204 No Content after a resource update. What should the client infer from this response?

  1. A

    The request failed because every successful response must include a body.

  2. B

    The response is a redirection because 204 is in the 3xx class.

  3. C

    The response indicates success and contains no body.

  4. D

    The server has not found the target resource.

03
Choose one
1 point

An API documents support for partial resource changes. Which HTTP method should a client consider for changing only selected fields?

  1. A

    GET

  2. B

    POST

  3. C

    PUT

  4. D

    PATCH

04
Choose one
1 point

An HTTP request contains a method, target URL, headers, and sometimes a body. Which part expresses the operation the client wants performed?

  1. A

    The method

  2. B

    The target URL

  3. C

    The headers

  4. D

    The body

05
Choose all
1 point

A client will authenticate to a network API with a bearer token. Which practices help protect that token? Select all that apply.

  1. A

    Use HTTPS with certificate validation.

  2. B

    Keep credentials out of logs and code repositories.

  3. C

    Grant only the permissions needed.

  4. D

    Put the token in the request URL so it is easy to inspect.

  5. E

    Disable certificate validation to avoid connection failures.

06
Choose all
1 point

A team is automating API changes that may encounter timeouts or rate limits. Which practices are appropriate? Select all that apply.

  1. A

    Validate input before sending a change.

  2. B

    Retry every failed POST immediately without checking its outcome.

  3. C

    Handle timeouts and rate limits.

  4. D

    Make retries carefully because a repeated POST may create duplicates.

07
True or false
1 point

A repeated PUT is intended to have the same effect as one successful PUT, so retrying it is generally less likely to create duplicate resources than repeating a POST.

  1. A

    True

  2. B

    False

08
True or false
1 point

Because YAML is commonly used for human-edited configuration files, a network API will automatically accept YAML request bodies.

  1. A

    True

  2. B

    False

09
Written response
1 point

Which gNMI RPC lets a client discover the models and encodings supported by a target? Enter the exact RPC name.

10
Written response
1 point

An API response indicates that the requested target was not found. What three-digit HTTP status code corresponds to this condition?

11
Fill in the blank
1 point

An HTTP response with a 5xx status code indicates a error.

12
Fill in the blank
1 point

In gNMI, the RPC used to receive updates through a one-time result, polling, or a continuing stream is .

13
Open ended
1 point

After an API accepts a configuration change, what should a client check to confirm that the intended network outcome was actually achieved?

14
Choose one
1 point

A network-management client communicates with a service using gRPC, including gNMI. Which listed encoding is schema-based and binary?

  1. A

    YAML

  2. B

    Protocol Buffers

  3. C

    XML

  4. D

    JSON

15
Choose one
1 point

An API uses an interface schema that specifies a name, an enabled flag, and a numeric MTU. Which statement best describes the relationship between that schema and JSON?

  1. A

    A data model is the text encoding used on the wire, while JSON defines valid field types and constraints.

  2. B

    A data model defines the information and constraints; JSON is one format that can encode that information.

  3. C

    A data model and an encoding format are interchangeable names for the same API component.

  4. D

    JSON defines which network resources exist, while a data model specifies how requests are authenticated.

16
Choose one
1 point

A team has a network configuration file written in YAML and wants to submit it to an API. What should they do before sending it?

  1. A

    An API accepts YAML whenever its configuration can be edited in YAML.

  2. B

    YAML is always the required format for network API requests.

  3. C

    The API documentation must be checked to determine whether YAML is supported.

  4. D

    YAML is a data model, so it cannot be used to encode configuration.

17
Written response
1 point

Which HTTP method would a client typically use to retrieve the current representation of a network interface?

18
True or false
1 point

A client receives a successful response after requesting a network configuration change. The client can conclude that the intended network state has been achieved without checking the resulting state.

  1. A

    True

  2. B

    False

19
Choose one
1 point

A client wants to change only an interface's MTU by sending a PUT body containing the interface name and new MTU. What should the client check before sending the request?

  1. A

    PUT always changes only the fields included in the request body.

  2. B

    The endpoint may treat PUT as replacement of the complete resource, so its update semantics should be checked.

  3. C

    PUT is used only to retrieve a resource and cannot change it.

  4. D

    PUT is guaranteed to append the request body as a new resource.

20
Written response
1 point

Which gNMI RPC does a client use to modify network data?