80
Cisco Systems, Inc. www.cisco.com Cisco has more than 200 offices worldwide. Addresses, phone numbers, and fax numbers are listed on the Cisco website at www.cisco.com/go/offices. Cisco UCS Invicta API Guide Version 1.6 August 22, 2014 Text Part Number:

Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

  • Upload
    others

  • View
    28

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

Cisco Systems, Inc.www.cisco.com

Cisco has more than 200 offices worldwide. Addresses, phone numbers, and fax numbers are listed on the Cisco website at www.cisco.com/go/offices.

Cisco UCS Invicta API GuideVersion 1.6

August 22, 2014

Text Part Number:

Page 2: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

THE SPECIFICATIONS AND INFORMATION REGARDING THE PRODUCTS IN THIS MANUAL ARE SUBJECT TO CHANGE WITHOUT NOTICE. ALL STATEMENTS, INFORMATION, AND RECOMMENDATIONS IN THIS MANUAL ARE BELIEVED TO BE ACCURATE BUT ARE PRESENTED WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. USERS MUST TAKE FULL RESPONSIBILITY FOR THEIR APPLICATION OF ANY PRODUCTS.

THE SOFTWARE LICENSE AND LIMITED WARRANTY FOR THE ACCOMPANYING PRODUCT ARE SET FORTH IN THE INFORMATION PACKET THAT SHIPPED WITH THE PRODUCT AND ARE INCORPORATED HEREIN BY THIS REFERENCE. IF YOU ARE UNABLE TO LOCATE THE SOFTWARE LICENSE OR LIMITED WARRANTY, CONTACT YOUR CISCO REPRESENTATIVE FOR A COPY.

The following information is for FCC compliance of Class A devices: This equipment has been tested and found to comply with the limits for a Class A digital device, pursuant to part 15 of the FCC rules. These limits are designed to provide reasonable protection against harmful interference when the equipment is operated in a commercial environment. This equipment generates, uses, and can radiate radio-frequency energy and, if not installed and used in accordance with the instruction manual, may cause harmful interference to radio communications. Operation of this equipment in a residential area is likely to cause harmful interference, in which case users will be required to correct the interference at their own expense.

The following information is for FCC compliance of Class B devices: This equipment has been tested and found to comply with the limits for a Class B digital device, pursuant to part 15 of the FCC rules. These limits are designed to provide reasonable protection against harmful interference in a residential installation. This equipment generates, uses and can radiate radio frequency energy and, if not installed and used in accordance with the instructions, may cause harmful interference to radio communications. However, there is no guarantee that interference will not occur in a particular installation. If the equipment causes interference to radio or television reception, which can be determined by turning the equipment off and on, users are encouraged to try to correct the interference by using one or more of the following measures:

• Reorient or relocate the receiving antenna.

• Increase the separation between the equipment and receiver.

• Connect the equipment into an outlet on a circuit different from that to which the receiver is connected.

• Consult the dealer or an experienced radio/TV technician for help.

Modifications to this product not authorized by Cisco could void the FCC approval and negate your authority to operate the product.

The Cisco implementation of TCP header compression is an adaptation of a program developed by the University of California, Berkeley (UCB) as part of UCB’s public domain version of the UNIX operating system. All rights reserved. Copyright © 1981, Regents of the University of California.

NOTWITHSTANDING ANY OTHER WARRANTY HEREIN, ALL DOCUMENT FILES AND SOFTWARE OF THESE SUPPLIERS ARE PROVIDED “AS IS” WITH ALL FAULTS. CISCO AND THE ABOVE-NAMED SUPPLIERS DISCLAIM ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THOSE OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OR ARISING FROM A COURSE OF DEALING, USAGE, OR TRADE PRACTICE.

IN NO EVENT SHALL CISCO OR ITS SUPPLIERS BE LIABLE FOR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, OR INCIDENTAL DAMAGES, INCLUDING, WITHOUT LIMITATION, LOST PROFITS OR LOSS OR DAMAGE TO DATA ARISING OUT OF THE USE OR INABILITY TO USE THIS MANUAL, EVEN IF CISCO OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

CCDE, CCENT, CCSI, Cisco Eos, Cisco Explorer, Cisco HealthPresence, Cisco IronPort, the Cisco logo, Cisco Nurse Connect, Cisco Pulse, Cisco SensorBase,Cisco StackPower, Cisco StadiumVision, Cisco TelePresence, Cisco TrustSec, Cisco Unified Computing System, Cisco WebEx, DCE, Flip Channels, Flip for Good, FlipMino, Flipshare (Design), Flip Ultra, Flip Video, Flip Video (Design), Instant Broadband, and Welcome to the Human Network are trademarks; Changing the Way We Work,Live, Play, and Learn, Cisco Capital, Cisco Capital (Design), Cisco:Financed (Stylized), Cisco Store, Flip Gift Card, and One Million Acts of Green are service marks; andAccess Registrar, Aironet, AllTouch, AsyncOS, Bringing the Meeting To You, Catalyst, CCDA, CCDP, CCIE, CCIP, CCNA, CCNP, CCSP, CCVP, Cisco, theCisco Certified Internetwork Expert logo, Cisco IOS, Cisco Lumin, Cisco Nexus, Cisco Press, Cisco Systems, Cisco Systems Capital, the Cisco Systems logo, Cisco Unity,Collaboration Without Limitation, Continuum, EtherFast, EtherSwitch, Event Center, Explorer, Follow Me Browsing, GainMaker, iLYNX, IOS, iPhone, IronPort, theIronPort logo, Laser Link, LightStream, Linksys, MeetingPlace, MeetingPlace Chime Sound, MGX, Networkers, Networking Academy, PCNow, PIX, PowerKEY,PowerPanels, PowerTV, PowerTV (Design), PowerVu, Prisma, ProConnect, ROSA, SenderBase, SMARTnet, Spectrum Expert, StackWise, WebEx, and the WebEx logo areregistered trademarks of Cisco and/or its affiliates in the United States and certain other countries.

Cisco and the Cisco Logo are trademarks of Cisco Systems, Inc. and/or its affiliates in the U.S. and other countries. A listing of Cisco's trademarks can be found at www.cisco.com/go/trademarks. Third party trademarks mentioned are the property of their respective owners. The use of the word partner does not imply a partnership relationship between Cisco and any other company. (1005R)

Any Internet Protocol (IP) addresses and phone numbers used in this document are not intended to be actual addresses and phone numbers. Any examples, command display output, network topology diagrams, and other figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses or phone numbers in illustrative content is unintentional and coincidental.

Cisco UCS Invicta Appliance Installation and Service Guide© 2014 Cisco Systems, Inc. All rights reserved.

Page 3: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

iiiCisco UCS Invicta API Guide, v1.6

C O N T E N T S

Preface vii

Organization vii

Conventions vii

Obtaining Documentation and Submitting a Service Request viii

C H A P T E R 1 Overview 1-1

API Structure 1-1

API Versions 1-1

JSON 1-1

cURL Examples 1-2

API Access/Permissions 1-2

Supported HTTP Methods 1-2

Supported Incoming Data Formats 1-2

C H A P T E R 2 API Methods 2-1

API Section Definitions 2-1

FIND (Get) 2-3

AUTHENTICATE (POST) 2-5

USER (GET) 2-6

USER (PUT) 2-7

UNITINFO (GET) 2-8

UNITNAME (GET) 2-10

UNITNAME (PUT) 2-11

MODEL (GET) 2-12

RAIDHEALTH (GET) 2-13

SSN (GET) 2-15

VOLUMEGROUP (GET) 2-17

VOLUMEGROUP (POST) 2-18

VOLUMEGROUP (DELETE) 2-19

ISCSIAVAILABLE (GET) 2-20

ISCSIAVAILABLE (PUT) 2-21

Page 4: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

Contents

ivCisco UCS Invicta API Guide, v1.6

ISCSIALLOWED (GET) 2-22

ISCSIALLOWED (PUT) 2-23

LUN (GET) 2-24

LUN (POST) 2-26

LUN (PUT) 2-27

LUN (DELETE) 2-28

LUNMIRROR (POST) 2-29

LUNMIRROR (DELETE) 2-30

TOTALSPACE (GET) 2-31

INITIATORGROUP (GET) 2-32

INITIATORGROUP (POST) 2-33

INITIATORGROUP (DELETE) 2-34

INITIATOR (POST) 2-35

INITIATOR (DELETE) 2-36

MAPLUN (POST) 2-37

MAPLUN (DELETE) 2-38

MAPLUNAUTO (POST) 2-39

WWN (GET) 2-40

IQN (GET) 2-41

INTERFACES (GET) 2-42

PHYSICALINTERFACES (GET) 2-44

BOND (POST) 2-45

BOND (PUT) 2-47

BOND (DELETE) 2-48

TOGGLEBOND (PUT) 2-49

ENSLAVE (PUT) 2-50

VLAN (POST) 2-51

VLAN (PUT) 2-53

VLAN (DELETE) 2-55

VIRTUALINTERFACE (POST) 2-56

VIRTUALINTERFACE (PUT) 2-58

VIRTUALINTERFACE (DELETE) 2-60

PERFORMANCE – [TYPES] (GET) 2-61

PERFORMANCE – [RESOURCES] (GET) 2-62

PERFORMANCE – [DATA] (GET) 2-63

Page 5: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

Contents

