FarmGetDetails

From $1

    Description

    This API call allows you to get information about your farm structure
     

    Changelog

    API version Changes
     2.0.0 Initial version
     2.1.0 Added CloudLocation field
     2.3.0 Added ScalarizrVersion

    Request Parameters

    Name Description Required
     FarmID  Farm ID Yes

     

    Response Elements

    Name Description
     ID Farm role ID
     RoleID Role ID
     Platform Cloud platform
     Name Role name
     CloudLocation Cloud location (Region)
     Category Role category
     ScalingProperties Scaling properties (MinInstances and MaxInstances)
     PlatformProperties Platform properties (For EC2: InstanceType and AvailabilityZone)
     ServerSet->ServerID Server ID
     ServerSet->ExternalIP Server External IP
     ServerSet->InternalIP Server Internal IP
     ServerSet->Status Server status
     ServerSet->ScalarizrVersion Version of scalr agent
     ServerSet->Uptime Instance uptime (hours)
     ServerSet->PlatformProperties Platform properties (For EC2: InstanceType, AvailabilityZone, AMIID, InstanceID)

    Sample Request

    https://api.scalr.net/?Action=FarmGetDetails
    &Version=2.0.0
    &FarmID=123
    &KeyID=<Your Scalr API Key ID>
    &TimeStamp=2009-06-19T05%3A13%3A00.000Z
    &Signature=<URLEncode(Base64Encode(Signature))>

     

    Sample Response

    <?xml version="1.0"?>
    <FarmGetDetailsResponse><TransactionID>f16447d8-36cd-4d6d-a664-65fe91073a12</TransactionID><FarmRoleSet><Item><ID>21366</ID><RoleID>26672</RoleID><Name>redis-test2-20110819-01</Name><Platform>ec2</Platform><Category>Base images</Category><ScalingProperties><MinInstances>1</MinInstances><MaxInstances>1</MaxInstances></ScalingProperties><PlatformProperties><InstanceType>m1.small</InstanceType><AvailabilityZone>us-east-1a</AvailabilityZone></PlatformProperties><ServerSet><Item><ServerID>a9cde1d9-d334-4a86-98c8-0f52ccb1743f</ServerID><ExternalIP>50.17.86.36</ExternalIP><InternalIP>10.91.34.152</InternalIP><Status>Running</Status><ScalarizrVersion>0.7.78</ScalarizrVersion><Uptime>192.47</Uptime><IsDbMaster>0</IsDbMaster><PlatformProperties><InstanceType>m1.small</InstanceType><AvailabilityZone>us-east-1a</AvailabilityZone><AMIID>ami-d78646be</AMIID><InstanceID>i-6b794e0a</InstanceID></PlatformProperties></Item></ServerSet><CloudLocation>us-east-1</CloudLocation></Item></FarmRoleSet></FarmGetDetailsResponse>
    Tags: (Edit tags)
    • No tags
     
    Comments (3)
    Viewing 3 of 3 comments: view all
    A suggestion, instead of having Name as an element, it would work better if you placed it as an attribute in the Item. Also, having multiple Item elements makes parsing a farm with multiple Roles difficult. I would suggest the following changes (only showing the changes):
    <FarmRoleSet>
    <Role name="role name" id="####" roleID="###">
    <ServerSet>
    <Instance serverID="###">
    </Instance>
    <Instance serverID="###">
    </Instance>
    </ServerSet>
    </Role>
    <Role name="role name" id="####" roleID="###">
    <ServerSet>
    <Instance serverID="###">
    </Instance>
    <Instance serverID="###">
    </Instance>
    </ServerSet>
    </Role>
    </FarmRoleSet>

    Something like that. Basically changing "Item" to something more specific and putting in the key data as attributes instead of elements. Even just changing away from multiple Item elements would be very helpful.
    Posted 19:51, 29 Sep 2010
    It would be useful having a "numberInstances" attribute in <ServerSet> with the total of <Item> of this rol.
    Posted 11:12, 23 Jun 2011
    I totally agree with grobuck.
    Posted 01:30, 27 Jun 2011
    Viewing 3 of 3 comments: view all
    You must login to post a comment.

     
    Powered by MindTouch Core