Which two statements about the REST API are correct? (Choose two.)
Options:
A.
The TCP session state is maintained by the server.
B.
The REST API application is stateless.
C.
The TCP session state is maintained by the client
D.
The REST API application is stateful.
Answer:
B, C
Explanation:
REST (Representational State Transfer) is an architectural style for designing networked applications, and its key principles include:
Statelessness (B): Each request from the client to the server must contain all the information needed to understand and process the request. The server does not store any session state between requests, meaning each request is independent and does not rely on previous ones.
TCP Session State (C): While REST itself is stateless, the underlying TCP connection's state, such as keeping the connection alive or managing retries, is handled by the client. The server does not retain information about the TCP connection beyond the processing of the individual request.
Options A and D are incorrect because they imply that the REST API is stateful, which contradicts the stateless nature of REST.
REST API Design Principles: Describes the stateless nature of REST and the responsibility of clients in managing session state.
Web Development Documentation: Discusses how REST APIs operate, focusing on statelessness and client-server interaction.
References:
Question 3
Using the set rest control configuration command, what are two ways to control access to the REST API running on a Junos device? (Choose two.)
Options:
A.
Limit management access to only SSH
B.
Limit management access to specific users.
C.
Limit the number of simultaneous connections.
D.
Limit access to only certain source IP addresses
Answer:
C, D
Explanation:
When using theset rest control configurationcommand on a Junos device, you have several options to control access to the REST API. Two effective methods include:
Limiting the number of simultaneous connections:This ensures that the REST API is not overwhelmed by too many concurrent requests, which could potentially lead to performance issues or denial of service.
Limiting access to certain source IP addresses:This method restricts API access to specific IP addresses, enhancing security by ensuring that only trusted sources can interact with the REST API.
Option A (Limit management access to only SSH)is unrelated to controlling REST API access specifically.
Option B (Limit management access to specific users)might be relevant in a different context, but it is not directly tied to REST API control via the specific command mentioned.
Supporting References:
Juniper Networks REST API Documentation:This documentation explains how to configure and control access to the REST API on Junos devices, including connection limits and IP-based access control.