FlavorList
(Difference between revisions)
Mike.robski (Talk | contribs) m (1 revision) |
(→GET /flavors?minDisk={diskInGB}&minRam={ramInMB}) |
||
Line 1: | Line 1: | ||
= GET /flavors?minDisk=''{diskInGB}''&minRam=''{ramInMB}'' = | = GET /flavors?minDisk=''{diskInGB}''&minRam=''{ramInMB}'' = | ||
− | + | This operation will list all available flavors optionally limited by the query parameters. | |
__TOC__ | __TOC__ | ||
== Request == | == Request == |
Revision as of 18:52, 26 June 2013
GET /flavors?minDisk={diskInGB}&minRam={ramInMB}
This operation will list all available flavors optionally limited by the query parameters.
Contents |
Request
GET /flavors?minDisk={diskInGB}&minRam={ramInMB}
URI Parameters
- minDisk - int
- Optional Only flavors with a disk size greater than or equal to minDisk will be returned. Specified in GB.
- minRam - int
- Optional Only flavors with a memory size greater than or equal to minRam will be returned. Specified in MB.
Also see Pagination
Response
Status Code
- 200 OK
- Success
- 401 Unauthorized
- Failure - 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.
Response Body
{ "flavors":[ { "id":"{flavor_id}", "links":[ {"href":"https://api.hostway.com/flavors/{flavor_id}/", "rel":"self"} ], "name":"{display_flavor_name}" }, { "id":"{flavor_id}", "links":[ {"href":"https://api.hostway.com/flavors/{flavor_id}/", "rel":"self"} ], "name":"{display_flavor_name}" } ] }
Parameters
- id - string
- Unique identifier for this flavor.
- links - array
- Hypermedia for this resource.
- name - string
- Display name for this flavor.
Examples
Successfully list available flavors
Request
GET /flavors Authorization: Basic {Base64-encoded username:password string}
Response
200 OK { "flavors": [ { "name": "Small", "links": [ {"href": "https://api.hostway.com/flavors/1/", "rel": "self"}, {"href": "https://api.hostway.com/flavors/1/", "rel": "bookmark"} ], "id": "1" }, { "name": "Large", "links": [ {"href": "https://api.hostway.com/flavors/3/", "rel": "self"}, {"href": "https://api.hostway.com/flavors/3/", "rel": "bookmark"} ], "id": "3" } ] }
Failure while trying to make an unauthorized request
Request
GET /flavors Authorization: Basic {invalid authorization}
Response
401 Unauthorized
See also