Last active
December 23, 2020 19:17
-
-
Save ObjectIsAdvantag/6233dc057aebc1f52c3c1b9a88203d30 to your computer and use it in GitHub Desktop.
Tip to retreive a Room Identifier from the Spark API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This tip shows how to retreive a Spark Room Id with the Cisco Spark API | |
# It leverages curl, jq and base64 commands | |
# Let’s retreive Room Details for "spark4devs" | |
> SPARK_TOKEN="pick your spark token from https://developer.ciscospark.com" | |
> curl -X GET -H "Authorization: Bearer $SPARK_TOKEN" "https://api.ciscospark.com/v1/rooms?max=1000" | jq '.items[] | select(.title | contains("spark4dev"))' | |
{ | |
"id": "Y2lzY29zcGFyazovL3VzL1JPT00vZDJmZGUwOTAtOWQwYy0xMWU1LWFlZWQtMjE3NmZkY2Q4YTU4", | |
"title": "#spark4dev - Public Support for Cisco Spark API", | |
"type": "group", | |
"isLocked": true, | |
"lastActivity": "2017-01-05T08:29:24.936Z", | |
"creatorId": "Y2lzY29zcGFyazovL3VzL1BFT1BMRS9mNWIzNjE4Ny1jOGRkLTQ3MjctOGIyZi1mOWM0NDdmMjkwNDY", | |
"created": "2015-12-07T18:03:30.969Z" | |
} | |
# Decode 64 the Room API id | |
> echo "Y2lzY29zcGFyazovL3VzL1JPT00vZDJmZGUwOTAtOWQwYy0xMWU1LWFlZWQtMjE3NmZkY2Q4YTU4" | base64 --decode | |
ciscospark://us/ROOM/d2fde090-9d0c-11e5-aeed-2176fdcd8a58 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment