View Allocated Flexible IP
From Hostway API Documentation
(Difference between revisions)
(Created page with "This operation will list details of the specific allocated flexible IP address. ='''GET''' /os-floating-ips/'''ip_address'''= List details of the specific allocated flexible ...") |
Mike.robski (Talk | contribs) m (1 revision: Release 86) |
||
(6 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
This operation will list details of the specific allocated flexible IP address. | This operation will list details of the specific allocated flexible IP address. | ||
− | ='''GET''' /os-floating-ips/'' | + | ='''GET''' /accounts/''{accountId}''/flexcloud/os-floating-ips/''{ip_address}''= |
List details of the specific allocated flexible IP address. | List details of the specific allocated flexible IP address. | ||
== Parameters == | == Parameters == | ||
+ | ; accountId - ''string'' | ||
+ | : The selected account Id. | ||
+ | |||
; ip_address - ''string'' | ; ip_address - ''string'' | ||
Line 18: | Line 21: | ||
"links": [ | "links": [ | ||
{ | { | ||
− | "href": "http://{api_server}/os-floating-ips/{ip_address}/", | + | "href": "http://{api_server}/accounts/{accountId}/flexcloud/os-floating-ips/{ip_address}/", |
"rel": "self" | "rel": "self" | ||
} | } | ||
Line 25: | Line 28: | ||
} | } | ||
] | ] | ||
− | } | + | }</nowiki> |
− | </nowiki> | + | |
====floating_ip==== | ====floating_ip==== | ||
Line 54: | Line 56: | ||
'''View detailed information for the specified allocated floating IP address''' | '''View detailed information for the specified allocated floating IP address''' | ||
− | :'''GET''' http(s)://{api_server}/os-floating-ips/{ip_address} | + | :'''GET''' http(s)://{api_server}/accounts/{accountId}/flexcloud/os-floating-ips/{ip_address} |
''Request Headers:'' | ''Request Headers:'' | ||
Line 74: | Line 76: | ||
"links": [ | "links": [ | ||
{ | { | ||
− | "href": "http://{api_server}/os-floating-ips/{ip_address}/", | + | "href": "http://{api_server}/accounts/{accountId}/flexcloud/os-floating-ips/{ip_address}/", |
"rel": "self" | "rel": "self" | ||
} | } | ||
Line 81: | Line 83: | ||
} | } | ||
] | ] | ||
− | } | + | }</nowiki> |
− | </nowiki> | + | |
'''Unauthorized access''' | '''Unauthorized access''' | ||
− | :'''GET''' http(s)://{api_server}/os-floating-ips/{ip_address} | + | :'''GET''' http(s)://{api_server}/accounts/{accountId}/flexcloud/os-floating-ips/{ip_address} |
''Request Headers:'' | ''Request Headers:'' | ||
Line 103: | Line 104: | ||
'''Failure while trying to view details for a non-existent flexible IP address''' | '''Failure while trying to view details for a non-existent flexible IP address''' | ||
− | :'''GET''' http(s)://{api_server}/os-floating-ips/{<span style="color:red">fake_ip_address</span>} | + | :'''GET''' http(s)://{api_server}/accounts/{accountId}/flexcloud/os-floating-ips/{<span style="color:red">fake_ip_address</span>} |
''Request Headers:'' | ''Request Headers:'' | ||
Line 113: | Line 114: | ||
<pre>HTTP/1.1 404 Not Found</pre> | <pre>HTTP/1.1 404 Not Found</pre> | ||
+ | '''Failure while trying to pass invalid account number''' | ||
+ | :'''GET''' http(s)://{api_server}/accounts/fake/flexcloud/os-floating-ips/{ip_address} | ||
+ | |||
+ | ''Response Code:'' | ||
+ | <pre>HTTP/1.1 404 Not Found</pre> | ||
+ | |||
+ | ''Response Body:'' | ||
+ | <nowiki> | ||
+ | { | ||
+ | "itemNotFound" : { | ||
+ | "message": "Resource not found", | ||
+ | "code": 404, | ||
+ | "details": "", | ||
+ | "errorid": "59e0b3dd-2173-432a-8ff5-60efe16e83bf" | ||
+ | } | ||
+ | }</nowiki> | ||
− | + | == Alternative URI /os-floating-ips/{ip_address} == | |
+ | An alternative way to execute this call is to omit the ''accountId'' portion of the URI. In this case the system assumes the request is executed for the account identified in the [[Authentication|authorization header]]. | ||
− | { | + | <code>GET /os-floating-ips/{ip_address}</code> |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | [[Category:Hostway API]] | |
+ | [[Category:FlexCloud Server API]] |
Latest revision as of 11:00, 11 October 2013
This operation will list details of the specific allocated flexible IP address.
Contents |
[edit] GET /accounts/{accountId}/flexcloud/os-floating-ips/{ip_address}
List details of the specific allocated flexible IP address.
[edit] Parameters
- accountId - string
- The selected account Id.
- ip_address - string
[edit] Response
[edit] JSON
{ "floating_ip" : [ { "instance_id" : {instance_id}, "ip": "{ip_address}", "fixed_ip": null, "links": [ { "href": "http://{api_server}/accounts/{accountId}/flexcloud/os-floating-ips/{ip_address}/", "rel": "self" } ], "pool": "default" } ] }
[edit] floating_ip
- 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.
[edit] 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.
- HTTP/1.1 404 Not Found - The resource does not exist
[edit] Examples
View detailed information for the specified allocated floating IP address
- GET http(s)://{api_server}/accounts/{accountId}/flexcloud/os-floating-ips/{ip_address}
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_ip" : [ { "instance_id": "test_server_0013", "ip": "{ip_address}", "fixed_ip": null, "links": [ { "href": "http://{api_server}/accounts/{accountId}/flexcloud/os-floating-ips/{ip_address}/", "rel": "self" } ], "pool": "default" } ] }
Unauthorized access
- GET http(s)://{api_server}/accounts/{accountId}/flexcloud/os-floating-ips/{ip_address}
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.
Failure while trying to view details for a non-existent flexible IP address
- GET http(s)://{api_server}/accounts/{accountId}/flexcloud/os-floating-ips/{fake_ip_address}
Request Headers:
Content-Type:application/json Charset=UTF-8 Authorization:Base64-encoded username & password string
Response Code:
HTTP/1.1 404 Not Found
Failure while trying to pass invalid account number
- GET http(s)://{api_server}/accounts/fake/flexcloud/os-floating-ips/{ip_address}
Response Code:
HTTP/1.1 404 Not Found
Response Body:
{ "itemNotFound" : { "message": "Resource not found", "code": 404, "details": "", "errorid": "59e0b3dd-2173-432a-8ff5-60efe16e83bf" } }
[edit] Alternative URI /os-floating-ips/{ip_address}
An alternative way to execute this call is to omit the accountId portion of the URI. In this case the system assumes the request is executed for the account identified in the authorization header.
GET /os-floating-ips/{ip_address}