vCisco UCS Invicta API Guide, v1.6

OL-31371-01

FILE (GET) 2-67

Status Codes 2-68

Page 6: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

Contents

viCisco UCS Invicta API Guide, v1.6

Page 7: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

viiCisco UCS Invicta API Guide, v1.6

Preface

OrganizationThis guide includes the following sections:

ConventionsThis document uses the following conventions:

Section Title Description

1 Overview Explains the application programming interface (API) and all of its properties

2 API Methods Provides the APIs and their properties

Convention Indication

bold font Commands and keywords and user-entered text appear in bold font.

italic font Document titles, new or emphasized terms, and arguments for which you supply values are in italic font.

[ ] Elements in square brackets are optional.

{x | y | z } Required alternative keywords are grouped in braces and separated by vertical bars.

[ x | y | z ] Optional alternative keywords are grouped in brackets and separated by vertical bars.

string A nonquoted set of characters. Do not use quotation marks around the string or the string will include the quotation marks.

courier font Terminal sessions and information the system displays appear in courier font.

< > Nonprinting characters such as passwords are in angle brackets.

[ ] Default responses to system prompts are in square brackets.

!, # An exclamation point (!) or a pound sign (#) at the beginning of a line of code indicates a comment line.

Page 8: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

viiiCisco UCS Invicta API Guide, v1.6

PrefaceObtaining Documentation and Submitting a Service Request

Note Means reader take note. Notes contain helpful suggestions or references to material not covered in the manual.

Tip Means the following information will help you solve a problem. The tips information might not be troubleshooting or even an action, but could be useful information, similar to a Timesaver.

Caution Means reader be careful. In this situation, you might perform an action that could result in equipment damage or loss of data.

Timesaver Means the described action saves time. You can save time by performing the action described in the paragraph.

Warning IMPORTANT SAFETY INSTRUCTIONS

This warning symbol means danger. You are in a situation that could cause bodily injury. Before you work on any equipment, be aware of the hazards involved with electrical circuitry and be familiar with standard practices for preventing accidents. Use the statement number provided at the end of each warning to locate its translation in the translated safety warnings that accompanied this device.

SAVE THESE INSTRUCTIONS

Warning Statements using this symbol are provided for additional information and to comply with regulatory and customer requirements.

Obtaining Documentation and Submitting a Service RequestFor information on obtaining documentation, using the Cisco Bug Search Tool (BST), submitting a service request, and gathering additional information, see What’s New in Cisco Product Documentation at: http://www.cisco.com/c/en/us/td/docs/general/whatsnew/whatsnew.html.

Subscribe to What’s New in Cisco Product Documentation, which lists all new and revised Cisco technical documentation, as an RSS feed and deliver content directly to your desktop using a reader application. The RSS feeds are a free service.

Page 9: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

C H A P T E R

1-1Cisco UCS Invicta API Guide, v1.6

1Overview

API StructureThis document explains the application programming interface (API) and all of its properties that can be used to maintain and operate Cisco UCS Invicta Series Solid State Systems.

UCS Invicta Series Solid State Systems API was designed and implemented as RESTful Web Service. All API methods are accessible over HTTPS request using the URL that consists of the following parts:

• The domain: The IP of the Cisco UCS Invicta Series Solid State Systems

• The URI: /restapi/<API_version>/<token>/<methodName>/<URI_reminder>

A URI reminder is not always required but is essential to any methods that are requested over PUT or DELETE.

API VersionsThe <API_version> in the URI (Example: 16) is important for consistent API support and compatibility. As the future enhancements and updates to the API methods are implemented, support for earlier versions is accessible. Each API method will preserve its signature as well as the response data structure under the version it was released, while all enhancements and changes is available under a new API version number.

The <token> URI element is included as a security measure to provide basic level of protection against unauthorized API use. See authenticate method section for all details.

JSONRequired data envelope on input (for POST and PUT request raw data) is JSON object notation labeled ‘data’.

The response object structure consists of envelope_version, status, message and data. Please note that the data portion could be empty if there is no data to return.

Here is a sample output of the raw JSON string following an API method call to find:

{"status":1,"message":"OK","data":{"unitName":"devMachine","apiVer-sions":["15","16"]},"envelope_version":"15"}

Page 10: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

1-2Cisco UCS Invicta API Guide, v1.6

Chapter 1 OverviewAPI Access/Permissions

cURL ExamplesFor cURL usage, please follow the examples below. Note that the <ip_address> and <token> entities should be replaced with the actual IP address and token, respectively.

• GET

curl -k -X GET --url https://<ip_address>/restapi/16/<token>/raidshealth -H "Accept: application/json"

• POST

curl -X POST -d data='{"name":"lun1","vg":"ssd1","size":2,"strip-ing":true}' -k --url https://<ip_address>/restapi/16/<token>/lun -H "Accept: application/json"

• PUT

curl -X PUT -d data='{"size":3}' -k --url https://<ip_ad-dress>/restapi/16/<token>/lun/lun1 -H "Accept: application/json"

• DELETE

curl -X DELETE -d data='{"name":"bond0:1"}' -k --url https://<ip_ad-dress>/restapi/16/<token>/virtualinterface/0 -H "Accept: applica-tion/json"

API Access/PermissionsA user account must be assigned to a role that has been granted API access permission. Permissions for individual API methods are dependent and directly related to a user’s assigned roles and its associated permissions in the UI. For example, if a user is not assigned to a role that has permission to access the LUNs settings page in the UI, that user will also not have access to any of the LUN settings that are related to the LUN setting API methods. Similarly, if a user was assigned a role in the UI that has permission to add and edit LUNs s but does not have LUN delete permission, the same restriction will apply in the API.

Supported HTTP Methods

Supported Incoming Data Formats

Version GET /list POST PUT DELETE

1.5 X X X X

1.6 X X X X

Version JSON XML

1.5 X

1.6 X

Page 11: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

C H A P T E R

2-1Cisco UCS Invicta API Guide, v1.6

2API Methods

This section provides all of the available API methods. Data requirements, expected responses, dependencies, and any other pertinent information are all clearly defined in their respective calls. The information sent within a receivable envelope is handled accordingly to execute the request. Any data sent that is outside of the scope of the API method is ignored.

API Section DefinitionsThe API methods are documented using the sections cited in

Table 2-1 API Section Definitions

API Section Name Description

Method Name The method name is the exact syntax to be used for the API call.

Devices The devices to which the API method applies.

Method The method is the HTTP METHOD sent as part of the request to the device. The method can be POST, PUT, GET, or DELETE.

• To create a resource on the server, use POST.

• To retrieve a resource, use GET.

• To change the state of a resource or to update it, use PUT.

• To remove or delete a resource, use DELETE.

Synopsis The synopsis provides a quick summary of the purpose of the method.

URL Example The URL example is the model in which the API method is called. See the introduction for more details regarding the structure of the URL.

Any PUT and DELETE methods require an extra parameter in the URI. This acts as the unique identifier (ID) of the object that needs to be modified. However, not all PUT or DELETE methods will pass the ID in the URI, as the ID may include an invalid character that would halt the method. Instead, a bogus ID (usually zero) is passed in the URI and the actual ID is sent as data.

Keep in mind that the examples employ an artificial IP address. Substitute the example with the actual IP of the machine.

Page 12: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-2Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsAPI Section Definitions

Request/Response Data The request and response data sections in each method description cover only the data portion of the returning envelope. The data types of all primitives must match according to the details of the method as described in the following pages.

If the response data is of an array type, it is further explained (unless it is one-dimensional).

JSON Sample A JSON sample of the data output is included in the documentation, if applicable.

Dependencies The dependencies listed in each method are the devices or objects that are required to make the method work properly.

Notes The notes are the additional comments that explain and provide clarification of different parts of the method.

API Section Name Description

Page 13: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-3Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsFIND (Get)

FIND (Get)

Method name find

Devices Cisco UCS Invicta Scaling System, Cisco UCS Invicta Appliance

HTTP method GET

Synopsis This method provides auto-discovery functionality. Every Cisco UCS Invicta Series Solid State System can be found by responding to this call.

Note Note: This is the only API method that does not require either version or token to be present in the URI.

URL example https://10.1.39.127/restapi/find

Request data

Response data

JSON Sample {"status":1,"message":"OK","data":{"apiVersion":[15, 16],"unitId":"WT-INV-QA-0000003","device":"INVICTA", "rrVersion":"Version 5.0.0 Release 004","boxSerial":"WT-INV-QA-SSRA-0000003"},"envelope_version":15}

Dependencies n/a

NAME TYPE NOTES

n/a

NAME TYPE NOTESunitId String Device serial number.

apiVersion* Array An array of strings

device

String Information whether the device is Cisco UCS Invicta Scaling System or Cisco UCS Invicta Appliance.

boxSerial String Box serial number.

rrVersion String Currently installed RaceRunner software version.

Page 14: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-4Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsFIND (Get)

Notes • A token is not needed to use this API method call.

• Incoming data is not needed to perform this API method call.

• *apiVersions is returned as an array of strings.

• unitId and boxSerial can be used on Cisco UCS Invicta Scaling System for identification of different SSRs on the same Cisco UCS Invicta Scaling System.

Page 15: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-5Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsAUTHENTICATE (POST)

AUTHENTICATE (POST)

Method name authenticate

Devices Cisco UCS Invicta Scaling System, Cisco UCS Invicta Appliance

