-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTimeAddressableDataStore.yaml
More file actions
2505 lines (2446 loc) · 98 KB
/
Copy pathTimeAddressableDataStore.yaml
File metadata and controls
2505 lines (2446 loc) · 98 KB
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
#
# Copyright 2026 British Broadcasting Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
openapi: 3.1.0
info:
title: Time-Addressable Data Store
description: |
The Time-Addressable Data Store (TADS) is used for storing timeline data.
The TADS consists of a service providing a database index of the Tracks and Track Events associated with them.
This document is a specification of the service API.
See the [bbc/tads](https://github.com/bbc/tads) repository for more background on TADS.
version: "0.1"
contact:
name: 'BBC R&D - Cloud-Fit Production Team'
email: 'cloudfit-opensource@rd.bbc.co.uk'
url: https://github.com/bbc/tads
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: 'http://localhost:4010'
description: Local mock of API
- url: 'https://example.com/tads/{version}'
description: Example TADS service
variables:
version:
description: API version
default: v0.1
security:
- bearer_token_auth: []
- url_token_auth: []
- basic_auth: []
paths:
/:
head:
summary: List Root Endpoints
operationId: HEAD_root
description: Return `/` path headers
responses:
"200":
description: ""
tags:
- Service
get:
summary: List Root Endpoints
operationId: GET_root
description: Return the list of endpoints available from the API.
responses:
"200":
description: Return the list of endpoints available from the API.
content:
application/json:
example:
- schemas
- service
- tracks
tags:
- Service
/service:
head:
summary: Service metadata
operationId: HEAD_service
description: Return `/service` path headers
responses:
"200":
description: ""
tags:
- Service
get:
summary: Service metadata
operationId: GET_service
description: Return metadata about the Service Instance.
responses:
"200":
description: Return metadata about the Service Instance.
content:
application/json:
schema:
$ref: schemas/service.json
example:
$ref: examples/service-get-200.json
tags:
- Service
/schemas:
head:
summary: List Payload Schemas
operationId: HEAD_schemas
description: Return `/schemas` path headers
parameters:
- name: label
in: query
description: Filter on Payload Schemas that have the given `label`.
schema:
type: string
- name: external_id
in: query
description: |
Filter on Payload Schemas that have the given `external_id`.
The value MUST be URL encoded where special characters are present.
schema:
type: string
- name: tag.{name}
in: query
description: |
Filter on Payload Schemas that have a tag named {name} with a value in the given comma-separated list of values.
The {name} and the value MUST be URL encoded where special characters are present.
Where the tag's value is a string, at least one of the given values will match.
Where the tag's value is an array, at least one value in the array will match at least one of the given values.
Partial string matches of the values are not valid.
schema:
$ref: schemas/url-tag-list.json
- name: tag_exists.{name}
in: query
description: |
Filter on Payload Schemas that have a tag named {name} regardless of value.
{name} MUST be URL encoded where special characters are present.
If set to true then the presence of the tag is filtered for.
If set to false then its absence is.
If left out then no filtering on tag presence is performed.
schema:
type: boolean
- $ref: "#/components/parameters/trait_resource_paged_page"
- $ref: "#/components/parameters/trait_resource_paged_limit"
responses:
"200":
description: ""
headers:
Link:
$ref: "#/components/headers/Link"
X-Paging-NextKey:
$ref: "#/components/headers/X-Paging-NextKey"
X-Paging-Limit:
$ref: "#/components/headers/X-Paging-Limit"
X-Paging-Count:
$ref: "#/components/headers/X-Paging-Count"
"400":
$ref: "#/components/responses/trait_resource_400_invalid_query_options"
tags:
- Payload Schemas
get:
summary: List Payload Schemas
operationId: GET_schemas
description: |
Return the list of Payload Schemas.
Each Track references a Payload Schema: the JSON `schema` belonging to the Payload Schema is used to validate the `payload` of every Track Event owned by the Track.
parameters:
- name: label
in: query
description: Filter on Payload Schemas that have the given `label`.
schema:
type: string
- name: external_id
in: query
description: |
Filter on Payload Schemas that have the given `external_id`.
The value MUST be URL encoded where special characters are present.
schema:
type: string
- name: tag.{name}
in: query
description: |
Filter on Payload Schemas that have a tag named {name} with a value in the given comma-separated list of values.
The {name} and the value MUST be URL encoded where special characters are present.
Where the tag's value is a string, at least one of the given values will match.
Where the tag's value is an array, at least one value in the array will match at least one of the given values.
Partial string matches of the values are not valid.
schema:
$ref: schemas/url-tag-list.json
- name: tag_exists.{name}
in: query
description: |
Filter on Payload Schemas that have a tag named {name} regardless of value.
{name} MUST be URL encoded where special characters are present.
If set to true then the presence of the tag is filtered for.
If set to false then its absence is.
If left out then no filtering on tag presence is performed.
schema:
type: boolean
- $ref: "#/components/parameters/trait_resource_paged_page"
- $ref: "#/components/parameters/trait_resource_paged_limit"
responses:
"200":
description: Return the list of Payload Schemas.
headers:
Link:
$ref: "#/components/headers/Link"
X-Paging-NextKey:
$ref: "#/components/headers/X-Paging-NextKey"
X-Paging-Limit:
$ref: "#/components/headers/X-Paging-Limit"
X-Paging-Count:
$ref: "#/components/headers/X-Paging-Count"
content:
application/json:
schema:
type: array
items:
$ref: schemas/schema.json
example:
$ref: examples/schemas-get-200.json
"400":
$ref: "#/components/responses/trait_resource_400_invalid_query_options"
tags:
- Payload Schemas
/schemas/{schema_id}:
parameters:
- name: schema_id
in: path
required: true
schema:
$ref: schemas/uuid.json
description: The Payload Schema identifier.
head:
summary: Payload Schema details
operationId: HEAD_schemas-schema_id
description: Return `/schemas/{schema_id}` path headers
responses:
"200":
description: ""
"404":
$ref: "#/components/responses/trait_resource_404_path_not_found"
tags:
- Payload Schemas
get:
summary: Payload Schema details
operationId: GET_schemas-schema_id
description: |
Return the Payload Schema details.
Each Track references a Payload Schema: the JSON `schema` belonging to the Payload Schema is used to validate the `payload` of every Track Event owned by the Track.
responses:
"200":
description: Return the Payload Schema details.
content:
application/json:
schema:
$ref: schemas/schema.json
example:
$ref: examples/schema-get-200.json
"404":
$ref: "#/components/responses/trait_resource_404_path_not_found"
tags:
- Payload Schemas
put:
summary: Create Payload Schema
description: |
Create a Payload Schema or update a Payload Schema's metadata.
Each Track references a Payload Schema: the JSON `schema` belonging to the Payload Schema is used to validate the `payload` of every Track Event owned by the Track.
operationId: PUT_schemas-schema_id
tags:
- Payload Schemas
requestBody:
content:
application/json:
example:
$ref: examples/schema-put.json
schema:
$ref: schemas/schema.json
required: true
responses:
"201":
description: Created. The Payload Schema has been created.
content:
application/json:
example:
$ref: examples/schema-put.json
schema:
$ref: schemas/schema.json
"204":
description: No content. The Payload Schema's metadata has been updated.
"400":
$ref: "#/components/responses/trait_resource_400_invalid_request_body"
"403":
description: Forbidden. Requests cannot modify an existing Payload Schema's `schema` value.
"404":
$ref: "#/components/responses/trait_resource_404_path_not_valid"
delete:
summary: Delete Payload Schema
description: |
Delete the Payload Schema.
Any Tracks using the Payload Schema must be deleted before deleting the Payload Schema. Service Implementations MUST reject the request if any Tracks exist that refer to the Payload Schema.
operationId: DELETE_schemas-schema_id
tags:
- Payload Schemas
responses:
"204":
description: No content. The Payload Schema has been deleted.
"400":
description: Bad request. The Payload Schema could still be in use by a Track.
"403":
$ref: "#/components/responses/trait_resource_403_delete_forbidden"
"404":
$ref: "#/components/responses/trait_resource_404_path_not_found"
/schemas/{schema_id}/schema:
parameters:
- name: schema_id
in: path
required: true
schema:
$ref: schemas/uuid.json
description: The Payload Schema identifier.
head:
summary: Payload Schema's JSON schema
description: Return `/schemas/{schema_id}/schema` path headers
operationId: HEAD_schemas-schema_id-schema
tags:
- Payload Schemas (granular)
responses:
"200":
description: ""
"404":
$ref: "#/components/responses/trait_resource_404_path_not_found"
get:
summary: Payload Schema's JSON schema
description: Return the Payload Schema `schema` value.
operationId: GET_schemas-schema_id-schema
tags:
- Payload Schemas (granular)
responses:
"200":
description: Return the Payload Schema `schema` value.
content:
application/json:
example:
$ref: examples/schema-get-200.json#/schema
schema:
description: The schema itself. Conforms to the JSON schema specification. Service Implementations must not permit editing of the `schema` itself.
type: object
"404":
$ref: "#/components/responses/trait_resource_404_path_not_found"
/schemas/{schema_id}/tags:
parameters:
- name: schema_id
in: path
required: true
schema:
$ref: schemas/uuid.json
description: The Payload Schema identifier.
head:
summary: List Payload Schema Tags
description: Return `/schemas/{schema_id}/tags` path headers
operationId: HEAD_schemas-schema_id-tags
tags:
- Payload Schemas (granular)
responses:
"200":
description: ""
"404":
$ref: "#/components/responses/trait_resource_404_path_not_found"
get:
summary: List Payload Schema Tags
description: Return the Payload Schema `tags` value.
operationId: GET_schemas-schema_id-tags
tags:
- Payload Schemas (granular)
responses:
"200":
description: Return the Payload Schema `tags` value.
content:
application/json:
example:
$ref: examples/schema-get-200.json#/tags
schema:
$ref: schemas/tags.json
"404":
$ref: "#/components/responses/trait_resource_404_path_not_found"
/schemas/{schema_id}/tags/{name}:
parameters:
- name: name
in: path
required: true
schema:
type: string
description: The tag name (used as the key in `tags`). {name} MUST be URL encoded where special characters are present.
- name: schema_id
in: path
required: true
schema:
$ref: schemas/uuid.json
description: The Payload Schema identifier.
head:
summary: Payload Schema Tag Value
description: Return `/schemas/{schema_id}/tags/{name}` path headers
operationId: HEAD_schemas-schema_id-tags-name
tags:
- Payload Schemas (granular)
responses:
"200":
description: ""
"404":
$ref: "#/components/responses/trait_resource_404_path_not_found"
get:
summary: Payload Schema Tag Value
description: Return the tag value associated with the tag name (where name is used as the key in `tags`).
operationId: GET_schemas-schema_id-tags-name
tags:
- Payload Schemas (granular)
responses:
"200":
description: Return the tag value associated with the tag name (where name is used as the key in `tags`).
content:
application/json:
example: |
"news"
schema:
oneOf:
- type: string
- type: array
items:
type: string
"404":
$ref: "#/components/responses/trait_resource_404_path_not_found"
put:
summary: Create or Update Payload Schema Tag
description: Create or update the Payload Schema tag (where name is used as the key in `tags`).
operationId: PUT_schemas-schema_id-tags-name
tags:
- Payload Schemas (granular)
requestBody:
content:
application/json:
example: |
"new_value"
schema:
oneOf:
- type: string
- type: array
items:
type: string
required: true
responses:
"204":
description: No content. The tag has been created or updated.
"400":
$ref: "#/components/responses/trait_resource_400_invalid_request_body"
"403":
$ref: "#/components/responses/trait_resource_403_modify_forbidden"
"404":
description: Not found. The specified Payload Schema does not exist and/or the tag name in the path is invalid.
delete:
summary: Delete Payload Schema Tag
description: Delete the Payload Schema tag (where name is used as the key in `tags`).
operationId: DELETE_schemas-schema_id-tags-name
tags:
- Payload Schemas (granular)
responses:
"204":
description: No content. The Payload Schema tag has been deleted.
"403":
$ref: "#/components/responses/trait_resource_403_delete_forbidden"
"404":
$ref: "#/components/responses/trait_resource_404_path_not_found"
/schemas/{schema_id}/description:
parameters:
- name: schema_id
in: path
required: true
schema:
$ref: schemas/uuid.json
description: The Payload Schema identifier.
head:
summary: Payload Schema Description
description: Return `/schemas/{schema_id}/description` path headers
operationId: HEAD_schemas-schema_id-description
tags:
- Payload Schemas (granular)
responses:
"200":
description: ""
"404":
$ref: "#/components/responses/trait_resource_404_path_not_found"
get:
summary: Payload Schema Description
description: Return the Payload Schema `description` value.
operationId: GET_schemas-schema_id-description
tags:
- Payload Schemas (granular)
responses:
"200":
description: Return the Payload Schema `description` value.
content:
application/json:
example:
$ref: examples/schema-get-200.json#/description
schema:
description: Freeform text describing the Payload Schema. This should be a human-readable description that may be displayed in detailed views of Payload Schemas. The description should be longer and more detailed than `label`.
type: string
"404":
$ref: "#/components/responses/trait_resource_404_path_not_found"
put:
summary: Create or Update Payload Schema Description
description: Create or update Payload Schema `description` with the given value.
operationId: PUT_schemas-schema_id-description
tags:
- Payload Schemas (granular)
requestBody:
content:
application/json:
example:
$ref: examples/schema-get-200.json#/description
schema:
description: Freeform text describing the Payload Schema. This should be a human-readable description that may be displayed in detailed views of Payload Schemas. The description should be longer and more detailed than `label`.
type: string
required: true
responses:
"204":
description: No content. The Payload Schema `description` has been created or updated with the given value.
"400":
description: Bad request. Invalid Payload Schema `description` value.
"403":
$ref: "#/components/responses/trait_resource_403_modify_forbidden"
"404":
$ref: "#/components/responses/trait_resource_404_path_not_found"
delete:
summary: Delete Payload Schema Description
description: Delete the Payload Schema `description` property.
operationId: DELETE_schemas-schema_id-description
tags:
- Payload Schemas (granular)
responses:
"204":
description: No content. The Payload Schema `description` property has been deleted.
"403":
$ref: "#/components/responses/trait_resource_403_modify_forbidden"
"404":
$ref: "#/components/responses/trait_resource_404_path_not_found"
/schemas/{schema_id}/label:
parameters:
- name: schema_id
in: path
required: true
schema:
$ref: schemas/uuid.json
description: The Payload Schema identifier.
head:
summary: Payload Schema Label
description: Return `/schemas/{schema_id}/label` path headers
operationId: HEAD_schemas-schema_id-label
tags:
- Payload Schemas (granular)
responses:
"200":
description: ""
"404":
$ref: "#/components/responses/trait_resource_404_path_not_found"
get:
summary: Payload Schema Label
description: Return the Payload Schema `label` value.
operationId: GET_schemas-schema_id-label
tags:
- Payload Schemas (granular)
responses:
"200":
description: Return the Payload Schema `label` value.
content:
application/json:
example:
$ref: examples/schema-get-200.json#/label
schema:
description: Freeform string label for the Payload Schema. This should be a very short, human-readable label that may be displayed in listings of Payload Schemas.
type: string
"404":
$ref: "#/components/responses/trait_resource_404_path_not_found"
put:
summary: Create or Update Payload Schema Label
description: Create or update Payload Schema `label` with the given value.
operationId: PUT_schemas-schema_id-label
tags:
- Payload Schemas (granular)
requestBody:
content:
application/json:
example:
$ref: examples/schema-get-200.json#/label
schema:
description: Freeform string label for the Payload Schema. This should be a very short, human-readable label that may be displayed in listings of Payload Schemas.
type: string
required: true
responses:
"204":
description: No content. The Payload Schema `label` has been created or updated with the given value.
"400":
description: Bad request. Invalid Payload Schema `label` value.
"403":
$ref: "#/components/responses/trait_resource_403_modify_forbidden"
"404":
$ref: "#/components/responses/trait_resource_404_path_not_found"
delete:
summary: Delete Payload Schema Label
description: Delete the Payload Schema `label` property.
operationId: DELETE_schemas-schema_id-label
tags:
- Payload Schemas (granular)
responses:
"204":
description: No content. The Payload Schema `label` property has been deleted.
"403":
$ref: "#/components/responses/trait_resource_403_modify_forbidden"
"404":
$ref: "#/components/responses/trait_resource_404_path_not_found"
/schemas/{schema_id}/external_id:
parameters:
- name: schema_id
in: path
required: true
schema:
$ref: schemas/uuid.json
description: The Payload Schema identifier.
head:
summary: Payload Schema External ID
description: Return `/schemas/{schema_id}/external_id` path headers
operationId: HEAD_schemas-schema_id-external_id
tags:
- Payload Schemas (granular)
responses:
"200":
description: ""
"404":
$ref: "#/components/responses/trait_resource_404_path_not_found"
get:
summary: Payload Schema External ID
description: Return the Payload Schema `external_id` value.
operationId: GET_schemas-schema_id-external_id
tags:
- Payload Schemas (granular)
responses:
"200":
description: Return the Payload Schema `external_id` value.
content:
application/json:
example:
$ref: examples/schema-get-200.json#/external_id
schema:
description: A string identifier used to identify the Payload Schema in other systems. If the Payload Schema is imported from another system and has a URI, or other identifier, it should be set here.
type: string
"404":
$ref: "#/components/responses/trait_resource_404_path_not_found"
put:
summary: Create or Update Payload Schema External ID
description: Create or update Payload Schema `external_id` with the given value.
operationId: PUT_schemas-schema_id-external_id
tags:
- Payload Schemas (granular)
requestBody:
content:
application/json:
example:
$ref: examples/schema-get-200.json#/external_id
schema:
description: A string identifier used to identify the Payload Schema in other systems. If the Payload Schema is imported from another system and has a URI, or other identifier, it should be set here.
type: string
required: true
responses:
"204":
description: No content. The Payload Schema `external_id` has been created or updated with the given value.
"400":
description: Bad request. Invalid Payload Schema `external_id` value.
"403":
$ref: "#/components/responses/trait_resource_403_modify_forbidden"
"404":
$ref: "#/components/responses/trait_resource_404_path_not_found"
delete:
summary: Delete Payload Schema External ID
description: Delete the Payload Schema `external_id` property.
operationId: DELETE_schemas-schema_id-external_id
tags:
- Payload Schemas (granular)
responses:
"204":
description: No content. The Payload Schema `external_id` property has been deleted.
"403":
$ref: "#/components/responses/trait_resource_403_modify_forbidden"
"404":
$ref: "#/components/responses/trait_resource_404_path_not_found"
/service/webhooks:
head:
summary: List Webhook URLs
description: Return `/service/webhooks` path headers
operationId: HEAD_service-webhooks
tags:
- Webhooks
parameters:
- name: tag.{name}
in: query
description: |
Filter on webhooks that have a tag named {name} with a value in the given comma-separated list of values.
The {name} and the value MUST be URL encoded where special characters are present.
Where the tag's value is a string, at least one of the given values will match.
Where the tag's value is an array, at least one value in the array will match at least one of the given values.
Partial string matches of the values are not valid.
schema:
$ref: schemas/url-tag-list.json
- name: tag_exists.{name}
in: query
description: |
Filter on webhooks that have a tag named {name} regardless of value.
{name} MUST be URL encoded where special characters are present.
If set to true then the presence of the tag is filtered for.
If set to false then its absence is.
If left out then no filtering on tag presence is performed.
schema:
type: boolean
- $ref: "#/components/parameters/trait_resource_paged_page"
- $ref: "#/components/parameters/trait_resource_paged_limit"
responses:
"200":
description: ""
headers:
Link:
$ref: "#/components/headers/Link"
X-Paging-NextKey:
$ref: "#/components/headers/X-Paging-NextKey"
X-Paging-Limit:
$ref: "#/components/headers/X-Paging-Limit"
X-Paging-Count:
$ref: "#/components/headers/X-Paging-Count"
"400":
$ref: "#/components/responses/trait_resource_400_invalid_query_options"
get:
summary: List Webhook URLs
description: |
Return the list of registered webhook URLs.
Service Implementations SHOULD take steps to avoid displaying URLs to users other than those who have suitable permissions (e.g. the owning user).
operationId: GET_service-webhooks
tags:
- Webhooks
parameters:
- name: tag.{name}
in: query
description: |
Filter on webhooks that have a tag named {name} with a value in the given comma-separated list of values.
The {name} and the value MUST be URL encoded where special characters are present.
Where the tag's value is a string, at least one of the given values will match.
Where the tag's value is an array, at least one value in the array will match at least one of the given values.
Partial string matches of the values are not valid.
schema:
$ref: schemas/url-tag-list.json
- name: tag_exists.{name}
in: query
description: |
Filter on webhooks that have a tag named {name} regardless of value.
{name} MUST be URL encoded where special characters are present.
If set to true then the presence of the tag is filtered for.
If set to false then its absence is.
If left out then no filtering on tag presence is performed.
schema:
type: boolean
- $ref: "#/components/parameters/trait_resource_paged_page"
- $ref: "#/components/parameters/trait_resource_paged_limit"
responses:
"200":
description: Return the list of registered webhook URLs.
headers:
Link:
$ref: "#/components/headers/Link"
X-Paging-NextKey:
$ref: "#/components/headers/X-Paging-NextKey"
X-Paging-Limit:
$ref: "#/components/headers/X-Paging-Limit"
X-Paging-Count:
$ref: "#/components/headers/X-Paging-Count"
content:
application/json:
example:
$ref: examples/webhook-get-200-list.json
schema:
type: array
items:
$ref: schemas/webhook-get.json
"400":
$ref: "#/components/responses/trait_resource_400_invalid_query_options"
post:
summary: Register webhook details
description: |
Register to receive event notifications as webhooks on a specified URL.
Webhook messages will conform to the format in the `webhooks` section of the API docs, depending on the event type (as defined in the same section).
HTTP events sent by the service to a client webhook's endpoint SHOULD include a header with the header name given by `api_key_name` and the header value given by `api_key_value`.
Clients SHOULD verify this against the value they provided when registering the webhook.
Service Implementations MAY partially support event filtering and transformations.
Service Implementations SHALL return a 400 response code if the filtering or transformation specified in the request is not supported.
Service Implementations SHOULD consider the security implications of providing webhooks, and include appropriate mitigations against Server Side Request Forgery (SSRF) attacks and similar.
Service Implementations SHOULD take appropriate steps to authorize the modification of existing webhooks. This may take the form of RBAC, or ABAC.
operationId: POST_service-webhooks
tags:
- Webhooks
requestBody:
content:
application/json:
example:
$ref: examples/webhook-post.json
schema:
$ref: schemas/webhook-post.json
required: true
responses:
"201":
description: Created. The webhook has been registered.
content:
application/json:
example:
$ref: examples/webhook-get-200.json
schema:
$ref: schemas/webhook-get.json
"400":
description: Bad request. Request body JSON is not valid or unsupported event filtering or transformation.
/service/webhooks/{webhook_id}:
parameters:
- name: webhook_id
in: path
required: true
schema:
$ref: schemas/uuid.json
description: The Webhook identifier.
head:
summary: Webhook details
description: Return `/service/webhooks/{webhook_id}` path headers
operationId: HEAD_service-webhooks-webhook_id
tags:
- Webhooks
responses:
"200":
description: ""
"404":
$ref: "#/components/responses/trait_resource_404_path_not_found"
get:
summary: Webhook details
description: |
Return the webhook details.
Service Implementations SHOULD take steps to avoid displaying URLs to users other than those who have suitable permissions (e.g. the owning user).
operationId: GET_service-webhooks-webhook_id
tags:
- Webhooks
responses:
"200":
description: Return the webhook details.
content:
application/json:
example:
$ref: examples/webhook-get-200.json
schema:
$ref: schemas/webhook-get.json
"404":
$ref: "#/components/responses/trait_resource_404_path_not_found"
put:
summary: Update webhook details
description: |
Update the configuration of an existing webhook.
Webhook messages will conform to the format in the `webhooks` section of the API docs, depending on the event type (as defined in the same section).
HTTP events sent by the service to a client webhook's endpoint SHOULD include a header with the header name given by `api_key_name` and the header value given by `api_key_value`.
Clients SHOULD verify this against the value they provided when registering the webhook.
Service Implementations MAY partially support event filtering and transformations.
Service Implementations SHALL return a 400 response code if the filtering or transformation specified in the request is not supported.
Service Implementations SHOULD consider the security implications of providing webhooks, and include appropriate mitigations against Server Side Request Forgery (SSRF) attacks and similar.
Service Implementations SHOULD take appropriate steps to authorize the modification of existing webhooks. This may take the form of RBAC, or ABAC.
operationId: PUT_service-webhooks-webhook_id
tags:
- Webhooks
requestBody:
content:
application/json:
example:
$ref: examples/webhook-put.json
schema:
$ref: schemas/webhook-put.json
required: true
responses:
"200":
description: Success. The webhook has been updated.
content:
application/json:
example:
$ref: examples/webhook-get-200.json
schema:
$ref: schemas/webhook-get.json
"400":
description: Bad request. Request body JSON is not valid or unsupported event filtering or transformation.
"403":
$ref: "#/components/responses/trait_resource_403_modify_forbidden"
"404":
$ref: "#/components/responses/trait_resource_404_path_not_found"
delete:
summary: Delete Webhook
description: |
Delete the webhook.
Service Implementations SHOULD consider the security implementations of providing webhooks, and include appropriate mitigations against Server Side Request Forgery (SSRF) attacks and similar. Service Implementations SHOULD take appropriate steps to authorize the deleting of webhooks. This may take the form of RBAC, or ABAC.
operationId: DELETE_service-webhooks-webhook_id
tags:
- Webhooks
responses:
"204":
description: No content. The webhook has been deleted.
"403":
$ref: "#/components/responses/trait_resource_403_delete_forbidden"
"404":
$ref: "#/components/responses/trait_resource_404_path_not_found"
/tracks:
head:
summary: List Tracks
description: Return `/tracks` path headers
operationId: HEAD_tracks
tags:
- Tracks
parameters:
- name: timerange
in: query
description: Filter on Tracks that have Track Events partially or wholly overlapping with timerange specified.
schema:
default: _
allOf:
- $ref: schemas/timerange.json
- name: label
in: query
description: Filter on Tracks that have the given `label`.
schema:
type: string
- name: schema_id
in: query
description: Filter on Tracks that use the given Payload Schema ID in `schema_id`.
schema:
$ref: schemas/uuid.json
- name: tag.{name}
in: query
description: |
Filter on Tracks that have a tag named {name} with a value in the given comma-separated list of values.
The {name} and the value MUST be URL encoded where special characters are present.
Where the tag's value is a string, at least one of the given values will match.
Where the tag's value is an array, at least one value in the array will match at least one of the given values.
Partial string matches of the values are not valid.
schema:
$ref: schemas/url-tag-list.json
- name: tag_exists.{name}
in: query
description: |
Filter on Tracks that have a tag named {name} regardless of value.
{name} MUST be URL encoded where special characters are present.
If set to true then the presence of the tag is filtered for.
If set to false then its absence is.
If left out then no filtering on tag presence is performed.
schema:
type: boolean
- name: editable_events
in: query
description: Filter on Tracks that have `editable_events` set to the specified value.
schema:
type: boolean
- name: timeline_reference.entity_id
in: query
description: |
Filter on Tracks where `entity_id` in `timeline_reference` matches any of the URIs used to generate the value of this parameter.
The value of this parameter is generated by percent-encoding each URI and then joining them into a string using a comma as a separator.
A URI is considered a "match" for `entity_id` if it is an exact string match. As such, two strings are not considered a match even if they only differ in terms of length (sub-strings), case, or percent-encoding.
Note, when the URIs used to generate the value of this parameter appear in the request URL, each one will have been percent-encoded twice.
schema:
$ref: schemas/url-uri-list.json
example: |
"http%3A%2F%2Fexample.com%2Fentity%2F1,http%3A%2F%2Fexample.com%2Fentity%2F2"
- $ref: "#/components/parameters/trait_resource_paged_page"
- $ref: "#/components/parameters/trait_resource_paged_limit"
responses:
"200":
description: ""
headers:
Link:
$ref: "#/components/headers/Link"
X-Paging-NextKey:
$ref: "#/components/headers/X-Paging-NextKey"
X-Paging-Limit:
$ref: "#/components/headers/X-Paging-Limit"
X-Paging-Count:
$ref: "#/components/headers/X-Paging-Count"
"400":
$ref: "#/components/responses/trait_resource_400_invalid_query_options"
get:
summary: List Tracks