JSON Schema



Available Datasets Schema

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "DatasetPayload",
    "description": "Available Datasets",
    "version": "1.2",
    "type": "object",
    "properties": {
        "dataSets": {
            "id": "dataSets",
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "datasetId": {
                        "type": "integer"
                    },
                    "datasetCode": {
                        "type": "string"
                    },
                    "datasetLabel": {
                        "type": "string"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "datasetId",
                    "datasetCode",
                    "datasetLabel"
                ]
            },
            "additionalItems": false
        },
    "Error": {
        "title": "Error",
        "version": "1.0",
        "description": "Detailed error message, can by localised by using the messageIds",
        "type": "object",
        "properties": {
            "message": {
                "type": "string"
            },
            "messageId": {
                "type": "integer"
            },
            "exceptionMessage": {
                "type": "string"
            },
            "exceptionMessageId": {
                "type": "integer"
            },
            "exceptionType": {
                "type": "string"
            },
            "exceptionTypeId": {
                "type": "integer"
            }
        },
        "additionalProperties": false,
        "required": [
            "message",
            "exceptionMessage",
            "exceptionType"
        ]   
    },
    "additionalProperties": false,
    "required": [
        "dataSets",
        "Error"
    ]
}

Back to top

Datasets Item Schema

{
    "$schema":"http://json-schema.org/draft-04/schema#",
    "id":"/",
    "type":"object",
    "properties":{
        "DataSet":{
            "id":"DataSet",
            "type":"object",
            "properties":{
                "DatasetId":{
                    "id":"DatasetId",
                    "type":"integer"
                },
                "DatasetCode":{
                    "id":"DatasetCode",
                    "type":"null"
                },
                "DatasetLabel":{
                    "id":"DatasetLabel",
                    "type":"string"
                },
                "Variables":{
                    "id":"Variables",
                    "type":"array",
                    "items":{
                        "id":"190",
                        "type":"object",
                        "properties":{
                            "VariableId":{
                                "id":"VariableId",
                                "type":"integer"
                            },
                            "VariableName":{
                                "id":"VariableName",
                                "type":"string"
                            },
                            "VariableLabel":{
                                "id":"VariableLabel",
                                "type":"string"
                            },
                            "Question":{
                                "id":"Question",
                                "type":"string"
                            },
                            "VariableType":{
                                "id":"VariableType",
                                "type":"string"
                            },
                            "IsMeanAllowed":{
                                "id":"IsMeanAllowed",
                                "type":"boolean"
                            },
                            "DatasetId":{
                                "id":"DatasetId",
                                "type":"integer"
                            },
                            "VariableGroup":{
                                "id":"VariableGroup",
                                "type":"object",
                                "properties":{
                                    "VariableGroupId":{
                                        "id":"VariableGroupId",
                                        "type":"integer"
                                    },
                                    "VariableGroupValue":{
                                        "id":"VariableGroupValue",
                                        "type":"string"
                                    }
                                },
                                "additionalProperties":false
                            },
                            "Topic":{
                                "id":"Topic",
                                "type":"object",
                                "properties":{
                                    "TopicId":{
                                        "id":"TopicId",
                                        "type":"integer"
                                    },
                                    "TopicValue":{
                                        "id":"TopicValue",
                                        "type":"string"
                                    }
                                },
                                "additionalProperties":false
                            },
                            "Categories":{
                                "id":"Categories",
                                "type":"array",
                                "items":{

                                },
                                "additionalItems":false
                            },
                            "VariableKeywords":{
                                "id":"VariableKeywords",
                                "type":"array",
                                "items":{
                                    "id":"0",
                                    "type":"object",
                                    "properties":{
                                        "VariableKeywordsId":{
                                            "id":"VariableKeywordsId",
                                            "type":"integer"
                                        },
                                        "VariableId":{
                                            "id":"VariableId",
                                            "type":"integer"
                                        },
                                        "Keyword":{
                                            "id":"Keyword",
                                            "type":"object",
                                            "properties":{
                                                "KeywordId":{
                                                    "id":"KeywordId",
                                                    "type":"integer"
                                                },
                                                "KeywordValue":{
                                                    "id":"KeywordValue",
                                                    "type":"string"
                                                }
                                            },
                                            "additionalProperties":false
                                        }
                                    },
                                    "additionalProperties":false
                                },
                                "additionalItems":false
                            }
                        },
                        "additionalProperties":false
                    },
                    "additionalItems":false
                }
            },
            "additionalProperties":false,
            "required":[
                "DatasetId",
                "DatasetCode",
                "DatasetLabel",
                "Variables"
            ]
        },
        "Error":{
            "id":"Error",
            "type":"object",
            "properties":{
                "message":{
                    "id":"message",
                    "type":"string"
                },
                "exceptionMessage":{
                    "id":"exceptionMessage",
                    "type":"string"
                },
                "exceptionType":{
                    "id":"exceptionType",
                    "type":"string"
                }
            },
            "additionalProperties":false
        }
    },
    "additionalProperties":false,
    "required":[
        "DataSet",
        "Error"
    ]
}

