Difference between revisions of "Designate/Blueprints/Server Pools/API"
< Designate | Blueprints | Server Pools
Graham Hayes (talk | contribs) (Created page with "== Overview == {| class="wikitable" |- ! Gerrit Patch || [] |- ! Launchpad Blueprint || [] |} === Summary === Quick overview of the change == API Changes == List of chang...") |
m (Added comments) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 16: | Line 16: | ||
List of changes to the HTTP API | List of changes to the HTTP API | ||
− | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! Verb !! Resource !! Description | ! Verb !! Resource !! Description | ||
|- | |- | ||
− | | GET || / | + | | GET || /v2/pools || Get a list of all pools a tenant has access to. |
|- | |- | ||
− | | GET || / | + | | GET || /v2/pools/{id} || Get individual pool details |
+ | |- | ||
+ | | POST || /v2/pools/ || Create a new pool | ||
+ | |- | ||
+ | | PATCH || /v2/pools/{id} || Update a pool's details | ||
+ | |} | ||
+ | |||
+ | All Server Operations will now be scoped under a pool, like such | ||
+ | |||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Verb !! Resource !! Description | ||
+ | |- | ||
+ | | GET || /v2/pools/{id}/servers || Get a list of servers a tenant has access in pool ''id'' | ||
+ | |- | ||
+ | | POST || /v2/pools/{id}/servers || Create a new server in pool ''id'' | ||
+ | |- | ||
+ | | PATCH || /v2/pools/{pool_id}/server/{server_id} || Update a server_id's server details in pool ''pool_id'' | ||
|} | |} | ||
+ | ===Comments=== | ||
+ | # [vinod] Should the PATCH call be /v2/pools/{pool_id}/<big>servers</big>/{server_id} i.e. servers instead of server similar to how other URLs are designed. | ||
+ | # [vinod] There should be a GET call for /v2/pools/{pool_id}/servers/{server_id} as there is a PATCH call at this URL | ||
+ | # [vinod] How about DELETE calls? | ||
− | ==== Example of Call ( | + | ==== Example of Call (GET /v2/pools/) ==== |
Overview of call | Overview of call | ||
Line 32: | Line 52: | ||
'''Response''' | '''Response''' | ||
{ | { | ||
− | + | “pools”: [ | |
− | + | { | |
− | + | "pool":{ | |
− | + | "id":"UUID STRING", | |
+ | "name":"Pool Name", | ||
+ | "labels":["anycast","premium"], | ||
+ | "servers":[ | ||
+ | {"id":"UUID STRING"}, | ||
+ | {"id":"UUID STRING"}, | ||
+ | {"id":"UUID STRING"} | ||
+ | ], | ||
+ | "project_id":"{project_id}" | ||
+ | } | ||
+ | } | ||
] | ] | ||
} | } | ||
== Database Changes == | == Database Changes == | ||
− | + | None | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Latest revision as of 18:06, 4 March 2014
Contents
Overview
Gerrit Patch | [] |
---|---|
Launchpad Blueprint | [] |
Summary
Quick overview of the change
API Changes
List of changes to the HTTP API
Verb | Resource | Description |
---|---|---|
GET | /v2/pools | Get a list of all pools a tenant has access to. |
GET | /v2/pools/{id} | Get individual pool details |
POST | /v2/pools/ | Create a new pool |
PATCH | /v2/pools/{id} | Update a pool's details |
All Server Operations will now be scoped under a pool, like such
Verb | Resource | Description |
---|---|---|
GET | /v2/pools/{id}/servers | Get a list of servers a tenant has access in pool id |
POST | /v2/pools/{id}/servers | Create a new server in pool id |
PATCH | /v2/pools/{pool_id}/server/{server_id} | Update a server_id's server details in pool pool_id |
Comments
- [vinod] Should the PATCH call be /v2/pools/{pool_id}/servers/{server_id} i.e. servers instead of server similar to how other URLs are designed.
- [vinod] There should be a GET call for /v2/pools/{pool_id}/servers/{server_id} as there is a PATCH call at this URL
- [vinod] How about DELETE calls?
Example of Call (GET /v2/pools/)
Overview of call
Response
{ “pools”: [ { "pool":{ "id":"UUID STRING", "name":"Pool Name", "labels":["anycast","premium"], "servers":[ {"id":"UUID STRING"}, {"id":"UUID STRING"}, {"id":"UUID STRING"} ], "project_id":"{project_id}" } } ] }
Database Changes
None