Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Python for Systems Engineers - Part 3

Python for Systems Engineers - Part 3

Python is one of the most popular programming languages of our time and the powerhouse behind most of Cisco’s API efforts. If there is a Cisco API chances are high that there will be a software development kit for that API in python. In this 3-part webinar series we will get our hands dirty with python.

In Part 3 we will get our hands dirty building a chat bot in Webex Teams.

Marcel Neidinger

November 21, 2019
Tweet

More Decks by Marcel Neidinger

Other Decks in Technology

Transcript

  1. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco

    Confidential REST API – A Request Webex API GET /api/v1/people/me HTTP/1.1 200 OK Date: Thu, 10 Oct 2019 03:59:02 GMT Content-Type: application/json { “id”: “Y2lzY29zcGFyazovL3VzLA”, ”emails”: [ “[email protected]” } } Header Body Location Method Identifier
  2. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco

    Confidential REST API – A Polling based approach Webex API
  3. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco

    Confidential Webhooks Webex API POST 21ce:1ce:babe::8931/webhook Host: www.test01.com Accept: application/json Content-Length: 25 { “id”: “Y2lzY29zcGFyazovL3VzLA”, ”event”: “created”, “resource”: “message”, [...] }
  4. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco

    Confidential Webhooks Webex API POST 21ce:1ce:babe::8931/webhook Host: www.test01.com Accept: application/json Content-Length: 25 { “id”: “Y2lzY29zcGFyazovL3VzLA”, ”event”: “created”, “resource”: “message”, [...] } Firewalls seriously dislike this (and InfoSec dislikes you if you try to do this)
  5. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco

    Confidential Webhooks Webex API ngrok POST abcscor0ck5.ngrok.io HTTP/1.1 200 OK Date: Thu, 10 Oct 2019 03:59:02 GMT Content-Type: application/json { “success”: True }
  6. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco

    Confidential Webhooks Webex API ngrok POST abcscor0ck5.ngrok.io HTTP/1.1 200 OK Date: Thu, 10 Oct 2019 03:59:02 GMT Content-Type: application/json { “success”: True } Hold on a minute You skipped the 43 hours spend setting up a webeserver
  7. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco

    Confidential Meet Flask - Open Source - Micro-framework - Easy to Code - Easy to Configure - Well Documented - All in all awesome $ pip install flask
  8. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco

    Confidential Meet Flask - Open Source - Micro-framework - Easy to Code - Easy to Configure - Well Documented - All in all awesome $ pip install flask Lets build a webserver (In a tweet)