List Flexible IPs
(Difference between revisions)
Mike.robski (Talk | contribs) |
|||
Line 1: | Line 1: | ||
− | This operation will list all allocated flexible IP addresses in your account. | + | ='''GET''' /os-floating-ips= |
+ | This operation will list all the allocated flexible IP addresses in your account. | ||
− | |||
− | + | == Response == | |
− | + | === JSON === | |
<nowiki> | <nowiki> | ||
{ | { | ||
Line 36: | Line 36: | ||
</nowiki> | </nowiki> | ||
− | + | ====floating_ips==== | |
; instance_id - ''string'' | ; instance_id - ''string'' | ||
: Unique instance identifier floating IP is assigned to. | : Unique instance identifier floating IP is assigned to. | ||
Line 52: | Line 52: | ||
: Name of the pool IP address belongs to. | : Name of the pool IP address belongs to. | ||
− | + | == Response Codes == | |
; Success: | ; Success: | ||
:''HTTP/1.1 200 OK'' | :''HTTP/1.1 200 OK'' | ||
− | + | == Examples == | |
'''List servers''' | '''List servers''' | ||
Line 123: | Line 123: | ||
[[Category:Hostway API]] | [[Category:Hostway API]] | ||
[[Category:FlexCloud Server API]] | [[Category:FlexCloud Server API]] | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 07:18, 20 May 2013
Contents |
GET /os-floating-ips
This operation will list all the allocated flexible IP addresses in your account.
Response
JSON
{ "floating_ips" : [ { "instance_id" : {instance_id}, "ip": "{ip_address}", "fixed_ip": null, "links": [ { "href": "http://{api_server}/os-floating-ips/{ip_address}/", "rel": "self" } ], "pool": "default" }, { "instance_id": "{instance_id}", "ip": "{ip_address}", "fixed_ip": null, "links": [ { "href": "http://{api_server}/os-floating-ips/{ip_address}/", "rel": "self" } ], "pool": "default" } ] }
floating_ips
- instance_id - string
- Unique instance identifier floating IP is assigned to.
- ip - string
- IP address allocated.
- fixed_ip - string
- Fixed IP address.
- links - list
- Hypermedia for this resource.
- pool - string
- Name of the pool IP address belongs to.
Response Codes
- Success
- HTTP/1.1 200 OK
Examples
List servers
- GET http(s)://{api_server}/os-floating-ips
Request Headers:
Content-Type:application/json Charset=UTF-8 Authorization:Base64-encoded username & password string
Response Code:
HTTP/1.1 200 OK
Response Body:
{ "floating_ips" : [ { "instance_id" : null, "ip": "{ip_address}", "fixed_ip": null, "links": [ { "href": "http://{api_server}/os-floating-ips/{ip_address}/", "rel": "self" } ], "pool": "default" }, { "instance_id": "test_server_0013", "ip": "{ip_address}", "fixed_ip": null, "links": [ { "href": "http://{api_server}/os-floating-ips/{ip_address}/", "rel": "self" } ], "pool": "default" } ] }
Unauthorized access
- GET http://{api_server}/os-floating-ips
Request Headers:
Content-Type:application/json Charset=UTF-8 Authorization:Base64-encoded fake_authentication_string
Response Code:
HTTP/1.1 401 Unauthorized
Response Body:
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.