Back to top

Topics List Schema

{
    "$schema":"http://json-schema.org/draft-04/schema#",
    "id":"/",
    "type":"object",
    "properties":{
        "Topics":{
            "id":"Topics",
            "type":"array",
            "items":{
                "id":"15",
                "type":"object",
                "properties":{
                    "TopicId":{
                        "id":"TopicId",
                        "type":"integer"
                    },
                    "TopicValue":{
                        "id":"TopicValue",
                        "type":"string"
                    }
                },
                "additionalProperties":false,
                "required":[
                    "TopicId",
                    "TopicValue"
                ]
            },
            "additionalItems":false,
            "required":[
                "15"
            ]
        },
        "Error":{
            "id":"Error",
            "type":"object",
            "properties":{
                "message":{
                    "id":"message",
                    "type":"string"
                },
                "exceptionMessage":{
                    "id":"exceptionMessage",
                    "type":"string"
                },
                "exceptionType":{
                    "id":"exceptionType",
                    "type":"string"
                }
            },
            "additionalProperties":false
        }
    },
    "additionalProperties":false,
    "required":[
        "Topics",
        "Error"
    ]
}

Back to top

Topic Item Schema

{
    "$schema":"http://json-schema.org/draft-04/schema#",
    "id":"/",
    "type":"object",
    "properties":{
        "Topic":{
            "id":"Topic",
            "type":"object",
            "properties":{
                "TopicId":{
                    "id":"TopicId",
                    "type":"integer"
                },
                "TopicValue":{
                    "id":"TopicValue",
                    "type":"string"
                }
            },
            "additionalProperties":false,
            "required":[
                "TopicId",
                "TopicValue"
            ]
        },
        "Error":{
            "id":"Error",
            "type":"object",
            "properties":{
                "message":{
                    "id":"message",
                    "type":"string"
                },
                "exceptionMessage":{
                    "id":"exceptionMessage",
                    "type":"string"
                },
                "exceptionType":{
                    "id":"exceptionType",
                    "type":"string"
                }
            },
            "additionalProperties":false
        }
    },
    "additionalProperties":false,
    "required":[
        "Topic",
        "Error"
    ]
}

Back to top

Variables List Schema

{
    "$schema":"http://json-schema.org/draft-04/schema#",
    "id":"/",
    "type":"object",
    "properties":{
        "Variables":{
            "id":"Variables",
            "type":"array",
            "items":{
                "id":"12",
                "type":"object",
                "properties":{
                    "VariableId":{
                        "id":"VariableId",
                        "type":"integer"
                    },
                    "VariableName":{
                        "id":"VariableName",
                        "type":"string"
                    },
                    "VariableLabel":{
                        "id":"VariableLabel",
                        "type":"string"
                    },
                    "Question":{
                        "id":"Question",
                        "type":"string"
                    },
                    "VariableType":{
                        "id":"VariableType",
                        "type":"string"
                    },
                    "IsMeanAllowed":{
                        "id":"IsMeanAllowed",
                        "type":"boolean"
                    },
                    "DatasetId":{
                        "id":"DatasetId",
                        "type":"integer"
                    },
                    "VariableGroup":{
                        "id":"VariableGroup",
                        "type":"object",
                        "properties":{
                            "VariableGroupId":{
                                "id":"VariableGroupId",
                                "type":"integer"
                            },
                            "VariableGroupValue":{
                                "id":"VariableGroupValue",
                                "type":"string"
                            }
                        },
                        "additionalProperties":false
                    },
                    "Topic":{
                        "id":"Topic",
                        "type":"object",
                        "properties":{
                            "TopicId":{
                                "id":"TopicId",
                                "type":"integer"
                            },
                            "TopicValue":{
                                "id":"TopicValue",
                                "type":"string"
                            }
                        },
                        "additionalProperties":false
                    },
                    "Categories":{
                        "id":"Categories",
                        "type":"array",
                        "items":{

                        },
                        "additionalItems":false
                    },
                    "VariableKeywords":{
                        "id":"VariableKeywords",
                        "type":"array",
                        "items":{
                            "id":"0",
                            "type":"object",
                            "properties":{
                                "VariableKeywordsId":{
                                    "id":"VariableKeywordsId",
                                    "type":"integer"
                                },
                                "VariableId":{
                                    "id":"VariableId",
                                    "type":"integer"
                                },
                                "Keyword":{
                                    "id":"Keyword",
                                    "type":"object",
                                    "properties":{
                                        "KeywordId":{
                                            "id":"KeywordId",
                                            "type":"integer"
                                        },
                                        "KeywordValue":{
                                            "id":"KeywordValue",
                                            "type":"string"
                                        }
                                    },
                                    "additionalProperties":false
                                }
                            },
                            "additionalProperties":false
                        },
                        "additionalItems":false
                    }
                },
                "additionalProperties":false,
                "required":[
                    "VariableId",
                    "VariableName",
                    "VariableLabel",
                    "Question",
                    "VariableType",
                    "IsMeanAllowed",
                    "DatasetId",
                    "VariableGroup",
                    "Topic",
                    "Categories",
                    "VariableKeywords"
                ]
            },
            "additionalItems":false,
            "required":[
                "12"
            ]
        },
        "Error":{
            "id":"Error",
            "type":"object",
            "properties":{
                "message":{
                    "id":"message",
                    "type":"string"
                },
                "exceptionMessage":{
                    "id":"exceptionMessage",
                    "type":"string"
                },
                "exceptionType":{
                    "id":"exceptionType",
                    "type":"string"
                }
            },
            "additionalProperties":false
        }
    },
    "additionalProperties":false,
    "required":[
        "Variables",
        "Error"
    ]
}

