JNCIA-DevOps · domain
Junos REST API
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.
Focused practice
Practice Junos REST API questions
Scored sessions drawing only from this domain — pick a length below.
Start 20-question practice test →What this domain covers
What to know about Junos REST API
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.
Watch out for
Common Junos REST API exam traps
- ▸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
Question index
All Junos REST API questions (49)
Click any question to see the full explanation, or start a practice session above.
An 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?
Hard2When troubleshooting REST API authentication and authorization on Junos devices, which THREE log files or diagnostic tools can an administrator inspect? (Choose three)
Hard3An 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?
Medium4An 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?
Medium5An 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?
Hard6An 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.)
Hard7Which THREE features are provided by the Junos REST API daemon (jpagent) when running on a Junos device? (Choose three)
Medium8An 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?
Hard9A 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?
Hard10When comparing the Junos REST API workflow to the NETCONF protocol workflow, which characteristic is unique to the REST API?
Easy11Which 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)
Medium12Which user credential validation mechanism does the Junos REST API use by default when authenticating incoming API calls?
Easy13Which statement best describes the primary architectural difference between NETCONF and the Junos REST API?
Easy14When retrieving configuration data in JSON format from the Junos REST API, how are Junos hierarchical container statements represented in the JSON payload structure?
Medium15An 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?
Medium16Which TWO benefits are gained by using the Junos REST API instead of traditional CLI screen-scraping in automation workflows? (Choose two)
Easy17An 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?
Medium18Which THREE architectural features distinguish the Junos REST API from traditional CLI screen-scraping (CLI automation via expect scripts)? (Choose three)
Hard19Which data serialization formats are natively supported by the Junos REST API for both input and output payloads?
Easy20An 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?
Medium21An 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.)
Medium22When 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?
Medium23An 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?
Hard24When designing an automation workflow that uses the Junos REST API for configuration management, which THREE practices ensure robust execution? (Choose three)
Medium25Which TWO HTTP response status codes indicate a successful Junos REST API request where data was successfully retrieved or modified? (Choose two)
Easy26Which statement correctly identifies the relationship between Junos REST API and NETCONF data models?
Easy27Which THREE advantages are associated with using the Junos REST API over NETCONF in lightweight automation scripts? (Choose three)
Medium28Which THREE actions can be performed using the Junos REST API operational endpoints? (Choose three)
Medium29When comparing error handling between NETCONF and the Junos REST API, how are protocol-level errors communicated back to the client?
Hard30Which TWO characteristics are true regarding the Junos REST API? (Choose two)
Easy31An 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?
Hard32An 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?
Hard33A 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?
Hard34An 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.)
Medium35When 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?
Medium36When executing a configuration change via the Junos REST API, what is the role of the HTTP DELETE method?
Medium37A 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?
Hard38An 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?
Medium39A 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?
Easy40An 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?
Hard41When 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)?
Medium42You 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?
Hard43An 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?
Medium44Which TWO data serialization formats can an automation engineer request using the 'Accept' header in a Junos REST API GET request? (Choose two)
Easy45Which TWO characteristics distinguish the Junos REST API from NETCONF when interacting with Junos devices? (Choose two)
Medium46An administrator configures the Junos REST API service. By default, which TCP port does the device listen on for secure HTTPS REST requests?
Easy47Which Junos configuration hierarchy is used to configure system services parameters related to the REST API agent?
Easy48Which THREE statements correctly contrast the session handling of NETCONF versus the Junos REST API? (Choose three)
Hard49Which THREE HTTP methods are commonly used within the Junos REST API for managing configuration and operational resources? (Choose three)
HardOther domains
All JNCIA-DevOps exam domains
Frequently asked questions
- What does the Junos REST API domain cover on the JNCIA-DevOps exam?
- 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.
- How many questions are in this domain?
- This page lists all 49 Junos REST API questions in the JNCIA-DevOps question bank. The actual exam draws from this domain proportionally to its weighting in the official exam blueprint.
- What is the best way to practise this domain?
- Start with a short focused session (10 questions) to identify gaps, then work through explanations. Repeat with a longer session once the weak areas feel solid.
- Can I practise only Junos REST API questions?
- Yes — the session launcher on this page filters questions to this domain only. Choose any session length for inline explanations and scoring.