HTTP method POST

Synopsis This method returns a 32-bit token that can be used to execute many of the available API methods. Tokens last for up to an hour.

URL example https://10.1.39.127/restapi/16/authenticate

Request data

JSON sample '{"username":"jdoe", "password":"password"}'

Response data

JSON sample "data":{"token":"1234567890xxxxxxxxxxxxxxxxxxxxx"}

Dependencies n/a

Notes • A token is not needed to use this API method call.

• Incoming data is needed to perform this API method call.

• Tokens can be reused as many times as needed until it expires.

NAME TYPE NOTES

username String Required

password String Required

NAME TYPE NOTES

token String Used in tandem to execute specific API calls.

Page 16: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-6Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsUSER (GET)

USER (GET)

Method name user

Devices Cisco UCS Invicta Scaling System, Cisco UCS Invicta Appliance

HTTP method GET

Synopsis Returns user information for the currently logged-in user.

URL example https://10.1.39.127/restapi/16/<token>/user

Request data

Response data

JSON sample "data":{"first_name":"Joe","last_name":”Doe”,"email_address":"[email protected]", “username”, “joedoe”}

Dependencies n/a

Notes • A token must be submitted in the URI to use this API method call.

• Incoming data is not needed to perform this API method call.

NAME TYPE NOTES

n/a

NAME TYPE NOTES

first_name String User’s first name as it is recorded in the system

last_name String User’s last name as it is recorded in the system

email_address String User’s email address as it is recorded in the system

username String User’s login name

Page 17: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-7Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsUSER (PUT)

USER (PUT)

Method name user

Devices Cisco UCS Invicta Scaling System, Cisco UCS Invicta Appliance

HTTP method PUT

Synopsis Change the user information for the current user.

URL example https://10.1.39.127/restapi/16/<token>/user

Request data

json sample {"password":”xxxxx”}

Response data

Dependencies n/a

Notes • A token must be submitted in the URI to use this API method call.

• Incoming data is needed to perform this API method call.

NAME TYPE NOTES

first_name String User’s first name as recorded in the system

last_name String User’s last name as recorded in the system

email_address String User’s email address as recorded in the system

password String User’s password

NAME TYPE NOTES

n/a

Page 18: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-8Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsUNITINFO (GET)

UNITINFO (GET)

Method name unitinfo

Devices Cisco UCS Invicta Scaling System, Cisco UCS Invicta Appliance

HTTP method GET

Synopsis This method returns the model name, unit ID and name, total and available capacity of the unit, uptime, and IP address of the storage device.

URL example https://10.1.39.127/restapi/16/<token>/unitinfo

Request data

Response data

IP Object

JSON sample "data":{"modelName":"INVICTA","unitId":" WT-INV-PROD-0000001","unitName":"SSRA","totalCapacity":1187472557998,"availableCapacity":1143492092887,"systemUptime":"4 days 03:24:15.46","IPs":[{“ipDevice”:”bond1”, “ip”:”192.168.110.116”}]}

Dependencies n/a

NAME TYPE NOTES

n/a

NAME TYPE NOTESmodelName String Name of the device model.

unitId String Device serial number.

unitName String Host name.

totalCapacity Integer Total capacity in Bytes.

availableCapacity Integer Available capacity in Bytes.

systemUptime String System uptime information.

IPs Array An array of IP objects

NAME TYPE NOTESipDevice String Name of the network interface.

ip String An IP assigned to this network interface.

Page 19: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-9Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsUNITINFO (GET)

Notes • A token must be submitted in the URI to use this API method call.

• Incoming data is not needed to perform this API method call.

Page 20: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-10Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsUNITNAME (GET)

UNITNAME (GET)

Method name unitname

Devices Cisco UCS Invicta Scaling System, Cisco UCS Invicta Appliance

HTTP method GET

Synopsis This method returns the unit name of the storage device.

URL example https://10.1.39.127/restapi/16/<token>/unitname

Request data

Response data

JSON sample "data":{"unitName":"SSRA"}

Dependencies n/a

Notes • A token must be submitted in the URI to use this API method call.

• Incoming data is not needed to perform this API method call.

NAME TYPE NOTES

n/a

NAME TYPE NOTESunitName String Host name.

Page 21: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-11Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsUNITNAME (PUT)

UNITNAME (PUT)

Method name unitname

Devices Cisco UCS Invicta Scaling System, Cisco UCS Invicta Appliance

HTTP method PUT

Synopsis This method changes the unit name of the storage device.

URL example https://10.1.39.127/restapi/16/<token>/unitname/0

Request data

JSON sample {"unitName":”HeadOne”}

Response data

Dependencies n/a

Notes • A token must be submitted in the URI to use this API method call.

• Incoming data is needed to perform this API method call.

• The string unitName must be alphanumeric, may include dashes and periods, and cannot be longer than 15 characters.

Note Important: A zero (0) is included as part of the URI to conform to the PUT standards of the API application. Without the fulfilled parameter, the request will fail.

NAME TYPE NOTESunitName String New host name (required)

NAME TYPE NOTES

n/a

Page 22: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-12Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsMODEL (GET)

MODEL (GET)

Method name model

Devices Cisco UCS Invicta Scaling System, Cisco UCS Invicta Appliance

HTTP method PUT

Task IDSynopsis This method returns the model of the device.

URL example https://10.1.39.127/restapi/16/<token>/model

Request data

Response data

JSON sample "data":{"modelName":"INVICTA"}

Dependencies n/a

Notes • A token must be submitted in the URI to use this API method call.

• Incoming data is not needed to perform this API method call.

NAME TYPE NOTES

n/a

NAME TYPE NOTESmodelName String Name of the device model.

Page 23: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-13Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsRAIDHEALTH (GET)

RAIDHEALTH (GET)

Method name raidhealth

Devices Cisco UCS Invicta Scaling System, Cisco UCS Invicta Appliance

HTTP method GET

Synopsis This method returns the health of all RAID units.

URL example https://10.1.39.127/restapi/16/<token>/raidhealth

Request data

Response data

Raids have array keys identical to the name of the actual RAID unit. Within those keys is the informational data about the RAID, with the following:

JSON sample “data":{"nodes":{"SSN1":{"raids":[{"name":"rs0","status":"G"}]},"SSN2":{"raids":[{"name":"rs0","status":"G"},{"name":"rs1","status":"G"},{"name":"rs2","status":"G"}]}

Dependencies n/a

NAME TYPE NOTES

n/a

NAME TYPE NOTESraids Array Explained below

nodes Array

NAME TYPE NOTESname Stringstatus Char G = Good

B = Bad

D = Degraded

R = Recoveringssn String The SSN to which the raid

belongs.

Page 24: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-14Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsRAIDHEALTH (GET)

Notes • A token must be submitted in the URI to use this API method call.

• Incoming data is not needed to perform this API method call.

Page 25: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-15Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsSSN (GET)

SSN (GET)

Method name ssn

Devices Cisco UCS Invicta Scaling System

HTTP method GET

Synopsis Returns a list of SSNs with names and allocation status with the name of the volume group it was allocated to. If there is no allocation status, null is returned

URL example https://10.1.39.127/restapi/16/<token>/ssn

Request data

Response data

Each SSN is represented by an SSN object.SSN Object

JSON sample "data":[{"name":"SSN1","allocation_status":true,"allocated_vg":"vg1"}]

Dependencies n/a

Notes • A token must be submitted in the URI to use this API method call.

NAME TYPE NOTES

n/a

NAME TYPE NOTES

Array An array of SSN objects

NAME TYPE NOTESname String Name of the SSN

allocation_status Bool If SSN is allocated

allocated_vg String||Null Name of the VG to which the SSN is allocated

Page 26: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-16Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsSSN (GET)

• Incoming data is not needed to perform this API method call.

Page 27: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-17Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsVOLUMEGROUP (GET)

VOLUMEGROUP (GET)

Method name volumegroup

Devices Cisco UCS Invicta Scaling System

HTTP method GET

Synopsis Returns a list of all Volume Groups with name, size, available space, list of SSNs and status

URL example https://10.1.39.127/restapi/16/<token>/volumegroup

Request data

Response data

Volume Group Object

JSON sample "data":[{"name":"vg1","size":100000,"size_available":80000,"ssns":["ssn1","ssn2"],"status":"good"}]

Dependencies n/a

Notes • A token must be submitted in the URI to use this API method call.

• Incoming data is not needed to perform this API method call.

NAME TYPE NOTES

n/a

NAME TYPE NOTES

Array Array of Volume Group objects

NAME TYPE NOTESname String The name of the volume groupsize Float The total size of the volume

group in GBsize_available Float Total available space in volume

group in GBssns Array Array of all bound SSNsstatus String Volume group status

Page 28: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-18Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsVOLUMEGROUP (POST)

VOLUMEGROUP (POST)

Method name volumegroup

Devices Cisco UCS Invicta Scaling System

HTTP method POST

Synopsis Creates a volume group.

URL example https://10.1.39.127/restapi/16/<token>/volumegroup

Request data

JSON sample '{"vgname":"vg3", "ssn": ["ssn3", "ssn4"]}'

Response data

Dependencies n/a

Notes • A token must be submitted in the URI to use this API method call.

• Incoming data is needed to perform this API method call.

NAME TYPE NOTESvgName String Name of new volume group

ssn Array Array of SSNs to which new volume group is allocated

