{
   "definitions":{},
   "$schema":"http://json-schema.org/draft-07/schema#",
   "$id":"http://api.glygen.org/log/grouped/response",
   "type":"object",
   "title":"The grouped log messages response schema.",
   "required":[
	"logs",
	"recordsTotal"
   ],
   "properties":{
      "logs":{
         "$id":"#/properties/logs",
         "type":"array",
         "description":"List of unique logs and their respective counts.",
         "items":{
            "$id":"#/properties/logs/items",
            "type":"object",
            "description":"A unique log message.",
            "required":[
               "message",
			   "count"
            ],
            "properties":{
               "message":{
                  "$id":"#/properties/logs/items/properties/message",
                  "type":"string",
                  "description":"Message body.",
                  "examples":[
                     "Some Message"
                  ],
                  "pattern":"^(.*)$"
               },
			   "count":{
                  "$id":"#/properties/logs/items/properties/count",
                  "type":"integer",
                  "description":"Message count.",
                  "examples":[
                     37
                  ],
                  "pattern":"^(.*)$"
               }
            }
         }
      },
	  "recordsTotal":{
		"$id":"#/properties/recordsTotal",
         "type":"integer",
         "description":"Count of all distinct logs for the request parameters",
		 "examples":[
                     10
         ],
		 "pattern":"^(.*)$"
	  },
      "error_list":{
         "$id":"#/properties/error_list",
         "type":"array",
         "description":"List of error for the request.",
         "default":null,
         "items":{
            "$id":"#/properties/error_list/items",
            "type":"object",
            "description":"Error that occurred in the request.",
            "required":[
               "error_code"
            ],
            "properties":{
               "error_code":{
                  "$id":"#/properties/error_list/items/properties/error_code",
                  "type":"string",
                  "description":"Request specific error code that describes the type of error.",
                  "examples":[
                     "open-connection-failed"
                  ],
                  "pattern":"^(.*)$"
               },
               "field":{
                  "$id":"#/properties/error_list/items/properties/field",
                  "type":"string",
                  "description":"If the error was related to an input field the ID of the field is given.",
                  "examples":[
                     "some field"
                  ],
                  "pattern":"^(.*)$"
               }
            }
         }
      }
   }
}