/filters/{id}/dimensions/{name}

GET

Return details of a specific dimension within a filter

Responses

200: A Dimension within a filter was returned

Example value
{
  "description": "A dimension to filter on a dataset. Information on a dimension can be gathered using the `Dataset API`",
  "type": "object",
  "properties": {
    "dimension_url": {
      "description": "A link to the filtered options within the dimension",
      "type": "string",
      "items": {
        "type": "string",
        "example": "/filters/00001/dimensions/age"
      }
    },
    "name": {
      "description": "The name of the dimension to filter on",
      "type": "string"
    }
  }
}

400: Filter was not found

Example value
null

404: Dimension name was not found

Example value
null

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

Example value
null

POST

Add a dimension to filter with a list of options

Parameters

Name Type Description
options body A list of options for a dimension to filter the dataset
id path The unique filter ID for customising a dataset
name path The name of a dimension

Responses

201: The dimension was created

Example value
null

400: Invalid request body

Example value
null

404: Filter job was not found

Example value
null

422: Unprocessable entity - instance has been removed

Example value
null

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

Example value
null

DELETE

Remove a dimension and any options set within the dimension

Responses

204: The dimension was removed

Example value
null

400: Filter was not found

Example value
null

404: Dimension name was not found

Example value
null

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

Example value
null

PATCH

Patch a list of dimension options for a filter

Parameters

Name Type Description
patch body A list of options for a dimension to filter the dataset
id path The unique filter ID for customising a dataset
name path The name of a dimension

Responses

200: The dimension was patched and the successfully applied patch operations are returned

Example value
{
  "description": "A list of operations to patch dimension to filter on a dataset. Can only handle adding or removing values from options array, each element in array is processed in sequential order. Method Patch does not abide by any existing rfc standard, yet this was adapted from rfc6902 standard.",
  "type": "array",
  "items": {
    "description": "Item containing all necessary information to make a single operation on the resource.",
    "type": "object",
    "properties": {
      "op": {
        "description": "The operation to be made on path.\n* add - Adding multiple values that are the same or already  in resource will not be appended to array.\n* remove - Removing values that do not exist in array will not result in failure\n",
        "type": "string",
        "enum": [
          "add",
          "remove"
        ]
      },
      "path": {
        "description": "Path to value that needs to be operated on. The special '-' key is the indicator of an array at a specific path",
        "type": "string",
        "example": "/options/-"
      },
      "value": {
        "description": "A list of values defined by the operation value. 'op' to define the update against array",
        "type": "array",
        "items": {
          "type": "string"
        }
      }
    }
  }
}

400: Invalid request body, filter job does not exist or too many values have been provided in the patch operations

Example value
null

401: Unauthorised, request lacks valid authentication credentials

Example value
null

404: Dimension was not found

Example value
null

422: Unprocessable entity - instance has been removed

Example value
null

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

Example value
null