NAME TYPE NOTES

n/a

Page 29: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-19Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsVOLUMEGROUP (DELETE)

VOLUMEGROUP (DELETE)

Method name volumegroup

Devices Cisco UCS Invicta Scaling System

HTTP method DELETE

Synopsis Deletes a volume group

URL example https://10.1.39.127/restapi/16/<token>/volumegroup/<existing target volume group>

Request data

Response data

Dependencies n/a

Notes • A token must be submitted in the URI to use this API method call.

• Incoming data is not needed to perform this API method call.

NAME TYPE NOTES

n/a

NAME TYPE NOTES

n/a

Page 30: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-20Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsISCSIAVAILABLE (GET)

ISCSIAVAILABLE (GET)

Method name iscsiavailable

Devices Cisco UCS Invicta Scaling System, Cisco UCS Invicta Appliance

HTTP method GET

Synopsis Returns a list of all available IP addresses not yet assigned.

URL example https://10.1.39.127/restapi/16/<token>/iscsiavailable

Request data

Response data

JSON sample "data": {"ip":["10.127.15.135","192.168.3.17"]}

Dependencies n/a

Notes • A token must be submitted in the URI to use this API method call.

• Incoming data is not needed to perform this API method call.

NAME TYPE NOTES

n/a

NAME TYPE NOTESip Array Array of IP Info Objects

Page 31: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-21Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsISCSIAVAILABLE (PUT)

ISCSIAVAILABLE (PUT)

Method name iscsiavailable

Devices Cisco UCS Invicta Scaling System, Cisco UCS Invicta Appliance

HTTP method PUT

Synopsis Add valid IP addresses to available and remove them from allowed

URL example https://10.1.39.127/restapi/16/<token>/iscsiavailable/0

Request data

JSON sample {"ip": "10.127.15.135"}

Response data

Dependencies n/a

Notes • A token must be submitted in the URI to use this API method call.

Note Important: A zero (0) is included as part of the URI to conform to the PUT standards on the API application. Without the fulfilled parameter, the request will fail.

NAME TYPE NOTESip String IP address

NAME TYPE NOTES

n/a

Page 32: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-22Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsISCSIALLOWED (GET)

ISCSIALLOWED (GET)

Method name iscsiallowed

Devices Cisco UCS Invicta Scaling System, Cisco UCS Invicta Appliance

HTTP method GET

Synopsis Returns a list of all allowed IP addresses

URL example https://10.1.39.127/restapi/16/<token>/iscsiallowed

Request data

Response data

JSON sample "data": {"ip" : ["10.127.15.207", "192.168.3.18"]}

Dependencies n/a

Notes • A token must be submitted in the URI to use this API method call.

• Incoming data is not needed to perform this API method call.

NAME TYPE NOTES

n/a

NAME TYPE NOTESip Array Array of IP address

Page 33: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-23Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsISCSIALLOWED (PUT)

ISCSIALLOWED (PUT)

Method name iscsiallowed

Devices Cisco UCS Invicta Scaling System, Cisco UCS Invicta Appliance

HTTP method PUT

Synopsis Add valid IP addresses to allowed and remove them from available

URL example https://10.1.39.127/restapi/16/<token>/iscsiallowed/0

Request data

JSON sample {"ip":"10.127.15.162"}

Response data

Dependencies n/a

Notes • A token must be submitted in the URI to use this API method call.

Note Important: A zero (0) is included as part of the URI to conform to the PUT standards on the API application. Without the fulfilled parameter, the request will fail.

NAME TYPE NOTESip String IP address

NAME TYPE NOTES

n/a

Page 34: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-24Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsLUN (GET)

LUN (GET)

Method name lun

Devices Cisco UCS Invicta Scaling System, Cisco UCS Invicta Appliance

HTTP method GET

Synopsis This method returns the LUNS of the device.

URL example https://10.1.39.127/restapi/16/<token>/lun

Request data

Response data

LUN records have array keys consisting of the Volume Group and actual LUN name joined by ‘-‘ dash sign. Each record contains following LUN detail information:

NAME TYPE NOTES

n/a

NAME TYPE NOTESluns Array

NAME TYPE NOTESname String LUN name

t10id String LUN T10ID string

lunid String LUN ID

size Integer LUN size

volumegroup String Volume group name this LUN belongs to

mirror String Name of the counterpart in mirroring if applicable

origin

String Origin volume name or LUN which snapshot is associated with. Returns ‘-‘for non-snapshot volumes.

snap_pct

String Shows current percentage of snapshot volume being used. Returns ‘-‘for non-snapshot volumes.

Page 35: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-25Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsLUN (GET)