Back to top

Variable Item Schema

{
    "$schema":"http://json-schema.org/draft-04/schema#",
    "id":"/",
    "type":"object",
    "properties":{
        "Variable":{
            "id":"Variable",
            "type":"object",
            "properties":{
                "VariableId":{
                    "id":"VariableId",
                    "type":"integer"
                },
                "VariableName":{
                    "id":"VariableName",
                    "type":"string"
                },
                "VariableLabel":{
                    "id":"VariableLabel",
                    "type":"string"
                },
                "Question":{
                    "id":"Question",
                    "type":"string"
                },
                "VariableType":{
                    "id":"VariableType",
                    "type":"string"
                },
                "IsMeanAllowed":{
                    "id":"IsMeanAllowed",
                    "type":"boolean"
                },
                "DatasetId":{
                    "id":"DatasetId",
                    "type":"integer"
                },
                "VariableGroup":{
                    "id":"VariableGroup",
                    "type":"object",
                    "properties":{
                        "VariableGroupId":{
                            "id":"VariableGroupId",
                            "type":"integer"
                        },
                        "VariableGroupValue":{
                            "id":"VariableGroupValue",
                            "type":"string"
                        }
                    },
                    "additionalProperties":false
                },
                "Topic":{
                    "id":"Topic",
                    "type":"null"
                },
                "Categories":{
                    "id":"Categories",
                    "type":"array",
                    "items":{

                    },
                    "additionalItems":false
                },
                "VariableKeywords":{
                    "id":"VariableKeywords",
                    "type":"array",
                    "items":{

                    },
                    "additionalItems":false
                }
            },
            "additionalProperties":false,
            "required":[
                "VariableId",
                "VariableName",
                "VariableLabel",
                "Question",
                "VariableType",
                "IsMeanAllowed",
                "DatasetId",
                "VariableGroup",
                "Topic",
                "Categories",
                "VariableKeywords"
            ]
        },
        "Error":{
            "id":"Error",
            "type":"object",
            "properties":{
                "message":{
                    "id":"message",
                    "type":"string"
                },
                "exceptionMessage":{
                    "id":"exceptionMessage",
                    "type":"string"
                },
                "exceptionType":{
                    "id":"exceptionType",
                    "type":"string"
                }
            },
            "additionalProperties":false
        }
    },
    "additionalProperties":false,
    "required":[
        "Variable",
        "Error"
    ]
}

Back to top

Keywords List Schema

