ScaleXtreme Support Forum/Documentation/Cloud Hosting Providers

Cloud Hosting Provider API

ScaleXtreme Support
posted this on Jan 20 10:31 am

Contents

Cloud Hosting Provider API

1.1 Create User

URLhttps://api.scalextreme.com/scalex/acl/createuser

Parameters

  • sxapikey: api key
  • sxsecretkey: md5 hash of "secret key"
  • firstname: customer first name
  • lastname: customer last name
  • email: customer email address
  • orgname: customer's organization name

Request Example

Response Example

  • result: "SUCCESS" or "FAILURE"
  • data: {"user":"JohnSmith","organization":"One Apple Industries","password":"eNuNugymy","user_id":"10209","organization_id":"17374"} 
    OR: 
    {"err":"User email joe.smith+7111@¡­ already registered with ScaleXtreme?. "}
    {"err":"Request is not a post... cannot proceed"}
    {"err":"There are input errors","errors":["email is missing","first name is missing","last name is missing","organization name is missing"]}
    {"err":"login failed, invalid api key or secret key"}

1.2 Customer Info

URLhttps://api.scalextreme.com/scalex/acl/customerInfo

Parameters

  • sxapikey: api key
  • sxsecretkey: md5 hash of "secret key"
  • email: customer email address

Request Example

Response Example

  • result: "SUCCESS" or "FAILURE"
  • data: {"firstname":"John","lastname":"Smith","email":"johnsmith@¡­","organization":"Organizaiton Name."} 
    OR: 
    {"err":"email johnsmiht@¡­ not registered with ScaleXtreme?."}
    {"err":"login failed, invalid api key or secret key"}

     

1.3 Customers List

URLhttps://api.scalextreme.com/scalex/acl/customerList

Parameters

  • sxapikey: api key
  • sxsecretkey: md5 hash of "secret key"
  • rowsperpage: option: rows returned on each page. default is all rows
  • currentpage: option: page of rows based on rows per page.
  • sortedby: option: sort by 'firstname', 'lastname',' email', 'organizaiton'. default is 'email'
  • sortdirection: option: sort up or down, 'asc','desc'. default is 'asc'

Request Example

Response Example

  • result: "SUCCESS" or "FAILURE"
  • data: {"paginginfo":{"totalrows":14,"totalpages":5,"currentpage":2,"prevpage":1,"nextpage":3,"rowsperpage":3,"sortedby":"organization"},"customers":[{"firstname":"Joe Test+10","lastname":"Smith","email":"joe.test+1@¡­","organization":"ABC Inc."},{"firstname":"Joe","lastname":"Miller","email":"joe.smith+3@¡­","organization":"CDF Systems."},{"firstname":"Fred","lastname":"Flintstone","email":"joe.smith+7895@¡­","organization":"HRT Co."}]} 
    OR: 
    {"err":"login failed, invalid api key or secret key"} 

     

2.1 Create Cloud Provider Account

URLhttps://api.scalextreme.com/scalex/acl/createprovider

Parameters

  • sxapikey: api key
  • sxsecretkey: md5 hash of "secret key"
  • provider: provider code: valid codes: ec2, rackspace, openstack, bluelock, thecloud, vcloud, cloudstack
  • userid: user id
  • companyid: company id/org id
  • name: display name, optional Provider-specified-parameters: Provider specified parameters
  • Amazon EC2: key_id, access_key, region
  • Rackspace: api_id, api_key, region
  • Openstack: url, username, apikey, projectid
  • Bluelock: username, password
  • theCloud: username, password
  • Generic Vmware vCloud: server, username, password
  • Citrix Cloudstack: server, username, password

Request Example for Amazon EC2

Response Example for Amazon EC2

  • result: "SUCCESS" or "FAILURE"
  • data: {"id":"698","provider":"ec2"} 
    OR: 
    {'err':'err blah blah'}

     

2.2 Get Cloud Provider Account

URLhttps://api.scalextreme.com/scalex/acl/getprovider

Parameters

  • sxapikey: api key
  • sxsecretkey: md5 hash of "secret key"
  • id: the id in mysql table

Request Example

Response Example

  • result: "SUCCESS"
  • data: {"id":"1","provider":"ec2","org":"0","userId":"1","name":"eeeee","key_id":"my key id","access_key":"myaccess key","region":"us-east-1"} 

     

2.3 Update Cloud Provider Account

URLhttps://api.scalextreme.com/scalex/acl/updateprovider

Parameters

  • sxapikey: api key
  • sxsecretkey: md5 hash of "secret key"
  • id: the id in mysql table
  • name: display name, optional Provider-specified-parameters: Provider specified parameters
  • Amazon EC2: key_id, access_key, region
  • Rackspace: api_id, api_key, region
  • Openstack: url, username, apikey, projectid
  • Bluelock: username, password
  • cloud: server, username, password
  • cloudstack: server, username, password
  • softlayer: username, api_key
  • linode: api_key

Request Example for Amazon EC2

Response Example for Amazon EC2

  • result: "SUCCESS" or "FAILURE"
  • data: {"id":"40","provider":"ec2"} 
    OR: 
    {'err':'err blah blah'}

     

2.4 Delete Cloud Provider Account

URLhttps://api.scalextreme.com/scalex/acl/deleteprovider

Parameters

  • sxapikey: api key
  • sxsecretkey: md5 hash of "secret key"
  • id: the id in mysql table

Request Example

Response Example

  • result: "SUCCESS" or "FAILURE"
  • data: {"id":"697"} 
    OR: 
    {'err':'err blah blah'}