ETExamTower
Q56Using APIs

Refer to the preceding exhibit and use the resource tabs in the upper-left corner to view the resources that help answer this question. A developer is creating a Python script that uses the Webex REST API to automatically create a new collaboration space with the developer and team leads on demand through a Linux terminal command. Drag the code snippets from the left to the numbered locations on the right that match the missing parts of the exhibit and complete the script. Not all code snippets are used. <DragDrop items={["application/xml","application/json","name","userName","title","personEmail","members","memberships","rooms","spaces"]} slots={[{"answer":"application/json","id":"item1"},{"answer":"rooms","id":"item2"},{"answer":"title","id":"item3"},{"answer":"memberships","id":"item4"},{"answer":"personEmail","id":"item5"}]} template={"#! /usr/bin/python3\nimport requests, sys\n\nhead = { 'Content-Type': '{{item1}}',\n 'Authorization': 'Bearer NWU4NjQ0ODJkKzTItM...4-ad72cae0e10f' }\n\nres = requests.post(url = 'https://api.ciscospark.com/v1/{{item2}}',\n headers = head, json = { '{{item3}}': sys.argv[1] })\nspaceId = res.json()['id']\n\nmembers = [ 'johndoe@example.com', 'janedoe@example.com']\nfor member in members:\n res = requests.post(url='https://api.ciscospark.com/v1/{{item4}}',\n headers = head,\n json = { 'roomId' spaceId, '{{item5}}': member})"} explanation={"Webex creates a collaboration room with a JSON POST to the rooms endpoint, using title as the room name. Each additional participant is added through a JSON POST to the memberships endpoint, where personEmail identifies the person and roomId identifies the room.\n\n**Learn more:** [Create a Room | Webex for Developers](https://developer.webex.com/messaging/docs/api/v1/rooms/create-a-room) · [Create a Membership | Webex for Developers](https://developer.webex.com/messaging/docs/api/v1/memberships/create-a-membership)"} reuse={false} />

Question exhibitQuestion exhibitQuestion exhibit
← → navigate · a answer
Discussion · 3
31
Agree with the answer being: 1. application/json 2. /rooms 3. title 4. /memberships 5. personEmail
1
The answer looks to be correct.
1
the answer is correct