-
Notifications
You must be signed in to change notification settings - Fork 5
/
openapi.yaml
3750 lines (3512 loc) · 109 KB
/
openapi.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.2
info:
title: Onna Platform API
description: >-
# Introduction

The Onna Platform API enables you to programmatically upload your data into
our Knowledge Integration Platform.
This unlocks the possibility to have all your data in one place
and turn it into knowledge—even data we don't support directly with one of
[our connectors](https://onna.com/connectors/ "List of available
connectors").
## Key concepts
Before starting to use the API, we recommend to become familiar with some
key concepts.
For more information on the key concepts, see [API
basics](https://dev.onna.com/fundamentals/api-basics "Documentation about
API basics").
## Requirements
To use this API, you must have an active account on an [Enterprise
Plan](https://onna.com/pricing/ "Onna pricing page")
and have the [Developer role
assigned](https://dev.onna.com/get-started/authentication#assign-developer-role
"Sections on how to assign a developer role").
For more information, see
[Requirements](https://dev.onna.com/fundamentals/api-basics#requirements
"Section about requirements").
## Security
This API requires that all requests are made using
[HTTPS](https://en.wikipedia.org/wiki/HTTPS "Wikipedia entry for HTTPS")
and must be [authenticated with a valid
token](https://dev.onna.com/get-started/authentication "Article about
authentication").
## Response codes
A full list of the response codes returned by this API is available at
[Response codes](https://dev.onna.com/fundamentals/response-codes "List of
supported response codes").
## Versioning
This API uses semantic versioning to ensure that your client doesn't break.
The version is declared in the URL so that you can lock to a specific one by
prefix the URL.
When the version declared in the URL is not supported, you will receive a
400 response.
For more information, see
[Versioning](https://dev.onna.com/fundamentals/api-basics#versioning
"Section about versioning").
## Date and time format
This API supports dates and times in [ISO
8601](https://en.wikipedia.org/wiki/ISO_8601 "Wikipedia entry for the IS0
8601 standard") format.
## Pagination
This API uses cursoring to divide large sets of results in multiple pages.
For more information, see
[Pagination](https://dev.onna.com/fundamentals/api-basics/#pagination
"Section about supported pagination").
## Parameters
There are many ways to pass parameters when making requests to this API.
For more information, see
[Parameters](https://dev.onna.com/fundamentals/api-basics#parameters
"Section about supported parameters").
## Resource types
You can ingest various type of resources. For more information, see
[Resource types](https://dev.onna.com/fundamentals/resource-types "Article
about supported resource types").
version: v1.1.0
contact:
name: Onna Help
url: https://dev.onna.com/help
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0.html
termsOfService: https://dev.onna.com/legal
servers:
- description: Production Server
url: https://api.onna.com/v1
tags:
- description: >-
[Workspaces](https://help.onna.com/hc/en-us/articles/4628449003292-Creating-and-Managing-Workspaces)
are locations where you can collect data coming from different sources,
organize it,
and collaborate with other members of your team.
You can share workspaces with collaborators with various permission levels
and roles.
Permission levels are dependent on the type of expected collaboration.
You can also search across an entire workspace and export the results of
your searches or entire data collections.
This collection includes all the endpoints that enable you to work and
collaborate inside workspaces.
name: Workspaces
- description: >-
A generic endpoint to upload a raw file to an existing resource (ticket,
file, etc).
Our upload engine is based on the [TUS protocol](https://tus.io/ "TUS
protocol website") and treats every upload as a resumable file upload.
Check our get [started
guide](https://dev.onna.com/get-started/hello-world?_highlight=tus#initialize-tus
"Get started with TUS and the platform API").
Whatever the programming language you're using, it's possible that there's
a library that integrates this protocol.
For more information about TUS, see the [TUS
documentation](https://tus.io/protocols/resumable-upload.html "TUS
protocol documentation").
name: Upload
- description: >-
Folders are containers for your files or other folders. A place where you
can group your resources together, like in any desktop operating system.
This collection includes all the endpoints that enable you to handle
folders, such as creating, retrieving, or deleting them.
name: Folders
- description: >-
You can ingest a wide range of raw files.
Here's the details of what raw files you can view in the UI:
- Media (Audio, Video, Images)
- PDFs
- Microsoft Documents (DOC, DOCX, PPT, PPTX), rendered as PDFs
- Microsoft Spreadsheets (Worksheets rendered as tabs)
- Plain text (CSV, TXT), rendered as PDFs
- Emails (EML, MSG)
- Web pages (HTM, HTML)
- Code
For more information,please check our docs about
[raw-files](https://dev.onna.com/fundamentals/resource-types#raw-files
"Link to docs site about raw-file ingestion") ingestion.
name: 'Resources: Files'
- description: >-
The `Ticket` resource type defines resources with which two parties
communicate to track work to resolve issues
or deliver incremental value. Customer support requests, service desk
tickets, or software development projects are
some examples of what can be mapped to this resource type.
Read our developer documentation to learn more about the [Ticket resource
type](https://dev.onna.com/fundamentals/resource-types#ticket).
name: 'Resources: Tickets'
- description: >-
Our API uses OAuth 2's Client Credentials Grant to authenticate your
requests.
This grant type is especially suited for machine-to-machine (M2M)
applications,
such as the applications you build on top of the Onna platform.
For more information please check our detailed [authentication
docs](https://dev.onna.com/get-started/authentication).
name: Authentication
- name: CustomFields
- description: API Utils, such as the `health` endpoint.
name: Utils
- description: >-
You can define custom resource types by defining and uploading a new
schema.
name: 'Resources: Custom Models'
- description: >-
A schema defines a custom model. They can be used to upload custom
resources.
name: Schemas
paths:
/customFields:
get:
tags:
- CustomFields
summary: List Custom Fields
operationId: CustomFields_list
security:
- OAuth2: []
description: List custom fields.
parameters:
- description: >-
The API uses [cursoring for
pagination.](https://dev.onna.com/fundamentals/api-basics/#pagination)
example: '2022-02-22T11:11:11.12345'
in: query
name: cursor
required: false
schema:
title: Cursor
description: >-
The API uses [cursoring for
pagination.](https://dev.onna.com/fundamentals/api-basics/#pagination)
type: string
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/CustomFieldPageResponseBody'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors401'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors403'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors404'
'422':
description: Unprocessable Entity
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors422'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors500'
x-codeSamples:
- label: cURL
lang: cURL
source: curl ...
post:
tags:
- CustomFields
summary: Create Custom Field
operationId: CustomFields_createField
security:
- OAuth2: []
description: Create a custom field.
parameters: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateCustomFieldRequestBody'
required: true
responses:
'201':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/CreateCustomFieldResponseBody'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors401'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors403'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors404'
'422':
description: Unprocessable Entity
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors422'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors500'
x-codeSamples:
- label: cURL
lang: cURL
source: curl ...
/folders:
post:
tags:
- Folders
summary: Create Folder
operationId: Folders_createNewFolder
security:
- OAuth2: []
description: Create a folder in a workspace.
parameters: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateFolderRequestBody'
required: true
responses:
'201':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/CreateFolderResponseBody'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors401'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors403'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors404'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors500'
x-codeSamples:
- label: cURL
lang: cURL
source: |-
curl --request POST \
--url 'https://api.onna.com/v1/folders' \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '{
"name": "My folder",
"onna_parent_id": "b7c6f55fa54c4a3e821e825bd6262c0f"
}'
/folders/{onna_id}:
delete:
tags:
- Folders
summary: Delete Folder
operationId: Folders_deleteFolder
security:
- OAuth2: []
description: |-
Delete the folder.
📌 This also deletes all resources contained in it!
parameters:
- description: Unique ID of the folder.
in: path
name: onna_id
required: true
schema:
title: ID
description: Unique ID of the folder.
type: string
responses:
'204':
description: Successful Response
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors401'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors403'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors404'
'422':
description: Unprocessable Entity
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors422'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors500'
x-codeSamples:
- label: cURL
lang: cURL
source: >
curl --request DELETE \
--url
'https://api.onna.com/v1/folders/fd9f0c5339de42f9964e6afe9bf20259' \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'Accept: application/json'
get:
tags:
- Folders
summary: Retrieve Folder Info
operationId: Folders_getInfo
security:
- OAuth2: []
description: Retrieve information related to a folder.
parameters:
- description: Unique ID of the folder.
in: path
name: onna_id
required: true
schema:
title: ID
description: Unique ID of the folder.
type: string
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ReadFolderResponseBody'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors401'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors403'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors404'
'422':
description: Unprocessable Entity
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors422'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors500'
x-codeSamples:
- label: cURL
lang: cURL
source: >+
curl --request GET \
--url
'https://api.onna.com/v1/folders/fd9f0c5339de42f9964e6afe9bf20259' \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'Accept: application/json' \
patch:
tags:
- Folders
summary: Update Folder
operationId: Folders_updateFolderName
security:
- OAuth2: []
description: >-
Update the folder. For example, rename it from `My folder` to `My
updated folder name`.
parameters:
- description: Unique ID of the folder.
in: path
name: onna_id
required: true
schema:
title: ID
description: Unique ID of the folder.
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateFolderRequestBody'
required: true
responses:
'204':
description: Successful Response
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors401'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors403'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors404'
'422':
description: Unprocessable Entity
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors422'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors500'
x-codeSamples:
- label: cURL
lang: cURL
source: >-
curl --request PATCH
'https://api.onna.com/v1/folders/fd9f0c5339de42f9964e6afe9bf20259' \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '{
"name": "My updated folder name"
}'
/health:
get:
tags:
- Utils
summary: Health Check
operationId: Utils_checkServiceStatus
description: Check service status, version and build.
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/HealthResponseBody'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors500'
x-codeSamples:
- label: cURL
lang: cURL
source: |
curl --request GET \
--url 'https://api.onna.com/v1/health' \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'Accept: application/json' \
/oauth/token:
post:
tags:
- Authentication
summary: Login
operationId: Authentication_exchangeCredentials
description: Exchange credentials for an access token.
requestBody:
content:
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/Body_login_oauth_token_post'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/OauthTokenResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors500'
x-codeSamples:
- label: cURL
lang: cURL
source: |-
curl --request POST \
--url 'https://api.onna.com/v1/oauth/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'client_id=YOUR_CLIENT_ID' \
--data-urlencode 'client_secret=YOUR_CLIENT_SECRET' \
--data-urlencode 'grant_type=client_credentials'
/oauth/user:
get:
tags:
- Authentication
summary: Current User
operationId: Authentication_currentUserInfo
security:
- OAuth2: []
description: Return information about the currently authenticated user.
parameters: []
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/CurrentUser'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors401'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors500'
/resources/files:
post:
tags:
- 'Resources: Files'
summary: Create File
operationId: ResourcesFiles_createNewFile
security:
- OAuth2: []
description: Create a file resource.
parameters: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateFileBody'
required: true
responses:
'201':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/CreateFileResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors401'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors403'
'422':
description: Unprocessable Entity
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors422'
x-codeSamples:
- label: cURL
lang: cURL
source: |-
curl --request POST 'https://api.onna.com/v1/resources/files' \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"onna_parent_id": "0ec85634bf2c4d8db453a65551c36b8d",
"ref": "Creativecommons-what-is-creative-commons_eng",
"url": "https://wiki.creativecommons.org/images/3/35/Creativecommons-what-is-creative-commons_eng.pdf",
"comment": "Creative Commons PDF",
"creation_date": "2022-07-21T09:02:40.083388+00:00",
"creator": "Creative Commons ORG",
"description": "Creative Commons PDF",
"name": "Creativecommons-what-is-creative-commons_eng.pdf",
"path": "/images/3/35",
"tags": [
"creative commons"
],
"type": "pdf",
"update_date": "2022-07-21T09:02:40.083388+00:00",
"updater": "Bob"
}'
/resources/files/{onna_id}:
delete:
tags:
- 'Resources: Files'
summary: Delete File
operationId: ResourcesFiles_deleteFile
security:
- OAuth2: []
description: Delete the file.
parameters:
- description: Unique ID of the file.
in: path
name: onna_id
required: true
schema:
title: ID
description: Unique ID of the file.
type: string
responses:
'204':
description: Successful Response
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors401'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors403'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors404'
'422':
description: Unprocessable Entity
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors422'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors500'
x-codeSamples:
- label: cURL
lang: cURL
source: >-
curl --request DELETE
'https://api.onna.com/v1/resources/files/fs3f0c5339de42f9964e6afe9bf20169'
\
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'Accept: application/json'
get:
tags:
- 'Resources: Files'
summary: Read File
operationId: ResourcesFiles_getFile
security:
- OAuth2: []
description: Retrieve a file resource.
parameters:
- description: Unique ID of the file.
in: path
name: onna_id
required: true
schema:
title: ID
description: Unique ID of the file.
type: string
responses:
'201':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ReadFileResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors401'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors403'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors404'
'422':
description: Unprocessable Entity
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors422'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors500'
x-codeSamples:
- label: cURL
lang: cURL
source: >-
curl --request GET
'https://api.onna.com/v1/resources/files/fs3f0c5339de42f9964e6afe9bf20169'
\
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'Accept: application/json'
/resources/tickets:
post:
tags:
- 'Resources: Tickets'
summary: Create Ticket
operationId: ResourcesTickets_createNewTicket
security:
- OAuth2: []
description: Create a ticket resource.
parameters: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateTicketBody'
required: true
responses:
'201':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/CreateTicketResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors401'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors403'
'422':
description: Unprocessable Entity
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors422'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/JsonApiErrors500'
x-codeSamples:
- label: cURL
lang: cURL
source: |-
curl --request POST 'https://api.onna.com/v1/resources/tickets' \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '{
"name": "CS0001401",
"onna_parent_id": "da72de92fef04c6a9cc5cfe018fa9cd6",
"ref": "f352dc9387632300d6b0a7da0acb0b60",
"url": "https://instance.servicenow.com/api/sn_customerservice/case/f352dc9387632300d6b0a7da0acb0b60"
}'
/resources/tickets/{onna_id}:
delete:
tags:
- 'Resources: Tickets'