DevNet Associate DEVASC 200-901 Official Certification Guide by Adrian Iliesiu (z-lib.org)

(andrew) #1

You can use the Rooms API to get a list of all the rooms
that have been created. To do so, you can use the GET
method and the API https://webexapis.com/v1/rooms.


Example 10-4 shows how to use the curl command to
make the REST call. This script sends a GET request to
list all rooms that a particular user belongs to.


Example 10-4 curl Script for Getting a List of All
Rooms


Click here to view code image


$ curl -X GET \
https://webexapis.com/v1/rooms \
-H 'Authorization: Bearer
DeadBeefMTAtN2UzZi00YjRiLWIzMGEtMThjMzliNWQwZGEyZTljN-
WQxZTktNTRl_PF84_1eb65fdf-9643-417f-9974-
ad72cae0e10f'

Memberships API


A membership represents a person’s relationship to a
room. You can use the Memberships API to list members
of any room that you’re in or create memberships to
invite someone to a room. Memberships can also be
updated to make someone a moderator or deleted to
remove someone from the room. Table 10-6 lists the
operations that can be performed with respect to the
Memberships API, such as listing memberships and
adding a new member.


Table 10-6 Webex Teams: Memberships API

MethodAPIDescription

GE
T

https://webexapis.com/v1/mem
berships

List
memberships

PO https://webexapis.com/v1/mem Add a new
Free download pdf