-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcoreBOSAPI.yaml
More file actions
2822 lines (2812 loc) · 103 KB
/
coreBOSAPI.yaml
File metadata and controls
2822 lines (2812 loc) · 103 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.0.0
info:
version: '0.22'
title: coreBOS API
description: |
**core Business Operating System** (coreBOS) is a customizable computer software solution.
coreBOS is a business empowering tool, an adaptable software program that will help your business accomplish it’s goals. It is a free and open source software application.
This API will permit you to manage all the information contained in your coreBOS install. You will be able to extract information about the modules and fields the data is structured in and also about all that data and its' relations.
On the operational side you will be able to trigger workflows and launch operations of various types that can be easily configured inside coreBOS.
All with the security restrictions established by the coreBOS administrator.
license:
name: VPL
servers:
- url: 'http://localhost/coreBOSTest/webservice.php'
- url: 'https://demo.corebos.com/webservice.php'
paths:
/getchallenge:
$ref: 'paths/getchallenge.yaml#/getchallenge'
/login:
$ref: 'paths/login.yaml#/login'
/extendsession:
$ref: 'paths/extendsession.yaml#/extendsession'
/authenticateContact:
$ref: 'paths/authenticateContact.yaml#/authenticateContact'
/loginPortal:
$ref: 'paths/loginPortal.yaml#/loginPortal'
/changePassword:
post:
operationId: changePassword
summary: 6.- Change a user password
description: Permits a user to change his password or the password of another user if the connected user is an administrator
tags:
- login
responses:
'200':
description: Returns created record or error
content:
application/json:
schema:
oneOf:
- $ref: 'components/changePasswordResponse.yaml#/changePasswordResponse'
- $ref: 'components/APIErrors.yaml#/INVALID_USER'
- $ref: 'components/APIErrors.yaml#/PASSWORD_NOT_STRONG'
- $ref: 'components/APIErrors.yaml#/INVALID_OLD_PASSWORD'
- $ref: 'components/APIErrors.yaml#/DATABASE_QUERY_ERROR'
- $ref: 'components/APIErrors.yaml#/CHANGE_PASSWORD_FAILURE'
- $ref: 'components/APIAccessDenied.yaml#/APIAccessDenied'
requestBody:
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
operation:
type: string
default: changePassword
example: changePassword
description: changePassword
sessionName:
type: string
example: 1a907f77602a37b70aa5d
description: active session ID
id:
type: string
description: web service ID of the user we want to change password
example: 19x8
oldPassword:
type: string
description: current user password
example: strong_password
newPassword:
type: string
description: new password
example: stronger_password
confirmPassword:
type: string
description: new password again
example: stronger_password
required:
- id
- oldPassword
- newPassword
- confirmPassword
- operation
- sessionName
/changePortalUserPassword:
post:
operationId: changePortalUserPassword
summary: 7.- Change a portal user, contact or employee, password
description: Permits a portal user to change his password
tags:
- login
responses:
'200':
description: true or false depending if the password can be changed or not
content:
application/json:
schema:
type: object
required:
- success
- result
properties:
success:
type: boolean
example: true
result:
type: boolean
example: false
requestBody:
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
operation:
type: string
default: changePortalUserPassword
example: changePortalUserPassword
description: changePortalUserPassword
sessionName:
type: string
example: 1a907f77602a37b70aa5d
description: active session ID
email:
type: string
description: email of the contact/employee to change
example: dr_who@gallifrey.io
password:
type: string
description: new password
example: stronger_password
oldpassword:
type: string
description: current contact/employee password
example: strong_password
required:
- email
- password
- oldPassword
- operation
- sessionName
/changeAccessKey:
post:
operationId: changeAccessKey
summary: 8.- Change a user API Access Key
description: Permits a user to change his Access Key or the Access Key of another user if the connected user is an administrator
tags:
- login
responses:
'200':
description: Returns created record or error
content:
application/json:
schema:
oneOf:
- $ref: 'components/changePasswordResponse.yaml#/changeAccessKeyResponse'
- $ref: 'components/APIErrors.yaml#/INVALID_USER'
- $ref: 'components/APIAccessDenied.yaml#/APIAccessDenied'
requestBody:
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
operation:
type: string
default: changeAccessKey
example: changeAccessKey
description: changeAccessKey
sessionName:
type: string
example: 1a907f77602a37b70aa5d
description: active session ID
id:
type: string
description: web service ID of the user we want to change access key
example: 19x8
required:
- id
- operation
- sessionName
/logout:
$ref: 'paths/logout.yaml#/logout'
/query:
$ref: 'paths/query.yaml#/query'
/create:
$ref: 'paths/create.yaml#/create'
/update:
$ref: 'paths/update.yaml#/update'
/revise:
$ref: 'paths/revise.yaml#/revise'
/retrieve:
$ref: 'paths/retrieve.yaml#/retrieve'
/delete:
$ref: 'paths/delete.yaml#/delete'
/deleteUser:
post:
operationId: deleteUser
summary: 06.- Eliminate a user
description: Permits us to delete a user and transfer all his assigned records to another user
tags:
- CRUD Operations
responses:
'200':
description: Returns created record or error
content:
application/json:
schema:
oneOf:
- $ref: 'components/APILogoutResponse.yaml#/APILogoutResponse'
- $ref: 'components/APISessionError.yaml#/APISessionError'
- $ref: 'components/APIAccessDenied.yaml#/APIAccessDenied'
requestBody:
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
operation:
type: string
default: deleteUser
example: deleteUser
description: deleteUser
sessionName:
type: string
example: 1a907f77602a37b70aa5d
description: active session ID
id:
type: string
description: web service ID of the user we want to delete
example: 19x8
newOwnerId:
type: string
description: web service ID of the user we want to transfer the records to
example: 19x1
required:
- id
- newOwnerId
- operation
- sessionName
/addProductImages:
post:
operationId: addProductImages
summary: 07.- Add attachment images to products
description: Inserts a set of images into the Product multi-image field
tags:
- CRUD Operations
responses:
'200':
description: An array with information of the executed operations
content:
application/json:
schema:
oneOf:
- $ref: 'components/APIProductResponse.yaml#/AddImagesGood'
- $ref: 'components/APIProductResponse.yaml#/AddImagesBad'
- $ref: 'components/APISessionError.yaml#/APISessionError'
- $ref: 'components/APIErrors.yaml#/INVALID_ID_ATTRIBUTE'
- $ref: 'components/APIErrors.yaml#/RECORD_NOT_FOUND'
- $ref: 'components/APIAccessDenied.yaml#/APIAccessDenied'
requestBody:
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
operation:
type: string
default: addProductImages
example: addProductImages
description: addProductImages
sessionName:
type: string
example: 1a907f77602a37b70aa5d
description: active session ID
id:
type: string
description: Web service ID of the product record to upload the images to
example: 14x2408
files:
type: string
description: |
JSON string of an array of images to upload, each array entry must contain two fields:
- name: name of the file to add
- content: base64 encoded binary data of the image
example: '[{"name": "productimage345", "content": "sll9032ef999..."},...]'
required:
- id
- files
- operation
- sessionName
/addTicketFaqComment:
post:
operationId: addTicketFaqComment
summary: 08.- Add comments to special modules HelpDesk and FAQ
description: Function used to add comments to Tickets (HelpDesk) and Frequently Asked Questions (Faq)
tags:
- CRUD Operations
responses:
'200':
description: An array with information of the record with the new comment
content:
application/json:
schema:
oneOf:
- $ref: 'components/APICURRResponse.yaml#/APICURRResponse'
- $ref: 'components/APISessionError.yaml#/APISessionError'
- $ref: 'components/APIErrors.yaml#/INVALID_ID_ATTRIBUTE'
- $ref: 'components/APIErrors.yaml#/RECORD_NOT_FOUND'
- $ref: 'components/APIAccessDenied.yaml#/APIAccessDenied'
- $ref: 'components/APIMissingMandatoryFields.yaml#/APIMissingMandatoryFields'
requestBody:
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
operation:
type: string
default: addTicketFaqComment
example: addTicketFaqComment
description: addTicketFaqComment
sessionName:
type: string
example: 1a907f77602a37b70aa5d
description: active session ID
id:
type: string
description: Web service ID of the HelpDesk/Faq record to add comments to
example: 17x2642
values:
type: string
description: |
JSON string with the parameters of the comment. these parameters can be:
- from_portal: 0/1: 0 = "user", 1 = "customer"
- parent_id: webservice id of the contact creating the comment from the portal
- comments: string, comment to add
example: '{"from_portal": "0", "parent_id": "4x22", "comments": "some comment"}'
required:
- id
- values
- operation
- sessionName
/retrievedocattachment:
post:
operationId: retrievedocattachment
summary: 09.- Return the base64 encoded file attached to the given documents
description: Obtain information of the attachment of a document without downloading the whole file which would slow many operations
tags:
- CRUD Operations
responses:
'200':
description: An object with the information of the attachment for each given ID
content:
application/json:
schema:
oneOf:
- $ref: 'components/APIDocResponse.yaml#/RetrieveDocResponse'
- $ref: 'components/APISessionError.yaml#/APISessionError'
- $ref: 'components/APIAccessDenied.yaml#/APIAccessDenied'
- $ref: 'components/APIErrors.yaml#/RECORD_NOT_FOUND'
- $ref: 'components/APIErrors.yaml#/INVALID_ID_ATTRIBUTE'
requestBody:
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
operation:
type: string
default: retrievedocattachment
example: retrievedocattachment
description: retrievedocattachment
sessionName:
type: string
example: 1a907f77602a37b70aa5d
description: active session ID
id:
type: string
description: A comma-separated list of document identifiers of which we want to get the attachments
example: 15x44166,15x44168
returnfile:
type: boolean
description: 1 if we want the whole file, 0 if we just want the attachment information
example: true
required:
- id
- operation
- sessionName
/getProductImages:
get:
operationId: getProductImages
summary: 10.- Retrieve product images
description: Return an array of images related to the given product
tags:
- CRUD Operations
responses:
'200':
description: An object with the information of the images of the given ID
content:
application/json:
schema:
oneOf:
- $ref: 'components/APIDocResponse.yaml#/RetrieveImagesResponse'
- $ref: 'components/APISessionError.yaml#/APISessionError'
- $ref: 'components/APIAccessDenied.yaml#/APIAccessDenied'
- $ref: 'components/APIErrors.yaml#/RECORD_NOT_FOUND'
- $ref: 'components/APIErrors.yaml#/INVALID_ID_ATTRIBUTE'
parameters:
- schema:
type: string
in: query
name: operation
example: getProductImages
description: getProductImages
required: true
- schema:
type: string
in: query
name: sessionName
example: 3fde6cf960edb4e9e91e3
description: The session ID
required: true
- schema:
type: string
in: query
name: id
description: The product record web service ID
example: 14x2808
required: true
/getRecordImages:
get:
operationId: getRecordImages
summary: 11.- Retrieve record images
description: Retrieve the information of the image attachments of a record
tags:
- CRUD Operations
responses:
'200':
description: An object with the information of the images of the given ID
content:
application/json:
schema:
oneOf:
- $ref: 'components/APIDocResponse.yaml#/RetrieveImagesResponse'
- $ref: 'components/APISessionError.yaml#/APISessionError'
- $ref: 'components/APIAccessDenied.yaml#/APIAccessDenied'
- $ref: 'components/APIErrors.yaml#/RECORD_NOT_FOUND'
- $ref: 'components/APIErrors.yaml#/INVALID_ID_ATTRIBUTE'
parameters:
- schema:
type: string
in: query
name: operation
example: getRecordImages
description: getRecordImages
required: true
- schema:
type: string
in: query
name: sessionName
example: 3fde6cf960edb4e9e91e3
description: The session ID
required: true
- schema:
type: string
in: query
name: id
description: The record web service ID
example: 12x1084
required: true
/getRelatedRecords:
post:
operationId: getRelatedRecords
summary: 12.- Retrieve related records
description: Retrieve the set of related records of a module that belong to any given record. [Additional Information](https://corebos.com/documentation/doku.php?id=en:devel:corebosws:getrelatedrecords)
tags:
- CRUD Operations
responses:
'200':
description: Returns set of related records or error
content:
application/json:
schema:
oneOf:
- $ref: 'components/APIQueryResponse.yaml#/APIQueryResponse'
- $ref: 'components/APISessionError.yaml#/APISessionError'
- $ref: 'components/APIErrors.yaml#/OPERATION_NOT_SUPPORTED'
- $ref: 'components/APIErrors.yaml#/UNKNOWN_ENTITY'
- $ref: 'components/APIErrors.yaml#/INVALID_ID_ATTRIBUTE'
- $ref: 'components/APIErrors.yaml#/RECORD_NOT_FOUND'
- $ref: 'components/APIErrors.yaml#/MODULES_NOT_RELATED'
- $ref: 'components/APIErrors.yaml#/RECORD_NOT_FOUND'
- $ref: 'components/APIAccessDenied.yaml#/APIAccessDenied'
requestBody:
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
operation:
type: string
default: getRelatedRecords
example: getRelatedRecords
description: getRelatedRecords
sessionName:
type: string
example: 1a907f77602a37b70aa5d
description: active session ID
id:
type: string
description: Web service ID corresponding to the main record we want to get the related records from
example: 12x44499
module:
type: string
description: module name of the Web service ID
example: Contacts
relatedModule:
type: string
description: The name of the module related to the main module, this represents the type of records to be returned
example: HelpDesk
queryParameters:
type: object
description: parameters to modify the query and set of returned results in different ways
properties:
productDiscriminator:
type: string
description: ProductBundle|ProductParent|ProductLineInvoice{Only}|ProductLineSalesOrder{Only}|ProductLineQuote{Only}|ProductLineAll|ProductLineNone
example: ProductLineSalesOrderOnly
limit:
type: integer
description: number of records to return
example: 50
offset:
type: integer
description: number of records to jump over before stating to return results (pagination)
example: 15
orderby:
type: string
description: a syntactically and semantically correct order by directive wihtout the "order by"
example: ticket_title
columns:
type: string
description: a comma separated string of column names that are to be returned
example: ticket_title,priority
relationtouse:
type: string
description: label of the relation to select when more than one is found
returnattachments:
type: boolean
description: for Document module will return the file attached if present
example: true
required:
- id
- module
- relatedModule
- operation
- sessionName
/getRelatedRecordsThroughModule:
post:
operationId: getRelatedRecordsThroughModule
summary: 13.- Retrieve related records through another related module
description: get a list of records related at a second level. [Additional information](http://corebos.com/documentation/doku.php?id=en:devel:corebosws:getrelatedrecords#getrelatedrecordsthroughmodule)'
tags:
- CRUD Operations
responses:
'200':
description: Returns set of related records or error
content:
application/json:
schema:
oneOf:
- $ref: 'components/APIQueryResponse.yaml#/APIQueryResponse'
- $ref: 'components/APISessionError.yaml#/APISessionError'
- $ref: 'components/APIErrors.yaml#/OPERATION_NOT_SUPPORTED'
- $ref: 'components/APIErrors.yaml#/UNKNOWN_ENTITY'
- $ref: 'components/APIErrors.yaml#/INVALID_ID_ATTRIBUTE'
- $ref: 'components/APIErrors.yaml#/RECORD_NOT_FOUND'
- $ref: 'components/APIErrors.yaml#/MODULES_NOT_RELATED'
- $ref: 'components/APIErrors.yaml#/RECORD_NOT_FOUND'
- $ref: 'components/APIAccessDenied.yaml#/APIAccessDenied'
requestBody:
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
operation:
type: string
default: getRelatedRecordsThroughModule
example: getRelatedRecordsThroughModule
description: getRelatedRecordsThroughModule
sessionName:
type: string
example: 1a907f77602a37b70aa5d
description: active session ID
id:
type: string
description: Web service ID corresponding to the main record we want to get the related records from
example: 12x44499
module:
type: string
description: module name of the Web service ID
example: Contacts
relatedModule:
type: string
description: The name of the module related to the bridge module, this represents the type of records to be returned
example: Projects
bridgeModule:
type: string
description: The name of the module related to the main module
example: HelpDesk
queryParameters:
type: object
description: parameters to modify the query and set of returned results in different ways
properties:
productDiscriminator:
type: string
description: ProductBundle|ProductParent|ProductLineInvoice{Only}|ProductLineSalesOrder{Only}|ProductLineQuote{Only}|ProductLineAll|ProductLineNone
example: ProductLineSalesOrderOnly
limit:
type: integer
description: number of records to return
example: 50
offset:
type: integer
description: number of records to jump over before stating to return results (pagination)
example: 15
orderby:
type: string
description: a syntactically and semantically correct order by directive wihtout the "order by"
example: ticket_title
columns:
type: string
description: a comma separated string of column names that are to be returned
example: ticket_title,priority
relationtouse:
type: string
description: label of the relation to select when more than one is found
returnattachments:
type: boolean
description: for Document module will return the file attached if present
example: true
required:
- id
- module
- relatedModule
- operation
- sessionName
/ValidateInformation:
post:
operationId: ValidateInformation
summary: 14.- Validate record informaton with application rules
description: Apply application configured validations on a set of fields. [read more](http://corebos.com/documentation/doku.php?id=en:devel:corebosws:methodreference#validateinformation)
tags:
- CRUD Operations
responses:
'200':
description: Returns true or false and a set of error messages
content:
application/json:
schema:
oneOf:
- $ref: 'components/APIResponse.yaml#/APIResponseTrue'
- $ref: 'components/APIResponse.yaml#/APIResponseValidationFalse'
- $ref: 'components/APISessionError.yaml#/APISessionError'
- $ref: 'components/APIAccessDenied.yaml#/APIAccessDenied'
- $ref: 'components/APIErrors.yaml#/INVALID_ID_ATTRIBUTE'
- $ref: 'components/APIErrors.yaml#/RECORD_NOT_FOUND'
- $ref: 'components/APIErrors.yaml#/INVALID_PARAMETER'
requestBody:
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
operation:
type: string
default: ValidateInformation
example: ValidateInformation
description: ValidateInformation
sessionName:
type: string
example: 1a907f77602a37b70aa5d
description: active session ID
element:
type: string
description: JSON string with the field-value pairs to validate. Either a “module” or a “record” entry must exist in the object. If “record” is given the validations will be evaluated with the fields of the record
example: '{"id":"12x44499","phone":"123456789"}'
required:
- element
- operation
- sessionName
/CreateWithValidation:
post:
operationId: CreateWithValidation
summary: 15.- Validate and create
description: Validate the information before creating a record
tags:
- CRUD Operations
responses:
'200':
description: Returns the created object or false and a set of error messages
content:
application/json:
schema:
oneOf:
- $ref: 'components/APICURRResponse.yaml#/APICURRResponse'
- $ref: 'components/APISessionError.yaml#/APISessionError'
- $ref: 'components/APIAccessDenied.yaml#/APIAccessDenied'
- $ref: 'components/APIMissingMandatoryFields.yaml#/APIMissingMandatoryFields'
- $ref: 'components/APIResponse.yaml#/APIResponseValidationFalse'
- $ref: 'components/APIErrors.yaml#/INVALID_PARAMETER'
requestBody:
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
operation:
type: string
default: CreateWithValidation
example: CreateWithValidation
description: CreateWithValidation
sessionName:
type: string
example: 1a907f77602a37b70aa5d
description: active session ID
elementType:
type: string
description: Module name where we want to create the record
example: Contacts
element:
type: string
description: JSON string with all the field-value entries to save
example: '{"firstname":"River","lastname":"Song","assigned_user_id":"19x5"}'
required:
- elementType
- element
- operation
- sessionName
/UpdateWithValidation:
post:
operationId: UpdateWithValidation
summary: 16.- Validate and update (with all mandatory)
description: Validate the information before updating a record
tags:
- CRUD Operations
responses:
'200':
description: Returns the updated object or false and a set of error messages
content:
application/json:
schema:
oneOf:
- $ref: 'components/APICURRResponse.yaml#/APICURRResponse'
- $ref: 'components/APISessionError.yaml#/APISessionError'
- $ref: 'components/APIAccessDenied.yaml#/APIAccessDenied'
- $ref: 'components/APIMissingMandatoryFields.yaml#/APIMissingMandatoryFields'
- $ref: 'components/APIResponse.yaml#/APIResponseValidationFalse'
- $ref: 'components/APIErrors.yaml#/INVALID_ID_ATTRIBUTE'
- $ref: 'components/APIErrors.yaml#/RECORD_NOT_FOUND'
- $ref: 'components/APIErrors.yaml#/INVALID_PARAMETER'
requestBody:
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
operation:
type: string
default: UpdateWithValidation
example: UpdateWithValidation
description: UpdateWithValidation
sessionName:
type: string
example: 1a907f77602a37b70aa5d
description: active session ID
element:
type: string
description: JSON string with all the field-value entries to save
example: '{"firstname":"River","lastname":"Song","assigned_user_id":"19x5"}'
required:
- element
- operation
- sessionName
/ReviseWithValidation:
post:
operationId: ReviseWithValidation
summary: 17.- Validate and update fields
description: Validate the information before updating a record
tags:
- CRUD Operations
responses:
'200':
description: Returns the updated object or false and a set of error messages
content:
application/json:
schema:
oneOf:
- $ref: 'components/APICURRResponse.yaml#/APICURRResponse'
- $ref: 'components/APISessionError.yaml#/APISessionError'
- $ref: 'components/APIAccessDenied.yaml#/APIAccessDenied'
- $ref: 'components/APIResponse.yaml#/APIResponseValidationFalse'
- $ref: 'components/APIErrors.yaml#/INVALID_ID_ATTRIBUTE'
- $ref: 'components/APIErrors.yaml#/RECORD_NOT_FOUND'
- $ref: 'components/APIErrors.yaml#/INVALID_PARAMETER'
requestBody:
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
operation:
type: string
default: ReviseWithValidation
example: ReviseWithValidation
description: ReviseWithValidation
sessionName:
type: string
example: 1a907f77602a37b70aa5d
description: active session ID
element:
type: string
description: JSON string with all the field-value entries to save
example: '{"firstname":"River","lastname":"Song","assigned_user_id":"19x5"}'
required:
- element
- operation
- sessionName
/MassCreate:
post:
operationId: MassCreate
summary: 01.- Create a set of records
description: Create many records and establish relationships among the different records in one call
tags:
- CRUD Mass Operations
responses:
'200':
description: |
An object with two elements:
- success_creates: array of created Object
- failed_creates: array of records that could not be created with their error message
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
description: "true"
example: true
result:
type: object
description: JSON object of the created records indexed by their web service ID
properties:
success_creates:
type: array
description: array of created records
items: {}
failed_creates:
type: array
description: array of records that could not be created with their error message
items: {}
requestBody:
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
operation:
type: string
default: MassCreate
example: MassCreate
description: MassCreate
sessionName:
type: string
example: 1a907f77602a37b70aa5d
description: active session ID
elements:
type: string
description: |
JSON string with all the records and field-value entries to create
[Read about the suppported format in the documentation](https://corebos.com/documentation/doku.php?id=en:devel:corebosws:methodreference#crud_mass_operations)
required:
- elements
- operation
- sessionName
/MassRetrieve:
post:
operationId: MassRetrieve
summary: 02.- Retrieve a set of records
description: Retrieve a set of records at once reducing the number of calls to the API
tags:
- CRUD Mass Operations
responses:
'200':
description: array of retrieved records
content:
application/json:
schema:
properties:
success:
type: boolean
description: "true"
example: true
result:
type: object
description: JSON object of the retrieved records indexed by their web service ID
requestBody:
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
operation:
type: string
default: MassRetrieve
example: MassRetrieve
description: MassRetrieve
sessionName:
type: string
example: 1a907f77602a37b70aa5d
description: active session ID
ids:
type: string
description: comma-separated string with all the record IDs to retrieve
example: 12x1084,11x74
required:
- ids
- operation
- sessionName
/MassUpdate:
post:
operationId: MassUpdate
summary: 03.- Update a set of records
description: Update a set of records at once as a single group
tags:
- CRUD Mass Operations
responses:
'200':
description: |
An object with two elements:
- success_updates: array of updated records
- failed_updates: array of records that could not be updated with their error message
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
description: "true"
example: true
result:
type: object
description: JSON object of the updated records indexed by their web service ID
properties:
success_updates:
type: array
description: array of updated records
items: {}
failed_updates:
type: array
description: array of records that could not be updated with their error message
items: {}
requestBody:
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
operation:
type: string
default: MassUpdate
example: MassUpdate
description: MassUpdate
sessionName:
type: string
example: 1a907f77602a37b70aa5d
description: active session ID
elements:
type: string
description: |
JSON string with all the records and field-value entries to update
[Read about the suppported format in the documentation](https://corebos.com/documentation/doku.php?id=en:devel:corebosws:methodreference#crud_mass_operations)
required:
- elements
- operation
- sessionName
/MassDelete:
post:
operationId: MassDelete