Standard Response

A number of endpoints will return a response that shares a common structure.

The response is a JSON string containing three values:

Metadata

The metadata value is a JSON list containing the following keys:

Key Description
viewName The name of the view used to retrieve the requested data
pageStart The data item the page starts at
dataSize The number of data rows returned
totalCount The total number of rows available
{
    "metadata": {
        "viewName": "a_view",
        "pageStart": "1",
        "dataSize": "10",
        "totalCount": "25"
    }
}

Columns

The columns value is a JSON array describing the columns that make up the view referenced in viewName (in the Metadata).

Each element in the array is a JSON list containing the following keys:

Key Description
humanisedName The column name for human consumption
columnisedName The column name for computer consumption
description Description of the column within the view
{
    "columns": [
        {
            "humanisedName": "Human column name",
            "columnisedName": "_human_column_name",
            "description": "An example of a column element"
        }
    ]
}

Rows

Internal JSON Response

The rows value is a JSON array; the length of the array is determined by the dataSize value in the Metadata.

Each element consists of a list of two values:

Key Desciption
dataRow An array containing the data for the row; will have as many elements as there are Columns
metadata A JSON list containing metadata for the data row (see below)

The row metadata contains the following value:

Key Description
url The URL to get the data item
{
    "rows": [
        {
            "dataRow":[
                "Data",
                "from",
                "the",
                "row"
            ],
            "metadata": {
                "url": "/for/the/row"
            }
        }
    ]
}

External JSON Response

The rows value is a JSON array; the length of the array is determined by the dataSize value in the Metadata.

When external JSON format is selected, the row data will be returned as key/value pairs as shown below. The data shown below is just an example, the actual contents of the data rows are particular to each endpoint.

Each element consists of a list of data values and a metadata:

Key Desciption
dataValues List of data values for the row; will have as many elements as there are Columns
metadata Metadata for the data row (see below)

The row metadata contains the following value:

Key Description
url The URL to get the data item
{
    "rows": [
        {
            "Name": "Input",
            "Project Base": "1",
            "Project Internal": "0",
            "Ref": "1",
            "Schema Name": "input",
            "metadata": {
                "url": "/for/the/row"
            }
        }
    ]
}