-
Notifications
You must be signed in to change notification settings - Fork 3
/
xbrlapi.yaml
5705 lines (5445 loc) · 236 KB
/
xbrlapi.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
openapi: 3.0.0
# XBRL API
info:
version: "V1"
title: XBRL API
description: |
#### [Interactive documentation for objects](https://xbrlus.github.io/xbrl-api/index.html#oauth2) || [Rapidoc interactive documentation for objects](https://xbrlus.github.io/xbrl-api/rapidoc.html#oauth2) || [Additional context and background on XBRL API (PDF)](https://xbrlus.github.io/xbrl-api/XBRL-API-V1.5.pdf)
## Introduction
The XBRL API can work with any database that conforms to the [XBRL 2.1 Specification](https://specifications.xbrl.org/work-product-index-group-base-spec-base-spec.html). The xbrlapi.yaml file noted above defines the free XBRL API used to retrieve data from the [XBRL US Database of Public filings](https://xbrl.us/filings-database).
The documentation below describes how to use the XBRL API. The purpose of the XBRL API is to provide a unified interface to stored XBRL data which any data utility can adopt. This unified interface allows developers with limited XBRL knowledge to learn a single interface to access many data repositories. This expands access to the market for available data, while also encouraging the use of fundamental structured data.
_To use this page interactively_, [generate a client ID and secret](https://xbrl.us/access-token) with your XBRL US Web account, then scroll down and click the **Authorize** button on the right-side of this page, or any of the lock icons. Enter the required details, change the "Client credentials location" to **Request body**, then click "Authorize" and "Close". Once authorized, click any **Try it out** button appearing at the top of any object's Parameters list to form a query and get results.
### Structure and Syntax
The API is structured to allow the return of XBRL details as objects, which are used to classify XBRL data. These objects generally fall into two categories: **facts and data taxonomy**. Each object has multiple properties that can be used to define the query. Some are shared and others are unique to the object. **Objects can also be nested** allowing specific information about the main object to be retrieved.
Each object has properties that can be accessed by requesting them from the XBRL API. The property of the object is defined using a dot notation (i.e. `object.property`). For example, to return the __value__ of the fact, use `fact.value`. While many of these properties can also be used to search for data, **not all properties of the object are searchable** and some properties may be defined as components of other objects and are inherited from these objects.
#### Object Search
The `search` keyword is used as an endpoint in many URIs. This indicates to the API that you will be searching on one or more properties of the object. A search can be performed on one object at a time, and is based on the first object that appears in the URI.
For example, in the following uri, `entity.cik` is the search property with the report object:
`/api/v1/report/search?entity.cik=0001493040&fields=report.*`
Multiple parameters can be included in a search and are separated by ampersands (&). In the case below, the API will return `fact.value` data for a given CIK for Assets for 2017 in the first quarter:
`/api/v1/fact/search?concept.local-name=Assets&period.fiscal-year=2017&period.fiscal.period=1Q&Entity.cik=0000001&fields=fact.value`
It is not possible to search on a property that is not a component of the object. In the example above, the endpoint is referencing the fact object (fact appears after v1) so a user must search on a valid fact property.
**Nested objects** allow you to pull sub-object information from the main object. Sub-objects that can be used are dependent on the main object. For example, facts can be returned for specific reports, and relationships can be returned for specific networks.
**Unique results** can be achieved by including `unique` as part of the query. This evaluates displayed fields for comparison: if all displayed values match an existing result, it will not be included in the result set (ie. including a unique value like fact.id in the fields for a query that returns the same fact.value multiple times will cause the same fact.value to appear because the fact.id differentiates each result).
In addition to accessing data through a specific object, **returned data can be managed by defining the properties of the data to be returned** and attributes of the properties:
- what details about the data should be returned - `fields`;
- how many records should be returned - `limit`;
- what order should the records be returned in - `sort`, and;
- from what starting position within the sequence of records should the data be returned - `offset`.
#### Fields
The `fields` query parameter establishes the details of the data to return for the specific query. Each field requested is separated using a comma without white space. The order of the fields returned is based on the position in the fields string. Using the * as a wildcard on the object in the fields to return (i.e. fact.*) will return all available properties of the object, and should only be used for testing, as it can slow a query considerably.
#### Limit
A `limit` restricts the number of results returned by the query. **The limit attribute can only be added to an object type and not a property.** For example, to limit the number of reports in a query, the limit property is added to the fields to return as follows: `report.limit(10)`.
#### Offset
The 'offset' attribute enables targeting a return to a specific starting point in a query return sequence (i.e. `report.offset(120)`). To work reliably, __at least one__ sorted property should be included in the returned fields.
#### Sort
Any returned value can be sorted in ascending or descending order, by adding an additional attribute (ASC or DESC) to a field value (i.e. `report.document-type.sort(DESC)`). **Multiple sort criteria can be defined** and the sort sequence is determined by the order defined in the fields parameter.
In the following example, the 10 reports returned starting with the 120th report for the search query would be sorted alpha-numerically in descending order first by document type and then by timestamp:
`fields=report.limit(10),report.document-type.sort(DESC),report.accepted-timestamp.sort(DESC),report.offset(120)`
### Authorization Flow
We use [OAuth2 JWT](https://jwt.io/) flows to secure interactions. Below are **CURL** examples for typical **XBRL API** flows to request, return and use a token, which is required to process queries. The XBRL API is sessionless, so each "session" always begins with the [OAuth2 JWT Access Token Flow](https://jwt.io/introduction).
#### Access Token Flow
This flow shows the steps required to interact with the API
1. Send an HTTP `POST` request to the tokenUrl: `/oauth2/token`:
```http
POST /oauth2/token HTTP/1.1
Host: <api.xbrl.us>
Content-Type: application/x-www-form-urlencoded
Body: {
"grant_type": password,
"client_id": "XBRL US Client",
"client_secret": "client secret",
"username": "username",
"password": "password",
"platform": pc
}
```
2. Upon a successful authorization grant, the server will respond with an `access_token`:
```http
HTTP/1.1 200 OK
Request URL: <example.com>/oauth2/token
Date: <EEE, dd MMM yyyy HH:mm:ss z>
Content-Length: 500
Body: {
"platform": "pc",
"access_token": "eyJ...124nOvc",
"refresh_token": "eyJ...124nOvc",
"expires_in" : 3600,
"refresh_token_expires_in": 10800,
"token_type": "bearer"
}
```
3. Add a new `Authorization` header with type `Bearer` and the contents of the above `access_token`
```http
GET </some/route> HTTP/1.1
Host: <api.xbrl.us>
Authorization: Bearer yJ...124nOvc
Content-Type: application/json; charset=utf-8
Body: <...>
```
**Once an access_token has been acquired, it can be used on all queries with an account until it returns a 401.** If this occurs, simply request a new token using existing `client_id`, `client_secret`, `refresh_token` and `platform` values, and set `grant_type` to **refresh_token**.
contact:
name: XBRL US
email: support@xbrl.us
servers:
- description: Client credentials location is _Request body_
url: 'https://api.xbrl.us'
tags:
- name: oauth2
description: " -- acquire authorization, receive tokens, and check tokens"
- name: fact
description: " -- return XBRL facts and metadata contained in a report"
- name: report
description: " -- get details about XBRL reports"
- name: entity
description: " -- get details about entities making XBRL filings"
- name: assertion
description: " -- return error information about XBRL facts and reports in filings"
- name: dts
description: " -- get details information about the discoverable taxonomy set (taxonomy)"
- name: concept
description: " -- get information about XBRL concepts in a taxonomy"
- name: label
description: " -- return metadata associated with a concept and a DTS identifier"
- name: network
description: " -- return network information about concepts and/or relationships in a dts"
- name: relationship
description: " -- get relationship information associated with a network and/or DTS identifier"
- name: cube
description: " -- get information about a hypercube and the data in a hypercube"
- name: dimension
description: " -- get information about a hypercubes dimensions and members"
- name: document
description: " -- request document information associated with a DTS or report (available to XBRL US Members only)"
security:
- oauth2: [ROLE_CLIENT, ROLE_USER]
paths:
/oauth2/token:
summary: Aquire an access token by fulfilling a client_credentials grant, or a password grant.
post:
operationId: tokenUrl
tags: [oauth2]
security: []
description: >
Assuming a valid login exists, this route allows a trusted client to aquire an access token for itself, or to request an access token for a specific user. **You may send both `client_credentials` grants and `password` grants via the following**:
* **application/x-www-form-urlencoded**
**[Read more](https://oauth.net/2/grant-types/)**
requestBody:
content:
# application/json:
# schema:
# $ref: '#/components/schemas/authorization_grant'
# example:
# grant_type: password
# client_id: 1223
# client_secret: xhOEnAX2M...gaIYLXOvCe25Q
# username: Your_XBRL_US_Web_Account_email@domain.com
# password: someSecurePassword
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/authorization_grant'
# multipart/form-data:
# schema:
# $ref: '#/components/schemas/authorization_grant'
responses:
'200':
description: >
The authorization grant has been validated, and an access token is granted. **[Read more](https://jwt.io/introduction/)**
content:
application/json:
schema:
type: object
properties:
platform :
type: string
example: pc
access_token:
type: string
format: byte
example: eyJ...124nOvc
description: A JWT access token. **[Read more](https://jwt.io/)**
refresh_token:
type: string
format: byte
example: eyJ...124nOvc
description: A JWT access token. **[Read more](https://jwt.io/)**
expires_in:
type: integer
example: 3600
refresh_token_expires_in:
type: integer
example: 3600
token_type:
type: string
example: bearer
description: >
_The token_type will always be bearer._ The access_token is considered a bearer token, and thus should be placed in all subsequent requests to the resource endpoints by using the following header:
* Authorization: Bearer [token]
# -----------------------------------------------------
# Links
# -----------------------------------------------------
links:
bearerAuth: # <---- arbitrary name for the link
operationId: tokenUrl
parameters:
bearerAuth: '$response.body#access_token'
description: >
The `access_token` value returned in the response can be used as
the `bearer token`.
# -----------------------------------------------------
'400':
$ref: '#/components/responses/bad_request'
'401':
$ref: '#/components/responses/unauthorized'
'405':
$ref: '#/components/responses/method_not_allowed'
'500':
$ref: '#/components/responses/internal_server_error'
/api/v1/fact/search:
summary: Request facts from XBRL filings based on search parameters.
get:
operationId: getFactDetails
tags: [fact]
security:
- OAuth2: []
- bearerAuth: []
description: >
Search for _XBRL facts_ based on the attributes of the fact, the report it was in, or the source of the data.
## Examples
### _-Get all the facts in a document_
The following call will: get all facts in the report with an id of `226471`; limit the number of records returned to `1010` facts; sort facts `A-Z by the concept name`, and; return the following values:
* entity.name
* dimensions.count
* dimensions
* entity.cik
* period.fiscal-period
* period.end
* period.instant
* period.year
* concept.local-name.sort(ASC)
* fact.numerical-value,fact.limit(1010)
* fact.value,report.source-id
* footnote.text
* footnote.role
https://api.xbrl.us/api/v1/fact/search?report.id=226471&fields=entity.name,dimensions.count,dimensions,entity.cik,period.fiscal-period,period.end,period.instant,period.year,concept.local-name.sort(ASC),fact.numerical-value,fact.limit(1010),fact.value,report.source-id,footnote.text,footnote.role
### _-Get Operating Cash used by Pharma for the 2017 year_
The following call will get all facts reported for the 2017 year using the concept `NetCashProvidedByUsedInOperatingActivities` reported for the sic code `3841` which have no dimensions. It also limits the records returned to `100` facts and will return the following values:
* fact.numerical-value
* period.fiscal-year
* period.fiscal-period
https://api.xbrl.us/api/v1/fact/search?period.fiscal-period=Y&fact.ultimus=true&report.sic-code=3841&concept.local-name=NetCashProvidedByUsedInOperatingActivities&period.fiscal-year=2017&dimensions.count=0&fields=fact.numerical-value,period.fiscal-year,period.fiscal-period,fact.limit(100)
parameters:
- $ref: '#/components/parameters/concept.id_Param'
- $ref: '#/components/parameters/concept.is-base_Param'
- $ref: '#/components/parameters/concept.is-monetary_Param'
- $ref: '#/components/parameters/concept.local-name_Param'
- $ref: '#/components/parameters/concept.namespace_Param'
- $ref: '#/components/parameters/dimension.is-base_Param'
- $ref: '#/components/parameters/dimension.local-name_Param'
- $ref: '#/components/parameters/dimension.namespace_Param'
- $ref: '#/components/parameters/dimensions.count_Param'
- $ref: '#/components/parameters/dimensions.id_Param'
- $ref: '#/components/parameters/dts.entry-point_Param'
- $ref: '#/components/parameters/dts.id_Param'
- $ref: '#/components/parameters/dts.target-namespace_Param'
- $ref: '#/components/parameters/entity.cik_Param'
- $ref: '#/components/parameters/entity.id_Param'
- $ref: '#/components/parameters/fact.accuracy-index_Param'
- $ref: '#/components/parameters/fact.has-dimensions_Param'
- $ref: '#/components/parameters/fact.hash_Param'
- $ref: '#/components/parameters/fact.id_Param'
- $ref: '#/components/parameters/fact.is-extended_Param'
- $ref: '#/components/parameters/fact.text-search_Param'
- $ref: '#/components/parameters/fact.ultimus_Param'
- $ref: '#/components/parameters/fact.ultimus-index_Param'
- $ref: '#/components/parameters/fact.value_Param'
- $ref: '#/components/parameters/fact.value-link_Param'
- $ref: '#/components/parameters/member.is-base_Param'
- $ref: '#/components/parameters/member.local-name_Param'
- $ref: '#/components/parameters/member.typed-value_Param'
- $ref: '#/components/parameters/member.member-value_Param'
- $ref: '#/components/parameters/member.namespace_Param'
- $ref: '#/components/parameters/period.calendar-period_Param'
- $ref: '#/components/parameters/period.fiscal-id_Param'
- $ref: '#/components/parameters/period.fiscal-period_Param'
- $ref: '#/components/parameters/period.fiscal-year_Param'
- $ref: '#/components/parameters/period.id_Param'
- $ref: '#/components/parameters/period.year_Param'
- $ref: '#/components/parameters/report.accession_Param'
- $ref: '#/components/parameters/report.creation-software_Param'
- $ref: '#/components/parameters/report.document-type_Param'
- $ref: '#/components/parameters/report.document-index_Param'
- $ref: '#/components/parameters/report.entry-url_Param'
- $ref: '#/components/parameters/report.id_Param'
- $ref: '#/components/parameters/report.restated_Param'
- $ref: '#/components/parameters/report.restated-index_Param'
- $ref: '#/components/parameters/report.sec-url_Param'
- $ref: '#/components/parameters/report.sic-code_Param'
- $ref: '#/components/parameters/report.source-id_Param'
- $ref: '#/components/parameters/report.source-name_Param'
- $ref: '#/components/parameters/unit_Param'
- in: query
name: fields
required: true
style: form
explode: false
allowEmptyValue : false
schema:
$ref: '#/components/schemas/fact_fields'
description: This is the list of fields that can be returned for _XBRL facts_.
# - in: query
# name: aspect
# # Wrap 'schema' into 'content.<media-type>'
# content:
# application/json: # <---- media type indicates how to serialize / deserialize the parameter content
# schema:
# type: object
# properties:
# dimension:
# type: string
# member:
# type: string
responses:
'200':
description: __fact details__ successfully accepted
content:
application/json:
schema:
type: object
properties:
paging:
$ref: '#/components/schemas/paging'
data:
type: array
items:
$ref: '#/components/schemas/fact_details'
# -----------------------------------------------------
# Links
# -----------------------------------------------------
links:
GetfactId: # <---- arbitrary name for the link
operationId: getFactBasedOnFactID
parameters:
fact.id: '$response.body#/data/fact.id'
description: >
The `fact.id` value returned in the response can be used as
the `factId` parameter in `/api/v1/fact/{fact.id}`.
# -----------------------------------------------------
'201':
$ref: '#/components/responses/invalid_request'
'400':
$ref: '#/components/responses/bad_request'
'401':
$ref: '#/components/responses/bad_token'
'405':
$ref: '#/components/responses/method_not_allowed'
'500':
$ref: '#/components/responses/internal_server_error'
/api/v1/fact/{fact.id}:
summary: Request fact detail from an XBRL filing based on its unique identifier. The fact ID is an internal ID used by the API.
get:
operationId: getFactBasedOnFactID
tags: [fact]
security:
- OAuth2: []
- bearerAuth: []
description: >
Search for _XBRL facts_ based on the fact.id attribute of the fact.
parameters:
- $ref: '#/components/parameters/fact.text-search_Param'
- name: fact.id
in: path
description: ID of the fact defined by the API.
required: true
schema:
type: integer
- in: query
name: fields
required: true
style: form
explode: false
schema:
$ref: '#/components/schemas/fact_fields'
description: This is the list of fields that can be returned for _XBRL facts_.
responses:
'200':
description: __fact details__ successfully accepted
content:
application/json:
schema:
type: object
properties:
paging:
$ref: '#/components/schemas/paging'
data:
type: array
items:
$ref: '#/components/schemas/fact_details'
'201':
$ref: '#/components/responses/invalid_request'
'400':
$ref: '#/components/responses/bad_request'
'401':
$ref: '#/components/responses/bad_token'
'405':
$ref: '#/components/responses/method_not_allowed'
'500':
$ref: '#/components/responses/internal_server_error'
/api/v1/fact/oim/search:
summary: Request facts from XBRL filings based on search parameters.
get:
operationId: getFactDetailsInOIMFormat
tags: [fact]
security:
- bearerAuth: []
description: >
Returns _XBRL facts_ detail in the OIM JSON format.
parameters:
- $ref: '#/components/parameters/concept.id_Param'
- $ref: '#/components/parameters/concept.is-base_Param'
- $ref: '#/components/parameters/concept.is-monetary_Param'
- $ref: '#/components/parameters/concept.local-name_Param'
- $ref: '#/components/parameters/concept.namespace_Param'
- $ref: '#/components/parameters/dimension.is-base_Param'
- $ref: '#/components/parameters/dimension.local-name_Param'
- $ref: '#/components/parameters/dimension.namespace_Param'
- $ref: '#/components/parameters/dimensions.count_Param'
- $ref: '#/components/parameters/dimensions.id_Param'
- $ref: '#/components/parameters/dts.entry-point_Param'
- $ref: '#/components/parameters/dts.id_Param'
- $ref: '#/components/parameters/dts.target-namespace_Param'
- $ref: '#/components/parameters/entity.cik_Param'
- $ref: '#/components/parameters/entity.id_Param'
- $ref: '#/components/parameters/fact.accuracy-index_Param'
- $ref: '#/components/parameters/fact.has-dimensions_Param'
- $ref: '#/components/parameters/fact.hash_Param'
- $ref: '#/components/parameters/fact.id_Param'
- $ref: '#/components/parameters/fact.is-extended_Param'
- $ref: '#/components/parameters/fact.ultimus_Param'
- $ref: '#/components/parameters/fact.ultimus-index_Param'
- $ref: '#/components/parameters/fact.value_Param'
- $ref: '#/components/parameters/member.is-base_Param'
- $ref: '#/components/parameters/member.local-name_Param'
- $ref: '#/components/parameters/member.typed-value_Param'
- $ref: '#/components/parameters/member.member-value_Param'
- $ref: '#/components/parameters/member.namespace_Param'
- $ref: '#/components/parameters/period.calendar-period_Param'
- $ref: '#/components/parameters/period.fiscal-id_Param'
- $ref: '#/components/parameters/period.fiscal-period_Param'
- $ref: '#/components/parameters/period.fiscal-year_Param'
- $ref: '#/components/parameters/period.id_Param'
- $ref: '#/components/parameters/period.year_Param'
- $ref: '#/components/parameters/report.accession_Param'
- $ref: '#/components/parameters/report.creation-software_Param'
- $ref: '#/components/parameters/report.entry-url_Param'
- $ref: '#/components/parameters/report.id_Param'
- $ref: '#/components/parameters/report.restated_Param'
- $ref: '#/components/parameters/report.restated-index_Param'
- $ref: '#/components/parameters/report.sec-url_Param'
- $ref: '#/components/parameters/report.sic-code_Param'
- $ref: '#/components/parameters/report.source-id_Param'
- $ref: '#/components/parameters/report.source-name_Param'
- $ref: '#/components/parameters/unit_Param'
responses:
'200':
description: __fact details__ successfully accepted
content:
application/json:
schema:
type: object
properties:
documentInfo:
$ref: '#/components/schemas/documentInfo_oim_json'
facts:
$ref: '#/components/schemas/facts_oim_json'
'201':
$ref: '#/components/responses/invalid_request'
'400':
$ref: '#/components/responses/bad_request'
'401':
$ref: '#/components/responses/bad_token'
'405':
$ref: '#/components/responses/method_not_allowed'
'500':
$ref: '#/components/responses/internal_server_error'
/api/v1/report/search:
summary: Request report details from XBRL filings based on search parameters.
get:
operationId: getReportDetails
tags: [report]
security:
- OAuth2: []
- bearerAuth: []
description: >
Return details for _XBRL reports_ based on the attributes of the report(s).
parameters:
- $ref: '#/components/parameters/dts.id_Param'
- $ref: '#/components/parameters/entity.cik_Param'
- $ref: '#/components/parameters/entity.id_Param'
- $ref: '#/components/parameters/entity.ticker_Param'
- $ref: '#/components/parameters/report.accession_Param'
- $ref: '#/components/parameters/report.document-type_Param'
- $ref: '#/components/parameters/report.document-index_Param'
- $ref: '#/components/parameters/report.entity-name_Param'
- $ref: '#/components/parameters/report.entry-type_Param'
- $ref: '#/components/parameters/report.entry-url_Param'
- $ref: '#/components/parameters/report.filer-category_Param'
- $ref: '#/components/parameters/report.id_Param'
- $ref: '#/components/parameters/report.is-most-current_Param'
- $ref: '#/components/parameters/report.period-index_Param'
- $ref: '#/components/parameters/report.restated_Param'
- $ref: '#/components/parameters/report.restated-index_Param'
- $ref: '#/components/parameters/report.sec-url_Param'
- $ref: '#/components/parameters/report.sic-code_Param'
- $ref: '#/components/parameters/report.source-id_Param'
- $ref: '#/components/parameters/report.source-name_Param'
- in: query
name: fields
required: true
style: form
explode: false
allowEmptyValue : false
schema:
$ref: '#/components/schemas/report_fields'
description: This is the list of fields that can be returned for _XBRL reports_.
responses:
'200':
description: __report details__ successfully accepted
content:
application/json:
schema:
type: object
properties:
paging:
$ref: '#/components/schemas/paging'
data:
type: array
items:
$ref: '#/components/schemas/report_details'
'201':
$ref: '#/components/responses/invalid_request'
'400':
$ref: '#/components/responses/bad_request'
'401':
$ref: '#/components/responses/bad_token'
'405':
$ref: '#/components/responses/method_not_allowed'
'500':
$ref: '#/components/responses/internal_server_error'
/api/v1/report/{report.id}:
summary: Request a report from XBRL filings based on unique report identifier. The report ID is an internal ID used by the API.
get:
operationId: getReportDetailsById
tags: [report]
security:
- OAuth2: []
- bearerAuth: []
description: >
Return detail for an _XBRL report_ based on the report.id attribute.
parameters:
- name: report.id
in: path
description: ID of the report defined by the API.
required: true
schema:
type: integer
- in: query
name: fields
required: true
style: form
explode: false
allowEmptyValue : false
schema:
$ref: '#/components/schemas/report_fields'
description: This is the list of fields that can be returned for _XBRL reports_.
responses:
'200':
description: __report details__ successfully accepted
content:
application/json:
schema:
type: object
properties:
paging:
$ref: '#/components/schemas/paging'
data:
type: array
items:
$ref: '#/components/schemas/report_details'
'201':
$ref: '#/components/responses/invalid_request'
'400':
$ref: '#/components/responses/bad_request'
'401':
$ref: '#/components/responses/bad_token'
'405':
$ref: '#/components/responses/method_not_allowed'
'500':
$ref: '#/components/responses/internal_server_error'
/api/v1/report/{report.id}/fact/search:
summary: Request facts from XBRL filings based on specified report.id and fact parameters.
get:
operationId: getReportFactDetailsById
tags: [report]
security:
- bearerAuth: []
description: >
Allows searching for _XBRL reports_ based on the report.id and returns certain _XBRL facts_ associated with that report. The attributes of those facts can be used as search parameters.
parameters:
- name: report.id
in: path
description: ID of the report defined by the API.
required: true
schema:
type: integer
- $ref: '#/components/parameters/concept.id_Param'
- $ref: '#/components/parameters/concept.is-base_Param'
- $ref: '#/components/parameters/concept.is-monetary_Param'
- $ref: '#/components/parameters/concept.local-name_Param'
- $ref: '#/components/parameters/concept.namespace_Param'
- $ref: '#/components/parameters/dimension.is-base_Param'
- $ref: '#/components/parameters/dimension.local-name_Param'
- $ref: '#/components/parameters/dimension.namespace_Param'
- $ref: '#/components/parameters/dimensions.count_Param'
- $ref: '#/components/parameters/dimensions.id_Param'
- $ref: '#/components/parameters/dts.entry-point_Param'
- $ref: '#/components/parameters/dts.id_Param'
- $ref: '#/components/parameters/dts.target-namespace_Param'
- $ref: '#/components/parameters/entity.cik_Param'
- $ref: '#/components/parameters/entity.id_Param'
- $ref: '#/components/parameters/fact.accuracy-index_Param'
- $ref: '#/components/parameters/fact.has-dimensions_Param'
- $ref: '#/components/parameters/fact.hash_Param'
- $ref: '#/components/parameters/fact.id_Param'
- $ref: '#/components/parameters/fact.is-extended_Param'
- $ref: '#/components/parameters/fact.text-search_Param'
- $ref: '#/components/parameters/fact.ultimus_Param'
- $ref: '#/components/parameters/fact.ultimus-index_Param'
- $ref: '#/components/parameters/fact.value_Param'
- $ref: '#/components/parameters/fact.value-link_Param'
- $ref: '#/components/parameters/member.is-base_Param'
- $ref: '#/components/parameters/member.local-name_Param'
- $ref: '#/components/parameters/member.typed-value_Param'
- $ref: '#/components/parameters/member.member-value_Param'
- $ref: '#/components/parameters/member.namespace_Param'
- $ref: '#/components/parameters/period.calendar-period_Param'
- $ref: '#/components/parameters/period.fiscal-id_Param'
- $ref: '#/components/parameters/period.fiscal-period_Param'
- $ref: '#/components/parameters/period.fiscal-year_Param'
- $ref: '#/components/parameters/period.id_Param'
- $ref: '#/components/parameters/period.year_Param'
- $ref: '#/components/parameters/report.accession_Param'
- $ref: '#/components/parameters/report.creation-software_Param'
- $ref: '#/components/parameters/report.entry-url_Param'
- $ref: '#/components/parameters/report.id_Param'
- $ref: '#/components/parameters/report.restated_Param'
- $ref: '#/components/parameters/report.restated-index_Param'
- $ref: '#/components/parameters/report.sec-url_Param'
- $ref: '#/components/parameters/report.sic-code_Param'
- $ref: '#/components/parameters/report.source-id_Param'
- $ref: '#/components/parameters/report.source-name_Param'
- $ref: '#/components/parameters/unit_Param'
- in: query
name: fields
required: true
style: form
explode: false
allowEmptyValue : false
schema:
$ref: '#/components/schemas/report_and_fact_fields'
description: Report *and* fact fields can be returned by a nested report/fact query.
responses:
'200':
description: __report details__ successfully accepted
content:
application/json:
schema:
type: object
properties:
paging:
$ref: '#/components/schemas/paging'
data:
type: array
items:
$ref: '#/components/schemas/report_details_with_facts'
'201':
$ref: '#/components/responses/invalid_request'
'400':
$ref: '#/components/responses/bad_request'
'401':
$ref: '#/components/responses/bad_token'
'405':
$ref: '#/components/responses/method_not_allowed'
'500':
$ref: '#/components/responses/internal_server_error'
/api/v1/report/fact/search:
summary: Request reports and facts from XBRL filings based on report and fact parameters.
get:
operationId: getReportFactDetailsBySearch
tags: [report]
security:
- OAuth2: []
- bearerAuth: []
description: >
Allows searching for _XBRL reports_ based on valid report search parameters and returns certain _XBRL facts_ associated with qualified reports. The attributes of those facts can be used as search parameters.
parameters:
- $ref: '#/components/parameters/concept.id_Param'
- $ref: '#/components/parameters/concept.is-base_Param'
- $ref: '#/components/parameters/concept.is-monetary_Param'
- $ref: '#/components/parameters/concept.local-name_Param'
- $ref: '#/components/parameters/concept.namespace_Param'
- $ref: '#/components/parameters/dimension.is-base_Param'
- $ref: '#/components/parameters/dimension.local-name_Param'
- $ref: '#/components/parameters/dimension.namespace_Param'
- $ref: '#/components/parameters/dimensions.id_Param'
- $ref: '#/components/parameters/dts.entry-point_Param'
- $ref: '#/components/parameters/dts.id_Param'
- $ref: '#/components/parameters/dts.target-namespace_Param'
- $ref: '#/components/parameters/entity.cik_Param'
- $ref: '#/components/parameters/entity.id_Param'
- $ref: '#/components/parameters/entity.ticker_Param'
- $ref: '#/components/parameters/fact.accuracy-index_Param'
- $ref: '#/components/parameters/fact.has-dimensions_Param'
- $ref: '#/components/parameters/fact.hash_Param'
- $ref: '#/components/parameters/fact.id_Param'
- $ref: '#/components/parameters/fact.is-extended_Param'
- $ref: '#/components/parameters/fact.text-search_Param'
- $ref: '#/components/parameters/fact.ultimus-index_Param'
- $ref: '#/components/parameters/fact.ultimus_Param'
- $ref: '#/components/parameters/fact.value_Param'
- $ref: '#/components/parameters/fact.value-link_Param'
- $ref: '#/components/parameters/member.is-base_Param'
- $ref: '#/components/parameters/member.local-name_Param'
- $ref: '#/components/parameters/member.typed-value_Param'
- $ref: '#/components/parameters/member.member-value_Param'
- $ref: '#/components/parameters/member.namespace_Param'
- $ref: '#/components/parameters/period.calendar-period_Param'
- $ref: '#/components/parameters/period.fiscal-id_Param'
- $ref: '#/components/parameters/period.fiscal-period_Param'
- $ref: '#/components/parameters/period.fiscal-year_Param'
- $ref: '#/components/parameters/period.id_Param'
- $ref: '#/components/parameters/period.year_Param'
- $ref: '#/components/parameters/report.accession_Param'
- $ref: '#/components/parameters/report.creation-software_Param'
- $ref: '#/components/parameters/report.document-type_Param'
- $ref: '#/components/parameters/report.document-index_Param'
- $ref: '#/components/parameters/report.entity-name_Param'
- $ref: '#/components/parameters/report.entry-type_Param'
- $ref: '#/components/parameters/report.entry-url_Param'
- $ref: '#/components/parameters/report.filer-category_Param'
- $ref: '#/components/parameters/report.id_Param'
- $ref: '#/components/parameters/report.is-most-current_Param'
- $ref: '#/components/parameters/report.period-index_Param'
- $ref: '#/components/parameters/report.restated-index_Param'
- $ref: '#/components/parameters/report.restated_Param'
- $ref: '#/components/parameters/report.sec-url_Param'
- $ref: '#/components/parameters/report.sic-code_Param'
- $ref: '#/components/parameters/report.source-id_Param'
- $ref: '#/components/parameters/report.source-name_Param'
- $ref: '#/components/parameters/unit_Param'
- in: query
name: fields
required: true
style: form
explode: false
allowEmptyValue : false
schema:
$ref: '#/components/schemas/report_details_with_facts'
description: Report *and* fact fields can be returned by a nested report/fact query.
responses:
'200':
description: __report details__ successfully accepted
content:
application/json:
schema:
type: object
properties:
paging:
$ref: '#/components/schemas/paging'
data:
type: array
items:
$ref: '#/components/schemas/report_details_with_facts'
'201':
$ref: '#/components/responses/invalid_request'
'400':
$ref: '#/components/responses/bad_request'
'401':
$ref: '#/components/responses/bad_token'
'405':
$ref: '#/components/responses/method_not_allowed'
'500':
$ref: '#/components/responses/internal_server_error'
/api/v1/report/{report.id}/delete:
delete:
operationId: deleteReportDetailsById
tags: [report]
security:
- OAuth2: []
- bearerAuth: []
description: >
Deletes an _XBRL report_.
parameters:
- name: report.id
in: path
description: ID of the report defined by the API.
required: true
schema:
type: integer
responses:
'200':
description: __report details__ successfully deleted
content:
application/json:
schema:
type: object
properties:
paging:
$ref: '#/components/schemas/paging'
data:
type: array
items:
$ref: '#/components/schemas/report_details'
'201':
$ref: '#/components/responses/invalid_request'
'400':
$ref: '#/components/responses/bad_request'
'401':
$ref: '#/components/responses/bad_token'
'405':
$ref: '#/components/responses/method_not_allowed'
'500':
$ref: '#/components/responses/internal_server_error'
/api/v1/entity/{entity.id}/report/search:
summary: Request report information based on the entity identifier. The entity ID is an internal ID used by the API.
get:
operationId: getEntityReportDetailsBasedOnID
tags: [entity]
security:
- bearerAuth: []
description: >
Search for _XBRL reports_ based on the entity identifier associated with the reporting entity. Get entity and report information for the known entity.
parameters:
- name: entity.id
in: path
description: ID of the entity defined by the API.
required: true
schema:
type: integer
- $ref: '#/components/parameters/report.source-id_Param'
- $ref: '#/components/parameters/report.source-name_Param'
- $ref: '#/components/parameters/report.accession_Param'
- $ref: '#/components/parameters/report.id_Param'
- $ref: '#/components/parameters/report.document-type_Param'
- $ref: '#/components/parameters/report.entry-type_Param'
- $ref: '#/components/parameters/report.entry-url_Param'
- $ref: '#/components/parameters/report.filer-category_Param'
- $ref: '#/components/parameters/report.is-most-current_Param'
- $ref: '#/components/parameters/report.period-index_Param'
- $ref: '#/components/parameters/report.restated_Param'
- $ref: '#/components/parameters/report.restated-index_Param'
- $ref: '#/components/parameters/report.sec-url_Param'
- $ref: '#/components/parameters/report.sic-code_Param'
- in: query
name: fields
required: true
style: form
explode: false
allowEmptyValue : false
schema:
$ref: '#/components/schemas/entity_fields'
description: Entity *and* report fields can be returned by a nested entity/report query.
responses:
'200':
description: __entity report details__ successfully accepted
content:
application/json:
schema:
type: object
properties:
paging:
$ref: '#/components/schemas/paging'
data:
type: array
items:
$ref: '#/components/schemas/entity_details'
'201':
$ref: '#/components/responses/invalid_request'
'400':
$ref: '#/components/responses/bad_request'
'401':
$ref: '#/components/responses/bad_token'
'405':
$ref: '#/components/responses/method_not_allowed'
'500':
$ref: '#/components/responses/internal_server_error'
/api/v1/entity/report/search:
summary: Request entity *and* report details from XBRL filings based on search parameters.
get:
operationId: getEntityReportDetails
tags: [entity]
security:
- OAuth2: []
- bearerAuth: []
description: >
Search _XBRL reports_ grouped by the entity that filed the reports. The API allows searching on the attributes of the entity and the report.
parameters:
- $ref: '#/components/parameters/entity.cik_Param'
- $ref: '#/components/parameters/entity.id_Param'
- $ref: '#/components/parameters/report.entity-name_Param'
- $ref: '#/components/parameters/entity.ticker_Param'
- $ref: '#/components/parameters/report.source-id_Param'
- $ref: '#/components/parameters/report.source-name_Param'
- $ref: '#/components/parameters/report.accession_Param'
- $ref: '#/components/parameters/report.id_Param'
- $ref: '#/components/parameters/report.document-type_Param'
- $ref: '#/components/parameters/report.entry-type_Param'
- $ref: '#/components/parameters/report.entry-url_Param'
- $ref: '#/components/parameters/report.filer-category_Param'
- $ref: '#/components/parameters/report.is-most-current_Param'
- $ref: '#/components/parameters/report.period-index_Param'
- $ref: '#/components/parameters/report.restated_Param'
- $ref: '#/components/parameters/report.restated-index_Param'
- $ref: '#/components/parameters/report.sec-url_Param'
- $ref: '#/components/parameters/report.sic-code_Param'
- in: query
name: fields
required: true
style: form
explode: false
allowEmptyValue : false
schema:
$ref: '#/components/schemas/entity_fields'
description: Entity *and* report fields can be returned by a nested entity/report query.
responses:
'200':
description: __entity report details__ successfully accepted
content:
application/json:
schema:
type: object
properties:
paging:
$ref: '#/components/schemas/paging'
data:
type: array
items:
$ref: '#/components/schemas/entity_details'
'201':
$ref: '#/components/responses/invalid_request'
'400':
$ref: '#/components/responses/bad_request'
'401':
$ref: '#/components/responses/bad_token'
'405':
$ref: '#/components/responses/method_not_allowed'
'500':
$ref: '#/components/responses/internal_server_error'
/api/v1/entity/{entity.id}: