300-920 · Question #62
Drag and Drop Question Drag and drop the items to complete the jsxapi script. Not all options are used. Answer:
The correct answer is body; bodyContent; streamURL; message; recording. jsxapi Drag-and-Drop: Explanation This question tests your understanding of how a jsxapi macro on a Cisco Webex/TelePresence device processes an incoming HTTP event and extracts nested data to trigger a recording or stream action. The script follows a data-extraction pipeline…
Question
Exhibit
Answer Area
Drag items
Correct arrangement
- body
- bodyContent
- streamURL
- message
- recording
Explanation
jsxapi Drag-and-Drop: Explanation
This question tests your understanding of how a jsxapi macro on a Cisco Webex/TelePresence device processes an incoming HTTP event and extracts nested data to trigger a recording or stream action.
The script follows a data-extraction pipeline: receive → parse → extract → command.
Item-by-Item Breakdown
1. body
The outermost data container from the incoming event (e.g., an HttpFeedback or Message Send event). This is always first because it represents the raw payload of the HTTP request/event object. You reference it directly from the event parameter.
2. bodyContent
The parsed/deserialized content of body. It sits one level deeper - body is the raw string wrapper, bodyContent is the structured object (often JSON-parsed). You cannot access properties like streamURL without this intermediate step.
3. streamURL
A specific property extracted from bodyContent. It comes third because it depends on bodyContent being defined first. This is the actual URL value needed for the streaming/recording command.
4. message
Used as a parameter key in the jsxapi command call (e.g., xapi.command(..., { message: ... })). It comes after the data extraction phase because it's part of the command invocation, not the data parsing.
5. recording
The final parameter or command target - also part of the command call, typically a flag or configuration option alongside message. It's last because it finalizes what action is taken with the extracted streamURL.
Common Mistakes
- Swapping
bodyandbodyContent:bodyis the raw wrapper;bodyContentis what you actually work with. They are not interchangeable. - Placing
streamURLbeforebodyContent:streamURLis a property ofbodyContent, sobodyContentmust be defined first. - Using
recordingbeforemessage: Both are command parameters, butmessagetypically carries the payload (the URL), whilerecordingis the action/flag - somessagelogically precedes it. - Including unused items as replacements: The question states not all options are used -
recordingis used here, so don't drop it thinking it's a distractor.
Summary Flow
event → body → bodyContent → streamURL
↓
command({ message: streamURL, recording: ... })
The data flows from raw event → structured payload → specific value → command parameters.
Topics
Community Discussion
No community discussion yet for this question.
