Question 29 of 500
AutomationmediumMultiple ChoiceObjective-mapped

Quick Answer

The answer is that an NX-API 401 error when the service is disabled means the switch is rejecting the request because the NX-API endpoint is not active. HTTP 401 typically signals unauthorized access due to missing or invalid credentials, but in this specific context, the root cause is that no authentication mechanism exists to process the request—the API service itself is not running. Enabling NX-API with the `feature nxapi` command is a mandatory prerequisite; without it, the switch cannot authenticate any user, so it returns a 401 error even if valid credentials are supplied. On the Cisco DCCOR 350-601 exam, this question tests your understanding that a 401 does not always mean bad credentials—it can indicate a disabled service, a common trap where candidates overlook the `feature` command. Remember the memory tip: “No feature, no auth—401 is the catch-all for a missing API.”

350-601 Automation Practice Question

This 350-601 practice question tests your understanding of automation. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

A Python script using NX-API returns HTTP 401. What is the most likely cause?

Clue words in this question

Noticing these words before you look at the options changes how you read each choice.

  • Clue: "most likely"

    Why it matters: Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.

Question 1mediummultiple choice
Study the full Python automation breakdown →

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

NX-API not enabled on the switch

HTTP 401 indicates unauthorized access, which in the context of NX-API means the request lacks valid authentication credentials. However, if NX-API is not enabled on the switch, the API endpoint itself is not active, and the switch will reject the request with a 401 error because no authentication mechanism is available to process the credentials. Enabling NX-API via the 'feature nxapi' command is a prerequisite for any NX-API communication.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Wrong NX-API version in URL

    Why it's wrong here

    Wrong version gives a different HTTP error (e.g., 404).

  • Firewall blocking port 443

    Why it's wrong here

    Firewall block results in connection timeout, not HTTP 401.

  • NX-API not enabled on the switch

    Why this is correct

    If NX-API is not enabled, the HTTP endpoint may return 401 (or 404) – but typically 401 due to lack of authentication context. In practice, enabling NX-API is required for authentication to work.

    Clue confirmation

    The clue word "most likely" in the question point toward this answer.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Invalid credentials

    Why it's wrong here

    Invalid credentials cause 401, but more specifically, missing or wrong username/password.

Common exam traps

Common exam trap: answer the scenario, not the keyword

Cisco often tests the distinction between 'service not enabled' and 'authentication failure' by using HTTP 401 as a red herring, leading candidates to assume invalid credentials when the actual issue is that the feature is not activated.

Detailed technical explanation

How to think about this question

When NX-API is disabled, the switch's HTTP server (nginx-based) still listens on port 80/443 but returns a 401 for any API request because the internal NX-API process is not registered to handle authentication. This behavior is documented in Cisco's NX-OS configuration guides, where the 'feature nxapi' command must be explicitly enabled before any API calls succeed. In real-world scenarios, after enabling NX-API, you must also configure a user with appropriate roles (e.g., network-admin) and optionally set up HTTPS certificates to avoid certificate-related errors.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A practitioner preparing for the 350-601 exam encounters this exact type of scenario on the job. The correct answer here is not the most general option — it is the best answer for the specific constraint described. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Real exam questions reward reading the full scenario before eliminating options, because the constraint defines which answer fits.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related 350-601 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free 350-601 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this 350-601 question test?

Automation — This question tests Automation — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: NX-API not enabled on the switch — HTTP 401 indicates unauthorized access, which in the context of NX-API means the request lacks valid authentication credentials. However, if NX-API is not enabled on the switch, the API endpoint itself is not active, and the switch will reject the request with a 401 error because no authentication mechanism is available to process the credentials. Enabling NX-API via the 'feature nxapi' command is a prerequisite for any NX-API communication.

What should I do if I get this 350-601 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Are there clue words in this question I should notice?

Yes — watch for: "most likely". Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 24, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This 350-601 practice question is part of Courseiva's free Cisco certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 350-601 exam.