Be able to enable the Junos REST API, authenticate with HTTP Basic Auth, set Accept and Content-Type headers for JSON or XML, and issue GET, POST, PUT, and DELETE requests to retrieve operational data and manage configuration safely.
Start practicing
Junos REST API — choose a session length
Free · No account required
Domain overview
This domain covers the Junos REST API on Junos devices: enabling the REST service with the 'set system services rest' hierarchy, authenticating requests, choosing JSON or XML payloads, and issuing HTTP GET, POST, PUT, and DELETE calls against RPCs and configuration endpoints. Questions test headers, authentication handling, and safe configuration workflows.
Exam objectives
Enabling the Junos REST API via 'set system services rest http' or 'https' and verifying reachability
Using HTTP Basic Authentication with valid Junos user credentials for REST requests
Setting Accept and Content-Type headers to application/json or application/xml for payloads
Retrieving operational data with GET RPCs and configuration with /rpc/get-configuration or config endpoints
Sending requests without the correct Accept header, so Junos returns XML instead of the expected JSON payload
Assuming a 401 means bad credentials when the REST service or user permissions are actually misconfigured
Using HTTP methods incorrectly, such as POST when GET is required for read-only operational RPCs
Click any question to see the full explanation and answer options, or start a focused practice session above.
When executing a configuration change via the Junos REST API, what is the role of the HTTP DELETE method?
2Which data serialization formats are natively supported by the Junos REST API for both input and output payloads?
3You are writing a Python script to retrieve interface statistics from a Junos device using the REST API. You use HTTP Basic Authentication. Which HTTP header must be included to pass the encoded credentials correctly?
4An engineer compares NETCONF and Junos REST API when fetching operational state via RPCs. How does the REST API transmit an RPC request compared to a NETCONF <rpc> wrapper?
5When an automation script issues a POST request to create a new static route via the Junos REST API, what HTTP status code indicates that the resource was successfully created?
6An engineer executes an HTTP GET request to retrieve interface operational details using the Junos REST API, but receives a 403 Forbidden status code. What is the most likely reason?
7Which user credential validation mechanism does the Junos REST API use by default when authenticating incoming API calls?
8When comparing error handling between NETCONF and the Junos REST API, how are protocol-level errors communicated back to the client?
9An engineer needs to execute a custom Junos RPC (such as 'get-route-information') using the REST API. Which HTTP method and general URI structure should be used?
10Which statement best describes the primary architectural difference between NETCONF and the Junos REST API?
11An automation script makes a REST API request to modify a Junos configuration. To ensure that the changes are validated and committed in a single workflow step without leaving dangling candidate changes, how can the commit parameter be handled?
12When retrieving configuration data in JSON format from the Junos REST API, how are Junos hierarchical container statements represented in the JSON payload structure?
13An automation developer is designing a tool that interacts with multiple network vendors, including Juniper Junos. They evaluate using Junos REST API versus NETCONF. Which workflow advantage does the REST API offer over NETCONF in web-centric application environments?
14Which TWO characteristics are true regarding the Junos REST API? (Choose two)
15Which THREE HTTP methods are commonly used within the Junos REST API for managing configuration and operational resources? (Choose three)
16Which THREE actions can be performed using the Junos REST API operational endpoints? (Choose three)
17Which TWO error response categories or HTTP status codes are commonly returned by the Junos REST API when client requests are malformed or unauthorized? (Choose two)
18Which TWO data serialization formats can an automation engineer request using the 'Accept' header in a Junos REST API GET request? (Choose two)
19Which THREE architectural features distinguish the Junos REST API from traditional CLI screen-scraping (CLI automation via expect scripts)? (Choose three)
20When designing an automation workflow that uses the Junos REST API for configuration management, which THREE practices ensure robust execution? (Choose three)
21An administrator configures the Junos REST API service. By default, which TCP port does the device listen on for secure HTTPS REST requests?
22Which THREE statements correctly contrast the session handling of NETCONF versus the Junos REST API? (Choose three)
23An automation engineer wants to retrieve information about all software packages installed on a Junos device using the REST API. Which operational RPC endpoint category is typically targeted?
24An engineer is troubleshooting a script that updates Junos configuration via the REST API. The payload is sent as JSON, but the device returns a 415 Unsupported Media Type error. What is the root cause?
25Which Junos configuration hierarchy is used to configure system services parameters related to the REST API agent?
26When an automation engineer queries operational data using the Junos REST API, how does the API format the returned structure if the 'Accept: application/json' header is supplied?
27An engineer is comparing how NETCONF and the Junos REST API handle candidate configuration validation. In NETCONF, the client can issue a <validate> RPC. How is configuration validation typically handled in the Junos REST API workflow?
28An automation script attempts to connect to the Junos REST API via HTTPS, but the Python script throws an SSL certificate verification error. What is the most appropriate way to resolve this in a development environment while maintaining security best practices?
29When using the Junos REST API to configure static routes, how does the JSON payload structure represent list items that can have multiple instances (such as multiple next-hops or static routes)?
30Which THREE features are provided by the Junos REST API daemon (jpagent) when running on a Junos device? (Choose three)
31Which statement correctly identifies the relationship between Junos REST API and NETCONF data models?
32Which TWO HTTP response status codes indicate a successful Junos REST API request where data was successfully retrieved or modified? (Choose two)
33Which THREE advantages are associated with using the Junos REST API over NETCONF in lightweight automation scripts? (Choose three)
34When troubleshooting REST API authentication and authorization on Junos devices, which THREE log files or diagnostic tools can an administrator inspect? (Choose three)
35When comparing the Junos REST API workflow to the NETCONF protocol workflow, which characteristic is unique to the REST API?
36An automation developer is writing a script to modify candidate configuration data on a Junos device using the REST API. Which HTTP method and request body format should be used to replace an existing configuration hierarchy?
37An engineer needs to retrieve the entire candidate configuration in JSON format from a Junos device using the Junos REST API. Which HTTP header must be included in the GET request to ensure the response is returned in JSON format?
38Which TWO characteristics distinguish the Junos REST API from NETCONF when interacting with Junos devices? (Choose two)
39Which TWO benefits are gained by using the Junos REST API instead of traditional CLI screen-scraping in automation workflows? (Choose two)
40An automation engineer is writing a Python script that retrieves the operational status of all interfaces from a Junos device using the Junos REST API. The script sends a GET request to https://device/rest/interface. The device returns an HTTP 200 OK response, but the response body is empty. The engineer examines the request and confirms that the URL is correct and the device is reachable. Which action should the engineer take to retrieve the interface status information?
41An automation engineer needs to retrieve the operational status of all interfaces from a Junos device using the Junos REST API over HTTPS. The device is configured with the REST API enabled and the engineer has valid credentials. Which HTTP request accomplishes this task?
42A network automation team is using the Junos REST API to manage configurations on a fleet of Junos devices. They need to ensure that configuration changes are applied atomically and that they can roll back if an error occurs. They decide to use the REST API to load a configuration, commit it, and then verify the commit. Which sequence of REST API calls should they use to load a configuration snippet, commit it, and then confirm the commit was successful?
43A network automation developer is writing a Python script that uses the Junos REST API to load a candidate configuration from a file and commit it. The developer wants to ensure the configuration is merged with the existing candidate configuration. Which HTTP method and endpoint should be used to load the configuration?
44An automation engineer is troubleshooting a Junos REST API script that intermittently fails with HTTP 401 Unauthorized errors when retrieving operational data. The script uses HTTP Basic Authentication with a valid username and password. The engineer confirms that the credentials are correct and that the REST API is enabled. What is the most likely cause of the intermittent failures?
45An automation engineer is tasked with implementing a REST API client that authenticates to a Junos device. The engineer must choose an authentication method supported by the Junos REST API and ensure that credentials are transmitted securely. Which two statements are correct about authentication for the Junos REST API? (Choose two.)
46An automation team is designing a script that uses the Junos REST API to manage configurations on a fleet of Junos devices. They need to ensure secure communication and proper error handling. Which two practices should they implement? (Choose two.)
47A network automation team is using the Junos REST API to manage configurations on a Junos device. They need to perform a commit operation that includes a commit comment and also synchronizes the commit across all Routing Engines in a dual-RE system. Which HTTP method and URI combination should they use to achieve this with a single request?
48An automation engineer is using the Junos REST API to manage configuration. The engineer needs to perform a commit that includes a descriptive comment and also synchronizes the commit across both Routing Engines in a dual-RE chassis. Which TWO parameters must be included in the commit RPC request? (Choose two.)
49A developer is writing a script that uses the Junos REST API to make configuration changes. The script needs to handle errors gracefully. After sending a load-configuration RPC, the developer receives an HTTP 400 Bad Request response with a JSON body containing an error message. What is the most likely cause of this error?
Be able to enable the Junos REST API, authenticate with HTTP Basic Auth, set Accept and Content-Type headers for JSON or XML, and issue GET, POST, PUT, and DELETE requests to retrieve operational data and manage configuration safely.
The Courseiva JNCIA-DevOps question bank contains 49 questions in the Junos REST API domain. Click any question to see the full explanation and answer breakdown.
Start with a 10-question focused session to identify your baseline accuracy in this domain. Read every explanation — even for questions you answer correctly — to understand the reasoning. Once you score consistently above 80%, move to a 20–30 question session to confirm depth before moving to the next domain.
Yes — the session launcher on this page draws questions exclusively from the Junos REST API domain. Choose 10, 20, 30, or 50 questions for a focused session, or click individual questions to review them one by one.
Save your results, see per-domain analytics, and get readiness scores — free, for every certification.
Sign Up FreeFree forever · Every certification included