JSON sample"data":{"luns”:{“VG1-L2":{"name":"L2","lunid":"1987cb76-L2","t10id":"1987cb76-L2","size":10,”volumegroup”:”VG1”,”mirror":"","origin":"-","snap_pct":"-","created":"1409165442","adminStatus”:”1”},”VG1-L3":{"name":"L3","lunid":"198790e0-L3","t10id":"198790e0-L3","size":20,"volumegroup”:”VG1","mirror":"","origin":"-","snap_pct":"-","created":"1409164250","adminStatus":"1"}}}

Dependencies n/a

Notes • A token must be submitted in the URI to use this API method call.

NAME TYPE NOTES

createdString Shows when the snapshot was

created. Returns ‘-‘ for non-snapshot volumes.

adminStatus

Integer 0 – Offline

1 – Online

2 - Degraded

Page 36: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-26Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsLUN (POST)

LUN (POST)

Method name lun

Devices Cisco UCS Invicta Scaling System, Cisco UCS Invicta Appliance

HTTP method POST

Synopsis This method creates a new LUN on the device.

URL example https://10.1.39.127/restapi/16/<token>/lun

Request data

JSON sample '{"name":"lun1", "vg":"vg1", "size":10}'

Response data

Dependencies n/a

Notes • A token must be submitted in the URI to use this API method call.

• The size should be specified in gigabytes (GB). Example: 2 = 2 GB.

NAME TYPE NOTESname String LUN name (required)

vg String Volume group name (required)

sizeInteger LUN size (required)

Value in GB

striping

Boolean Optional

This property is ignored for Cisco UCS Invicta C3124SA Appliance

NAME TYPE NOTES

n/a

Page 37: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-27Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsLUN (PUT)

LUN (PUT)

Method name lun

Devices Cisco UCS Invicta Scaling System, Cisco UCS Invicta Appliance

HTTP method PUT

Synopsis This method increases the LUN size on the device.

URL example https://10.1.39.127/restapi/16/<token>/lun/<name>

Request data

JSON sample {“size”:1234}

Response data

Dependencies n/a

Notes • A token must be submitted in the URI to use this API method call.

• The <name>, submitted in the URI, is the unique name of the LUN that needs to be modified.

• The size (GB) cannot be lower than the previous value.

NAME TYPE NOTESsize Integer Value in GB

Cannot be lower than previous value

NAME TYPE NOTES

n/a

Page 38: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-28Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsLUN (DELETE)

LUN (DELETE)

Method name lun

Devices Cisco UCS Invicta Scaling System, Cisco UCS Invicta Appliance

HTTP method DELETE

Synopsis This method deletes a LUN from the device.

URL example https://10.1.39.127/restapi/16/<token>/lun/<name>

Request data

JSON sample

{“breakMode”:”deleteTarget”}

Response data

Dependencies n/a

Notes • A token must be submitted in the URI to use this API method call.

• Incoming data is not needed to perform this API method call.

• During the LUN deletion process, GUI performance may be negatively affected until the process completes. The larger the LUN, the more time the process may take. We recommend deleting larger LUNs during off-peak hours.

NAME TYPE NOTES

n/a

NAME TYPE NOTES

n/a

Page 39: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-29Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsLUNMIRROR (POST)

LUNMIRROR (POST)

Method name lunmirror

Devices Cisco UCS Invicta Scaling System

HTTP method POST

Synopsis Create a mirror of an existing LUN.

URL example https://10.1.39.127/restapi/16/<token>/lunmirror

Request data

JSON sample '{"lun":"lun1", "mirror":"lun1mirror", "vg":"vg1"}'

Response data

Dependencies n/a

Notes • A token must be submitted in the URI to use this API method call.

• Depending on the size of the LUN, it may take some time to receive a response from this call.

NAME TYPE NOTESlun String The LUN being mirrored

mirror String Name of the new LUN as a result of the mirror

vg String Name of available VG different than VG used by source LUN

NAME TYPE NOTES

n/a

Page 40: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-30Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsLUNMIRROR (DELETE)

LUNMIRROR (DELETE)

Method name lunmirror

Devices Cisco UCS Invicta Scaling System

HTTP method DELETE

Synopsis Break a LUN mirror

URL example https://10.1.39.127/restapi/16/<token>/lunmirror/<lun id>

Request data

JSON sample ‘{“breakMode”:”deleteTarget”}’

Response data

Dependencies n/a

Notes • A token must be submitted in the URI to use this API method call.

• Incoming data is not needed to perform this API method call.

• The LUN name, not the LUN mirror name, is passed in this call.

NAME TYPE NOTESbreakMode string Break mode:

keep – breaks mirror and keeps both luns

deleteTarget – breaks mirror and deletes target lun

deleteSource – breaks mirror and deletes source lun

NAME TYPE NOTES

n/a

Page 41: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-31Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsTOTALSPACE (GET)

TOTALSPACE (GET)

Method name totalspace

Devices Cisco UCS Invicta Scaling System, Cisco UCS Invicta Appliance

HTTP method GET

Synopsis This method returns the total space available on the entire device.

URL example https://10.1.39.127/restapi/16/<token>/totalspace

Request data

Response data

JSON sample "data":[{"name":"vg1","freeSpace":"822"},{"name":"vg2","freeSpace":"818"}]

Dependencies n/a

Notes • A token must be submitted in the URI to use this API method call.

• Incoming data is not needed to perform this API method call.

NAME TYPE NOTES

n/a

NAME TYPE NOTES

Array List of all volume groups

name String

freeSpace Integer Calculated in GBs

Page 42: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-32Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsINITIATORGROUP (GET)

INITIATORGROUP (GET)

Method name initiatorgroup

Devices Cisco UCS Invicta Scaling System, Cisco UCS Invicta Appliance

HTTP method GET

Synopsis This method returns all initiator groups with list of all initiators and assigned LUNs.

URL example https://10.1.39.127/restapi/16/<token>/initiatorgroup

Request data

Response data

JSON sample "data":[{"name":"IGsomename","initiators":[],"luns":["dev1:0"]},{"name":"vmwaretest","initia-tors":["iqn.1998-01.com.vmware:wt-lab-esx01-2229f4c5"],"luns":["dev:3","dev1:0"]}]

Dependencies n/a

Notes • A token must be submitted in the URI to use this API method call.

• Incoming data is not needed to perform this method call.

NAME TYPE NOTES

n/a

NAME TYPE NOTES

Array List of all initiator groups

name String Initiator group name

initiators Array of strings List of all initiators that belong to this particular initiator group

lunsArray of strings List of all LUNs that are

assigned to this particular initiator group

Page 43: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-33Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsINITIATORGROUP (POST)

INITIATORGROUP (POST)

Method name initiatorgroup

Devices Cisco UCS Invicta Scaling System, Cisco UCS Invicta Appliance

HTTP method POST

Synopsis This method adds an initiator group on the device.

URL example https://10.1.39.127/restapi/16/<token>/initiatorgroup

Request data

JSON sample {“name”:”IG123”}

Response data

Dependencies n/a

Notes • A token must be submitted in the URI to use this API method call.

• Incoming data is needed to perform this method call.

NAME TYPE NOTES

name String Required

It is checked for uniqueness

NAME TYPE NOTES

n/a

Page 44: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-34Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsINITIATORGROUP (DELETE)

INITIATORGROUP (DELETE)

Method name initiatorgroup

Devices Cisco UCS Invicta Scaling System, Cisco UCS Invicta Appliance

HTTP method DELETE

Synopsis This method deletes an initiator group on the device.

URL example https://10.1.39.127/restapi/16/<token>/initiatorgroup/<group>

Request data

Response data

Dependencies n/a

Notes • A token must be submitted in the URI to use this API method call.

• The <group> is the unique name of the initiator group that is removed from the device.

NAME TYPE NOTES

n/a

NAME TYPE NOTES

n/a

Page 45: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-35Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsINITIATOR (POST)

INITIATOR (POST)

Method name Initiator

Devices Cisco UCS Invicta Scaling System, Cisco UCS Invicta Appliance

HTTP method POST

Synopsis This method creates an initiator for an initiator group on the device.

URL example https://10.1.39.127/restapi/16/<token>/initiator

Request data

JSON sample {“name”:”IG123”, “initiator”:”iqn.1998-01.com.vmware:wt-lab-esx01-2229f4c5”}

Response data

Dependencies At least one initiator group must be available to use this method.

Notes • A token must be submitted in the URI to use this API method call.

• The name is the unique name of the initiator group that the initiator is added to.

• There are 3 different formats supported for initiator string:

• Specific IQN format for iSCSI connection

• “Colon-separated” hex notation of WWN for FC connection

• “0X” hex notation of WWN for IB connection

NAME TYPE NOTESname String Required

Name of the initiator groupinitiator String Required

Checked for unique assignment – initiator can only be assigned to one group

NAME TYPE NOTES

n/a

Page 46: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-36Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsINITIATOR (DELETE)

INITIATOR (DELETE)

Method name initiator

Devices Cisco UCS Invicta Scaling System, Cisco UCS Invicta Appliance

HTTP method DELETE

Synopsis This method deletes an initiator from an initiator group on the device.

URL example https://10.1.39.127/restapi/16/<token>/initiator/<initiator_group>

Request data

JSON sample {“name”:”iqn.1998-01.com.vmware:wt-lab-esx01-2229f4c5”}

Response data

Dependencies n/a

Notes • A token must be submitted in the URI to use this API method call.

• The name is the initiator string specifying the initiator that is deleted from the <initiator_group>, submitted in the URI.

NAME TYPE NOTESname String Required

NAME TYPE NOTES

n/a

Page 47: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-37Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsMAPLUN (POST)

MAPLUN (POST)

Method name maplun

Devices Cisco UCS Invicta Scaling System, Cisco UCS Invicta Appliance

HTTP method POST

Synopsis This method creates a LUN mapping on the initiator group level.

URL example https://10.1.39.127/restapi/16/<token>/maplun

Request data

JSON sample {“name”:”IG123”, “lunName”:”lunt1”, “id”:3}

Response data

Dependencies To utilize this method, a LUN and an initiator group must exist on the device.

Notes • A token must be submitted in the URI to use this API method call.

• The name is the unique name of the initiator group.

• The lunName is the unique name of the LUN that is mapped to the initiator group.

• If there is no mapping with ID 0 (zero) present for the initiator group and id field in this request contains different number then 0 (zero), an error will be returned.

NAME TYPE NOTESname String Initiator group name – Required

lunName String LUN name – Required

id Integer Value between 0 and 255 Required

NAME TYPE NOTES

n/a

Page 48: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-38Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsMAPLUN (DELETE)

MAPLUN (DELETE)

Method name maplun

Devices Cisco UCS Invicta Scaling System, Cisco UCS Invicta Appliance

HTTP method DELETE

Synopsis This method deletes a LUN mapping on the initiator group level.

URL example https://10.1.39.127/restapi/16/<token>/maplun/<lun_name>

Request data

JSON sample {“name”:”IG123”, “force_mapid0_delete“:true}

Response data

Dependencies n/a

Notes • A token must be submitted in the URI to use this API method call.

• The name is the unique name of the initiator group.

• The lun_name is the unique name of the LUN that is unmapped from the initiator group.

NAME TYPE NOTESname String Initiator group name – Required

force_mapid0_delete

Boolean Optional

If the LUN that will be unmapped has a MAP ID of 0, a warning is returned indicating MAP ID 0 is to be unmapped. Send this parameter to override warning.

NAME TYPE NOTES

n/a

Page 49: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-39Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsMAPLUNAUTO (POST)

MAPLUNAUTO (POST)

Method name maplunauto

Devices Cisco UCS Invicta Scaling System, Cisco UCS Invicta Appliance

HTTP method POST

Synopsis This method creates a LUN mapping on the initiator group level.

URL example https://10.1.39.127/restapi/16/<token>/maplunauto

Request data

JSON sample {“name”:”IG123”, “lunName”:”lunt1”}

Response data

Dependencies To utilize this method, a LUN and initiator group must exist on the device.

Notes • A token must be submitted in the URI to use this API method call.

• The name is the unique name of the initiator group.

• The lunName is the unique name of the LUN that is mapped to the initiator group.

• Next available mapping ID is being picked automatically.

NAME TYPE NOTESname String Initiator group name – Required

lunName String LUN name – Required

NAME TYPE NOTES

n/a

Page 50: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-40Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsWWN (GET)

WWN (GET)

Method name wwn

Devices Cisco UCS Invicta Scaling System, Cisco UCS Invicta Appliance

HTTP method GET

Synopsis This method gets the Worldwide Name (WWN) of the device.

URL example https://10.1.39.127/restapi/16/<token>/wwn

Request data

Response data

JSON sample “data”:{“wwns”:[{“0”:”21:00:00:24:ff:39:fa:98”},{“1”:” 21:00:00:24:ff:39:fa:99”}]}

Dependencies n/a

Notes • A token must be submitted in the URI to use this API method call.

NAME TYPE NOTES

n/a

NAME TYPE NOTESwwns Array An array of strings

Page 51: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-41Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsIQN (GET)

IQN (GET)

Method name iqn

Devices Cisco UCS Invicta Scaling System, Cisco UCS Invicta Appliance

HTTP method GET

Synopsis This method gets the iSCSI Qualified Name (IQN) of the device.

URL example https://10.1.39.127/restapi/16/<token>/iqn

Request data

Response data

JSON sample "data":{"iqn.2008-07.com.WHIPTAILtech:storage"}

Dependencies n/a

Notes • A token must be submitted in the URI to use this API method call.

NAME TYPE NOTES

n/a

NAME TYPE NOTESiqn String iSCSI Qualified Name

Page 52: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-42Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsINTERFACES (GET)

INTERFACES (GET)

Method name interfaces

Devices Cisco UCS Invicta Scaling System, Cisco UCS Invicta Appliance

HTTP method GET

Synopsis This method gets all of the interfaces on the device.

URL example https://10.1.39.127/restapi/16/<token>/interfaces

Request data

Response data

interfaces has array keys identical to the name of the actual interface Each record contains following interface detail information:

NAME TYPE NOTES

n/a

NAME TYPE NOTESinterfaces* Array Array of Interfaces

NAME TYPE NOTESname String Interface namemtu Integer Maximum Transmission Unitstatus String Interface statusip String Interface IPmac String Interface MAC addressmask String Interface network maskspeed String Only for physical devicesinterfaces Array An array of strings

Only for logical (bonds)

maxSpeed String Only for physical devicesduplex String Only for physical devicesonboot String ”Yes” or “No”mode Integer Empty is returned for Virtuals

and Vlans.vlan Boolean TRUE if this is vlan

Page 53: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-43Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsINTERFACES (GET)

JSON sample"data":{"interfaces":{"bond0":{"name":"bond0","status":"UP","ip":"10.10.15.215","speed":"1000\/FULL","mtu":"1500","mask":"255.255.255.0","onBoot":"yes","mode":"6","maxSpeed":null,"vlan":false,"virtualinterface":false,"interfaces":["eth0"],"duplex":"FULL","mac":"00:50:56:B1:4E:FD"},"bond0.1":{"name":"bond0.1","status":"UP","ip":"10.10.15.223","speed":"UNKNOWN","mtu":"1500","mask":"255.255.255.0","onBoot":"yes","mode":"","maxSpeed":null,"vlan":true,"virtualinterface":false,"interfaces":[],"duplex":null,"mac":"00:50:56:B1:4E:FD"},"bond0:0":{"name":"bond0:0","status":"DOWN","ip":"10.10.15.224","speed":"UNKNOWN","mtu":"1500","mask":"255.255.255.0","onBoot":"yes","mode":"","maxSpeed":null,"vlan":false,"virtualinterface":true,"interfaces":[],"duplex":null,"mac":"00:50:56:B1:4E:FD"},"bond100":{"name":"bond100","status":"UP","ip":"10.90.90.2","speed":"1000\/FULL","mtu":"1500","mask":"255.255.255.0","onBoot":"yes","mode":"6","maxSpeed":null,"vlan":false,"virtualinterface":false,"inter-faces":["eth1"],"duplex":"FULL","mac":"00:50:56:B1:02:5A"}}}

Dependencies n/a

Notes • A token must be submitted in the URI to use this API method call.

virtualinterface Boolean TRUE if this is virtual interfacelabel String Applies only to un-bonded

interfacesmac String Mac address of un-bonded

interfacestatus String Applies only to un-bonded

interfacespeed Applies only to un-bonded

interface

N/A since there is no status data until the interface becomes bonded.

performance String Applies only to un-bonded interface

N/A since there is no performance data until the interface becomes bonded.

type String Applies only to un-bonded interface

The type of connection:TWISTED PAIRFIBREDIRECT ATTACH COPPER

Page 54: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-44Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsPHYSICALINTERFACES (GET)

PHYSICALINTERFACES (GET)

Method name physicalinterfaces

Devices Cisco UCS Invicta Scaling System, Cisco UCS Invicta Appliance

HTTP method GET

Synopsis This method gets all of the unbonded physical interfaces on the device.

URL example https://10.1.39.127/restapi/16/<token>/physicalinterfaces

Request data

Response data

interfaces has array keys identical to the name of the actual interface Each record contains following interface detail information:

JSON sample "data":{"interfaces":[{"name":"eth5"},{"name":"eth6"}]]}

