nerdexam
Cisco

200-901 · Question #379

Refer to the exhibit. An engineer must authorize a REST API call. The API password is "Cisco123!". Which Bash command must be placed in the code to authorize the call?

The correct answer is D. export API_PASSWORD=Cisco123! In the provided Python code, the API_PASSWORD is retrieved from the environment variable API_PASSWORD. To set this environment variable in a Bash shell, the correct command to use is export. This command sets the environment variable for the current shell session and any child…

Understanding and Using APIs

Question

Refer to the exhibit. An engineer must authorize a REST API call. The API password is "Cisco123!". Which Bash command must be placed in the code to authorize the call?

Exhibit

200-901 question #379 exhibit

Options

  • Amkdir API_PASSWORD=Cisco123!
  • Bset API_PASSWORD=Cisco123!
  • Ccp API_PASSWORD=Cisco123!
  • Dexport API_PASSWORD=Cisco123!

How the community answered

(24 responses)
  • A
    4% (1)
  • C
    4% (1)
  • D
    92% (22)

Explanation

In the provided Python code, the API_PASSWORD is retrieved from the environment variable API_PASSWORD. To set this environment variable in a Bash shell, the correct command to use is export. This command sets the environment variable for the current shell session and any child Bash Command: export API_PASSWORD=Cisco123! This command ensures that the environment variable API_PASSWORD is set to "Cisco123!" and can be accessed by the Python script.

Topics

#Bash scripting#Environment variables#API authentication#Command line interface

Community Discussion

No community discussion yet for this question.

Full 200-901 Practice