/dimension-search/datasets/{id}/editions/{edition}/versions/{version}/dimensions/{name}

GET

Perform a search on dimension options which are within a hierarchy of a published version of a dataset by the ONS.

Parameters

Name Type Description
id path Id that represents a dataset
edition path An edition of a dataset
version path A version of a dataset
name path A dimension from a dataset.
limit query The number of items requested, defaulted to 50 and limited to 1000.
offset query The first row of resources to retrieve, starting at 0. Use this parameter as a pagination mechanism along with the limit parameter.
q query The query text to search datasets with.

Responses

200: A json list containing search results of dimension options which are within a hierarchy of a published version of a dataset by the ONS.

Example value
{
  "description": "The resulting resource of the completed search against a dimension hierarchy.",
  "type": "object",
  "required": [
    "count",
    "limit",
    "items",
    "offset",
    "total_count"
  ],
  "properties": {
    "count": {
      "description": "The number of items returned.",
      "type": "integer"
    },
    "items": {
      "description": "The results of the completed search against a dimension hierarchy.",
      "type": "array",
      "items": {
        "description": "An individual result of the completed search of dimension hierarchy.",
        "type": "object",
        "required": [
          "code",
          "dimension_option_url",
          "has_data",
          "label",
          "matches",
          "number_of_children"
        ],
        "properties": {
          "code": {
            "description": "The code for this dimension option.",
            "type": "string"
          },
          "dimension_option_url": {
            "description": "The id of a collection of datasets that a dataset is associated to.",
            "type": "string"
          },
          "has_data": {
            "description": "Indicator to show whether there is an observation value corresponding to the dimension option.",
            "type": "boolean"
          },
          "label": {
            "description": "The label for this dimension option.",
            "type": "string"
          },
          "matches": {
            "description": "A list of members and arrays of character offset, defining substrings that matched the search terms.",
            "type": "object",
            "properties": {
              "code": {
                "description": "An array of character offset into the `code` string. These always occur in pairs, and define the start and end of substrings in the member `code` that matched the search terms. The first character of the string is index 1. ",
                "type": "array",
                "items": {
                  "description": "A pair of integers to define the start and end of substring in the member that matched the search terms. The first character of the string is index 1.",
                  "type": "object",
                  "properties": {
                    "end": {
                      "description": "An integer to define the end of a substring in the member that matched.",
                      "type": "integer",
                      "example": 8
                    },
                    "start": {
                      "description": "An integer to define the start of a substring in the member that matched. The first character of the string is index 1.",
                      "type": "integer",
                      "example": 3
                    }
                  }
                }
              },
              "label": {
                "description": "An array of character offsets into the `label` string. These always occur in pairs, and define the start and end of substrings in the member `label` that matched the search terms. The first character of the string is index 1.",
                "type": "array",
                "items": {
                  "description": "A pair of integers to define the start and end of substring in the member that matched the search terms. The first character of the string is index 1.",
                  "type": "object",
                  "properties": {
                    "end": {
                      "description": "An integer to define the end of a substring in the member that matched.",
                      "type": "integer",
                      "example": 8
                    },
                    "start": {
                      "description": "An integer to define the start of a substring in the member that matched. The first character of the string is index 1.",
                      "type": "integer",
                      "example": 3
                    }
                  }
                }
              }
            }
          },
          "number_of_children": {
            "description": "The number of first generation descendents to this dimension option within the hierarchy.",
            "type": "integer"
          }
        }
      }
    },
    "limit": {
      "description": "The number of items requested, defaulted to 50 and limited to 1000.",
      "type": "integer"
    },
    "offset": {
      "description": "The first row of items to retrieve, starting at 0. Use this parameter as a pagination mechanism along with the limit parameter. The total number of items that one can page through is limited to 1000 items.",
      "type": "integer"
    }
  }
}

400: Failed to process the request due to invalid request.

Example value
null

404: Dimension or option not found.

Example value
null

500: Failed to process the request due to an internal error.

Example value
null