Dependencies n/a

Notes • A token must be submitted in the URI to use this API method call.

NAME TYPE NOTES

n/a

NAME TYPE NOTESinterfaces* Array Array of Interfaces

NAME TYPE NOTESname String Interface name

Page 55: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-45Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsBOND (POST)

BOND (POST)

Method name bond

Devices Cisco UCS Invicta Scaling System, Cisco UCS Invicta Appliance

HTTP method POST

Synopsis This method creates a new bond.

URL example https://10.1.39.127/restapi/16/<token>/bond

Request data

JSON sample '{"ip":"10.10.10.120","mask":"255.255.255.0","mtu":1505,"mode":4,"onboot":false}'

Response data

JSON sample “data”:{“name”:”bond1”}

Dependencies n/a

NAME TYPE NOTESip String Bond IP

mask String Bond network mask

mtu Integer Maximum Transmission Unitmode Integer Mode code – Required

0= Round-robin

1= Active Backup

4 = LACP

6 = ALB

onbootBoolean Initialize on boot – Required

TRUE or FALSE

NAME TYPE NOTESname String

Page 56: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-46Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsBOND (POST)

Notes • A token must be submitted in the URI to use this API method call.

Page 57: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-47Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsBOND (PUT)

BOND (PUT)

Method name bond

Devices Cisco UCS Invicta Scaling System, Cisco UCS Invicta Appliance

HTTP method PUT

Synopsis This method updates an existing bond.

URL example https://10.1.39.127/restapi/16/<token>/bond/<bond_name>

Request data

JSON sample '{"ip":"10.10.10.120","mask":"255.255.255.0","mtu":1505,"mode":4,"onboot":false}'

Response data

Dependencies n/a

Notes • A token must be submitted in the URI to use this API method call.

• The bond_name in the URI is the unique name of the bond/device.

NAME TYPE NOTESip String Bond IP –Requiredmask String Bond network mask – Requiredmtu Integer Maximum Transmission Unit –

Requiredmode Integer Mode code – Required

0= Round-robin

1= Active Backup

4 = LACP

6 = ALBonboot Boolean Initialize on boot – Required

TRUE or FALSE

NAME TYPE NOTES

n/a

Page 58: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-48Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsBOND (DELETE)

BOND (DELETE)

Method name bond

Devices Cisco UCS Invicta Scaling System, Cisco UCS Invicta Appliance

HTTP method DELETE

Synopsis This method deletes an existing bond.

URL example https://10.1.39.127/restapi/16/<token>/bond/<bond_name>

Request data

Response data

Dependencies n/a

Notes • A token must be submitted in the URI to use this API method call.

• The bond_name in the URI is the unique name of the bond/device.

NAME TYPE NOTES

n/a

NAME TYPE NOTES

n/a

Page 59: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-49Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsTOGGLEBOND (PUT)

TOGGLEBOND (PUT)

Method name togglebond

Devices Cisco UCS Invicta Scaling System, Cisco UCS Invicta Appliance

HTTP method PUT

Synopsis This method enables/disables a bond device

URL example https://10.1.39.127/restapi/16/<token>/togglebond/<bond_name>

Request data

JSON sample '{"toggleState":"enable"}'

Response data

Dependencies n/a

Notes • A token must be submitted in the URI to use this API method call.

• The bond_name in the URI is the unique name of the bond/device.

NAME TYPE NOTEStoggleState String Action indicator -Required

enable or disable

NAME TYPE NOTES

n/a

Page 60: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-50Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsENSLAVE (PUT)

ENSLAVE (PUT)

Method name enslave

Devices Cisco UCS Invicta Scaling System, Cisco UCS Invicta Appliance

HTTP method PUT

Synopsis This method adds or removes physical interface to an existing bond.

URL example https://10.1.39.127/restapi/16/<token>/enslave/<bond_name>

Request data

JSON sample‘{“nicName”:”eth4”, “action”:”add”}’

Response data

Dependencies n/a

Notes • A token must be submitted in the URI to use this API method call.

• The bond_name in the URI is the unique name of the bond/device.

NAME TYPE NOTESnicName String Physical interface name e.g.

eth2action String add or remove

NAME TYPE NOTES

n/a

Page 61: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-51Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsVLAN (POST)

VLAN (POST)

Method name vlan

Devices Cisco UCS Invicta Scaling System, Cisco UCS Invicta Appliance

HTTP method POST

Synopsis This method creates a new VLAN.

URL example https://10.1.39.127/restapi/16/<token>/vlan

Request data

JSON sample ‘{"name":"bond0","vlanID":1,"ip":"10.10.15.221","mask":"255.255.255.0","mtu":1500,"onboot":true,"force":true}’

Response data

Dependencies To utilize this method, a bond must exist on the device.

NAME TYPE NOTESname String “Parent” interface name –

RequiredvlanID Integer VLAN ID – Required

Value between 1 and 4096ip String VLAN IP – Requiredmask String VLAN network mask –

Requiredmtu Integer Maximum Transmission Unit –

Requiredonboot Boolean Initialize on boot – Required

TRUE or FALSEforce Boolean If set to TRUE a check if IP is

already in use is omitted – Optional

TRUE or FALSE

NAME TYPE NOTES

n/a

Page 62: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-52Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsVLAN (POST)

Notes • A token must be submitted in the URI to use this API method call.

• The name is the unique name of the bond/device.

• An error with status code 391 will be returned for any IP that can reply to a PING as an API will assume that the IP is already in use. The IP can still be used by sending the call again using the ‘force’ parameter.

Page 63: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-53Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsVLAN (PUT)

VLAN (PUT)

Method name vlan

Devices Cisco UCS Invicta Scaling System, Cisco UCS Invicta Appliance

HTTP method PUT

Synopsis This method updates an existing VLAN.

URL example https://10.1.39.127/restapi/16/<token>/vlan/0

Request data

JSON sample ‘{"name":"bond0.1","ip":"10.10.15.222","mask":"255.255.255.0","mtu":1500,"onboot":true,"force":true}’

Response data

Dependencies n/a

Notes • A token must be submitted in the URI to use this API method call.

