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
| import requests | |
| import json | |
| token = 'z8-sXMth942nOiQqXuikCNjbamrAlI2IjS7g' | |
| url = 'https://gorest.co.in/public-api/users/1571' | |
| result = requests.delete(url, |
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
| import requests | |
| import json | |
| token = 'z8-sXMth942nOiQqXuikCNjbamrAlI2IjS7g' | |
| url = 'https://gorest.co.in/public-api/users/1571' | |
| result = requests.get(url, |
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
| import acitoolkit | |
| url = 'https://sandboxapicdc.cisco.com' | |
| username = 'admin' | |
| pwd = 'ciscopsdt' | |
| session = acitoolkit.Session(url, username, pwd) |
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
| from acitoolkit.acisession import Session | |
| from acitoolkit.aciphysobject import Node | |
| url = 'https://sandboxapicdc.cisco.com' | |
| usr_name = 'admin' | |
| password = 'ciscopsdt' |
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
| from acitoolkit import * | |
| url = 'https://sandboxapicdc.cisco.com' | |
| usr_name = 'admin' | |
| password = 'ciscopsdt' | |
| session = Session(url, usr_name, password) |
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
| import requests | |
| import json | |
| url = 'https://sandboxsdwan.cisco.com:8443/j_security_check/' | |
| data = {'j_username':'devnetuser','j_password':'Cisco123!'} | |
| response = requests.post(url, data, verify=False) |
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
| from pprint import pprint | |
| from pynso.client import NSOClient | |
| from pynso.datastores import DatastoreType | |
| client = NSOClient('<ip-address>', 'admin', 'admin') | |
| pprint(client.info()['version']) |
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
| <?php | |
| $host="10.10.20.100"; | |
| $username="administrator"; | |
| $password="ciscopsdt"; | |
| $context = |
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
| <?php | |
| $context = stream_context_create(array('ssl'=>array('verify_peer_name'=>true, | |
| 'allow_self_signed'=>true, | |
| 'cafile'=>"/var/www/html/PHP-Sample/UCM-blah.cisco.com" | |
| ))); |
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
| <?php | |
| $response = $client->getPhone(array("name"=>"SEP010101010199")); | |
| ?> |