{
    "$schema":"http://json-schema.org/draft-04/schema#",
    "id":"/",
    "type":"object",
    "properties":{
        "Keywords":{
            "id":"Keywords",
            "type":"array",
            "items":{
                "id":"44",
                "type":"object",
                "properties":{
                    "KeywordId":{
                        "id":"KeywordId",
                        "type":"integer"
                    },
                    "KeywordValue":{
                        "id":"KeywordValue",
                        "type":"string"
                    }
                },
                "additionalProperties":false,
                "required":[
                    "KeywordId",
                    "KeywordValue"
                ]
            },
            "additionalItems":false,
            "required":[
                "44"
            ]
        },
        "Error":{
            "id":"Error",
            "type":"object",
            "properties":{
                "message":{
                    "id":"message",
                    "type":"string"
                },
                "exceptionMessage":{
                    "id":"exceptionMessage",
                    "type":"string"
                },
                "exceptionType":{
                    "id":"exceptionType",
                    "type":"string"
                }
            },
            "additionalProperties":false
        }
    },
    "additionalProperties":false,
    "required":[
        "Keywords",
        "Error"
    ]
}

Back to top

Keyword Item Schema

{
    "$schema":"http://json-schema.org/draft-04/schema#",
    "id":"/",
    "type":"object",
    "properties":{
        "Keyword":{
            "id":"Keyword",
            "type":"object",
            "properties":{
                "KeywordId":{
                    "id":"KeywordId",
                    "type":"integer"
                },
                "KeywordValue":{
                    "id":"KeywordValue",
                    "type":"string"
                }
            },
            "additionalProperties":false,
            "required":[
                "KeywordId",
                "KeywordValue"
            ]
        },
        "Error":{
            "id":"Error",
            "type":"object",
            "properties":{
                "message":{
                    "id":"message",
                    "type":"string"
                },
                "exceptionMessage":{
                    "id":"exceptionMessage",
                    "type":"string"
                },
                "exceptionType":{
                    "id":"exceptionType",
                    "type":"string"
                }
            },
            "additionalProperties":false
        }
    },
    "additionalProperties":false,
    "required":[
        "Keyword",
        "Error"
    ]
}

Back to top

Variable Groups List Schema

{
    "$schema":"http://json-schema.org/draft-04/schema#",
    "id":"/",
    "type":"object",
    "properties":{
        "VariableGroups":{
            "id":"VariableGroups",
            "type":"array",
            "items":{
                "id":"16",
                "type":"object",
                "properties":{
                    "VariableGroupId":{
                        "id":"VariableGroupId",
                        "type":"integer"
                    },
                    "VariableGroupValue":{
                        "id":"VariableGroupValue",
                        "type":"string"
                    }
                },
                "additionalProperties":false,
                "required":[
                    "VariableGroupId",
                    "VariableGroupValue"
                ]
            },
            "additionalItems":false,
            "required":[
                "16"
            ]
        },
        "Error":{
            "id":"Error",
            "type":"object",
            "properties":{
                "message":{
                    "id":"message",
                    "type":"string"
                },
                "exceptionMessage":{
                    "id":"exceptionMessage",
                    "type":"string"
                },
                "exceptionType":{
                    "id":"exceptionType",
                    "type":"string"
                }
            },
            "additionalProperties":false
        }
    },
    "additionalProperties":false,
    "required":[
        "VariableGroups",
        "Error"
    ]
}

Back to top

Variable Group Item Schema

{
    "$schema":"http://json-schema.org/draft-04/schema#",
    "id":"/",
    "type":"object",
    "properties":{
        "VariableGroup":{
            "id":"VariableGroup",
            "type":"object",
            "properties":{
                "VariableGroupId":{
                    "id":"VariableGroupId",
                    "type":"integer"
                },
                "VariableGroupValue":{
                    "id":"VariableGroupValue",
                    "type":"string"
                }
            },
            "additionalProperties":false,
            "required":[
                "VariableGroupId",
                "VariableGroupValue"
            ]
        },
        "Error":{
            "id":"Error",
            "type":"object",
            "properties":{
                "message":{
                    "id":"message",
                    "type":"string"
                },
                "exceptionMessage":{
                    "id":"exceptionMessage",
                    "type":"string"
                },
                "exceptionType":{
                    "id":"exceptionType",
                    "type":"string"
                }
            },
            "additionalProperties":false
        }
    },
    "additionalProperties":false,
    "required":[
        "VariableGroup",
        "Error"
    ]
}

Back to top

Timeseries Data Frequency Schema

