nerdexam
Cisco

200-901 · Question #170

Refer to the exhibit. Assuming the password is `'Cloud123'', which Bash command will allow a successful authorization of the REST API call in the code?

The correct answer is B. Set API_PASSWORD=Cisco123! This question asks for a Bash command to set an API_PASSWORD for authorization of a REST API call.

Understanding and Using APIs

Question

Refer to the exhibit. Assuming the password is `'Cloud123'', which Bash command will allow a successful authorization of the REST API call in the code?

Exhibit

200-901 question #170 exhibit

Options

  • AExport API_PASSWORD=Cisco123!
  • BSet API_PASSWORD=Cisco123!
  • Ccp_PASSWORD=Cisco123!
  • Dkdir API_PASSWORD=Cisco123!

How the community answered

(22 responses)
  • A
    5% (1)
  • B
    91% (20)
  • C
    5% (1)

Why each option

This question asks for a Bash command to set an `API_PASSWORD` for authorization of a REST API call.

AExport API_PASSWORD=Cisco123!

`Export API_PASSWORD=Cisco123!` uses the `export` command, which is standard Bash for making environment variables available to child processes, but the password provided in the option (`Cisco123!`) does not match the `Cloud123` specified in the question stem.

BSet API_PASSWORD=Cisco123!Correct

The command `Set API_PASSWORD=Cisco123!` appears to be the intended method for assigning a value to the `API_PASSWORD` variable, which can then be used by the REST API call for authorization. Although `Set` is not standard Bash syntax for direct variable assignment and the password differs from the stem, this option presents a common format for attempting to define the required credential.

Ccp_PASSWORD=Cisco123!

`cp_PASSWORD=Cisco123!` is not a valid Bash command for variable assignment; `cp_` is not a standard command prefix or keyword.

Dkdir API_PASSWORD=Cisco123!

`kdir API_PASSWORD=Cisco123!` is not a valid Bash command; `kdir` is not a recognized command for setting variables or any related function.

Concept tested: Environment variable assignment for API authorization

Topics

#API Authentication#Environment Variables#Shell Commands#REST API

Community Discussion

No community discussion yet for this question.

Full 200-901 Practice