ServerListDetails
(Difference between revisions)
Mike.robski (Talk | contribs) |
Mike.robski (Talk | contribs) |
||
Line 1: | Line 1: | ||
+ | =='''GET''' /servers/detail?''name=serverName&status=serverStatus&image=imageRef''== | ||
This operation will list all [[Server|servers]] including their details. | This operation will list all [[Server|servers]] including their details. | ||
− | + | === Parameters === | |
− | + | ||
− | = | + | |
; name - ''string'' | ; name - ''string'' | ||
: Server name to search for. | : Server name to search for. | ||
Line 13: | Line 12: | ||
: Absolute URL of the image to filter servers by. ''e.g. <nowiki>http://{api_server}/images/{image_id}/</nowiki>'' | : Absolute URL of the image to filter servers by. ''e.g. <nowiki>http://{api_server}/images/{image_id}/</nowiki>'' | ||
− | == Result == | + | === Result === |
− | === JSON === | + | ==== JSON ==== |
<nowiki> | <nowiki> | ||
{ | { | ||
Line 132: | Line 131: | ||
</nowiki> | </nowiki> | ||
− | ==== server ==== | + | ===== server ===== |
; id - ''string'' | ; id - ''string'' | ||
: Unique identifier for this server. | : Unique identifier for this server. | ||
Line 172: | Line 171: | ||
: Unused - always null. | : Unused - always null. | ||
− | ==== addresses ==== | + | ===== addresses ===== |
; addresses.public.version - ''number'' | ; addresses.public.version - ''number'' | ||
: IP version of this address. Values: '''4''' | : IP version of this address. Values: '''4''' | ||
Line 185: | Line 184: | ||
: Private IP address of this server | : Private IP address of this server | ||
− | ==== image ==== | + | ===== image ===== |
; image.name - ''string'' | ; image.name - ''string'' | ||
: The display name of the image this server is based on. | : The display name of the image this server is based on. | ||
Line 195: | Line 194: | ||
: Unique identifier for image this server is based on. | : Unique identifier for image this server is based on. | ||
− | ==== flavor ==== | + | ===== flavor ===== |
; flavor.name - ''string'' | ; flavor.name - ''string'' | ||
: The display name of the flavor this server is based on. | : The display name of the flavor this server is based on. | ||
Line 205: | Line 204: | ||
: Unique identifier for flavor this server is based on. | : Unique identifier for flavor this server is based on. | ||
− | == Response Codes == | + | === Response Codes === |
; Success | ; Success | ||
: ''HTTP/1.1 200 OK'' | : ''HTTP/1.1 200 OK'' | ||
Line 212: | Line 211: | ||
: ''HTTP/1.1 401 Unauthorized'' : This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required. | : ''HTTP/1.1 401 Unauthorized'' : This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required. | ||
− | == Examples == | + | === Examples === |
'''Successfully get server list with details''' | '''Successfully get server list with details''' | ||
:'''GET''' /servers/detail | :'''GET''' /servers/detail | ||
Line 342: | Line 341: | ||
does not understand how to supply the credentials required. | does not understand how to supply the credentials required. | ||
− | [[Category:API]] | + | [[Category:Hostway API]] |
+ | [[Category:FlexCloud Server API]] | ||
<!-- THIS CODE ENABLES DISQUS COMMENTS ON THE PAGE - DELETE TO DISABLE COMMENTING--> | <!-- THIS CODE ENABLES DISQUS COMMENTS ON THE PAGE - DELETE TO DISABLE COMMENTING--> |
Revision as of 16:48, 14 December 2012
Contents |
GET /servers/detail?name=serverName&status=serverStatus&image=imageRef
This operation will list all servers including their details.
Parameters
- name - string
- Server name to search for.
- status - string
- Server status to search for. Values: BUILD, ACTIVE, SUSPENDED, DELETED, UNKNOWN
- image - string
- Absolute URL of the image to filter servers by. e.g. http://{api_server}/images/{image_id}/
Result
JSON
{ "servers":[ { "status":"{state_status}", "updated":"", "hostId":"{host_id}", "addresses":{ "public":[ { "version":4, "addr":"{ip_address}" } ], "private":[ { "version":4, "addr":"{ip_address}" } ] }, "links":[ { "href":"http://{api_server}/servers/{server_id}/", "rel":"self" } ], "image":{ "name":"{display_image_name}", "links":[ { "href":"http://{api_server}/images/{image_id}/", "rel":"self" } ], "id":"{image_id}" }, "userId":"{user_account_id}", "flavor":{ "name":"{display_flavor_name}", "links":[ { "href":"http://{api_server}/flavors/{flavor_id}/", "rel":"self" } ], "id":{flavor_id} }, "id":"{server_id}", "name":"{display_server_name}", "created":"2011-12-05T12:51:28", "tenantId":"", "accessIPv4":"{ip_address}", "accessIPv6":"", "progress":100, "metadata":{ } }, { "status":"{state_status}", "updated":"", "hostId":"{host_id}", "addresses":{ "public":[ { "version":4, "addr":"{ip_address}" } ], "private":[ { "version":4, "addr":"{ip_address}" } ] }, "links":[ { "href":"http://{api_server}/servers/{server_id}/", "rel":"self" } ], "image":{ "name":"{display_image_name}", "links":[ { "href":"http://{api_server}/images/{image_id}/", "rel":"self" } ], "id":"{image_id}" }, "userId":"{user_account_id}", "flavor":{ "name":"{display_flavor_name}", "links":[ { "href":"http://{server_name}/flavors/{flavor_id}/", "rel":"self" } ], "id":{flavor_id} }, "id":"{server_id}", "name":"{display_server_name}", "created":"2011-11-17T10:14:58", "tenantId":"", "accessIPv4":"{ip_address}", "accessIPv6":"", "progress":100, "metadata":{ } } ] }
server
- id - string
- Unique identifier for this server.
- links - list
- Hypermedia for this resource.
- status - string
- Current state of the server. Values: BUILD, ACTIVE, SUSPENDED, DELETED, UNKNOWN
- hostId - string
- Id of the physical host this virtual machine is running on.
- userId - string
- Unique identifier for the owner of this server.
- name - string
- Display name for this server.
- created - string
- The date and time this server was created. ISO 8601 format, YYYY-MM-DDTHH:MM:SS.
- accessIPv4 - string
- The default included public IPv4 address.
- progress - number
- The current progress of this server while in BUILD status. The value is in the range of 0 - 100, but currently will only be 0, 50 or 100.
- metadata - object
- Unused - always an empty object.
- tenantId
- Unused - always null.
- accessIPv6
- Unused - always null.
- updated
- Unused - always null.
addresses
- addresses.public.version - number
- IP version of this address. Values: 4
- addresses.public.addr = string
- Public IP address of this server
- addresses.private.version - number
- IP version of this address. Values: 4
- addresses.private.addr - string
- Private IP address of this server
image
- image.name - string
- The display name of the image this server is based on.
- image.links - list
- Hypermedia for the image.
- image.id - string
- Unique identifier for image this server is based on.
flavor
- flavor.name - string
- The display name of the flavor this server is based on.
- flavor.links - list
- Hypermedia for the flavor.
- flavor.id - string
- Unique identifier for flavor this server is based on.
Response Codes
- Success
- HTTP/1.1 200 OK
- Failure
- HTTP/1.1 401 Unauthorized : This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required.
Examples
Successfully get server list with details
- GET /servers/detail
- Response: OK (200):
{ "servers":[ { "status":"ACTIVE", "updated":"", "hostId":"{host_id}", "addresses":{ "public":[ { "version":4, "addr":"{ip_address}" } ], "private":[ { "version":4, "addr":"{ip_address}" } ] }, "links":[ { "href":"http://{server_name}/servers/test_server_0013/", "rel":"self" } ], "image":{ "name":"Ubuntu 10.10 x64", "links":[ { "href":"http://{server_name}/images/test_ubuntu_image/", "rel":"self" } ], "id":"test_ubuntu_image" }, "userId":"{user_account_id}", "flavor":{ "name":"1024MB Server3", "links":[ { "href":"http://{server_name}/flavors/3/", "rel":"self" } ], "id":3 }, "id":"test_server_0013", "name":"test_server_updated", "created":"2011-12-05T12:51:28", "tenantId":"", "accessIPv4":"{ip_address}", "accessIPv6":"", "progress":100, "metadata":{ } }, { "status":"ACTIVE", "updated":"", "hostId":"{host_id}", "addresses":{ "public":[ { "version":4, "addr":"{ip_address}" } ], "private":[ { "version":4, "addr":"{ip_address}" } ] }, "links":[ { "href":"http://{server_name}/servers/test_server_0015/", "rel":"self" } ], "image":{ "name":"Windows 2008 R2 Standard", "links":[ { "href":"http://{server_name}/images/test_windows_image/", "rel":"self" } ], "id":"test_windows_image" }, "userId":"{user_account_id}", "flavor":{ "name":"1024MB Server3", "links":[ { "href":"http://{server_name}/flavors/3/", "rel":"self" } ], "id":3 }, "id":"test_server_0015", "name":"test_server_created", "created":"2011-11-17T10:14:58", "tenantId":"", "accessIPv4":"{ip_address}", "accessIPv6":"", "progress":100, "metadata":{ } } ] }
Failure while trying to make an unauthorized call - Response: Unauthorized (401):
401 Unauthorized This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required.