{
    "description": "Time series data",
    "version": "1.0",
    "type": "object",
    "properties": {
        "timeSeries": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "studyId": {
                        "type": "integer"
                    },
                    "year": {
                        "type": "integer"
                    },
                    "value": {
                        "type": "integer"
                    },
                    "weightedFrequency": {
                        "type": "number"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "studyId",
                    "year",
                    "value",
                    "weightedFrequency"
                ]
            },
            "additionalItems": false
        }
    },
    "Error": {
        "title": "Error",
        "version": "1.0",
        "description": "Detailed error message, can by localised by using the messageIds",
        "type": "object",
        "properties": {
            "message": {
                "type": "string"
            },
            "messageId": {
                "type": "integer"
            },
            "exceptionMessage": {
                "type": "string"
            },
            "exceptionMessageId": {
                "type": "integer"
            },
            "exceptionType": {
                "type": "string"
            },
            "exceptionTypeId": {
                "type": "integer"
            }
        },
        "additionalProperties": false,
        "required": [
            "message",
            "exceptionMessage",
            "exceptionType"
        ]
    },
    "additionalProperties": false,
    "required": [
        "timeSeries",
        "error"
    ]
}

Back to top

Timeseries Average Data Schema

{
    "description": "Time series data",
    "version": "1.0",
    "type": "object",
    "properties": {
        "timeSeries": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "studyId": {
                        "type": "integer"
                    },
                    "year": {
                        "type": "integer"
                    },
                    "value": {
                        "type": "integer"
                    },
                    "weightedFrequency": {
                        "type": "number"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "studyId",
                    "year",
                    "value",
                    "weightedFrequency"
                ]
            },
            "additionalItems": false
        }
    },
    "Error": {
        "title": "Error",
        "version": "1.0",
        "description": "Detailed error message, can by localised by using the messageIds",
        "type": "object",
        "properties": {
            "message": {
                "type": "string"
            },
            "messageId": {
                "type": "integer"
            },
            "exceptionMessage": {
                "type": "string"
            },
            "exceptionMessageId": {
                "type": "integer"
            },
            "exceptionType": {
                "type": "string"
            },
            "exceptionTypeId": {
                "type": "integer"
            }
        },
        "additionalProperties": false,
        "required": [
            "message",
            "exceptionMessage",
            "exceptionType"
        ]
    },
    "additionalProperties": false,
    "required": [
        "timeSeries",
        "error"
    ]
}

Back to top

Breakdown Average Schema

{
    "$schema":"http://json-schema.org/draft-04/schema#",
    "id":"/",
    "type":"object",
    "properties":{
        "Breakdown":{
            "id":"Breakdown",
            "type":"array",
            "items":{
                "id":"64",
                "type":"object",
                "properties":{
                    "DatasetId":{
                        "id":"DatasetId",
                        "type":"integer"
                    },
                    "Year":{
                        "id":"Year",
                        "type":"integer"
                    },
                    "BreakdownValue":{
                        "id":"BreakdownValue",
                        "type":"integer"
                    },
                    "WeightedAverage":{
                        "id":"WeightedAverage",
                        "type":"integer"
                    }
                },
                "additionalProperties":false,
                "required":[
                    "DatasetId",
                    "Year",
                    "BreakdownValue",
                    "WeightedAverage"
                ]
            },
            "additionalItems":false,
            "required":[
                "64"
            ]
        },
        "Error":{
            "id":"Error",
            "type":"object",
            "properties":{
                "message":{
                    "id":"message",
                    "type":"string"
                },
                "exceptionMessage":{
                    "id":"exceptionMessage",
                    "type":"string"
                },
                "exceptionType":{
                    "id":"exceptionType",
                    "type":"string"
                }
            },
            "additionalProperties":false
        }
    },
    "additionalProperties":false,
    "required":[
        "Breakdown",
        "Error"
    ]
}

Back to top

Breakdown Frequency Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "id": "/",
  "type": "object",
  "properties": {
    "Breakdown": {
      "id": "Breakdown",
      "type": "array",
      "items": {
        "id": "649",
        "type": "object",
        "properties": {
          "DatasetId": {
            "id": "DatasetId",
            "type": "integer"
          },
          "Year": {
            "id": "Year",
            "type": "integer"
          },
          "BreakdownValue": {
            "id": "BreakdownValue",
            "type": "integer"
          },
          "Value": {
            "id": "Value",
            "type": "integer"
          },
          "WeightedFrequency": {
            "id": "WeightedFrequency",
            "type": "number"
          }
        },
        "additionalProperties": false
      }
    },
    "Error": {
      "id": "Error",
      "type": "object",
      "properties": {
        "messageId": {
          "id": "messageId",
          "type": "integer"
        },
        "message": {
          "id": "message",
          "type": "string"
        },
        "exceptionMessage": {
          "id": "exceptionMessage",
          "type": "string"
        },
        "exceptionType": {
          "id": "exceptionType",
          "type": "string"
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

Back to top