Jump to: navigation, search

Difference between revisions of "Designate/Blueprints/Server Pools/API"

(Created page with "== Overview == {| class="wikitable" |- ! Gerrit Patch || [] |- ! Launchpad Blueprint || [] |} === Summary === Quick overview of the change == API Changes == List of chang...")
 
Line 16: Line 16:
 
List of changes to the HTTP API
 
List of changes to the HTTP API
  
=== One Per Change ===
 
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
 
! Verb !! Resource !! Description
 
! Verb !! Resource !! Description
 
|-
 
|-
| GET || /resource || Description of call
+
| GET || /v2/pools || Get a list of all pools a tenant has access to.
 
|-
 
|-
| GET || /resource/{id} || Description of call
+
| 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 Zone and Server Operations will now be scoped under a pool, like such
 +
 
 +
{| class="wikitable"
 +
|-
 +
! Verb !! Resource !! Description
 +
|-
 +
| GET || /v2/pools/{id}/zones || Get a list of zones a tenant has access in pool ''id''
 +
|-
 +
| POST || /v2/pools/{id}/zones || Create a new zone in pool ''id''
 +
|-
 +
| PATCH || /v2/pools/{pool_id}/zones/{zone_id} || Update a pool's details in zone ''zone_id''
 
|}
 
|}
  
==== Example of Call (HTTP Verb) ====
+
==== Example of Call (GET /v2/pools/) ====
  
 
Overview of call
 
Overview of call
Line 32: Line 48:
 
'''Response'''
 
'''Response'''
 
     {
 
     {
         “data”: [
+
         “pools”: [
            {
+
              {
                "more":"data"
+
                  "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 ==
Description of Changes to DB schemas
+
None
 
 
eg -
 
 
 
{| class="wikitable"
 
|-
 
! Name!! Data Type !! Length !! Nullable!! Details
 
|-
 
| id || VARCHAR || 36 || False || Primary Key, Generated UUID
 
|-
 
| name || VARCHAR || 255 || False || Domain name to be blacklisted
 
|-
 
| version || INTEGER || - || False || Designate API version
 
|-
 
| created_at || DATETIME ||  -  || False || UTC time of creation
 
|-
 
| updated_at || DATETIME || - ||True || UTC time of creation
 
|-
 
| description || VARCHAR || 160 || True || UTF-8 text field
 
|}
 

Revision as of 15:21, 17 February 2014

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 Zone and Server Operations will now be scoped under a pool, like such

Verb Resource Description
GET /v2/pools/{id}/zones Get a list of zones a tenant has access in pool id
POST /v2/pools/{id}/zones Create a new zone in pool id
PATCH /v2/pools/{pool_id}/zones/{zone_id} Update a pool's details in zone zone_id

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