200-901 · Question #431
Refer to the exhibit. An engineer must create a local user on Cisco ASA and prepares a script to send the request through ASA REST API. The engineer gets a response of 400 Bad Request. Which HTTP…
The correct answer is A. POST/api/objects/localusers Request Data { "kind": "object#LocalUserObj", "name": "UserOne", "password": "p4ssW0rd", "privilegeLevel": 2, "ASDM_CLIAccessType": "Cli", "objectId": "userOne1973" }. The Cisco ASA REST API requires the correct endpoint, a 'name' field, an integer privilegeLevel, and a valid ASDM_CLIAccessType enumeration value to return HTTP 201 Created.
Question
Refer to the exhibit. An engineer must create a local user on Cisco ASA and prepares a script to send the request through ASA REST API. The engineer gets a response of 400 Bad Request. Which HTTP request produces a response code of 201? A. B. C. D.
Exhibits
Options
- APOST/api/objects/localusers Request Data { "kind": "object#LocalUserObj", "name": "UserOne", "password": "p4ssW0rd", "privilegeLevel": 2, "ASDM_CLIAccessType": "Cli", "objectId": "userOne1973" }
- BPOST/api/objects/localusers Request Data { "kind": "object#LocalUserObj", "password": "p4ssW0rd", "MSCHAPAuthenticated": true, "privilegeLevel": "high", "ASDM_CLIAccessType": "None", "objectId": "userOne1973" }
- CPOST/api/objects/localusers Request Data { "kind": "object#LocalUserObj", "name": "UserOne", "password": "p4ssW0rd", "MSCHAPAuthenticated": false, "privilegeLevel": 2, "ASDM_CLIAccessType": "Full" }
- DPOST/api/objects/localusergroups Request Data { "kind": "object#LocalUserObj", "password": "p4ssW0rd", "MSCHAPAuthenticated": false, "privilegeLevel": "low", "ASDM_CLIAccessType": "Null" }
How the community answered
(64 responses)- A94% (60)
- B2% (1)
- C3% (2)
- D2% (1)
Why each option
The Cisco ASA REST API requires the correct endpoint, a 'name' field, an integer privilegeLevel, and a valid ASDM_CLIAccessType enumeration value to return HTTP 201 Created.
Choice A uses the correct endpoint (/api/objects/localusers), includes the required 'name' field, specifies 'privilegeLevel' as an integer (2), and sets 'ASDM_CLIAccessType' to 'Cli', which is a valid enumeration value. All required fields are present and correctly typed, so the ASA REST API accepts the request and returns 201 Created. The 'objectId' field provides the unique resource identifier expected by the API.
Choice B omits the required 'name' field and specifies 'privilegeLevel' as a string ('high') instead of an integer, both of which violate the API schema and produce a 400 Bad Request.
Choice C uses 'ASDM_CLIAccessType': 'Full', which is not a valid enumeration value - the ASA REST API accepts only 'None', 'Cli', 'Enable', or 'ASDM', causing a 400 Bad Request.
Choice D targets the wrong endpoint (/api/objects/localusergroups instead of /api/objects/localusers), omits the required 'name' field, and specifies 'privilegeLevel' as a string ('low') instead of an integer.
Concept tested: Cisco ASA REST API local user creation request
Source: https://www.cisco.com/c/en/us/td/docs/security/asa/api/qsg-asa-api.html
Topics
Community Discussion
No community discussion yet for this question.




