Use Postman for quick and simple listing of various cloud assets. Specify response in either JSON (default) or XML format.
Table of Contents
The following are prerequisites for completing this tutorial:
Using Postman to list (HTTP GET) cloud assets is simple and quick. No need to spin up servers, write a bash, Ruby or PowerShell script, etc. Basically, all you need to do is:
Having previously authenticated and set the X_API_VERSION HTTP header, modify the request URL and click the Send button.
Notes:
Cloud Asset to List or Show | Request URL (HTTP GET) (example IDs) |
Account information | https://my.rightscale.com/api/accounts/1234 |
Available Clouds | https://my.rightscale.com/api/clouds |
Instance Types for a specified cloud (e.g. GCE) | https://my.rightscale.com/api/clouds/2175/instance_types |
List specifications for a specific Instance Type (ID retrieved via API) | https://my.rightscale.com/api/clouds/2175/instance_types/7F3E5V67F4V4C |
List all Security Groups on AWS US-West (Cloud ID = 3) for an account on US-3 shard (note the different API endpoint in the Request URL) | https://us-3.rightscale.com/api/clouds/3/security_groups |
A basic pattern should be emerging as you learn how to fish for information from the RightScale API.
As an example... suppose you want to show information about a specific Security Group, not any of the resources from the table above. You could:
Online reference information including a sample JSON response for Show Security Groups.
Sample Postman Configuration
Sample response (JSON)
{ "links": [ { "rel": "self", "href": "/api/clouds/2175/security_groups/DTE14QTCF4QBO" }, { "rel": "cloud", "href": "/api/clouds/2175" }, { "rel": "security_group_rules", "href": "/api/clouds/2175/security_groups/DTE14QTCF4QBO/security_group_rules" } ], "description": "", "actions": [], "name": "ap-sg-1", "resource_uid": "sg-1c76421a7" }
Sample response (XML)
<?xml version="1.0" encoding="UTF-8"?> <security_group> <links> <link rel="self" href="/api/clouds/2175/security_groups/DTE14QTCF4QBO"/> <link rel="cloud" href="/api/clouds/2175"/> <link rel="security_group_rules" href="/api/clouds/2175/security_groups/DTE14QTCF4QBO/security_group_rules"/> </links> <description></description> <actions></actions> <name>ap-sg-1</name> <resource_uid>sg-1c76421a7</resource_uid> </security_group>
Use Postman for other list, show or other RightScale API operations you need to accomplish.
© 2006-2014 RightScale, Inc. All rights reserved.
RightScale is a registered trademark of RightScale, Inc. All other products and services may be trademarks or servicemarks of their respective owners.