-
Notifications
You must be signed in to change notification settings - Fork 0
/
swagger.yaml
1236 lines (1233 loc) · 39.5 KB
/
swagger.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
swagger: '2.0'
info:
description: >-
Create and submit custom queries, known as `filters`, against a given
Census 2021 dataset. Specify which values, known as `options`, are of
interest in each `dimension`, and then submit a filter. This generates a
`filter output`, which provides links to the filtered results in a variety
of formats.
version: 1.0.0
title: Filter a Census 2021 dataset
license:
name: Open Government Licence v3.0
url: http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/
basePath: /v1
tags:
- name: "Public"
description: "Used to filter published Census 2021 datasets"
- name: "Private"
description: "Used by system operations on filter records"
schemes:
- http
parameters:
dataset_id:
name: dataset_id
description: "Id that represents a dataset"
in: path
required: true
type: string
edition:
name: edition
description: "An edition of a dataset"
in: path
required: true
type: string
filter_id:
name: id
type: string
required: true
description: The unique filter ID for customising a dataset
in: path
filter_output_id:
name: filter_output_id
type: string
required: true
description: The unique filter output ID for a customised dataset
in: path
area-type:
description: "The name of the area-type dimension that is being flexed, e.g. country"
name: area-type
in: query
required: false
type: string
page_limit:
name: limit
description: >-
Limit the number of items that will be returned. Defaults to 20 and capped
at 500
in: query
required: false
type: integer
default: 20
minimum: 0
maximum: 500
offset:
name: offset
description: >-
Starting index of the items array that will be returned. By default it is
zero, meaning that the returned items will start from the beginning.
in: query
required: false
type: integer
default: 0
minimum: 0
name:
name: name
type: string
required: true
description: The name of a dimension
in: path
options:
required: false
name: options
schema:
$ref: '#/definitions/Options'
description: "A list of options for a dimension to filter the dataset"
in: body
option:
name: option
type: string
required: true
description: The single option for a dimension
in: path
version:
name: version
description: "A version of a dataset"
in: path
required: true
type: string
dimension:
name: dimension
schema:
$ref: '#/definitions/Dimension'
required: true
description: A dimension to filter the dataset
in: body
dimensionUpdate:
name: dimension
schema:
$ref: '#/definitions/DimensionUpdate'
required: true
description: A dimension to update on the filter
in: body
patch_options:
required: true
name: patch
schema:
$ref: '#/definitions/PatchOptions'
description: "A list of options for a dimension to filter the dataset"
in: body
new_filter:
name: filter
schema:
$ref: '#/definitions/NewFilterRequest'
required: true
description: Model of all editable properties within a filter
in: body
update_filter_output:
name: filter_output
schema:
$ref: '#/definitions/UpdateOutputRequest'
required: true
description: Model of all editable properties within a filter output
in: body
submitted:
name: submitted
description: A flag to indicate the submission of a filter
in: query
type: boolean
update_filter:
name: filter
schema:
$ref: '#/definitions/UpdateFilterRequest'
required: true
description: Model of all editable properties within a filter
in: body
event:
name: event
schema:
$ref: '#/definitions/Event'
required: true
description: The model of an event
in: body
if_match:
name: If-Match
required: true
description: >-
Filter resource version, as returned by a previous ETag, to be validated;
or '*' to skip the version check
in: header
type: string
securityDefinitions:
InternalAPIKey:
name: internal-token
description: "API key used to allow only internal services to update the state of an import job"
in: header
type: apiKey
paths:
/filter-outputs/{filter_output_id}:
parameters:
- $ref: '#/parameters/filter_output_id'
get:
tags:
- "Public"
summary: "Get a filter output"
description: "Get document describing the filter output"
produces:
- "application/json"
responses:
200:
description: "The filter output was found and document is returned"
schema:
$ref: '#/definitions/GetFilterOutputResponse'
404:
$ref: '#/responses/FilterOutputNotFound'
500:
$ref: '#/responses/InternalError'
put:
tags:
- "Private"
summary: "Update a filter output"
description: |
Update the filter output state and to contain downloads
parameters:
- $ref: '#/parameters/update_filter_output'
responses:
200:
description: "The filter output has been updated"
400:
description: "Invalid request body"
401:
description: "Unauthorised, request lacks valid authentication credentials"
403:
description: "Forbidden, the filter output state has been set to `completed`, resource has a list of downloadable files"
404:
$ref: '#/responses/FilterOutputNotFound'
500:
$ref: '#/responses/InternalError'
/filters:
post:
tags:
- "Public"
summary: Create a filter for a dataset
description: >-
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.
produces:
- application/json
parameters:
- $ref: '#/parameters/new_filter'
responses:
'201':
description: filter was created
schema:
$ref: '#/definitions/CreateFilterResponse'
headers:
ETag:
type: string
description: Defines a unique filter resource version
'400':
description: Invalid request body
'500':
$ref: '#/responses/InternalError'
/filters/{id}:
parameters:
- $ref: '#/parameters/filter_id'
get:
tags:
- "Public"
summary: Get a filter
description: Get document describing the filter
produces:
- application/json
responses:
'200':
description: The filter was found and document is returned
schema:
$ref: '#/definitions/GetFilterResponse'
headers:
ETag:
type: string
description: Defines a unique filter resource version
'404':
$ref: '#/responses/FilterNotFound'
'500':
$ref: '#/responses/InternalError'
put:
tags:
- "Private"
summary: "Update a filter"
description: "Update the filter by providing new properties, submit a filter for processing by setting query parameter `submitted` to `true`"
parameters:
- $ref: '#/parameters/update_filter'
- $ref: '#/parameters/if_match'
responses:
200:
description: "The filter job has been updated"
schema:
$ref: '#/definitions/UpdateFilterResponse'
headers:
ETag:
type: string
description: "Defines a unique filter resource version"
400:
description: "Invalid request body or If-Match header not provided"
404:
$ref: '#/responses/FilterNotFound'
409:
description: '#/responses/FilterConflict'
500:
$ref: '#/responses/InternalError'
/filters/{id}/dimensions:
get:
tags:
- "Public"
summary: "Get all dimensions used in this filter"
description: |
Return a list of all dimensions which are going to be used to filter on
parameters:
- $ref: '#/parameters/filter_id'
- $ref: '#/parameters/page_limit'
- $ref: '#/parameters/offset'
responses:
200:
description: "A list of dimension URLs"
schema:
type: array
items:
$ref: '#/definitions/GetFilterDimensionsResponse'
headers:
ETag:
type: string
description: "Defines a unique filter resource version"
404:
$ref: '#/responses/FilterNotFound'
500:
$ref: '#/responses/InternalError'
post:
tags:
- "Public"
summary: "Add a dimension to a filter"
description: "Add a dimension to filter with a list of options. Note - the is_area_type property is required to ensure a successful filter journey."
produces:
- "application/json"
parameters:
- $ref: '#/parameters/filter_id'
- $ref: '#/parameters/options'
- $ref: '#/parameters/if_match'
responses:
201:
description: "The dimension was created"
headers:
ETag:
type: string
description: "Defines a unique filter resource version"
400:
description: "Invalid request body"
404:
description: "Filter job was not found"
409:
$ref: '#/responses/FilterConflict'
422:
description: "Unprocessable entity - instance has been removed"
500:
$ref: '#/responses/InternalError'
/filters/{id}/dimensions/{name}:
parameters:
- $ref: '#/parameters/filter_id'
- $ref: '#/parameters/name'
get:
tags:
- "Public"
summary: "Get a dimension from a filter"
description: "Return details of a specific dimension within a filter"
responses:
200:
description: "A Dimension within a filter was returned"
schema:
$ref: '#/definitions/DimensionItemWithArea'
headers:
ETag:
type: string
description: "Defines a unique filter resource version"
400:
description: "Filter was not found"
404:
description: "Dimension name was not found"
500:
$ref: '#/responses/InternalError'
put:
tags:
- "Private"
summary: "Update a dimension"
description: "Update the filter by updating a selected dimension"
parameters:
- $ref: '#/parameters/dimensionUpdate'
- $ref: '#/parameters/if_match'
responses:
200:
description: "The dimension has been updated"
schema:
$ref: '#/definitions/DimensionItem'
headers:
ETag:
type: string
description: "Defines a unique filter resource version"
400:
description: "Invalid request body, filter does not exist, or If-Match header not provided"
404:
description: "Dimension was not found"
409:
description: '#/responses/FilterConflict'
500:
$ref: '#/responses/InternalError'
patch:
tags:
- "Public"
summary: "Update dimension options against a filter job"
description: "Patch a list of dimension options for a filter"
produces:
- "application/json-patch+json"
parameters:
- $ref: '#/parameters/patch_options'
- $ref: '#/parameters/if_match'
responses:
200:
description: "The dimension was patched and the successfully applied patch operations are returned"
schema:
$ref: '#/definitions/PatchOptions'
headers:
ETag:
type: string
description: "Defines a unique filter resource version"
400:
description: "Invalid request body, filter job does not exist or too many values have been provided in the patch operations"
401:
description: "Unauthorised, request lacks valid authentication credentials"
404:
description: "Dimension was not found"
409:
$ref: '#/responses/FilterConflict'
422:
description: "Unprocessable entity - instance has been removed"
500:
$ref: '#/responses/InternalError'
delete:
tags:
- "Public"
summary: "Remove a dimension from a filter"
description: "Remove a dimension and any options set within the dimension"
parameters:
- $ref: '#/parameters/if_match'
responses:
204:
description: "The dimension was removed"
headers:
ETag:
type: string
description: "Defines a unique filter resource version"
400:
description: "Filter was not found"
404:
description: "Dimension name was not found"
409:
description: '#/responses/FilterConflict'
500:
$ref: '#/responses/InternalError'
/filters/{id}/dimensions/{name}/options:
parameters:
- $ref: '#/parameters/filter_id'
- $ref: '#/parameters/name'
- $ref: '#/parameters/page_limit'
- $ref: '#/parameters/offset'
get:
tags:
- "Public"
summary: "Get all options for a filtered dimension"
description: "Get a list of all options which will be used to filter the dimension"
responses:
200:
description: "A list of all options for a dimension was returned"
schema:
$ref: '#/definitions/OptionsResponse'
headers:
ETag:
type: string
description: "Defines a unique filter resource version"
400:
description: "Filter was not found"
404:
description: "Dimension name was not found"
500:
$ref: '#/responses/InternalError'
/filters/{id}/dimensions/{name}/options/{option}:
parameters:
- $ref: '#/parameters/filter_id'
- $ref: '#/parameters/name'
- $ref: '#/parameters/option'
post:
tags:
- "Public"
summary: "Add an option to a filtered dimension"
description: "Add an option to a filtered dimension"
parameters:
- $ref: '#/parameters/if_match'
responses:
201:
description: "Option was added"
schema:
$ref: '#/definitions/AddOptionResponse'
headers:
ETag:
type: string
description: "Defines a unique filter resource version"
400:
description: "Filter was not found"
404:
description: " Dimension name was not found"
409:
description: '#/responses/FilterConflict'
422:
description: "Unprocessable entity - instance has been removed"
500:
$ref: '#/responses/InternalError'
delete:
tags:
- "Public"
summary: "Remove an option from a filtered dimension"
description: "Remove a single option from a dimension"
parameters:
- $ref: '#/parameters/if_match'
responses:
204:
description: "Option was removed"
headers:
ETag:
type: string
description: "Defines a unique filter resource version"
400:
description: |
This error code could be one or more of:
* Filter was not found
* Dimension name was not found
404:
description: "Dimension option was not found"
409:
description: '#/responses/FilterConflict'
500:
$ref: '#/responses/InternalError'
/filter-outputs/{filter_output_id}/events:
parameters:
- $ref: '#/parameters/filter_output_id'
post:
tags:
- "Private"
summary: "Add an event to a filter output"
description: |
Add an event to a filter output
parameters:
- $ref: '#/parameters/event'
security:
- InternalAPIKey: []
responses:
201:
description: "The event has been created on the filter output"
400:
description: "Invalid request body"
401:
description: "Unauthorised, request lacks valid authentication credentials"
404:
$ref: '#/responses/FilterOutputNotFound'
500:
$ref: '#/responses/InternalError'
/filters/{id}/submit:
post:
tags:
- "Public"
summary: Submits a filter query for a Census 2021 dataset
produces:
- application/json
parameters:
- $ref: '#/parameters/filter_id'
responses:
'202':
description: Query was submitted successfully
schema:
$ref: '#/definitions/SubmitFilterResponse'
'500':
$ref: '#/responses/InternalError'
/datasets/{dataset_id}/editions/{edition}/versions/{version}/json:
get:
tags:
- "Public"
summary: "Get observations for a census dataset - to be deprecated autumn 2023. Updated endpoint will be /datasets/{dataset_id}/editions/{edition}/versions/{version}/observations."
description: "This endpoint will be deprecated autumn 2023. This gets observations for a census dataset, with capability to flex and filter the data to the users need. If no area-type or dimension parameters are supplied then observations for the default area-type and dimensions are returned."
parameters:
- $ref: '#/parameters/dataset_id'
- $ref: '#/parameters/edition'
- $ref: '#/parameters/version'
- $ref: '#/parameters/area-type'
responses:
200:
description: "Json object containing all metadata for a version"
schema:
$ref: '#/definitions/GetDatasetJSONResponse'
400:
description: |
Invalid request, reasons can be one of the following:
* query parameters contain incorrect dimensions
404:
description: |
Resource not found, reasons can be one of the following:
* dataset id was incorrect
* edition was incorrect
* version was incorrect
* observations not found for selected query paramaters
500:
$ref: '#/responses/InternalError'
/datasets/{dataset_id}/editions/{edition}/versions/{version}/census-observations:
get:
tags:
- "Public"
summary: "Get observations for a census dataset - new format. This replaces /datasets/{dataset_id}/editions/{edition}/versions/{version}/json."
description: "Get observations for a census dataset, with capability to flex and filter the data to the users need. If no area-type or dimension parameters are supplied then observations for the default area-type and dimensions are returned."
parameters:
- $ref: '#/parameters/dataset_id'
- $ref: '#/parameters/edition'
- $ref: '#/parameters/version'
- $ref: '#/parameters/area-type'
responses:
200:
description: "Json object containing observations for a dataset"
schema:
$ref: '#/definitions/GetDatasetObservationsResponse'
400:
description: |
Invalid request, reasons can be one of the following:
* query parameters contain incorrect dimensions
404:
description: |
Resource not found, reasons can be one of the following:
* dataset id was incorrect
* edition was incorrect
* version was incorrect
* observations not found for selected query paramaters
500:
$ref: '#/responses/InternalError'
responses:
FilterNotFound:
description: Filter not found
FilterConflict:
description: Filter was modified by an external entity
FilterOutputNotFound:
description: Filter output not found
FilterOrDimensionNotFound:
description: Filter or dimension name not found
InternalError:
description: Failed to process the request due to an internal error
MethodNotSupported:
description: Attempted to call an endpoint that is not supported for this API
definitions:
NewFilterRequest:
description: A model used to create new filters. Dimensions are optional
allOf:
- type: object
properties:
dataset:
$ref: '#/definitions/Dataset'
dimensions:
readOnly: false
type: array
description: A list of dimensions in the filter job
items:
type: array
items:
$ref: "#/definitions/Dimension"
population_type:
type: string
description: The population type the information is selected from.
UpdateFilterRequest:
description: >-
A model used to update filters. Dimensions are optional, while downloads
and events are for internal use only.
allOf:
- type: object
properties:
dataset:
$ref: "#/definitions/Dataset"
events:
type: array
items:
$ref: "#/definitions/Event"
population_type:
type: string
description: The population type the information is selected from.
GetFilterResponse:
description: A model for the response body when updating a filter
allOf:
- $ref: '#/definitions/Filter'
CreateFilterResponse:
description: "A model for the response body when creating a new filter"
allOf:
- $ref: '#/definitions/Filter'
UpdateOutputRequest:
description: >-
A model used to update filter outputs. Only the downloads list and state
are editable
type: object
properties:
state:
type: string
description: >
The state of the job can be in five states;
* created - The job is ready to be updated with filters. (default
state)
* submitted - The job has been submitted to be processed. This will
lock the job and no further changes can be done
* completed - The job has been completed, if the filter created
results the download links will contain links. It is
possible that a job gets marked as completed but no download URLs are present, this is due to the filter job
returning no results. See the events for more information.
* failed - The job failed to be processed, See events for more
information
downloads:
$ref: '#/definitions/Downloads'
Filter:
properties:
filter_id:
type: string
description: id of filter
instance_id:
type: string
description: id of instance filter is based on
dataset:
$ref: "#/definitions/Dataset"
published:
type: boolean
description: is dataset published or not
disclosure_control:
$ref: "#/definitions/DisclosureControl"
type:
type: string
description: type of filter(e.g. flexible)
population_type:
type: string
description: census dataset/blob filter is based on
links:
$ref: "#/definitions/FilterLinks"
Dataset:
readOnly: false
type: object
description: A version of an edition for a dataset to filter on.
properties:
id:
type: string
description: The unique identifier of a dataset
edition:
type: string
description: An edition of a dataset
version:
type: integer
description: A version of a dataset
IsBasedOn:
type: object
description: If the dataset is related to Census, which population-type the dataset is taken from, and the type of dataset
properties:
id:
type: string
description: the population-type the dataset is based on
type:
type: string
description: the type of dataset
Dimension:
type: object
description: "A dimension to filter on a dataset. Information on a dimension can be gathered using the `Dataset API`"
properties:
name:
type: string
description: "The name of the dimension to filter on"
is_area_type:
type: boolean
description: Indicates if the dimension is an area type
filter_by_parent:
type: string
description: Indicates the dependent variable, one level up, that the dimension should be filtered by
options:
type: array
items:
type: string
DimensionUpdate:
type: object
description: "A dimension to update on a dataset."
required:
- id
properties:
id:
type: string
example: city
is_area_type:
type: boolean
description: Indicates if the dimension is an area type
options:
type: array
items:
type: string
Downloads:
type: object
description: >
The url to download the customised dataset. This will be blank until the
jobs `state` has been marked completed and can only be updated if
authorised
properties:
xls:
$ref: '#/definitions/DownloadFile'
csv:
$ref: '#/definitions/DownloadFile'
csvw:
$ref: '#/definitions/DownloadFile'
txt:
$ref: '#/definitions/DownloadFile'
Events:
type: array
items:
$ref: '#/definitions/Event'
description: >
A list of events which happened to the resource, can only be updated if
authorised.
Event:
type: object
description: A description of an event which has happened to the resource
properties:
timestamp:
type: string
description: The time of the event happened
example: 2016-07-17T08:38:25.316+0000
format: string
name:
type: string
description: The type of event which happened
example: cantabular-export-start
DownloadFile:
type: object
properties:
href:
type: string
description: The URL to the generated file
size:
type: string
description: The size of the file in bytes
public:
type: string
description: The URL to a public-accessible download
private:
type: string
description: The URL to a non public-accessible download
skipped:
type: boolean
description: A flag to indicate the file will not be generated due to size
FilterLinks:
description: A list of links related to this resource
readOnly: true
type: object
properties:
version:
type: object
properties:
href:
description: A URL to the version being filtered
example: >-
http://localhost:8080/datasets/DE3BC0B6-D6C4-4E20-917E-95D7EA8C91DC/editions/2017/version/1
type: string
id:
description: An ID of the version being filtered
example: 1
type: string
self:
type: object
properties:
href:
description: A URL to the filter
example: >-
http://localhost:8080/filters/DE3BC0B6-D6C4-4E20-917E-95D7EA8C91DC
type: string
id:
description: An ID of the version being filtered
example: "DE3BC0B6-D6C4-4E20-917E-95D7EA8C91DC"
type: string
dimensions:
type: object
properties:
href:
description: A URL to the dimensions list
example: >-
http://localhost:8080/filters/DE3BC0B6-D6C4-4E20-917E-95D7EA8C91DC/dimensions
type: string
FilterOutputLinks:
description: A list of links related to this resource
readOnly: true
type: object
properties:
version:
type: object
properties:
href:
description: A URL to the version being filtered
example: >-
http://localhost:8080/datasets/DE3BC0B6-D6C4-4E20-917E-95D7EA8C91DC/editions/2017/version/1
type: string
id:
description: An ID of the version being filtered
example: de3bc0b6-d6c4-4e20-917e-95d7ea8c91dc
type: string
self:
type: object
properties:
href:
description: A URL to the filter
example: >-
http://localhost:8080/filters/DE3BC0B6-D6C4-4E20-917E-95D7EA8C91DC
type: string
DisclosureControl:
type: object
properties:
status:
type: string
description: An indicator of the status of the filter query, e.g. OK for no blocked categories, BLOCKED where disclosure rules have been triggered
dimension:
type: string
description: The name of the dimension that triggers the disclosure rules
blockedoptions:
$ref: '#/definitions/BlockedOptions'
PatchOptions:
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:
type: object
description: "Item containing all necessary information to make a single operation on the resource."
properties:
op:
description: |
The operation to be made on path.
* add - Adding multiple values that are the same or already in resource will not be appended to array.
* remove - Removing values that do not exist in array will not result in failure
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
ObservationDimension:
type: object
description: "A dimension returned relating to an observation"
properties:
dimension:
type: string
description: "The dimension description"
dimension_id:
type: string
description: "The dimension id"
option:
type: string
description: "The description of the option the observation relates to"
option_id:
type: string
description: "The id of the option the observation relates to"
Options:
type: object
description: "A list of options for dimension to filter on a dataset"
properties:
name:
type: string
description: "The name of the dimension"
is_area_type:
type: boolean
description: "Indicates if the dimension is an area type"
options:
type: array
description: "A list of options for dimension to filter on a dataset"
items:
type: string
BlockedOptions:
type: object
properties:
blocked_options:
type: array
items:
type: string
description: A list of blocked options applicable to the dimension
blocked_count:
type: integer
description: The count of blocked options
FilterOutput:
properties:
id:
type: string
filter_id:
type: string
instance_id:
type: string
dataset:
$ref: "#/definitions/Dataset"
published:
type: boolean
state:
description: "This describes the status of the filter."
enum:
- "completed"
- "created"
type: string
downloads:
$ref: '#/definitions/Downloads'
events:
type: array
items:
$ref: "#/definitions/Event"
type:
type: string
population_type:
type: string
disclosure_control: