mitchell852 commented on a change in pull request #2029: [Issue 1907] TO API 
for backup edge cachegroup
URL: 
https://github.com/apache/incubator-trafficcontrol/pull/2029#discussion_r181814989
 
 

 ##########
 File path: docs/source/development/traffic_ops_api/v12/cachegroup_fallbacks.rst
 ##########
 @@ -0,0 +1,209 @@
+.. 
+.. 
+.. Licensed under the Apache License, Version 2.0 (the "License");
+.. you may not use this file except in compliance with the License.
+.. You may obtain a copy of the License at
+.. 
+..     http://www.apache.org/licenses/LICENSE-2.0
+.. 
+.. Unless required by applicable law or agreed to in writing, software
+.. distributed under the License is distributed on an "AS IS" BASIS,
+.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+.. See the License for the specific language governing permissions and
+.. limitations under the License.
+.. 
+
+.. _to-api-v12-cachegroupfallbacks:
+
+Cache Group Fallback
+====================
+
+.. _to-api-v12-cachegroupfallbacks-route:
+
+/api/1.2/cachegroup_fallbacks
+++++++++++++++++++++++++++++++
+
+**GET /api/1.2/cachegroup_fallbacks**
+
+  Retrieve fallback related configurations for a cache group.
+
+  Authentication Required: Yes
+
+  Role(s) Required: None
+
+  **Request Query Parameters**
+
+  Query parameter is mandatory. Either one of the parameters must be used. 
Both cant be used simultaneously.
+
+  
+-----------------+---------------------------------------------------------------------------+
+  | Name            | Description                                              
                 |
+  
+=================+===========================================================================+
+  | cacheGroupId    | The id of the cache group whose backup configurations 
has to be retrieved |
+  
+-----------------+---------------------------------------------------------------------------+
+  | fallbackId      | The id of the fallback cache group associated with a 
cache group          |
+  
+-----------------+---------------------------------------------------------------------------+
+
+  **Response Properties**
+
+  
+-----------------------------------+--------+--------------------------------------------------------------------------+
+  | Parameter                         | Type   | Description                   
                                           |
+  
+===================================+========+==========================================================================+
+  |                                   | array  | parameters array              
                                           |
+  
+-----------------------------------+--------+--------------------------------------------------------------------------+
+  | ``>cacheGroupId``                 | int    | Cache group id                
                                           |
+  
+-----------------------------------+--------+--------------------------------------------------------------------------+
+  | ``>fallbackId``                   | int    | fallback cache group id       
                                           |
+  
+-----------------------------------+--------+--------------------------------------------------------------------------+
+  | ``>cacheGroupName``               | string | Cache group name              
                                           |
+  
+-----------------------------------+--------+--------------------------------------------------------------------------+
+  | ``>fallbackName``                 | string | Fallback cache group  name    
                                           |
+  
+-----------------------------------+--------+--------------------------------------------------------------------------+
+  | ``>fallbackOrder``                | int    | Ordering list in the list of 
backups                                     |
+  
+-----------------------------------+--------+--------------------------------------------------------------------------+
+
+  **Response Example** ::
+
+    {
+       "response": [
+          {
+             "cacheGroupId":1,
+             "cacheGroupName":"GROUP1",
+             "fallbackId":2,
+             "fallbackOrder":10,
+             "fallbackName":"GROUP2"
+          }
+       ]
+    }
+
+|
+
+**POST /api/1.2/cachegroup_fallbacks**
+
+  Creates/ Updates fallback list for the cache group.
+
+  Authentication Required: Yes
+
+  Role(s) Required: admin or oper
+
+  **Request Query Parameters**
+
+
+  
+-----------------+----------+-----------------------------------------------------------------------------+
+  | Name            | Required |     Description                               
                              |
+  
+=================+==========+=============================================================================+
+  | cacheGroupId    | Yes      | The id of the cache group for which backup 
configurations has to be updated |
+  
+-----------------+----------+-----------------------------------------------------------------------------+
+
+  **Request Parameters**
+  The request parameters should be in array format.
+
+  
+-----------------------------------+--------+--------------------------------------------------------------------------+
+  | Parameter                         | Type   | Description                   
                                           |
+  
+===================================+========+==========================================================================+
+  |                                   | array  | parameters array              
                                           |
+  
+-----------------------------------+--------+--------------------------------------------------------------------------+
+  | ``>cacheGroupId``                 | int    | Cache group id                
                                           |
+  
+-----------------------------------+--------+--------------------------------------------------------------------------+
+  | ``>fallbackName``                 | string | Fallback cache group name     
                                           |
+  
+-----------------------------------+--------+--------------------------------------------------------------------------+
+  | ``>fallbackOrder``                | int    | Ordering list in the list of 
backups                                     |
+  
+-----------------------------------+--------+--------------------------------------------------------------------------+
+
+  **Request Example** ::
+
+    [
+       {
+          "cacheGroupId": 1, 
+          "fallbackName": "GROUP2", 
+          "fallbackOrder": 10
+       }
+    ]
+
+  **Response Properties**
+
+  
+-----------------------------------+--------+--------------------------------------------------------------------------+
+  | Parameter                         | Type   | Description                   
                                           |
+  
+===================================+========+==========================================================================+
+  |                                   | array  | parameters array              
                                           |
+  
+-----------------------------------+--------+--------------------------------------------------------------------------+
+  | ``>cacheGroupId``                 | int    | Cache group id                
                                           |
+  
+-----------------------------------+--------+--------------------------------------------------------------------------+
+  | ``>fallbackId``                   | int    | fallback cache group id       
                                           |
+  
+-----------------------------------+--------+--------------------------------------------------------------------------+
+  | ``>cacheGroupName``               | string | Cache group name              
                                           |
+  
+-----------------------------------+--------+--------------------------------------------------------------------------+
+  | ``>fallbackName``                 | string | Fallback cache group  name    
                                           |
+  
+-----------------------------------+--------+--------------------------------------------------------------------------+
+  | ``>fallbackOrder``                | int    | Ordering list in the list of 
backups                                     |
+  
+-----------------------------------+--------+--------------------------------------------------------------------------+
+  | ``alerts``                        | array  | A collection of alert 
messages.                                          |
+  
+-----------------------------------+--------+--------------------------------------------------------------------------+
+  | ``>level``                        | string | Success, info, warning or 
error.                                         |
+  
+-----------------------------------+--------+--------------------------------------------------------------------------+
+  | ``>text``                         | string | Alert message.                
                                           |
+  
+-----------------------------------+--------+--------------------------------------------------------------------------+
+
+
+  **Response Example** ::
+
+    {
+       "alerts": [
+          {
+             "level":"success",
+             "text":"Backup configuration for 1 successful."
+          }
+       ],
+       "response": [
+          {
+             "cacheGroupId":1,
+             "cacheGroupName":"GROUP1",
+             "fallbackId":3,
+             "fallbackName":"GROUP2",
+             "fallbackorder":10,
+          }
+       ]
+    }
+   
+|
+
+**DELETE /api/1.2/cachegroup_fallbacks**
 
 Review comment:
   you can't delete just one fallback? you can only delete all of them for a 
cachegroup?
   
   seems like you should be able to do both (delete one fallback or ALL 
fallbacks for a cg)
   
   DELETE /api/1.2/cachegroup_fallbacks?id=45
   DELETE /api/1.2/cachegroup_fallbacks?cacheGroupId=3

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to