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.
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
Options
- AExport API_PASSWORD=Cisco123!
- BSet API_PASSWORD=Cisco123!
- Ccp_PASSWORD=Cisco123!
- Dkdir API_PASSWORD=Cisco123!
How the community answered
(22 responses)- A5% (1)
- B91% (20)
- C5% (1)
Why each option
This question asks for a Bash command to set an `API_PASSWORD` for authorization of a REST API call.
`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.
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.
`cp_PASSWORD=Cisco123!` is not a valid Bash command for variable assignment; `cp_` is not a standard command prefix or keyword.
`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
Community Discussion
No community discussion yet for this question.
