@gitbook/api 0.15.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/GitBookAPIError.d.ts +18 -0
- package/dist/client.d.ts +210 -10
- package/dist/index.cjs +136 -6
- package/dist/index.d.ts +2 -0
- package/dist/index.js +133 -6
- package/package.json +1 -1
- package/spec/openapi.json +900 -71
- package/spec/openapi.yaml +516 -38
package/spec/openapi.yaml
CHANGED
|
@@ -151,6 +151,13 @@ components:
|
|
|
151
151
|
description: The unique id of a capture
|
|
152
152
|
schema:
|
|
153
153
|
type: string
|
|
154
|
+
snippetId:
|
|
155
|
+
name: snippetId
|
|
156
|
+
in: path
|
|
157
|
+
required: true
|
|
158
|
+
description: The unique id of a snippet
|
|
159
|
+
schema:
|
|
160
|
+
type: string
|
|
154
161
|
userId:
|
|
155
162
|
name: userId
|
|
156
163
|
in: path
|
|
@@ -172,6 +179,13 @@ components:
|
|
|
172
179
|
description: The unique id of the page
|
|
173
180
|
schema:
|
|
174
181
|
type: string
|
|
182
|
+
fileId:
|
|
183
|
+
name: fileId
|
|
184
|
+
in: path
|
|
185
|
+
required: true
|
|
186
|
+
description: The unique id of the file
|
|
187
|
+
schema:
|
|
188
|
+
type: string
|
|
175
189
|
pagePath:
|
|
176
190
|
name: pagePath
|
|
177
191
|
in: path
|
|
@@ -2968,6 +2982,9 @@ components:
|
|
|
2968
2982
|
type: string
|
|
2969
2983
|
description:
|
|
2970
2984
|
type: string
|
|
2985
|
+
documentId:
|
|
2986
|
+
type: string
|
|
2987
|
+
description: ID of the document with the page body. If undefined, the page is empty.
|
|
2971
2988
|
pages:
|
|
2972
2989
|
type: array
|
|
2973
2990
|
items:
|
|
@@ -3860,9 +3877,9 @@ components:
|
|
|
3860
3877
|
oneOf:
|
|
3861
3878
|
- type: string
|
|
3862
3879
|
enum:
|
|
3863
|
-
- meeting
|
|
3864
3880
|
- thread
|
|
3865
3881
|
- walkthrough
|
|
3882
|
+
- document
|
|
3866
3883
|
BaseCaptureEvent:
|
|
3867
3884
|
type: object
|
|
3868
3885
|
properties:
|
|
@@ -4007,6 +4024,80 @@ components:
|
|
|
4007
4024
|
body:
|
|
4008
4025
|
description: Content of the capture.
|
|
4009
4026
|
$ref: "#/components/schemas/Document"
|
|
4027
|
+
Snippet:
|
|
4028
|
+
allOf:
|
|
4029
|
+
- $ref: "#/components/schemas/Document"
|
|
4030
|
+
- type: object
|
|
4031
|
+
properties:
|
|
4032
|
+
id:
|
|
4033
|
+
type: string
|
|
4034
|
+
description: Unique identifier for the snippet
|
|
4035
|
+
createdAt:
|
|
4036
|
+
type: string
|
|
4037
|
+
format: date-time
|
|
4038
|
+
editedAt:
|
|
4039
|
+
type: string
|
|
4040
|
+
format: date-time
|
|
4041
|
+
description: Timestamp of when the snippet was last edited, if it has been edited since its creation.
|
|
4042
|
+
title:
|
|
4043
|
+
type: string
|
|
4044
|
+
description: Title describing the snippet.
|
|
4045
|
+
maxLength: 100
|
|
4046
|
+
source:
|
|
4047
|
+
description: The source of the snippet.
|
|
4048
|
+
type: object
|
|
4049
|
+
properties:
|
|
4050
|
+
sourceId:
|
|
4051
|
+
type: string
|
|
4052
|
+
description: An ID identifying the source, unique across all sources.
|
|
4053
|
+
name:
|
|
4054
|
+
type: string
|
|
4055
|
+
description: A display name for the source.
|
|
4056
|
+
externalId:
|
|
4057
|
+
type: string
|
|
4058
|
+
description: An ID identifying the snippet in the source system, if available.
|
|
4059
|
+
externalUrl:
|
|
4060
|
+
description: URL of the snippet in the source system, if available.
|
|
4061
|
+
$ref: "#/components/schemas/URL"
|
|
4062
|
+
required:
|
|
4063
|
+
- sourceId
|
|
4064
|
+
- name
|
|
4065
|
+
contributors:
|
|
4066
|
+
description: An array of contributors to the snippet, which can be either users or integrations. The first contributor is the one who created the snippet.
|
|
4067
|
+
type: array
|
|
4068
|
+
minItems: 1
|
|
4069
|
+
items:
|
|
4070
|
+
oneOf:
|
|
4071
|
+
- $ref: "#/components/schemas/Integration"
|
|
4072
|
+
- $ref: "#/components/schemas/User"
|
|
4073
|
+
urls:
|
|
4074
|
+
type: object
|
|
4075
|
+
description: URLs associated with the object
|
|
4076
|
+
properties:
|
|
4077
|
+
location:
|
|
4078
|
+
description: URL of the snippet in the API
|
|
4079
|
+
$ref: "#/components/schemas/URL"
|
|
4080
|
+
app:
|
|
4081
|
+
description: URL of the snippet in the app
|
|
4082
|
+
$ref: "#/components/schemas/URL"
|
|
4083
|
+
required:
|
|
4084
|
+
- location
|
|
4085
|
+
- app
|
|
4086
|
+
required:
|
|
4087
|
+
- id
|
|
4088
|
+
- source
|
|
4089
|
+
- createdAt
|
|
4090
|
+
- contributors
|
|
4091
|
+
- urls
|
|
4092
|
+
UpdateSnippetSchema:
|
|
4093
|
+
type: object
|
|
4094
|
+
properties:
|
|
4095
|
+
title:
|
|
4096
|
+
type: string
|
|
4097
|
+
description: A new title for the snippet.
|
|
4098
|
+
body:
|
|
4099
|
+
description: Content of the snippet.
|
|
4100
|
+
$ref: "#/components/schemas/Document"
|
|
4010
4101
|
ContentAuditRelation:
|
|
4011
4102
|
type: object
|
|
4012
4103
|
description: Content audit relation
|
|
@@ -4038,18 +4129,16 @@ components:
|
|
|
4038
4129
|
- createdAt
|
|
4039
4130
|
ContentAuditRelationType:
|
|
4040
4131
|
description: The type of the relation between the sources
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
- duplicate
|
|
4132
|
+
type: string
|
|
4133
|
+
enum:
|
|
4134
|
+
- contradiction
|
|
4135
|
+
- duplicate
|
|
4046
4136
|
ContentAuditRelationStatus:
|
|
4047
4137
|
description: Status of the audit relation to filter on
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
- rejected
|
|
4138
|
+
type: string
|
|
4139
|
+
enum:
|
|
4140
|
+
- pending
|
|
4141
|
+
- rejected
|
|
4053
4142
|
ContentAuditRelationStatusUpdate:
|
|
4054
4143
|
type: object
|
|
4055
4144
|
properties:
|
|
@@ -4817,6 +4906,7 @@ components:
|
|
|
4817
4906
|
type: string
|
|
4818
4907
|
enum:
|
|
4819
4908
|
- entities:write
|
|
4909
|
+
- snippets:read
|
|
4820
4910
|
- capture:write
|
|
4821
4911
|
- space:views:read
|
|
4822
4912
|
- space:content:read
|
|
@@ -8145,21 +8235,6 @@ components:
|
|
|
8145
8235
|
required:
|
|
8146
8236
|
- code
|
|
8147
8237
|
- message
|
|
8148
|
-
ContentFilesResponse:
|
|
8149
|
-
description: OK
|
|
8150
|
-
content:
|
|
8151
|
-
application/json:
|
|
8152
|
-
schema:
|
|
8153
|
-
allOf:
|
|
8154
|
-
- $ref: "#/components/schemas/List"
|
|
8155
|
-
- type: object
|
|
8156
|
-
required:
|
|
8157
|
-
- items
|
|
8158
|
-
properties:
|
|
8159
|
-
items:
|
|
8160
|
-
type: array
|
|
8161
|
-
items:
|
|
8162
|
-
$ref: "#/components/schemas/RevisionFile"
|
|
8163
8238
|
paths:
|
|
8164
8239
|
/:
|
|
8165
8240
|
get:
|
|
@@ -8713,9 +8788,33 @@ paths:
|
|
|
8713
8788
|
application/json:
|
|
8714
8789
|
schema:
|
|
8715
8790
|
$ref: "#/components/schemas/RequestImportContent"
|
|
8791
|
+
"/spaces/{spaceId}/content/pages":
|
|
8792
|
+
get:
|
|
8793
|
+
summary: List all pages for the main revision content of a space
|
|
8794
|
+
operationId: listPages
|
|
8795
|
+
security:
|
|
8796
|
+
- user: []
|
|
8797
|
+
parameters:
|
|
8798
|
+
- $ref: "#/components/parameters/spaceId"
|
|
8799
|
+
responses:
|
|
8800
|
+
"200":
|
|
8801
|
+
description: OK
|
|
8802
|
+
content:
|
|
8803
|
+
application/json:
|
|
8804
|
+
schema:
|
|
8805
|
+
type: object
|
|
8806
|
+
properties:
|
|
8807
|
+
pages:
|
|
8808
|
+
type: array
|
|
8809
|
+
items:
|
|
8810
|
+
$ref: "#/components/schemas/RevisionPage"
|
|
8811
|
+
required:
|
|
8812
|
+
- pages
|
|
8813
|
+
default:
|
|
8814
|
+
$ref: "#/components/responses/UnexpectedError"
|
|
8716
8815
|
"/spaces/{spaceId}/content/files":
|
|
8717
8816
|
get:
|
|
8718
|
-
summary: List all files for the
|
|
8817
|
+
summary: List all files for the main revision content of a space
|
|
8719
8818
|
operationId: listFiles
|
|
8720
8819
|
security:
|
|
8721
8820
|
- user: []
|
|
@@ -8725,7 +8824,38 @@ paths:
|
|
|
8725
8824
|
- $ref: "#/components/parameters/listLimit"
|
|
8726
8825
|
responses:
|
|
8727
8826
|
"200":
|
|
8728
|
-
|
|
8827
|
+
description: OK
|
|
8828
|
+
content:
|
|
8829
|
+
application/json:
|
|
8830
|
+
schema:
|
|
8831
|
+
allOf:
|
|
8832
|
+
- $ref: "#/components/schemas/List"
|
|
8833
|
+
- type: object
|
|
8834
|
+
required:
|
|
8835
|
+
- items
|
|
8836
|
+
properties:
|
|
8837
|
+
items:
|
|
8838
|
+
type: array
|
|
8839
|
+
items:
|
|
8840
|
+
$ref: "#/components/schemas/RevisionFile"
|
|
8841
|
+
default:
|
|
8842
|
+
$ref: "#/components/responses/UnexpectedError"
|
|
8843
|
+
"/spaces/{spaceId}/content/files/{fileId}":
|
|
8844
|
+
get:
|
|
8845
|
+
summary: Get a file by its ID in the main revision of a space
|
|
8846
|
+
operationId: getFileById
|
|
8847
|
+
security:
|
|
8848
|
+
- user: []
|
|
8849
|
+
parameters:
|
|
8850
|
+
- $ref: "#/components/parameters/spaceId"
|
|
8851
|
+
- $ref: "#/components/parameters/fileId"
|
|
8852
|
+
responses:
|
|
8853
|
+
"200":
|
|
8854
|
+
description: OK
|
|
8855
|
+
content:
|
|
8856
|
+
application/json:
|
|
8857
|
+
schema:
|
|
8858
|
+
$ref: "#/components/schemas/RevisionFile"
|
|
8729
8859
|
default:
|
|
8730
8860
|
$ref: "#/components/responses/UnexpectedError"
|
|
8731
8861
|
"/spaces/{spaceId}/content/page/{pageId}":
|
|
@@ -8797,6 +8927,29 @@ paths:
|
|
|
8797
8927
|
- $ref: "#/components/schemas/RevisionPageGroup"
|
|
8798
8928
|
default:
|
|
8799
8929
|
$ref: "#/components/responses/UnexpectedError"
|
|
8930
|
+
"/spaces/{spaceId}/documents/{documentId}":
|
|
8931
|
+
get:
|
|
8932
|
+
operationId: getDocumentById
|
|
8933
|
+
summary: Get a document by its ID in a space.
|
|
8934
|
+
security:
|
|
8935
|
+
- user: []
|
|
8936
|
+
parameters:
|
|
8937
|
+
- $ref: "#/components/parameters/spaceId"
|
|
8938
|
+
- name: documentId
|
|
8939
|
+
in: path
|
|
8940
|
+
required: true
|
|
8941
|
+
description: ID of the document in the space
|
|
8942
|
+
schema:
|
|
8943
|
+
type: string
|
|
8944
|
+
responses:
|
|
8945
|
+
"200":
|
|
8946
|
+
description: Document
|
|
8947
|
+
content:
|
|
8948
|
+
application/json:
|
|
8949
|
+
schema:
|
|
8950
|
+
$ref: "#/components/schemas/JSONDocument"
|
|
8951
|
+
default:
|
|
8952
|
+
$ref: "#/components/responses/UnexpectedError"
|
|
8800
8953
|
"/spaces/{spaceId}/change-requests":
|
|
8801
8954
|
post:
|
|
8802
8955
|
operationId: createChangeRequest
|
|
@@ -9433,9 +9586,34 @@ paths:
|
|
|
9433
9586
|
application/json:
|
|
9434
9587
|
schema:
|
|
9435
9588
|
$ref: "#/components/schemas/RequestImportContent"
|
|
9589
|
+
"/spaces/{spaceId}/change-requests/{changeRequestId}/content/pages":
|
|
9590
|
+
get:
|
|
9591
|
+
summary: List all pages in the content of a change request
|
|
9592
|
+
operationId: listPagesInChangeRequest
|
|
9593
|
+
security:
|
|
9594
|
+
- user: []
|
|
9595
|
+
parameters:
|
|
9596
|
+
- $ref: "#/components/parameters/spaceId"
|
|
9597
|
+
- $ref: "#/components/parameters/changeRequestId"
|
|
9598
|
+
responses:
|
|
9599
|
+
"200":
|
|
9600
|
+
description: OK
|
|
9601
|
+
content:
|
|
9602
|
+
application/json:
|
|
9603
|
+
schema:
|
|
9604
|
+
type: object
|
|
9605
|
+
properties:
|
|
9606
|
+
pages:
|
|
9607
|
+
type: array
|
|
9608
|
+
items:
|
|
9609
|
+
$ref: "#/components/schemas/RevisionPage"
|
|
9610
|
+
required:
|
|
9611
|
+
- pages
|
|
9612
|
+
default:
|
|
9613
|
+
$ref: "#/components/responses/UnexpectedError"
|
|
9436
9614
|
"/spaces/{spaceId}/change-requests/{changeRequestId}/content/files":
|
|
9437
9615
|
get:
|
|
9438
|
-
summary: List all files in
|
|
9616
|
+
summary: List all files in a change request content
|
|
9439
9617
|
operationId: listFilesInChangeRequestById
|
|
9440
9618
|
security:
|
|
9441
9619
|
- user: []
|
|
@@ -9446,7 +9624,39 @@ paths:
|
|
|
9446
9624
|
- $ref: "#/components/parameters/listLimit"
|
|
9447
9625
|
responses:
|
|
9448
9626
|
"200":
|
|
9449
|
-
|
|
9627
|
+
description: OK
|
|
9628
|
+
content:
|
|
9629
|
+
application/json:
|
|
9630
|
+
schema:
|
|
9631
|
+
allOf:
|
|
9632
|
+
- $ref: "#/components/schemas/List"
|
|
9633
|
+
- type: object
|
|
9634
|
+
required:
|
|
9635
|
+
- items
|
|
9636
|
+
properties:
|
|
9637
|
+
items:
|
|
9638
|
+
type: array
|
|
9639
|
+
items:
|
|
9640
|
+
$ref: "#/components/schemas/RevisionFile"
|
|
9641
|
+
default:
|
|
9642
|
+
$ref: "#/components/responses/UnexpectedError"
|
|
9643
|
+
"/spaces/{spaceId}/change-requests/{changeRequestId}/content/files/{fileId}":
|
|
9644
|
+
get:
|
|
9645
|
+
summary: Get a file by its ID in the content of a change request
|
|
9646
|
+
operationId: getFileInChangeRequestById
|
|
9647
|
+
security:
|
|
9648
|
+
- user: []
|
|
9649
|
+
parameters:
|
|
9650
|
+
- $ref: "#/components/parameters/spaceId"
|
|
9651
|
+
- $ref: "#/components/parameters/changeRequestId"
|
|
9652
|
+
- $ref: "#/components/parameters/fileId"
|
|
9653
|
+
responses:
|
|
9654
|
+
"200":
|
|
9655
|
+
description: OK
|
|
9656
|
+
content:
|
|
9657
|
+
application/json:
|
|
9658
|
+
schema:
|
|
9659
|
+
$ref: "#/components/schemas/RevisionFile"
|
|
9450
9660
|
default:
|
|
9451
9661
|
$ref: "#/components/responses/UnexpectedError"
|
|
9452
9662
|
"/spaces/{spaceId}/change-requests/{changeRequestId}/content/page/{pageId}":
|
|
@@ -9579,6 +9789,30 @@ paths:
|
|
|
9579
9789
|
- changes
|
|
9580
9790
|
default:
|
|
9581
9791
|
$ref: "#/components/responses/UnexpectedError"
|
|
9792
|
+
"/spaces/{spaceId}/revisions/{revisionId}/pages":
|
|
9793
|
+
get:
|
|
9794
|
+
summary: List all pages in a revision
|
|
9795
|
+
operationId: listPagesInRevisionById
|
|
9796
|
+
security:
|
|
9797
|
+
- user: []
|
|
9798
|
+
parameters:
|
|
9799
|
+
- $ref: "#/components/parameters/spaceId"
|
|
9800
|
+
responses:
|
|
9801
|
+
"200":
|
|
9802
|
+
description: OK
|
|
9803
|
+
content:
|
|
9804
|
+
application/json:
|
|
9805
|
+
schema:
|
|
9806
|
+
type: object
|
|
9807
|
+
properties:
|
|
9808
|
+
pages:
|
|
9809
|
+
type: array
|
|
9810
|
+
items:
|
|
9811
|
+
$ref: "#/components/schemas/RevisionPage"
|
|
9812
|
+
required:
|
|
9813
|
+
- pages
|
|
9814
|
+
default:
|
|
9815
|
+
$ref: "#/components/responses/UnexpectedError"
|
|
9582
9816
|
"/spaces/{spaceId}/revisions/{revisionId}/files":
|
|
9583
9817
|
get:
|
|
9584
9818
|
summary: List all files in a revision
|
|
@@ -9592,7 +9826,39 @@ paths:
|
|
|
9592
9826
|
- $ref: "#/components/parameters/listLimit"
|
|
9593
9827
|
responses:
|
|
9594
9828
|
"200":
|
|
9595
|
-
|
|
9829
|
+
description: OK
|
|
9830
|
+
content:
|
|
9831
|
+
application/json:
|
|
9832
|
+
schema:
|
|
9833
|
+
allOf:
|
|
9834
|
+
- $ref: "#/components/schemas/List"
|
|
9835
|
+
- type: object
|
|
9836
|
+
required:
|
|
9837
|
+
- items
|
|
9838
|
+
properties:
|
|
9839
|
+
items:
|
|
9840
|
+
type: array
|
|
9841
|
+
items:
|
|
9842
|
+
$ref: "#/components/schemas/RevisionFile"
|
|
9843
|
+
default:
|
|
9844
|
+
$ref: "#/components/responses/UnexpectedError"
|
|
9845
|
+
"/spaces/{spaceId}/revisions/{revisionId}/files/{fileId}":
|
|
9846
|
+
get:
|
|
9847
|
+
summary: Get a file in a revision by its ID
|
|
9848
|
+
operationId: getFileInRevisionById
|
|
9849
|
+
security:
|
|
9850
|
+
- user: []
|
|
9851
|
+
parameters:
|
|
9852
|
+
- $ref: "#/components/parameters/spaceId"
|
|
9853
|
+
- $ref: "#/components/parameters/revisionId"
|
|
9854
|
+
- $ref: "#/components/parameters/fileId"
|
|
9855
|
+
responses:
|
|
9856
|
+
"200":
|
|
9857
|
+
description: OK
|
|
9858
|
+
content:
|
|
9859
|
+
application/json:
|
|
9860
|
+
schema:
|
|
9861
|
+
$ref: "#/components/schemas/RevisionFile"
|
|
9596
9862
|
default:
|
|
9597
9863
|
$ref: "#/components/responses/UnexpectedError"
|
|
9598
9864
|
"/spaces/{spaceId}/revisions/{revisionId}/page/{pageId}":
|
|
@@ -11186,6 +11452,11 @@ paths:
|
|
|
11186
11452
|
- $ref: "#/components/parameters/organizationId"
|
|
11187
11453
|
- $ref: "#/components/parameters/listPage"
|
|
11188
11454
|
- $ref: "#/components/parameters/listLimit"
|
|
11455
|
+
- in: query
|
|
11456
|
+
name: owner
|
|
11457
|
+
description: The unique identifier of a member of the organization. Only teams they can manage will be returned.
|
|
11458
|
+
schema:
|
|
11459
|
+
type: string
|
|
11189
11460
|
- in: query
|
|
11190
11461
|
name: title
|
|
11191
11462
|
description: If provided, only teams whose name contains the given parameter will be returned. Case insensitive.
|
|
@@ -12143,6 +12414,32 @@ paths:
|
|
|
12143
12414
|
$ref: "#/components/schemas/Integration"
|
|
12144
12415
|
default:
|
|
12145
12416
|
$ref: "#/components/responses/UnexpectedError"
|
|
12417
|
+
"/orgs/{organizationId}/integrations/{integrationName}/installation_status":
|
|
12418
|
+
get:
|
|
12419
|
+
operationId: getOrganizationIntegrationStatus
|
|
12420
|
+
summary: Get the status of an integration installation in an organization
|
|
12421
|
+
tags:
|
|
12422
|
+
- integrations
|
|
12423
|
+
security:
|
|
12424
|
+
- user: []
|
|
12425
|
+
parameters:
|
|
12426
|
+
- $ref: "#/components/parameters/organizationId"
|
|
12427
|
+
- $ref: "#/components/parameters/integrationName"
|
|
12428
|
+
responses:
|
|
12429
|
+
"200":
|
|
12430
|
+
description: Integration installation status
|
|
12431
|
+
content:
|
|
12432
|
+
application/json:
|
|
12433
|
+
schema:
|
|
12434
|
+
properties:
|
|
12435
|
+
status:
|
|
12436
|
+
$ref: "#/components/schemas/IntegrationInstallationStatus"
|
|
12437
|
+
required:
|
|
12438
|
+
- status
|
|
12439
|
+
"404":
|
|
12440
|
+
$ref: "#/components/responses/NotFoundError"
|
|
12441
|
+
default:
|
|
12442
|
+
$ref: "#/components/responses/UnexpectedError"
|
|
12146
12443
|
"/orgs/{organizationId}/installations":
|
|
12147
12444
|
get:
|
|
12148
12445
|
operationId: listOrganizationInstallations
|
|
@@ -12360,7 +12657,8 @@ paths:
|
|
|
12360
12657
|
"/orgs/{organizationId}/captures":
|
|
12361
12658
|
get:
|
|
12362
12659
|
operationId: listCaptures
|
|
12363
|
-
|
|
12660
|
+
deprecated: true
|
|
12661
|
+
summary: List captures. Deprecated, use listSnippets instead.
|
|
12364
12662
|
description: |
|
|
12365
12663
|
List captures in an organization, newest first.
|
|
12366
12664
|
tags:
|
|
@@ -12443,7 +12741,8 @@ paths:
|
|
|
12443
12741
|
"/orgs/{organizationId}/captures/{captureId}":
|
|
12444
12742
|
get:
|
|
12445
12743
|
operationId: getCapture
|
|
12446
|
-
|
|
12744
|
+
deprecated: true
|
|
12745
|
+
summary: Get a capture by its ID. Deprecated, use getSnippet instead.
|
|
12447
12746
|
tags:
|
|
12448
12747
|
- organizations
|
|
12449
12748
|
security:
|
|
@@ -12463,7 +12762,8 @@ paths:
|
|
|
12463
12762
|
$ref: "#/components/responses/UnexpectedError"
|
|
12464
12763
|
delete:
|
|
12465
12764
|
operationId: deleteCapture
|
|
12466
|
-
|
|
12765
|
+
deprecated: true
|
|
12766
|
+
summary: Delete a capture by its ID. Deprecated, use deleteSnippet.
|
|
12467
12767
|
tags:
|
|
12468
12768
|
- organizations
|
|
12469
12769
|
security:
|
|
@@ -12478,7 +12778,8 @@ paths:
|
|
|
12478
12778
|
$ref: "#/components/responses/UnexpectedError"
|
|
12479
12779
|
put:
|
|
12480
12780
|
operationId: updateCapture
|
|
12481
|
-
|
|
12781
|
+
deprecated: true
|
|
12782
|
+
summary: Update an existing capture. Deprecated, use updateSnippet.
|
|
12482
12783
|
tags:
|
|
12483
12784
|
- organizations
|
|
12484
12785
|
security:
|
|
@@ -12567,6 +12868,134 @@ paths:
|
|
|
12567
12868
|
- capture
|
|
12568
12869
|
default:
|
|
12569
12870
|
$ref: "#/components/responses/UnexpectedError"
|
|
12871
|
+
"/orgs/{organizationId}/snippets":
|
|
12872
|
+
get:
|
|
12873
|
+
operationId: listSnippets
|
|
12874
|
+
summary: Lists snippets.
|
|
12875
|
+
description: |
|
|
12876
|
+
List snippets in an organization, newest first.
|
|
12877
|
+
tags:
|
|
12878
|
+
- organizations
|
|
12879
|
+
security:
|
|
12880
|
+
- user: []
|
|
12881
|
+
parameters:
|
|
12882
|
+
- $ref: "#/components/parameters/organizationId"
|
|
12883
|
+
- $ref: "#/components/parameters/pageFormat"
|
|
12884
|
+
- $ref: "#/components/parameters/listPage"
|
|
12885
|
+
- $ref: "#/components/parameters/listLimit"
|
|
12886
|
+
- name: source
|
|
12887
|
+
in: query
|
|
12888
|
+
description: If specified, only snippets from the specified source will be returned.
|
|
12889
|
+
schema:
|
|
12890
|
+
type: string
|
|
12891
|
+
responses:
|
|
12892
|
+
"200":
|
|
12893
|
+
description: OK
|
|
12894
|
+
content:
|
|
12895
|
+
application/json:
|
|
12896
|
+
schema:
|
|
12897
|
+
allOf:
|
|
12898
|
+
- $ref: "#/components/schemas/List"
|
|
12899
|
+
- type: object
|
|
12900
|
+
required:
|
|
12901
|
+
- items
|
|
12902
|
+
properties:
|
|
12903
|
+
items:
|
|
12904
|
+
type: array
|
|
12905
|
+
items:
|
|
12906
|
+
$ref: "#/components/schemas/Snippet"
|
|
12907
|
+
default:
|
|
12908
|
+
$ref: "#/components/responses/UnexpectedError"
|
|
12909
|
+
post:
|
|
12910
|
+
operationId: createSnippet
|
|
12911
|
+
summary: Create a new snippet
|
|
12912
|
+
tags:
|
|
12913
|
+
- organizations
|
|
12914
|
+
security:
|
|
12915
|
+
- user: []
|
|
12916
|
+
parameters:
|
|
12917
|
+
- $ref: "#/components/parameters/organizationId"
|
|
12918
|
+
requestBody:
|
|
12919
|
+
content:
|
|
12920
|
+
application/json:
|
|
12921
|
+
schema:
|
|
12922
|
+
type: object
|
|
12923
|
+
responses:
|
|
12924
|
+
"201":
|
|
12925
|
+
description: Snippet created
|
|
12926
|
+
headers:
|
|
12927
|
+
Location:
|
|
12928
|
+
description: API URL for the newly created snippet
|
|
12929
|
+
schema:
|
|
12930
|
+
type: string
|
|
12931
|
+
content:
|
|
12932
|
+
application/json:
|
|
12933
|
+
schema:
|
|
12934
|
+
$ref: "#/components/schemas/Snippet"
|
|
12935
|
+
default:
|
|
12936
|
+
$ref: "#/components/responses/UnexpectedError"
|
|
12937
|
+
"/orgs/{organizationId}/snippets/{snippetId}":
|
|
12938
|
+
get:
|
|
12939
|
+
operationId: getSnippet
|
|
12940
|
+
summary: Get a snippet by its ID
|
|
12941
|
+
tags:
|
|
12942
|
+
- organizations
|
|
12943
|
+
security:
|
|
12944
|
+
- user: []
|
|
12945
|
+
parameters:
|
|
12946
|
+
- $ref: "#/components/parameters/organizationId"
|
|
12947
|
+
- $ref: "#/components/parameters/snippetId"
|
|
12948
|
+
- $ref: "#/components/parameters/pageFormat"
|
|
12949
|
+
responses:
|
|
12950
|
+
"200":
|
|
12951
|
+
description: OK
|
|
12952
|
+
content:
|
|
12953
|
+
application/json:
|
|
12954
|
+
schema:
|
|
12955
|
+
$ref: "#/components/schemas/Snippet"
|
|
12956
|
+
default:
|
|
12957
|
+
$ref: "#/components/responses/UnexpectedError"
|
|
12958
|
+
delete:
|
|
12959
|
+
operationId: deleteSnippet
|
|
12960
|
+
summary: Delete a snippet by its ID.
|
|
12961
|
+
tags:
|
|
12962
|
+
- organizations
|
|
12963
|
+
security:
|
|
12964
|
+
- user: []
|
|
12965
|
+
parameters:
|
|
12966
|
+
- $ref: "#/components/parameters/organizationId"
|
|
12967
|
+
- $ref: "#/components/parameters/snippetId"
|
|
12968
|
+
responses:
|
|
12969
|
+
"200":
|
|
12970
|
+
description: OK
|
|
12971
|
+
default:
|
|
12972
|
+
$ref: "#/components/responses/UnexpectedError"
|
|
12973
|
+
put:
|
|
12974
|
+
operationId: updateSnippet
|
|
12975
|
+
summary: Update an existing snippet.
|
|
12976
|
+
tags:
|
|
12977
|
+
- organizations
|
|
12978
|
+
security:
|
|
12979
|
+
- user: []
|
|
12980
|
+
parameters:
|
|
12981
|
+
- $ref: "#/components/parameters/organizationId"
|
|
12982
|
+
- $ref: "#/components/parameters/snippetId"
|
|
12983
|
+
- $ref: "#/components/parameters/ifUnmodifiedSince"
|
|
12984
|
+
requestBody:
|
|
12985
|
+
required: true
|
|
12986
|
+
content:
|
|
12987
|
+
application/json:
|
|
12988
|
+
schema:
|
|
12989
|
+
$ref: "#/components/schemas/UpdateSnippetSchema"
|
|
12990
|
+
responses:
|
|
12991
|
+
"200":
|
|
12992
|
+
description: OK
|
|
12993
|
+
content:
|
|
12994
|
+
application/json:
|
|
12995
|
+
schema:
|
|
12996
|
+
$ref: "#/components/schemas/Snippet"
|
|
12997
|
+
default:
|
|
12998
|
+
$ref: "#/components/responses/UnexpectedError"
|
|
12570
12999
|
"/orgs/{organizationId}/ask":
|
|
12571
13000
|
post:
|
|
12572
13001
|
operationId: askInOrganization
|
|
@@ -12611,9 +13040,29 @@ paths:
|
|
|
12611
13040
|
required: false
|
|
12612
13041
|
description: Status of the audit relation to filter on
|
|
12613
13042
|
schema:
|
|
12614
|
-
|
|
12615
|
-
|
|
12616
|
-
-
|
|
13043
|
+
default: pending
|
|
13044
|
+
oneOf:
|
|
13045
|
+
- $ref: "#/components/schemas/ContentAuditRelationStatus"
|
|
13046
|
+
- type: string
|
|
13047
|
+
enum:
|
|
13048
|
+
- all
|
|
13049
|
+
- name: space
|
|
13050
|
+
in: query
|
|
13051
|
+
required: false
|
|
13052
|
+
description: Space concerned by the relation
|
|
13053
|
+
schema:
|
|
13054
|
+
type: string
|
|
13055
|
+
- name: type
|
|
13056
|
+
in: query
|
|
13057
|
+
required: false
|
|
13058
|
+
description: Type of the audit relation to filter on
|
|
13059
|
+
schema:
|
|
13060
|
+
default: all
|
|
13061
|
+
oneOf:
|
|
13062
|
+
- $ref: "#/components/schemas/ContentAuditRelationType"
|
|
13063
|
+
- type: string
|
|
13064
|
+
enum:
|
|
13065
|
+
- all
|
|
12617
13066
|
responses:
|
|
12618
13067
|
"200":
|
|
12619
13068
|
description: Content audit relations
|
|
@@ -12666,6 +13115,35 @@ paths:
|
|
|
12666
13115
|
$ref: "#/components/responses/NotFoundError"
|
|
12667
13116
|
default:
|
|
12668
13117
|
$ref: "#/components/responses/UnexpectedError"
|
|
13118
|
+
"/orgs/{organizationId}/insights/audit-sources/{sourceId}/content":
|
|
13119
|
+
get:
|
|
13120
|
+
operationId: getContentAuditSourceContentById
|
|
13121
|
+
summary: Get the content of an audit source
|
|
13122
|
+
tags:
|
|
13123
|
+
- organizations
|
|
13124
|
+
security:
|
|
13125
|
+
- user: []
|
|
13126
|
+
parameters:
|
|
13127
|
+
- $ref: "#/components/parameters/organizationId"
|
|
13128
|
+
- name: sourceId
|
|
13129
|
+
in: path
|
|
13130
|
+
required: true
|
|
13131
|
+
description: The id of the content audit source
|
|
13132
|
+
schema:
|
|
13133
|
+
type: string
|
|
13134
|
+
- $ref: "#/components/parameters/pageFormat"
|
|
13135
|
+
responses:
|
|
13136
|
+
"200":
|
|
13137
|
+
description: OK
|
|
13138
|
+
content:
|
|
13139
|
+
application/json:
|
|
13140
|
+
schema:
|
|
13141
|
+
$ref: "#/components/schemas/Document"
|
|
13142
|
+
"404":
|
|
13143
|
+
description: No matching content source found for given ID
|
|
13144
|
+
$ref: "#/components/responses/NotFoundError"
|
|
13145
|
+
default:
|
|
13146
|
+
$ref: "#/components/responses/UnexpectedError"
|
|
12669
13147
|
/internal/hive/token:
|
|
12670
13148
|
post:
|
|
12671
13149
|
operationId: generateHiveAccessToken
|