-
Notifications
You must be signed in to change notification settings - Fork 24
/
apiary.apib
2480 lines (1850 loc) · 83.9 KB
/
apiary.apib
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
FORMAT: 1A
HOST: https://store.lab.fiware.org/
TITLE: FIWARE Store Open API Specification
DATE: 30 September 2015
VERSION: v4.4.3
PREVIOUS_VERSION: v4.1.0
APIARY_PROJECT: fiwarestore
# FIWARE Store
WStore is the reference implementation of the FIWARE Store Generic Enabler.
The Store GE provides functionality for the monetization of different kind of
digital assets, including the management of assets and offerings as well as support for acquisitions,
charging, billing, and accounting of pay-per-use services.
This document describes the Store REST API including: Administration APIs, Resource API, Offering API, and Search API.
## Editors
* Francisco de la Vega, Universidad Politénica de Madrid
## Status
This is a work in progress and is changing on a daily basis. You can check the latest
available version on: <https://github.com/conwetlab/wstore/tree/develop>.
Please send your comments to <[email protected]>.
This specification is licensed under the [FIWARE Open Specification License](https://forge.fiware.org/plugins/mediawiki/wiki/fiware/index.php/FI-WARE_Open_Specification_Legal_Notice_%28implicit_patents_license%29)
## Acknowledgements
The editors would like to express their gratitude to the following people who actively contributed to this specification:
Aitor Magán and Álvaro Arranz García
## Copyright
* Copyright © 2015 by Universidad Politénica de Madrid
## Specification
### Authentication
Each HTTP request against the Store API requires the inclusion of specific authentication credentials. The specific implementation of this API may support multiple authentication schemes (OAuth, Basic Auth, Token) and will be determined by the specific provider that implements the GE. Please contact the provider to determine the best way to authenticate against this API. Remember that some authentication schemes may require that the API operates using SSL over HTTP (HTTPS).
WStore provides support for Cookie, OAuth2, and Basic authentication being OAuth2 the default in FIWARE Lab.
### Synchronous Faults
Error responses will be encoded using the most appropriated <code>content-type</code> in base to the <code>Accept</code> header of the request.
JSON Example
{
"message": "No JSON object could be decoded",
"result": "error"
}
XML Example
<?xml version="1.0" encoding="utf-8"?>
<error>No JSON object could be decoded</error>
### Used HTTP Codes
| HTTP Code | Type | Description |
|-----------|------|------------ |
| 200 | OK | Your request has been completed properly |
| 201 | Created | Your resource has been created.|
| 204 | No content | Your request has been processed, but a response is not available. Generally used when deleting entities|
| 400 | Bad Request | The content of your request is not correct (e.g. There is a missing field) |
| 409 | Conflict | The resource you are tring to create already exists |
| 404 | Not Found | The resource you are looking for does not exists |
| 403 | Forbidden | You have no rights to perform the request |
| 401 | Unauthorized | You are not logged in or the Authorization token you are providing is not valid |
| 500 | Internal server error | There was an internal error in the system so your request cannot be completed |
# Group Managing Marketplaces
API for the management of instances of the Marketplace Generic Enabler. It allows to retrieve, register and unregister Marketplace instances.
This API uses the following fields:
* **name** - The name given to the Marketplace instance in the Store
* **host** - URL where the Marketplace instance is running
* **api_version** - Version of the API of the Maketplace (note that v1 is now deprecated)
* **credentials** - Username and password used to access the Marketplace in case it implements API V1 or V2 with local authentication (Note that the version 2 of the Marketplace is integrated with the IdM)
## Marketplace Collection [/api/administration/marketplaces]
### List All Marketplaces [GET]
+ Request
+ Headers
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Response 200 (application/json)
[
{
"name": "FIWARE Lab Market",
"host": "https://marketplace.lab.fiware.org/",
"api_version": 2
}
]
### Register a Marketplace [POST]
+ Request Register a Marketplace v2 (application/json)
+ Headers
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Body
{
"name": "FIWARE Lab Market",
"host": "https://marketplace.lab.fiware.org/",
"api_version": 2
}
+ Response 201
+ Request Register a Marketplace v1 - This Marketplace version is deprecated - (application/json)
+ Headers
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Body
{
"name": "FIWARE Lab Market",
"host": "https://marketplace.lab.fiware.org/",
"api_version": 1,
"credentials": {
"username": "marketuser",
"passwd": "marketpasswd"
}
}
+ Response 201
## Marketplace Entry [/api/administration/marketplaces/{market}]
### Unregister a Marketplace [DELETE]
+ Parameters
+ market: FIWARELab - Name of the Marketplace
+ Request
+ Headers
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Response 204
# Group Managing Repositories
API for the management of instances of the Repository Generic Enabler. It allows to retrieve, register and unregister Repository instances.
This API uses the following fields:
* **name** - The name given to the Repository instance in the Store
* **host** - URL where the Repository instance is running
* **is_default** - Specifies whether the Repository instance is the default one in the Store
* **offering_collection** - Collection name used in the Repository instance for storing offering descriptions
* **resource_collection** - Collection name used in the Repository instance for storing resource descriptions
* **api_version** - Version of the API of the Repository (note that v1 is now deprecated)
## Repository Collection [/api/administration/repositories]
### List All Repositories [GET]
+ Request
+ Headers
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Response 200 (application/json)
[
{
"name": "FIWARE Lab Repository",
"host": "https://repository.lab.fiware.org/",
"is_default": true,
"offering_collection": "storeOfferingCollection",
"resource_collection": "storeResourceCollection",
"api_version": 2
}
]
### Register a Repository [POST]
+ Request (application/json)
+ Headers
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Body
[
{
"name": "FIWARE Lab Repository",
"host": "https://repository.lab.fiware.org/",
"is_default": true,
"offering_collection": "storeOfferingCollection",
"resource_collection": "storeResourceCollection",
"api_version": 2
}
]
+ Response 201
## Repository Entry [/api/administration/repositories/{repository}]
### Unregister a Repository [DELETE]
+ Parameters
+ repository: FIWARELab - Name of the repository
+ Request
+ Headers
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Response 204
# Group Managing RSSs
API for the management of instances of the Revenue Settlement and Sharing System Generic Enabler. It allows to retrieve, register and unregister RSS instances.
This API uses the following fields:
* **name** - The name given to the RSS instance in the Store
* **host** - The URL where the RSS instance in running
* **limits** - The default expenditure limits for the customers of the Store. This field contains the following values:
* **currency** - The currency in what the limits are specified
* **perTransaction** - Maximum allowed amount in a single transaction
* **weekly** - Maximum allowed amount expended weekly
* **daily** - Maximum allowed amount expended daily
* **monthly** - Maximum allowed amount expended monthly
* **models** - The percentage the owner of the Store expects to retrieve of the revenues generated in the Store. This field is a list containing elements with the following fields
* **revenue_class** - The type of pricing model used to determine the percentage applied (single-payment, subscription, use)
* **percentage** - Concrete percentage expected by the Store owner
* **is_default** - Specifies whether the RSS instance is the default one in the Store
* **api_version** - Version of the API of the RSS instance (note that v1 is now deprecated)
## RSS Collection [/api/administration/rss]
### List All RSSs [GET]
+ Request
+ Headers
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Response 200 (application/json)
[
{
"name": "FIWARE Lab RSS",
"host": "https://rss.lab.fiware.org/",
"is_default": true,
"api_version": 2,
"limits": {
"currency": "EUR",
"perTransaction": 10000,
"weekly": 100000,
"daily": 10000,
"monthly": 100000
},
"models": [
{
"reveune_class": "single-payment",
"percentage": 10
},
{
"reveune_class": "subscription",
"percentage": 15
},
{
"reveune_class": "use",
"percentage": 30
}
]
}
]
### Register a RSS [POST]
+ Request (application/json)
+ Headers
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Body
[
{
"name": "FIWARE Lab RSS",
"host": "https://rss.lab.fiware.org/",
"is_default": true,
"api_version": 2,
"limits": {
"currency": "EUR",
"perTransaction": 10000,
"weekly": 100000,
"daily": 10000,
"monthly": 100000
},
"models": [
{
"reveune_class": "single-payment",
"percentage": 10
},
{
"reveune_class": "subscription",
"percentage": 15
},
{
"reveune_class": "use",
"percentage": 30
}
]
}
]
+ Response 201
## RSS Entry [/api/administration/rss/{rss}]
### List a RSS [GET]
+ Parameters
+ rss: FIWARELab - Name of the rss
+ Request
+ Headers
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Response 200 (application/json)
{
"name": "FIWARE Lab RSS",
"host": "https://rss.lab.fiware.org/",
"is_default": true,
"api_version": 2,
"limits": {
"currency": "EUR",
"perTransaction": 10000,
"weekly": 100000,
"daily": 10000,
"monthly": 100000
},
"models": [
{
"reveune_class": "single-payment",
"percentage": 10
},
{
"reveune_class": "subscription",
"percentage": 15
},
{
"reveune_class": "use",
"percentage": 30
}
]
}
### Update a RSS [PUT]
+ Parameters
+ rss: FIWARELab - Name of the RSS
+ Request (application/json)
+ Headers
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Body
[
{
"name": "FIWARE Lab RSS",
"host": "https://rss.lab.fiware.org/",
"is_default": true,
"api_version": 2,
"limits": {
"currency": "EUR",
"perTransaction": 10000,
"weekly": 100000,
"daily": 10000,
"monthly": 100000
},
"models": [
{
"revenue_class": "single-payment",
"percentage": 10
},
{
"revenue_class": "subscription",
"percentage": 15
},
{
"revenue_class": "use",
"percentage": 30
}
]
}
]
+ Response 200
### Unregister a RSS [DELETE]
+ Parameters
+ rss: FIWARELab - Name of the RSS
+ Request
+ Headers
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Response 204
# Group Managing Units
API for the management of pricing units. It allows to list and create units.
This API uses the following fields:
* **name** - Name given to the unit
* **defined_model** - Pricing model that is defined by the unit (single payment, subscription, or pay per use)
* **renovation_period** - This field is only used for subscriptions and specifies the duration in days
## Units Collection [/api/administration/units]
### List all Units [GET]
+ Request
+ Headers
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Response 200 (application/json)
[
{
"name": "second",
"defined_model": "pay per use"
},
{
"name": "per month",
"defined_model": "subscription",
"renovation_period": 30
}
]
### Create new Unit [POST]
+ Request (application/json)
+ Headers
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Body
{
"name": "second",
"defined_model": "pay per use"
}
+ Response 201
# Group Managing Currencies
API for the management of Currencies. This API allows to register, retrieve, and delete currencies.
This API uses the following fields:
* **currency** - String representing the Currency
* **default** - Whether the currency is the default one or not
## Currencies Collection [/api/administration/currency]
### List all Currencies [GET]
+ Request
+ Headers
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Response 200 (application/json)
[
{
"currency": "EUR",
"default": true
}
]
### Register new Currency [POST]
+ Request (application/json)
+ Headers
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Body
{
"currency": "EUR",
"default": true
}
+ Response 201
## Currency Entry [/api/administration/currency/{currency}]
### Delete Currency [DELETE]
+ Parameters
+ currency: EUR - Currency to be deleted
+ Request
+ Headers
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Response 204
### Set Currency as Default [PUT]
+ Parameters
+ currency: EUR - Currency to be set as default
+ Request
+ Headers
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Response 200
# Group Managing Users
## Users Collection [/api/administration/profiles]
This API is used for the management of Users. This API allows to list, create, and update users. Note that some of the actions available in this API are limited when using an external identity manager.
This API manages the following fields:
* **username** - Id given to the user
* **password** - Password used by the user to access the Store when not using an external IdM
* **complete_name** - Display name of the user
* **first_name** - Name of the user
* **last_name** - Surname of the user
* **current_organization** - Current organization the user is on behalf
* **notification_url** - Default notification URL of the user
* **organizations** - List of organization the user belongs to. For each organization is included the name and the list of roles of the user
* **limits** - Expenditure limits defined by the user
* **tax_address** - Default tax address ofthe user
* **roles** - List of roles of the user
* **payment_info** - Credit card of the user. Note that the support for credit cards is deprecated and should not be used
### List All Users [GET]
+ Request
+ Headers
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Response 200 (application/json)
[
{
"username": "fdelavega",
"complete_name": "Francisco de la Vega",
"current_organization": "CoNWeT",
"notification_url": "http://conwet.fi.upm.es/",
"organizations": [
{
"name": "CoNWeT",
"roles": ["manager", "provider", "customer"]
}
],
"limits": {
"currency": "EUR",
"perTransaction": 10000,
"weekly": 100000,
"daily": 10000,
"monthly": 100000
},
"tax_address": {
"street": "Campus Montegancedo S/N",
"postal": "28050",
"city": "Madrid",
"country": "Spain"
},
"roles": ["provider", "customer", "admin"],
"payment_info": {}
}
]
### Create a New User [POST]
- **Note:** This action is not available when using an external IdM for authentication, since users are created in this external system
+ Request (application/json)
+ Headers
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Body
{
"username": "fdelavega",
"first_name": "Francisco",
"last_name": "de la Vega",
"password": "123456",
"notification_url": "http://conwet.fi.upm.es/",
"tax_address": {
"street": "Campus Montegancedo S/N",
"postal": "28050",
"city": "Madrid",
"country": "Spain"
},
"roles": ["provider", "customer", "admin"],
"payment_info": {}
}
+ Response 201
## User Entry [/api/administration/profiles/{username}]
### Get User Info [GET]
+ Parameters
+ username: fdelavega - Id of the user, username field
+ Request
+ Headers
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Response 200 (application/json)
{
"complete_name": "Francisco de la Vega",
"current_organization": "CoNWeT",
"notification_url": "http://conwet.fi.upm.es/",
"organizations": [
{
"name": "CoNWeT",
"roles": ["manager", "provider", "customer"]
}
],
"limits": {
"currency": "EUR",
"perTransaction": 10000,
"weekly": 100000,
"daily": 10000,
"monthly": 100000
},
"tax_address": {
"street": "Campus Montegancedo S/N",
"postal": "28050",
"city": "Madrid",
"country": "Spain"
},
"roles": ["provider", "customer", "admin"],
"payment_info": {}
}
### Update user [PUT]
- **Note:** If an external IdM is being used, "first_name", "last_name", "password", and "roles" fields are ignored, since this information is managed by the IdM
+ Parameters
+ username: fdelavega - Id of the user, username field
+ Request (application/json)
+ Headers
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Body
{
"first_name": "Francisco",
"last_name": "de la Vega",
"password": "123456",
"notification_url": "http://conwet.fi.upm.es/",
"tax_address": {
"street": "Campus Montegancedo S/N",
"postal": "28050",
"city": "Madrid",
"country": "Spain"
},
"limits": {
"currency": "EUR",
"perTransaction": 10000,
"weekly": 100000,
"daily": 10000,
"monthly": 100000
},
"roles": ["provider", "customer", "admin"],
"payment_info": {}
}
+ Response 200
# Group Managing Organizations
This API is used for the management of organizations. This API allows to list, create, and update organizations. Additionally, it allows to change current user organization, list organization users and include new users in organizations. Note that if an external identity manager is used some of this actions may be limited.
This API manages the following fields:
* **name** - Name of the organization
* **is_manager** - Whether the user making the request is manager of the organization
* **notification_url** - Default notification URL of the organization
* **limits** - Expenditure limits specified for the organization
* **tax_address** - Default tax address of the organization
* **payment_info** - Credit card info. Note that credit card payments are deprecated so they should not be used
Additionally, for the management of organization users it uses the following fields:
* **members** - list of members of the given organization
* **username** - Username of the member
* **roles** - List of roles of the member within the organization
## Organizations Collection [/api/administration/organizations{?username}]
### List all Organizations [GET]
+ Parameters
+ username: fdelavega (optional) - Optional parameter used to filter the organizations by manager user
+ Request
+ Headers
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Response 200 (application/json)
[
{
"name": "CoNWeT",
"is_manager": true,
"notification_url": "http://conwet.fi.upm.es/",
"limits": {
"currency": "EUR",
"perTransaction": 10000,
"weekly": 100000,
"daily": 10000,
"monthly": 100000
},
"tax_address": {
"street": "Campus Montegancedo S/N",
"postal": "28050",
"city": "Madrid",
"country": "Spain"
},
"payment_info": {}
}
]
### Create New Organization [POST]
- **Note:** This action is not available when using an external IdM, since organizations are created in this system
+ Request (application/json)
+ Headers
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Body
{
"name": "CoNWeT",
"notification_url": "http://conwet.fi.upm.es/",
"tax_address": {
"street": "Campus Montegancedo S/N",
"postal": "28050",
"city": "Madrid",
"country": "Spain"
},
"payment_info": {}
}
+ Response 201
## Organization Entry [/api/administration/organizations/{organization}]
### Get Organization Info [GET]
+ Parameters
+ organization: CoNWeT - Name of the organization
+ Request
+ Headers
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Response 200 (application/json)
{
"name": "CoNWeT",
"is_manager": true,
"notification_url": "http://conwet.fi.upm.es/",
"limits": {
"currency": "EUR",
"perTransaction": 10000,
"weekly": 100000,
"daily": 10000,
"monthly": 100000
},
"tax_address": {
"street": "Campus Montegancedo S/N",
"postal": "28050",
"city": "Madrid",
"country": "Spain"
},
"payment_info": {}
}
### Update Organization [PUT]
+ Parameters
+ organization: CoNWeT - Name of the organization
+ Request (application/json)
+ Headers
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Body
{
"notification_url": "http://conwet.fi.upm.es/",
"tax_address": {
"street": "Campus Montegancedo S/N",
"postal": "28050",
"city": "Madrid",
"country": "Spain"
},
"limits": {
"currency": "EUR",
"perTransaction": 10000,
"weekly": 100000,
"daily": 10000,
"monthly": 100000
},
"payment_info": {}
}
+ Response 200
## Current Organization Change Entry [/api/administration/organizations/change]
### Change Current Organization [PUT]
+ Request (application/json)
+ Headers
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Body
{
"organization": "CoNWeT"
}
+ Response 200
## Organization Users Collection [/api/administration/organizations/{organization}/users]
### Get Organization Users [GET]
+ Parameters
+ organization: CoNWeT - Name of the organization
+ Request
+ Headers
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Response 200 (application/json)
{
"members": [
{
"username": "fdelavega",
"roles": ["manager", "provider", "customer"]
}
]
}
### Add a User an Organization [POST]
- **Note:** This action is not availabe when using an external IdM, since organizations are managed on it
+ Parameters
+ organization: CoNWeT - Name of the organization
+ Request (application/json)
+ Headers
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Body
{
"username": "fdelavega",
"roles": ["manager", "provider", "customer"]
}
+ Response 200
# Group Managing Resources
API for the management of Resources. It allows to retrieve, create, update, upgrade and delete resources.
This API uses the following fields for managing resources:
* **name** - Name of the resource
* **version** - Current version of the resource
* **description** - Description of the resource
* **content_type** - Media type of the provided resource
* **state** - Current state of the resource (created, used, deleted)
* **open** - Whether the resource needs authentication to be accessed
* **link** - URL pointing to the resource, both when the resource is an API or when the resource can be downloaded from a server
* **resource_type** - Type of the resource. The valid types can be different depending on what plugins definig resource types are installed.
* **meta** - Meta information of the resource. This field can contain any valid JSON
* **content** - Base 64 encoded resource file. This field is only used when the resource is provided by encoding it in base 64
* **name** - Name of the file
* **data** - Base 64 encoded file
Additionally, this API also allows to retrieve a list of the existing resource plugins. A resource plugin defines a type of resource supported by the Store and specifies a couple of constrains.
This API uses the following fields for managing resource plugins:
* **name** - Name of the resource type that is defined by the plugin
* **plugin_id** - Id of the plugin used for management