Jump to: navigation, search

Difference between revisions of "Manila/design/manila-liberty-consistency-groups/api-schema"

(Created page with "GET /consistencygroups Response Schema: { "$schema": "http://json-schema.org/draft-04/schema#", "title": "Consistency Group (CG)", "description": "A resource repr...")
 
m
Line 2: Line 2:
  
 
Response Schema:
 
Response Schema:
{
+
{
 
     "$schema": "http://json-schema.org/draft-04/schema#",
 
     "$schema": "http://json-schema.org/draft-04/schema#",
 
     "title": "Consistency Group (CG)",
 
     "title": "Consistency Group (CG)",
Line 18: Line 18:
 
     },
 
     },
 
     "required": ["id", "name"]
 
     "required": ["id", "name"]
}
+
}
  
 
GET /consistencygroups/detail
 
GET /consistencygroups/detail
 
  Response:
 
  Response:
{
+
{
 
     "$schema": "http://json-schema.org/draft-04/schema#",
 
     "$schema": "http://json-schema.org/draft-04/schema#",
 
     "title": "Consistency Group (CG)",
 
     "title": "Consistency Group (CG)",
Line 70: Line 70:
 
     },
 
     },
 
     "required": ["id", "name", "description", "created_at", "status", "project_id", "host"]
 
     "required": ["id", "name", "description", "created_at", "status", "project_id", "host"]
}
+
}

Revision as of 14:21, 29 July 2015

GET /consistencygroups

Response Schema:

{
   "$schema": "http://json-schema.org/draft-04/schema#",
   "title": "Consistency Group (CG)",
   "description": "A resource representing a group of shares that can be snapshotted in unison",
   "type": "object",
   "properties": {
       "id": {
           "description": "The unique identifier for a product",
           "type": "integer"
       },
       "name": {
           "description": "A non-unique name for a CG",
           "type": "string"
       },
   },
   "required": ["id", "name"]
}

GET /consistencygroups/detail

Response:
{
   "$schema": "http://json-schema.org/draft-04/schema#",
   "title": "Consistency Group (CG)",
   "description": "A resource representing a group of shares that can be snapshotted in unison",
   "type": "object",
   "properties": {
       "id": {
           "description": "The unique identifier for a product",
           "type": "integer",
           'pattern': ('^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}'
                       '-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}$'),
       },
       "name": {
           "description": "A non-unique name for a CG",
           "type": "string",
           'maxLength': 255,
       },
       "description": {
           "description": "A short description of the CG",
           "type": "string"
       },
       "created_at": {
           "description": "The time at which the CG was created",
           "type": "string"
       },
       "status": {
           "description": "Status of the CG",
           "type": "string",
           "enum": ["ACTIVE", "ERROR"]
       },
       "project_id": {
           "description": "The owner of the CG",
           "type": "string"
       },
       "host": {
           "description": "The backend where the CG lives",
           "type": "string"
       },
       "source_cgsnapshot_id": {
           "description": "The uuid of the cgsnapshot from which this CG was created.",
           "type": ['null', 'string'],
       },
       "share_types": {
           "description": "The share types that shares in the CG are allowed to be a part of",
           "type": "string"
       },
   },
   "required": ["id", "name", "description", "created_at", "status", "project_id", "host"]
}