Note: Please go to to access the current RightScale documentation set. Also, feel free to Chat with us!
Home > Guides > RightScale API 1.5 > Examples > Servers > Show Server

Show Server

Show the information on a single server.

icon_curl_v1.png    icon_rs_api_client_v1.png  

Table of Contents


Example Call

Prerequisite:  Example assumes you have previously authenticated, and your valid session cookie is in 'mycookie'.

#!/bin/sh -e
curl -i -H X_API_VERSION:1.5 -b mycookie -X GET$SERVER.xml

Sample Output

Note:  Truncated XML output without headers included (to save space).

  <updated_at>2012/10/09 21:42:04 +0000</updated_at>
    <link href="/api/servers/527725001" rel="self"/>
    <link href="/api/deployments/306795001" rel="deployment"/>
    <link href="/api/clouds/2112/instances/2BFJC99QC8FJA" rel="current_instance"/>
    <link href="/api/clouds/2112/instances/B469CS55K5VRQ" rel="next_instance"/>
    <link href="/api/servers/527725001/alert_specs" rel="alert_specs"/>
  <created_at>2012/10/09 21:41:34 +0000</created_at>
  <name>Base ServerTemplate for Linux (v12.11.0-LTS)</name>
    <action rel="terminate"/>


Note: If your server ID is incorrect, you will receive:

  • HTTP 422 Unprocessable Entity
  • ResourceNotFound: Couldn't find Server with ID=123456789


Example Call

require 'rubygems'
require 'pp'                          # Require pretty print Ruby gem
require 'right_api_client'            # RightScale API client gem

user = ''         # Set user email address for using the Dashboard
acct = '1234'                         # Set the account ID
pass = 'SomePassword'                 # Set the password for the user.  Create client object so you can use the API.
@client = => user, :password => pass, :account_id => acct)
# Setup and authenticate above. Set and use additional variables below, display output, etc.
server_id = '527725001'
pp @client.servers(:id => server_id).show

Sample Output

#<RightApi::ResourceDetail resource_type="server", name="Base ServerTemplate for Linux (v12.11.0-LTS)">



Prerequisite:  Example assumes you have previously authenticated and your session cookie for subsequent requests is in 'cookieContainer'.

Example Call

#get cookie container from authentication $cookieContainer
$SERVER='761004'      # Set the Server ID. Obtain via the API or Dashboard navigation and the URL.

$webRequest = [System.Net.WebRequest]::Create("$SERVER.xml")
$webRequest.Method = "GET"
$webRequest.CookieContainer = $cookieContainer
$webRequest.Headers.Add("X_API_VERSION", "1.5");

[System.Net.WebResponse] $webResponse = $webRequest.GetResponse()
$responseStream = $webResponse.GetResponseStream()
$responseStreamReader = New-Object System.IO.StreamReader -argumentList $responseStream
[string]$responseString = $responseStreamReader.ReadToEnd()

Sample Output

Same as the bash/curl output.



You must to post a comment.
Last modified
09:59, 11 Oct 2013



This page has no classifications.



© 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.