• The name is the unique name of the bond/device and the vlanID joined by a period (Example: bond0.1234).

NAME TYPE NOTESname String VLAN name – Requiredip String VLAN IP – Requiredmask String VLAN network mask –

Requiredmtu Integer Maximum Transmission Unit –

Requiredonboot Boolean Initialize on boot – Required

TRUE or FALSEforce Boolean If set to TRUE a check if IP is

already in use is omitted – Optional

TRUE or FALSE

NAME TYPE NOTES

n/a

Page 64: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-54Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsVLAN (PUT)

• An error with status code 391 will be returned for any IP that can reply to a PING as an API will assume that the IP is already in use. The IP can still be used by sending the call again using the ‘force’ parameter.

Note Important: A zero (0) is included as part of the URI to conform to the PUT standards of the API application. Without the fulfilled parameter, the request will fail.

Page 65: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-55Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsVLAN (DELETE)

VLAN (DELETE)

Method name vlan

Devices Cisco UCS Invicta Scaling System, Cisco UCS Invicta Appliance

HTTP method DELETE

Synopsis This method deletes an existing VLAN.

URL example https://10.1.39.127/restapi/16/<token>/vlan/0

Request data

JSON sample {"name":"bond3.1”}

Response data

Dependencies n/a

Notes • A token must be submitted in the URI to use this API method call.

• The name is the unique name of the bond/device and the vlanID joined by a period (Example: bond0.1234).

Note Important: A zero (0) is included as part of the URI to conform to the DELETE standards of the API application. Without the fulfilled parameter, the request will fail.

NAME TYPE NOTESname String

NAME TYPE NOTES

n/a

Page 66: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-56Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsVIRTUALINTERFACE (POST)

VIRTUALINTERFACE (POST)

Method name virtualinterface

Devices Cisco UCS Invicta Scaling System, Cisco UCS Invicta Appliance

HTTP method POST

Synopsis This method creates a virtual interface.

URL example https://10.1.39.127/restapi/16/<token>/virtualinterface

Request data

JSON sample ‘{"name":"bond0","ip":"10.10.15.226","mask":"255.255.255.0","mtu":1500,"onboot":true,"force":true}’

Response data

Dependencies To utilize this method, a bond must exist on the device.

NAME TYPE NOTES

name String “Parent” interface name – Required

ip String Virtual interface IP – Required

mask String Virtual interface network mask – Required

mtu Integer Maximum Transmission Unit – Required

onbootBoolean Initialize on boot – Required

TRUE or FALSE

force

Boolean If set to TRUE a check if IP is already in use is omitted – Optional Required

TRUE or FALSE

NAME TYPE NOTES

n/a

Page 67: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-57Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsVIRTUALINTERFACE (POST)

Notes • A token must be submitted in the URI to use this API method call.

• The name is the unique name of the bond/device.

• An error with status code 391 will be returned for any IP that can reply to a PING as API will assume the IP is already in use. The IP can still be used by sending the call again using the ‘force’ parameter.

Page 68: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-58Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsVIRTUALINTERFACE (PUT)

VIRTUALINTERFACE (PUT)

Method name virtualinterface

Devices Cisco UCS Invicta Scaling System, Cisco UCS Invicta Appliance

HTTP method PUT

Synopsis This method updates a virtual interface.

URL example https://10.1.39.127/restapi/16/<token>/virtualinterface/0

Request data

JSON sample ‘{"name":"bond0:0","ip":"10.10.15.227","mask":"255.255.255.0","mtu":1500,"onboot":true,"force":true}’

Response data

Dependencies n/a

Notes • A token must be submitted in the URI to use this API method call.

• The name is the unique name of the bond/device and the assigned ID joined by a colon (Example: bond1:1).

NAME TYPE NOTES

name String Virtual interface name – Required

ip String Virtual interface IP – Required

mask String Virtual interface network mask – Required

mtu Integer Maximum Transmission Unit – Required

onbootBoolean Initialize on boot – Required

TRUE or FALSE

force

Boolean If set to TRUE a check if IP is already in use is omitted – Optional

TRUE or FALSE

NAME TYPE NOTES

n/a

Page 69: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-59Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsVIRTUALINTERFACE (PUT)

• An error with status code 391 will be returned for any IP that can reply to a PING as an API will assume that the IP is already in use. The IP can still be used by sending the call again using the ‘force’ parameter.

Note Important: A zero (0) is included as part of the URI to conform to the PUT standards of the API application. Without the fulfilled parameter, the request will fail.

Page 70: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-60Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsVIRTUALINTERFACE (DELETE)

VIRTUALINTERFACE (DELETE)

Method name virtualinterface

Devices Cisco UCS Invicta Scaling System, Cisco UCS Invicta Appliance

HTTP method DELETE

Synopsis This method deletes a virtual interface.

URL example https://10.1.39.127/restapi/16/<token>/virtualinterface/0

Request data

JSON sample {"name":"bond0:1”}

Response data

Dependencies n/a

Notes • A token must be submitted in the URI to use this API method call.

• The name is the unique name of the bond/device and the assigned ID joined by a colon (Example: bond1:1).

Note Important: A zero (0) is included as part of the URI to conform to the DELETE standards of the API application. Without the fulfilled parameter, the request will fail.

NAME TYPE NOTESname String Virtual interface name –

Required

NAME TYPE

n/a

Page 71: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-61Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsPERFORMANCE – [TYPES] (GET)

PERFORMANCE – [TYPES] (GET)

Method name performance

Devices Cisco UCS Invicta Scaling System, Cisco UCS Invicta Appliance

HTTP method GET

Synopsis This method retrieves types of available performance logs.

URL example https://10.1.39.127/restapi/16/<token>/performance/types

Request data

URL request sample curl -k -X GET --url 'https://10.10.15.181/restapi/16/<token>/perfor-mance/types' -H "Accept: application/json"

Response data

JSON sample "data":{"types":["bricks","luns","networkphysical","networkvirtual"]}

Dependencies n/a

Notes • A token must be submitted in the URI to use this API method call.

NAME TYPE NOTESn/a

NAME TYPE NOTES

Array An array of available types

Page 72: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-62Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsPERFORMANCE – [RESOURCES] (GET)

PERFORMANCE – [RESOURCES] (GET)

Method name performance

Devices Cisco UCS Invicta Scaling System, Cisco UCS Invicta Appliance

HTTP method GET

Synopsis This method retrieves available resources for the specified performance log type.

URL example https://10.1.39.127/restapi/16/<token>/performance/resources/type/<type>

Request data

URL request sample curl -k -X GET --url 'https://10.10.15.181/restapi/16/<token>/perfor-mance/resources/type/bricks' -H "Accept: application/json"

Response data

JSON response "data":{"type":"bricks","resources":["all","ssb1","ssb2"]}

Dependencies The list of the available performance log types can be retrieved by API method PERFORMANCE – TYPES.

Notes • A token must be submitted in the URI to use this API method call.

NAME TYPE NOTEStype String Name of the performance log

type.

NAME TYPE NOTES

type String Name of performance log type

resources Array An array of available resources for the given type

Page 73: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-63Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsPERFORMANCE – [DATA] (GET)

PERFORMANCE – [DATA] (GET)

Method name performance

Devices Cisco UCS Invicta Scaling System, Cisco UCS Invicta Appliance

HTTP method GET

Synopsis This method retrieves data for the specified type and resource.

URL example https://10.1.39.127/restapi/16/<token>/performance/data/type/<type>/name/<name>/start/<start>/finish/<finish>/format/<format>

Request data

URL request sample curl -k -X GET --url 'https://10.10.15.181/restapi/16/<token>/perfor-mance/data/type/bricks/name/all/start/2013-08-02%2012:33:00/finish/2013-08-02%2012:34:00/format/raw' -H 'Accept: application/json'

Response data Response data varies depending on requested performance log type and returning format.

NAME TYPE NOTEStype String Name of the performance log

type:

bricks, luns, networkphysical, networkvirtual

name String Name of the resource

For lun resource, the lun name given in format

“<vgname>~<lunname>”start Datetime Beginning of the time range

given in format

“yyyy-mm-dd HH:MM:ss”finish Datetime Ending of the time range given

in format

“yyyy-mm-dd HH:MM:ss” format String Optional parameter.

Specifies return format:

raw, json, zip

Page 74: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-64Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsPERFORMANCE – [DATA] (GET)

Type: bricks, luns

Format: raw

Response data:

JSON response sample

"data":"["1375461181,0.0,0.0,0.00","1375461186,0.0,0.0,0.00","1375461191,0.0,0.0,0.00","1375461196,0.0,0.0,0.00","1375461201,0.0,0.0,0.00","1375461206,0.0,0.0,0.00","1375461211,0.0,0.0,0.00","1375461216,0.0,0.0,0.00","1375461221,0.0,0.0,0.00","1375461226,0.0,0.0,0.00","1375461231,0.0,0.0,0.00","1375461236,0.0,0.0,0.00"]"

Type: networkphysical, networkvirtual

Format: raw

Response data:

JSON response sample

"data":"["1375288381,10.0,3.0,0.5,0.0","1375288386,11.0,3.0,0.5,0.0","1375288391,7.0,3.0,0.0,0.0","1375288396,6.5,3.0,0.0,0.0","1375288401,7.0,3.0,0.0,0.0","1375288406,5.5,3.0,0.0,0.0","1375288411,9.0,3.0,0.5,0.0","1375288416,11.5,3.0,0.5,0.0","1375288421,6.5,3.0,0.0,0.0","1375288426,4.0,3.0,0.0,0.0","1375288431,6.0,3.0,0.0,0.0","1375288436,8.5,3.0,0.0,0.0"]"

Type: bricks, luns

Format: json

Response data:

The structure of the array item:

JSON response sample

NAME TYPE NOTES

Array An array of raw data

Format:

Unixdatetime, MBs, IOPS, Latency

NAME TYPE NOTES

Array An array of raw data.

Format:

Unixdatetime, rxpck, txpck, rxkb, txkb

NAME TYPE NOTES

Array DateTime in Unix Format

NAME TYPE NOTES

mbs Float

iops Float

latency Float

Page 75: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-65Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsPERFORMANCE – [DATA] (GET)

"data":"{"1375461181":{"mbs":0,"iops":0,"latency":0},"1375461186":{"mbs":0,"iops":0,"latency":0},"1375461191":{"mbs":0,"iops":0,"latency":0},"1375461196":{"mbs":0,"iops":0,"latency":0},"1375461201":{"mbs":0,"iops":0,"latency":0},"1375461206":{"mbs":0,"iops":0,"latency":0},"1375461211":{"mbs":0,"iops":0,"latency":0},"1375461216":{"mbs":0,"iops":0,"latency":0},"1375461221":{"mbs":0,"iops":0,"latency":0},"1375461226":{"mbs":0,"iops":0,"latency":0},"1375461231":{"mbs":0,"iops":0,"latency":0},"1375461236":{"mbs":0,"iops":0,"latency":0}}"

Type: networkphysical, networkvirtual

Format: json

Response data:

The structure of the array item:

JSON response sample

"data":"{"1375288381":{"rxpck":10,"txpck":3,"rxkb":0.5,"txkb":0},"1375288386":{"rxpck":11,"txpck":3,"rxkb":0.5,"txkb":0},"1375288391":{"rxpck":7,"txpck":3,"rxkb":0,"txkb":0},"1375288396":{"rxpck":6.5,"txpck":3,"rxkb":0,"txkb":0},"1375288401":{"rxpck":7,"txpck":3,"rxkb":0,"txkb":0},"1375288406":{"rxpck":5.5,"txpck":3,"rxkb":0,"txkb":0},"1375288411":{"rxpck":9,"txpck":3,"rxkb":0.5,"txkb":0},"1375288416":{"rxpck":11.5,"txpck":3,"rxkb":0.5,"txkb":0},"1375288421":{"rxpck":6.5,"txpck":3,"rxkb":0,"txkb":0},"1375288426":{"rxpck":4,"txpck":3,"rxkb":0,"txkb":0},"1375288431":{"rxpck":6,"txpck":3,"rxkb":0,"txkb":0},"1375288436":{"rxpck":8.5,"txpck":3,"rxkb":0,"txkb":0}}"

Type: any

Format: zip

Response data:

JSON response sample

"data":"{"file":"perf_bricks_all_20130802123300_20130802123400.log.gz"}"

To retrieve zip file FILE API method should be used.

NAME TYPE NOTES

Array DateTime in Unix Format

NAME TYPE NOTES

rxpck Float

txpck Float

rxkb Float

txkb Float

NAME TYPE NOTES

file String Filename

Page 76: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-66Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsPERFORMANCE – [DATA] (GET)

Dependencies The list of the available performance log types can be retrieved by API method PERFORMANCE – TYPES.

The available resources can be retrieved by API method PERFORMANCE – RESOURCES.

Notes • A token must be submitted in the URI to use this API method call.

• The slash character must be substituted when the resource name lun is returned in the form of <vgname>/<lunname> (for example, the escaped slash character in the JSON format “vg1\/lun1”). In this instance the URL encoding will not work because while the URL is being processed internally, the ‘%2F’ sequence is already translated back into ‘/’ (slash) and the system tries to route the request to a non-existent location for response processing.

For this reason ‘~’ (tilde) was selected as a character to substitute for the ‘/’ (slash) in the following example:

‘vg1/lun1’ lun-resource name “vg1~lun1”

Page 77: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-67Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsFILE (GET)

FILE (GET)

Method name file

Devices Cisco UCS Invicta Scaling System, Cisco UCS Invicta Appliance

HTTP method GET

HTTP header Accept: application/octet-stream

Synopsis This method downloads the file.

URL example https://10.1.39.127/restapi/16/<token>/file/<filename>

Request data

URL request sample curl -k -O -X GET --url 'https://10.10.15.181/restapi/16/<token>/file/per-f_bricks_all_20130802123300_20130802123400.log.gz' -H "Accept: applica-tion/octet-stream"

Response data Streams the binary data.

Dependencies The list of the available performance log types can be retrieved by API method PERFORMANCE – DATA with specified data format as zip.

Notes • A token must be submitted in the URI to use this API method call.

• In curl option –O should be specified in order to accept the filename same as source.

NAME TYPE NOTESfilename String File name from the

PERFORMANCE – DATA when zip format was specified.

Page 78: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-68Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsStatus Codes

Status CodesThe Table 2-2 lists status codes.

Table 2-2 Status Codes

CODE MESSAGE

1 OK.

2 OK – method deprecated.

100 Invalid data format.

101 HTTP method <type> not supported for <function> REST method.

102 Invalid credentials.

103 Not enough permissions.

104 Unexpected call.

105 Internal API Error.

106 Unsupported method for this device type.

107 Resource not found.

121 Validation for <function> has failed. Check <primitive> for correct data type/format.

320 Failed to delete Initiator Group.

321 Invalid Initiator Group ID.

322 Failed to create Initiator Group.

323 Initiator Group ID already exists.

324 Initiator is invalid.

325 Failed to add Initiator.

326 Failed to remove Initiator.

327 LUNS or NFS Volumes present in Volume Group. Failed to delete Volume Group.

328 Volume group does not exist. Failed to delete volume group.

329 Failed to delete Volume Group.

330 Partner has a lock. Failed to create volume group.

331 Failed to create Volume Group.

332 Failed to rename volume group.

333 Invalid Volume Group. Failed to create LUN.

334 Invalid Device Group. Failed to create LUN.

335 This LUN cannot be striped. Failed to create LUN.

336 The LUN name is not available. Failed to create LUN.

337 LUN does not exist. Failed to delete LUN.

Page 79: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-69Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsStatus Codes

338 Amount must be greater than zero. Failed to update LUN.

339 Failed to update LUN.

340 Initiator Group does not exist.

341 Invalid Volume Group. Failed to mirror LUN.

342 Failed to mirror LUN.

343 LUN name is not available. Failed to mirror LUN.

344 Failed to create LUN mapping. The specific mapping you are trying to create may already exist.

345 The LUN name provided does not exist.

346 The ID provided is invalid.

347 The initiator group provided does not contain any initiators.

348 Failed to remove LUN Mirror

349 The LUN you are attempting to unmap is not mapped to the group you have provided.

350 Unable to get next free mapID.

351 Unreachable IP. Could not change partner IP.

352 Could not change partner IP.

353 IP address not available. Failed to create Bond.

354 Failed to create Bond.

355 Invalid Bond. Failed to delete Bond.

356 Failed to delete Bond.

357 Bond could not be found. Failed to update Bond.

358 Failed to update bond.

359 Invalid bond. Failed to create VLAN.

360 Failed to create VLAN.

361 VLANID is not available. Failed to create VLAN.

362 Unable to perform the enslaving action attempted.

363 Request does not match expect usage. Usage: createBondedEth <bond> <eth>.

364 Target Ethernet interface is being used. Confirm interface is not in use before trying again

365 The Ethernet interface provided does not exist.

366 The bond interface provided does not exist

367 Enslave action unrecognized. Expected actions are < add | remove >.

368 Portal is already allowed.

369 Portal does not exist.

370 IP address not available. Failed to update bond.

371 Parameter is invalid.

372 Unable to perform the bond action requested. Verify that bond exists in a DELETE or PUT request, and does not exist in a POST.

373 Failed to update user.

Table 2-2 Status Codes (continued)

Page 80: Cisco UCS Invicta API Guide · iii Cisco UCS Invicta API Guide, v1.6 CONTENTS Preface vii Organization vii Conventions vii Obtaining Documentation and Submitting a Service Request

2-70Cisco UCS Invicta API Guide, v1.6

Chapter 2 API MethodsStatus Codes

375 Device does not exist.

376 LUN does not exist.

377 There is not enough space on the destination Volume Group.

378 Cannot connect to peer. Please try again later.

379 LUN mirror break failed: This LUN does not contain a mirror to break.

380 Unable to find serial number.

381 FIND failed. Unable to get apiVersion.

382 FIND failed. Unable to get unitId.

383 FIND failed. Unable to get device.

384 FIND failed. Unable to get boxSerial.

385 IP address not available. Failed to create Virtual Interface.

386 LUN is mirrored. Failed to update LUN.

387 IP is already in use. Failed to update VLAN

388 An error has occurred. Failed to perform action on VLAN.

389 IP is already in use. Failed to add VLAN.

390 Map ID 0 is about to be removed. Failure to remap a LUN 0 will result in initiator issues. Please use force_mapid0_delete parameter to force unmapping of this LUN.

Table 2-2 Status Codes (continued)