cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
9535
Views
11
Helpful
3
Comments
dsoper
Cisco Employee
Cisco Employee

 

Cisco Intersight API Overview

 

This document provides an overview of the Cisco Intersight API.  For general information on Intersight, visit Cisco Intersight - Cisco

 

API Overview Demos with PowerShell and Python

  • An updated video demo includes a walk-through of Intersight's developer center and example of using Intersight's PowerShell module 
  • The video demo of the Intersight API includes information on getting help with the API, generating API keys for remote use, and how to use the Intersight Python SDK.


Accessing the Intersight API

  • Visit https://intersight.com/help and follow the API Documentation link to learn more about using the API.  The API Docs pages have an interactive API browser and the ability to directly interact with the API if you are logged in to a valid Intersight account.  Below is a screenshot of the API Docs page with the left pane showing how to search for "user" and expand the iam/User resource, and the right pane showing how to "Send" an actual API command to GET all current Users.

Screen Shot 2018-01-22 at 10.07.46 PM.png

  • Note that some features of the API require an Intersight Essentials license.  More information on Intersight licensing can be found on the Intersight Licensing page.

 

API Keys for Remote API Access

  • API keys are needed to access the API from Python or other remote scripting tools.  To generate API keys, navigate to the user profile in the upper right of the Intersight UI and select "Generate API Keys"

Screen Shot 2018-01-22 at 10.37.32 PM.png

  • Similar to SSH keys, Intersight API keys consist of "Public" API Key IDs and a Secret, or "Private", Key that should not be shared.  The Generate New API Key page shows the following information and provides the ability to save the Secret Key to a file or the clipboard.  As noted on the Generate New API Key page, the Secret Key is only visible one time, but a new set of access keys can be generated any time as needed.

Screen Shot 2018-01-22 at 10.41.48 PM.png

 

Intersight Python SDK

  • Intersight's RESTful API is built on "Swagger Specs" that allow automatic generation of Python code and code for several other common programming or scripting languages.  The Python SDK is currently hosted on GitHub at https://github.com/CiscoDevNet/intersight-python and Intersight's PowerShell Module is at https://github.com/CiscoDevNet/intersight-powershell.  The GitHub pages have install and usage instructions including examples scripts for user add/delete and device claim/delete with additional examples in development.
Comments
ymadalug
Cisco Employee
Cisco Employee

Is there an API which receive serial number of the device & returns back if the device is registered/claimed into intersight.

Right now we can use DeviceinfoSerialNumberInfoApi(), but it returns all devices in the account. This will be huge information depending account size.

Looking for simple API which can say Yes/No if device is registered in Intersight or not, may one step ahead claimed or not.

dsoper
Cisco Employee
Cisco Employee

The device claim scripts discussed here https://communities.cisco.com/docs/DOC-77204 use the local device's device connector API to retrieve claimed status. When using the Intersight API, information for claimed devices is returned by DeviceRegistrations. Any Intersight API can only retrieve info for claimed devices in that account.

jamjiang
Cisco Employee
Cisco Employee

dsoper:

 

A question for API secrect key, secrect key will be shared to API client  with API key ID at same time, could you please elabrate more about "Private", Key that should not be shared" ? Thanks/James

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking for a $25 gift card