/filters

POST

Create a resource for listing a selection of dimensions and dimension options to be added to filter for a dataset

Parameters

Name Type Description
filter body Model of all editable properties within a filter

Responses

201: filter was created

Example value
{
  "description": "A model for the response body when creating a new filter",
  "allOf": [
    {
      "description": "A description of a job to generate a customised dataset\n",
      "type": "object",
      "required": [
        "instance_id"
      ],
      "properties": {
        "dimension_list_url": {
          "description": "A url that lists all dimensions currently set for filter",
          "type": "string",
          "readOnly": true
        },
        "events": {
          "description": "A list of events which happened to the resource, can only be updated if authorised.\n",
          "type": "array",
          "items": {
            "description": "A description of an event which has happened to the resource",
            "type": "object",
            "properties": {
              "time": {
                "description": "The time of the event happened",
                "type": "string"
              },
              "type": {
                "description": "The type of event which happened",
                "type": "string"
              }
            }
          }
        },
        "filter_id": {
          "description": "A unique id for this resource",
          "type": "string",
          "readOnly": true
        },
        "links": {
          "description": "A list of links related to this resource",
          "type": "object",
          "properties": {
            "preview": {
              "type": "object",
              "properties": {
                "href": {
                  "description": "A URL to a preview of the filter output",
                  "type": "string",
                  "example": "http://localhost:8080/filter-outputs/DE3BC0B6-D6C4-4E20-917E-95D7EA8C91DC/preview"
                }
              }
            },
            "version": {
              "type": "object",
              "properties": {
                "href": {
                  "description": "A URL to the version being filtered",
                  "type": "string",
                  "example": "http://localhost:8080/datasets/DE3BC0B6-D6C4-4E20-917E-95D7EA8C91DC/editions/2017/version/1"
                },
                "id": {
                  "description": "An ID of the version being filtered",
                  "type": "string",
                  "example": "de3bc0b6-d6c4-4e20-917e-95d7ea8c91dc"
                }
              }
            }
          },
          "readOnly": true
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "dataset": {
          "description": "A version of an edition for a dataset to filter on.",
          "type": "object",
          "properties": {
            "edition": {
              "description": "An edition of a dataset",
              "type": "string"
            },
            "id": {
              "description": "The unique identifier of a dataset",
              "type": "string"
            },
            "version": {
              "description": "A version of a dataset",
              "type": "integer"
            }
          }
        }
      }
    }
  ]
}

400: Invalid request body

Example value
null

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

Example value
null