/filters
POST
Create a resource for listing a selection of dimensions and dimension options to be added to filter for a dataset. Note - the is_area_type property is required to ensure a successful filter journey.
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": [
{
"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"
}
}
},
"disclosure_control": {
"type": "object",
"properties": {
"blockedoptions": {
"type": "object",
"properties": {
"blocked_count": {
"description": "The count of blocked options",
"type": "integer"
},
"blocked_options": {
"description": "A list of blocked options applicable to the dimension",
"type": "array",
"items": {
"type": "string"
}
}
}
},
"dimension": {
"description": "The name of the dimension that triggers the disclosure rules",
"type": "string"
},
"status": {
"description": "An indicator of the status of the filter query, e.g. OK for no blocked categories, BLOCKED where disclosure rules have been triggered",
"type": "string"
}
}
},
"filter_id": {
"description": "id of filter",
"type": "string"
},
"instance_id": {
"description": "id of instance filter is based on",
"type": "string"
},
"links": {
"description": "A list of links related to this resource",
"type": "object",
"properties": {
"dimensions": {
"type": "object",
"properties": {
"href": {
"description": "A URL to the dimensions list",
"type": "string",
"example": "http://localhost:8080/filters/DE3BC0B6-D6C4-4E20-917E-95D7EA8C91DC/dimensions"
}
}
},
"self": {
"type": "object",
"properties": {
"href": {
"description": "A URL to the filter",
"type": "string",
"example": "http://localhost:8080/filters/DE3BC0B6-D6C4-4E20-917E-95D7EA8C91DC"
},
"id": {
"description": "An ID of the version being filtered",
"type": "string",
"example": "DE3BC0B6-D6C4-4E20-917E-95D7EA8C91DC"
}
}
},
"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": 1
}
}
}
},
"readOnly": true
},
"population_type": {
"description": "census dataset/blob filter is based on",
"type": "string"
},
"published": {
"description": "is dataset published or not",
"type": "boolean"
},
"type": {
"description": "type of filter(e.g. flexible)",
"type": "string"
}
}
}
]
}
400: Invalid request body
Example value
null
500: Failed to process the request due to an internal error
Example value
null