Commit 5a3976e3 by amir

adding cisco cdp

parent d613f1d7
This diff could not be displayed because it is too large.
<!DOCTYPE HTML><html><head><title>CDP API Quickstart Guide API API documentation</title><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="generator" content="https://github.com/kevinrenskers/raml2html 2.4.0"><link rel="stylesheet" href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.1/styles/default.min.css"><script type="text/javascript" src="https://code.jquery.com/jquery-1.11.0.min.js"></script><script type="text/javascript" src="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.1/highlight.min.js"></script><script type="text/javascript">
$(document).ready(function() {
$('.page-header pre code, .top-resource-description pre code').each(function(i, block) {
hljs.highlightBlock(block);
});
$('[data-toggle]').click(function() {
var selector = $(this).data('target') + ' pre code';
$(selector).each(function(i, block) {
hljs.highlightBlock(block);
});
});
// open modal on hashes like #_action_get
$(window).bind('hashchange', function(e) {
var anchor_id = document.location.hash.substr(1); //strip #
var element = $('#' + anchor_id);
// do we have such element + is it a modal? --> show it
if (element.length && element.hasClass('modal')) {
element.modal('show');
}
});
// execute hashchange on first page load
$(window).trigger('hashchange');
// remove url fragment on modal hide
$('.modal').on('hidden.bs.modal', function() {
try {
if (history && history.replaceState) {
history.replaceState({}, '', '#');
}
} catch(e) {}
});
});
</script><style>
.hljs {
background: transparent;
}
.parent {
color: #999;
}
.list-group-item > .badge {
float: none;
margin-right: 6px;
}
.panel-title > .methods {
float: right;
}
.badge {
border-radius: 0;
text-transform: uppercase;
width: 70px;
font-weight: normal;
color: #f3f3f6;
line-height: normal;
}
.badge_get {
background-color: #63a8e2;
}
.badge_post {
background-color: #6cbd7d;
}
.badge_put {
background-color: #22bac4;
}
.badge_delete {
background-color: #d26460;
}
.badge_patch {
background-color: #ccc444;
}
.list-group, .panel-group {
margin-bottom: 0;
}
.panel-group .panel+.panel-white {
margin-top: 0;
}
.panel-group .panel-white {
border-bottom: 1px solid #F5F5F5;
border-radius: 0;
}
.panel-white:last-child {
border-bottom-color: white;
-webkit-box-shadow: none;
box-shadow: none;
}
.panel-white .panel-heading {
background: white;
}
.tab-pane ul {
padding-left: 2em;
}
.tab-pane h2 {
font-size: 1.2em;
padding-bottom: 4px;
border-bottom: 1px solid #ddd;
}
.tab-pane h3 {
font-size: 1.1em;
}
.tab-content {
border-left: 1px solid #ddd;
border-right: 1px solid #ddd;
border-bottom: 1px solid #ddd;
padding: 10px;
}
#sidebar {
margin-top: 30px;
padding-right: 5px;
overflow: auto;
height: 90%;
}
.top-resource-description {
border-bottom: 1px solid #ddd;
background: #fcfcfc;
padding: 15px 15px 0 15px;
margin: -15px -15px 10px -15px;
}
.resource-description {
border-bottom: 1px solid #fcfcfc;
background: #fcfcfc;
padding: 15px 15px 0 15px;
margin: -15px -15px 10px -15px;
}
.resource-description p:last-child {
margin: 0;
}
.list-group .badge {
float: left;
}
.method_description {
margin-left: 85px;
}
.method_description p:last-child {
margin: 0;
}
.list-group-item {
cursor: pointer;
}
.list-group-item:hover {
background-color: #f5f5f5;
}
</style></head><body data-spy="scroll" data-target="#sidebar"><div class="container"><div class="row"><div class="col-md-9" role="main"><div class="page-header"><h1>CDP API Quickstart Guide API API documentation <small>version v1</small></h1><p></p><h3 id="CDP-API-Quickstart-Guide"><a href="#CDP-API-Quickstart-Guide">CDP API Quickstart Guide</a></h3><h1 id="cdp-api-quickstart-guide">CDP API Quickstart Guide</h1><p><strong>NOTE</strong>: Pre-release version, subject to changes and enhancements</p><h4 id="cdp-exposes-data-to-application-developers-and-other-consumers-of-device-data-via-a-collection-of-apis-">CDP exposes data to application developers and other consumers of device data via a collection of APIs.</h4><h2 id="authentication">Authentication</h2><p>The APIs use Oauth 2 for authentication. See the <a href="security.html">Authentication and Authorization Document API Document</a> for information about Authentication</p><h2 id="the-basic-flow-for-api-access-of-device-data-is-as-follows-">The basic flow for API access of device data is as follows:</h2><h3 id="step-1-authenticate">Step 1 - Authenticate</h3><h3 id="step-2-request-account-information">Step 2 - Request Account Information</h3><h3 id="step-3-get-region-information">Step 3 - Get Region information</h3><h3 id="step-4-query-device-data">Step 4 - Query device data</h3><p>The application can then choose to create a socket connection for device updates. The application can also update the state of connected devices (if enabled for the logged in user).</p><h1 id="api-details">API Details</h1><h2 id="1-authenticate">1. Authenticate</h2><p>In order to use the APIs, the application will need to log the user in and then user the email/password combination in the Authentication: Bearer \<token>request header for subsequent API calls.</token></p><h2 id="2-get-user-account-details">2. Get User Account details</h2><pre><code>/cdp/v1/accounts/{username}
</code></pre><p>This will return a json object containing the user id which will be needed foe the next request</p><h2 id="3-get-location-information-for-the-user">3. Get Location information for the user</h2><pre><code>/cdp/v1/locations/userinfo/user/{userid}
</code></pre><h2 id="2-get-location-information">2. Get Location Information</h2><pre><code>/cdp/v1/locations/{locationId}
</code></pre><p>The location information returns the geographic boundry of the region which can be used to select specific devices. See the CDP API Documentation for more details on the request/response.</p><p>This will return a json object containing the location information including the geographic boundary (polygon coordinates) which will be used in the future requests.</p><h2 id="3-query-device-data">3. Query Device Data</h2><p>Device data is queried and updated via POSTs to the endpoints with TQL post bodies.</p><h6 id="url-cdp-instance-cdp-v1-devices-device-specific-endpoint-example-http-cdp-demous1-ui-cisco-com-cdp-v1-devices-lighting-">URL:<cdp-instance>/cdp/v1/devices/<device-specific-endpoint>(example: <a href="http://cdp-demous1-ui.cisco.com/cdp/v1/devices/lighting">http://cdp-demous1-ui.cisco.com/cdp/v1/devices/lighting</a>)</device-specific-endpoint></cdp-instance></h6><h6 id="method-post">Method: POST</h6><h6 id="headers-authorization-bearer-access_token-authorization-bearer-y2nzqwnvqgnkxc5jb2c6yxn4m2n7q0raiq-">Headers: {Authorization: "Bearer \<access_token>} (Authorization: "Bearer Y2NzQWNvQGNkXC5jb2C6YXN4M2N7Q0RaIQ=)</access_token></h6><h6 id="post-body-the-tql-query-to-execute-see-tql-and-or-cdp-api-documentation-for-more-details-on-tql-and-example-queries">Post Body: The TQL Query to execute. See TQL and/or CDP API Documentation for more details on TQL and example queries</h6><p>This example will get all lights in the location&#39;s boundry</p><p><code>URL: http://cdp-demous1-ui.cisco.com/cdp/v1/devices/lighting</code></p><p><code>Post Body:</code></p><pre><code>{
"Query": {
"Find": {
"With": {
"kind": "const",
"GeoPolygon": {
"as": "region",
"geoPoint": [{
"latitude": 37.430688206825,
"longitude": -122.138142585754
}, {
"latitude": 37.4291887329258,
"longitude": -122.139666080475
}, {
"latitude": 37.4442587832677,
"longitude": -122.163323163986
}, {
"latitude": 37.445016891038,
"longitude": -122.162539958954
}, {
"latitude": 37.430688206825,
"longitude": -122.138142585754
}]
}
},
"Light": {
"as": "var.myarea",
"eq": {
"target": "inside(const.region, var.myarea.geocoordinates)",
"value": true
}
}
}
}
}
</code></pre><p>Response:</p><pre><code>{
"status": "success",
"result": {
"Find": {
"Status": "Success",
"Result": [{
"Light": {
"sid": "KTUC6SEHAAAH6AAAAGF7262D",
"deviceState": {
"connState": {
"since": "2016-05-25T12:59:01.971Z",
"connected": true
}
},
"operatedBy": "sensity",
"geocoordinates": {
"latitude": 37.443097826730195,
"longitude": -122.16133930613421
},
"thirdPartyId": "*W4A5GPF3",
"lightZoneId": null,
"state": {
"powerConsumption": -1,
"intensityLevel": 0,
"reliability": 100
},
"providerDetails": {
"provider": "sensity",
"providerId": "KTUCXRMZAAAH6AAAAHBD73JA"
},
"deviceType": "Light",
"lastUpdated": "2016-05-26T04:43:14.447Z"
}
}, {
"Light": {
"sid": "KTUC6SEVAAAH6AAAAEQ4KRW6",
"deviceState": {
"connState": {
"since": "2016-04-28T14:33:46.291Z",
"connected": false
}
},
"operatedBy": "sensity",
"geocoordinates": {
"latitude": 37.44308025785778,
"longitude": -122.16131248404406
},
"thirdPartyId": "*EEXJSAM6",
"lightZoneId": null,
"state": {
"powerConsumption": -1,
"intensityLevel": 0,
"reliability": 100
},
"providerDetails": {
"provider": "sensity",
"providerId": "KTUCXRMZAAAH6AAAAHBD73JA"
},
"deviceType": "Light",
"lastUpdated": "2016-05-26T04:43:14.454Z"
}
}]
}
}
}
</code></pre><p>For Parking Spots, change the URL to the parking URL:</p><p><code>http://cdp-demous1-ui.cisco.com/cdp/v1/devices/parking</code></p><p>And change the request post body query to find ParkingSpot</p><p>Change</p><pre><code>"Light": {
"as": "var.myarea",
"eq": {
"target": "inside(const.region, var.myarea.geocoordinates)",
"value": true
}
}
</code></pre><p>To</p><pre><code>"ParkingSpot": {
"as": "var.myarea",
"eq": {
"target": "inside(const.region, var.myarea.geocoordinates)",
"value": true
}
}
</code></pre><p>For Parking Spaces (parking areas), use the parking URL:</p><p><code>http://cdp-demous1-ui.cisco.com/cdp/v1/devices/parking</code></p><p>And change the request post body query to find ParkingSpace and change the boundry check to check for overlaps of the parking areas and the locations geocoordinates</p><p>Change</p><pre><code>"Light": {
"as": "var.myarea",
"eq": {
"target": "inside(const.region, var.myarea.geocoordinates)",
"value": true
}
}
</code></pre><p>To</p><pre><code>"ParkingSpace": {
"as": "var.myarea",
"eq": {
"target": "overlaps(const.region, var.myarea.boundary)",
"value": true
}
}
</code></pre><p>See API Rederence Guide and Domain Specific Documents for more information.</p></div></div><div class="col-md-3"><div id="sidebar" class="hidden-print affix" role="complementary"><ul class="nav nav-pills nav-stacked"></ul></div></div></div></div></body></html>
\ No newline at end of file
<!DOCTYPE HTML><html><head><title>Authentication and Authorization API documentation</title><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="generator" content="https://github.com/kevinrenskers/raml2html 2.4.0"><link rel="stylesheet" href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.1/styles/default.min.css"><script type="text/javascript" src="https://code.jquery.com/jquery-1.11.0.min.js"></script><script type="text/javascript" src="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.1/highlight.min.js"></script><script type="text/javascript">
$(document).ready(function() {
$('.page-header pre code, .top-resource-description pre code').each(function(i, block) {
hljs.highlightBlock(block);
});
$('[data-toggle]').click(function() {
var selector = $(this).data('target') + ' pre code';
$(selector).each(function(i, block) {
hljs.highlightBlock(block);
});
});
// open modal on hashes like #_action_get
$(window).bind('hashchange', function(e) {
var anchor_id = document.location.hash.substr(1); //strip #
var element = $('#' + anchor_id);
// do we have such element + is it a modal? --> show it
if (element.length && element.hasClass('modal')) {
element.modal('show');
}
});
// execute hashchange on first page load
$(window).trigger('hashchange');
// remove url fragment on modal hide
$('.modal').on('hidden.bs.modal', function() {
try {
if (history && history.replaceState) {
history.replaceState({}, '', '#');
}
} catch(e) {}
});
});
</script><style>
.hljs {
background: transparent;
}
.parent {
color: #999;
}
.list-group-item > .badge {
float: none;
margin-right: 6px;
}
.panel-title > .methods {
float: right;
}
.badge {
border-radius: 0;
text-transform: uppercase;
width: 70px;
font-weight: normal;
color: #f3f3f6;
line-height: normal;
}
.badge_get {
background-color: #63a8e2;
}
.badge_post {
background-color: #6cbd7d;
}
.badge_put {
background-color: #22bac4;
}
.badge_delete {
background-color: #d26460;
}
.badge_patch {
background-color: #ccc444;
}
.list-group, .panel-group {
margin-bottom: 0;
}
.panel-group .panel+.panel-white {
margin-top: 0;
}
.panel-group .panel-white {
border-bottom: 1px solid #F5F5F5;
border-radius: 0;
}
.panel-white:last-child {
border-bottom-color: white;
-webkit-box-shadow: none;
box-shadow: none;
}
.panel-white .panel-heading {
background: white;
}
.tab-pane ul {
padding-left: 2em;
}
.tab-pane h2 {
font-size: 1.2em;
padding-bottom: 4px;
border-bottom: 1px solid #ddd;
}
.tab-pane h3 {
font-size: 1.1em;
}
.tab-content {
border-left: 1px solid #ddd;
border-right: 1px solid #ddd;
border-bottom: 1px solid #ddd;
padding: 10px;
}
#sidebar {
margin-top: 30px;
padding-right: 5px;
overflow: auto;
height: 90%;
}
.top-resource-description {
border-bottom: 1px solid #ddd;
background: #fcfcfc;
padding: 15px 15px 0 15px;
margin: -15px -15px 10px -15px;
}
.resource-description {
border-bottom: 1px solid #fcfcfc;
background: #fcfcfc;
padding: 15px 15px 0 15px;
margin: -15px -15px 10px -15px;
}
.resource-description p:last-child {
margin: 0;
}
.list-group .badge {
float: left;
}
.method_description {
margin-left: 85px;
}
.method_description p:last-child {
margin: 0;
}
.list-group-item {
cursor: pointer;
}
.list-group-item:hover {
background-color: #f5f5f5;
}
</style></head><body data-spy="scroll" data-target="#sidebar"><div class="container"><div class="row"><div class="col-md-9" role="main"><div class="page-header"><h1>Authentication and Authorization API documentation <small>version v1</small></h1><p>https://<cdp-sso-instance>/api</cdp-sso-instance></p><h3 id="Authentication-and-Authorization"><a href="#Authentication-and-Authorization">Authentication and Authorization</a></h3><h2 id="authentication-and-authorization-document">Authentication and Authorization Document</h2><h3 id="authentication-and-authorization-overview">Authentication and Authorization Overview</h3><ol><li><strong>Authenticate</strong> - Authorization is performed by making a request to <code>/token.oauth2</code> and passing in the following in the request body:<ol><li>User Credentials (username, password)</li><li>Client ID (client_id)</li><li>Client Secret (client_secret)</li><li>grant_type: password</li></ol></li><li><strong>Retrieve Tokens</strong> - Successful authorization will return two tokens:<ol><li>Access Token (access_token)</li><li>Refresh Token (refresh_token)</li></ol></li><li><strong>Send Token</strong> - send token in header for all subsequent API requests<ol><li>Authorization: Bearer \<access_token></access_token></li></ol></li><li><strong>Refresh Token</strong> as needed - The access token will expire and will need to be refreshed by sending a renew request and passing in the following in the post body:<ol><li>Refresh Token (refresh_token) - returned in Authentication response</li><li>Client ID (client_id)</li><li>Client Secret (client_secret)</li><li>grant_type: refresh_token</li></ol></li></ol><h3 id="example-request-and-response">Example Request and response</h3><h4 id="authenticate-with-username-password">Authenticate with username/password</h4><p><code>POST https://cloudsso-test.cisco.com/as/api/token.oauth2</code></p><p>Example Body:</p><pre><code>grant_type: password
client_id:3af1340b0ebf0db78cce051b2d50e6d3
client_secret:bfa0c1c7ad7f8275BD94D2EB79AC2AE7
username : &lt;cisco-username&gt;
password : &lt;password&gt;
</code></pre><p>Example Response:</p><pre><code>{
"access_token": "5gMxAmy7QIFgbkxDxWX4PkQq2DLT",
"refresh_token": "KolxKMhUIdLqzDAxUafdmeMLYXRIJ09kmYelyR9T90",
"token_type": "Bearer",
"expires_in": 3599
}
</code></pre><h4 id="renew-authentication-with-refresh-token">Renew authentication with refresh token</h4><p><code>POST https://cloudsso-test.cisco.com/as/api/token.renew</code></p><p>Example Body:</p><pre><code>grant_type: refresh_token
client_id:3af1340b0ebf0db78cce051b2d50e6d3
client_secret:bfa0c1c7ad7f8275BD94D2EB79AC2AE7
refresh_token : KolxKMhUIdLqzDAxUafdmeMLYXRIJ09kmYelyR9T90
</code></pre><p>Example Response:</p><pre><code>{
"access_token": "cWVlEZxlMtb9n3sWfZABDGAIPsUf",
"refresh_token": "Rv9q0oDafLAmvGUWwh4ua8i7biCBGwbZFvHWVmZomA",
"token_type": "Bearer",
"expires_in": 3599
}
</code></pre><h4 id="add-authorization-header-to-all-subsequent-api-calls">Add Authorization Header to all subsequent API calls</h4><pre><code>Authorization: Bearer cWVlEZxlMtb9n3sWfZABDGAIPsUf
</code></pre></div><div class="panel panel-default"><div class="panel-heading"><h3 id="as" class="panel-title">/as</h3></div><div class="panel-body"><div class="panel-group"><div class="panel panel-white"><div class="panel-heading"><h4 class="panel-title"><a class="collapsed" data-toggle="collapse" href="#panel_as_token_oauth2"><span class="parent">/as</span>/token.oauth2</a> <span class="methods"><a href="#as_token_oauth2_post"><span class="badge badge_post">post</span></a></span></h4></div><div id="panel_as_token_oauth2" class="panel-collapse collapse"><div class="panel-body"><div class="list-group"><div onclick="window.location.href = '#as_token_oauth2_post'" class="list-group-item"><span class="badge badge_post">post</span><div class="method_description"><p>API to get access token by client_id, client_secret and user credentials</p></div><div class="clearfix"></div></div></div></div></div><div class="modal fade" tabindex="0" id="as_token_oauth2_post"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button><h4 class="modal-title" id="myModalLabel"><span class="badge badge_post">post</span> <span class="parent">/as</span>/token.oauth2</h4></div><div class="modal-body"><div class="alert alert-info"><p>API to get access token by client_id, client_secret and user credentials</p></div><ul class="nav nav-tabs"><li class="active"><a href="#as_token_oauth2_post_request" data-toggle="tab">Request</a></li><li><a href="#as_token_oauth2_post_response" data-toggle="tab">Response</a></li></ul><div class="tab-content"><div class="tab-pane active" id="as_token_oauth2_post_request"><h3>Body</h3><p><strong>Type: application/x-www-form-urlencoded</strong></p><strong>Form Parameters</strong><ul><li><strong>grant_type</strong>: <em>required (one of password)</em><p><strong>Example</strong>:</p><pre>password</pre></li><li><strong>client_id</strong>: <em>required (string)</em><p><strong>Example</strong>:</p><pre>3af1340b0ebf0db78cce051b2d50e6d3</pre></li><li><strong>client_secret</strong>: <em>required (string)</em><p><strong>Example</strong>:</p><pre>bfa0c1c7ad7f8275BD94D2EB79AC2AE7</pre></li><li><strong>username</strong>: <em>required (string)</em></li><li><strong>password</strong>: <em>required (string)</em></li></ul></div><div class="tab-pane" id="as_token_oauth2_post_response"><h2>HTTP status code <a href="http://httpstatus.es/200" target="_blank">200</a></h2><h3>Body</h3><p><strong>Type: application/json</strong></p><p><strong>Example</strong>:</p><pre><code>{"access_token":"AtyfCjwO9Knvf3BD5CPGeHHzKpph", "token_type":"Bearer", "refresh_token":"KolxKMhUIdLqzDAxUafdmeMLYXRIJ09kmYelyR9T90","expires_in":3599}
</code></pre></div></div></div></div></div></div></div><div class="panel panel-white"><div class="panel-heading"><h4 class="panel-title"><a class="collapsed" data-toggle="collapse" href="#panel_as_token_renew"><span class="parent">/as</span>/token.renew</a> <span class="methods"><a href="#as_token_renew_post"><span class="badge badge_post">post</span></a></span></h4></div><div id="panel_as_token_renew" class="panel-collapse collapse"><div class="panel-body"><div class="list-group"><div onclick="window.location.href = '#as_token_renew_post'" class="list-group-item"><span class="badge badge_post">post</span><div class="method_description"><p>API to refresh the access token by client_id, client_secret and refresh token</p></div><div class="clearfix"></div></div></div></div></div><div class="modal fade" tabindex="0" id="as_token_renew_post"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button><h4 class="modal-title" id="myModalLabel"><span class="badge badge_post">post</span> <span class="parent">/as</span>/token.renew</h4></div><div class="modal-body"><div class="alert alert-info"><p>API to refresh the access token by client_id, client_secret and refresh token</p></div><ul class="nav nav-tabs"><li class="active"><a href="#as_token_renew_post_request" data-toggle="tab">Request</a></li><li><a href="#as_token_renew_post_response" data-toggle="tab">Response</a></li></ul><div class="tab-content"><div class="tab-pane active" id="as_token_renew_post_request"><h3>Body</h3><p><strong>Type: application/x-www-form-urlencoded</strong></p><strong>Form Parameters</strong><ul><li><strong>grant_type</strong>: <em>required (one of refresh_token)</em><p><strong>Example</strong>:</p><pre>refresh_token</pre></li><li><strong>client_id</strong>: <em>required (string)</em><p><strong>Example</strong>:</p><pre>3af1340b0ebf0db78cce051b2d50e6d3</pre></li><li><strong>client_secret</strong>: <em>required (string)</em><p><strong>Example</strong>:</p><pre>bfa0c1c7ad7f8275BD94D2EB79AC2AE7</pre></li><li><strong>refresh_token</strong>: <em>required (string)</em><p><strong>Example</strong>:</p><pre>KolxKMhUIdLqzDAxUafdmeMLYXRIJ09kmYelyR9T90</pre></li></ul></div><div class="tab-pane" id="as_token_renew_post_response"><h2>HTTP status code <a href="http://httpstatus.es/200" target="_blank">200</a></h2><h3>Body</h3><p><strong>Type: application/json</strong></p><p><strong>Example</strong>:</p><pre><code>{"access_token":"cWVlEZxlMtb9n3sWfZABDGAIPsUf", "token_type":"Bearer", "refresh_token":"Rv9q0oDafLAmvGUWwh4ua8i7biCBGwbZFvHWVmZomA","expires_in":3599}
</code></pre></div></div></div></div></div></div></div></div></div></div></div><div class="col-md-3"><div id="sidebar" class="hidden-print affix" role="complementary"><ul class="nav nav-pills nav-stacked"><li><a href="#as">/as</a></li></ul></div></div></div></div></body></html>
\ No newline at end of file
CISCO CDP:
[SITE]
https://developer.cisco.com/site/smartconnected-communities/index.gsp
choose smart+connected digital platform
- active "Reserve" and wait for the mail to ipg.test
[INSTALL VPN ]
http://www.humans-enabled.com/2011/06/how-to-connect-ubuntu-linux-to-cisco.html
- connect to vpn with the user/pass you've got in mail
- After connect to login ( with params from mail) :
http://10.10.20.6/apigw/devnetlabtokenapi/login
{
"scope": "default",
"token_type": "bearer",
"app_access_token": "b746d143ba4f9fae868b1e7efa533161",
"app_refresh_token": "57de744cb5f932dc480887f426b63a0",
"app_expires_in": 3600,
"api_access_token": "LuGy7w5FvQTRULXEEtCgWFnXZjPl",
"api_expires_in": 3599
}
* All api's from here require the Headers"
WSO2-Authorization: [app_access_token]
Authorization: [api_access_token]
- Run Get User Details to retrieve UserKey (id) and SensorCustomerKey (parent id)
- Add to devices api the query params: ?UserKey=[id]&SensorCustomerKey=[parent id]AppKey=CDP-App
- enjoy ;-)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment