-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathapiary.apib
1596 lines (1175 loc) · 47.2 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://marketplace.lab.fiware.org/
TITLE: FIWARE Marketplace v2 Open API Specification
DATE: 30 September 2015
VERSION: v2
PREVIOUS_VERSION: v1
APIARY_PROJECT: fiwaremarketplace
# FIWARE Marketplace
WMarket is the reference implementation of the FIWARE Marketplace Generic Enabler.
The Marketplace provides functionality necessary for bringing together offering and
demand for making business. These functions include basic services for registering
business entities, publishing and retrieving offerings and demands, search and discover
offerings according to specific consumer requirements as well as lateral functions
like review, rating and recommendation. Besides the core functions, the Marketplace
may offer value because of its "knowledge" about the market in terms of market
intelligence services, pricing support, advertising, information subscription and
more.
## Editors
+ Aitor Magán García, Universidad Politécnica de Madrid
## Acknowledgements
The editors would like to express their gratitude to the following people who actively
contributed to this specification: Francisco de la Vega and Álvaro Arranz García
## 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/WMarket/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)
## Copyright
* Copyright © 2015 by Universidad Politécnica de Madrid
## Specification
### Authentication
Each HTTP request against the Marketplace 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).
WMarket provides support for Basic, Cookie and OAuth2 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
{
"error": {
"type": "NOT_FOUND",
"message": "User no_user not found"
}
}
XML Example
<?xml version="1.0" encoding="utf-8"?>
<error>
<message>User no_user not found</message>
<type>NOT_FOUND</type>
</error>
### HTTP Codes
| HTTP Code | Type | Description |
|-----------|------|------------ |
| 200 | OK | Your request has been completed properly |
| 201 | Created | Your resource has been created. The `Location` header will contain the final URL that users can use to access this resource |
| 204 | No content | Your request has been processed, but a response is not available. Generally used when deleting entities or bookmarking offerings |
| 400 | Bad Request | The content of your request is not correct (e.g. there is already a resource with the specified name) |
| 400 | Validation Error | One or more fields of your content is not valid. The field `field` indicates the first field with a validation error |
| 403 | Forbidden | You have no rights to perform the query |
| 404 | Not found | The resource does not exist |
| 500 | Internal server error | There was an internal error in the system so your request cannot be completed |
## Group Users
API to create, retrieve, edit and delete user accounts.
When you are creating or updating a user, you can set the following fields:
+ displayName - The display name of the user (the one used in the UI). This field will be used to automatically generate the userName
+ email - The user's email account. This field is hidden and it will not be returned in GET requests. Used for logging purposes
+ password - The user's password. This field is hidden and it will not be returned in GET requests
+ company - (optional) The user's company
However, some additional fields will be automatically generated for you:
+ userName - unique user identifier based on user's display name. Users can also use this field to identify themselves
+ imageUrl - link to Gravatar based on user's mail
+ createdAt - Date of creation
## Creating and/or Listing Users [/api/v2/user/{?offset}{?max}]
### Create a new User [POST]
+ Request (application/json)
+ Headers
Accept: application/json
+ Body
{
"displayName": "Example Display Name",
"email": "[email protected]",
"password": "example_complex_password",
"company": "Example Company"
}
+ Response 201
+ Headers
Location: http://marketplace.lab.fiware.org/api/v2/user/example-display-name
+ Response 400 (application/json)
{
"error": {
"message": "This field must be a valid email.",
"type": "VALIDATION_ERROR",
"field": "email"
}
}
### List existing Users [GET]
+ Parameters
+ offset: 0 (optional, int) - The first element to be retrieved
+ max: 100 (optional, int) - The number of elements to be retrieved
+ Request
+ Headers
Accept: application/json
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Response 200 (application/json)
{
"users": [
{
"userName": "aitor",
"displayName": "Aitor",
"imageUrl": "https://secure.gravatar.com/avatar/149dd094923c17d1fce7231c45296357?d=identicon",
"createdAt": 1436170938000
}
]
}
## Managing an existing User [/api/v2/user/{user_id}]
+ Parameters
+ user_id: aitor (required, string) - ID of the User
### Get User Details [GET]
+ Request
+ Headers
Accept: application/json
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Response 200 (application/json)
{
"userName": "aitor",
"displayName": "Aitor",
"imageUrl": "https://secure.gravatar.com/avatar/149dd094923c17d1fce7231c45296357?d=identicon",
"createdAt": 1436170938000
}
+ Response 404 (application/json)
{
"error": {
"message": "User aitor not found",
"type": "NOT_FOUND"
}
}
### Update an existing User [POST]
+ Request (application/json)
+ Headers
Accept: application/json
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Body
{
"displayName": "Example Display Name",
"email": "[email protected]",
"password": "example_complex_password",
"company": "Example Company"
}
+ Response 200
+ Response 400 (application/json)
{
"error": {
"message": "This field must be a valid email.",
"type": "VALIDATION_ERROR",
"field": "email"
}
}
+ Response 403 (application/json)
{
"error": {
"message": "You are not authorized to update user aitor",
"type": "FORBIDDEN"
}
}
+ Response 404 (application/json)
{
"error": {
"message": "User aitor not found",
"type": "NOT_FOUND"
}
}
### Delete an existing User [DELETE]
+ Request
+ Headers
Accept: application/json
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Response 204
+ Response 403 (application/json)
{
"error": {
"message": "You are not authorized to delete user aitor",
"type": "FORBIDDEN"
}
}
+ Response 404 (application/json)
{
"error": {
"message": "User aitor not found",
"type": "NOT_FOUND"
}
}
## Group Stores
API to create, retrieve, edit and delete Stores.
When you are creating or updating a store, you can set the following fields:
+ displayName - The display name of the Store (the one used in the User Interface). This field will be used to automatically generate the store identifier (name)
+ url - The URL where the store is located
+ comment - (optional) Additional information about the Store
+ imageBase64 - (optional) You can add an image to your store by coding it in Base64
However, some additional fields will be automatically generated for you:
+ name - Unique store identifier based on the display name of the Store
+ imagePath - The relative path that can be used to retrieve the image of the Store
+ createdAt - Date of creation
+ creator - The user that created the Store
+ lastEditor - The last user that updated the Store
+ averageScore - Based on the reviews made by users
## Creating and/or Listing Stores [/api/v2/store/{?offset}{?max}]
### Create a new Store [POST]
+ Request (application/json)
+ Headers
Accept: application/json
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Body
{
"displayName": "WStore",
"url": "http://example.com",
"comment": "Example comment",
"imageBase64": "PNG_IMAGE_IN_BASE64"
}
+ Response 201
+ Headers
Location: http://marketplace.lab.fiware.org/api/v2/store/wstore
+ Response 400 (application/json)
{
"error": {
"field": "name",
"type": "VALIDATION_ERROR",
"message": "This name is already in use."
}
}
### List existing Stores [GET]
+ Parameters
+ offset: 0 (optional, int) - The first element to be retrieved
+ max: 100 (optional, int) - The number of elements to be retrieved
+ Request
+ Headers
Accept: application/json
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Response 200 (application/json)
{
"stores": [
{
"averageScore": 3.7,
"url": "http://example.com",
"displayName": "WStore",
"name": "wstore",
"comment": "Example Comment",
"createdAt": 1437390486000,
"lasteditor": "USER_NAME",
"creator": "USER_NAME",
"imagePath": "media/store/STORE_NAME.png"
}
]
}
## Managing an existing Store [/api/v2/store/{store_name}]
+ Parameters
+ store_name: wstore (required, string) - ID of the Store
### Get Store Details [GET]
+ Request
+ Headers
Accept: application/json
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Response 200 (application/json)
{
"averageScore": 3.7,
"url": "http://example.com",
"displayName": "WStore",
"name": "wstore",
"comment": "Example Comment",
"createdAt": 1437390486000,
"lasteditor": "USER_NAME",
"creator": "USER_NAME",
"imagePath": "media/store/STORE_NAME.png"
}
+ Response 404 (application/json)
{
"error": {
"message": "Store wstore not found",
"type": "NOT_FOUND"
}
}
### Update an existing Store [POST]
+ Request (application/json)
+ Headers
Accept: application/json
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Body
{
"displayName": "WStore",
"url": "http://example.com",
"comment": "Example comment",
"imageBase64": "PNG_IMAGE_IN_BASE64"
}
+ Response 200
+ Response 400 (application/json)
{
"error": {
"field": "name",
"type": "VALIDATION_ERROR",
"message": "This name is already in use."
}
}
+ Response 403 (application/json)
{
"error": {
"message": "You are not authorized to update store wstore",
"type": "FORBIDDEN"
}
}
+ Response 404 (application/json)
{
"error": {
"message": "Store wstore not found",
"type": "NOT_FOUND"
}
}
### Delete an existing Store [DELETE]
+ Request
+ Headers
Accept: application/json
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Response 204
+ Response 403 (application/json)
{
"error": {
"message": "You are not authorized to delete store wstore",
"type": "FORBIDDEN"
}
}
+ Response 404 (application/json)
{
"error": {
"message": "Store wstore not found",
"type": "NOT_FOUND"
}
}
## Creating and/or Listing Store Reviews [/api/v2/store/{store_name}/review{?offset}{?max}{?orderBy}{?desc}{?detailed}]
Stores can be reviewed so other users can easily know which stores can be trusted. One user can only review one store once. To review a store,
the user should send the following fields:
+ score: 3 (required, int) - a number between 1 or 5 where 1 means "I really hate this Store" and 5 means "I really like this Store"
+ comment: Example (optional, string) - A brief explanation for your score
+ Parameters
+ store_name: wstore (required, string) - The ID of the store to be reviewed
### Review a Store [POST]
+ Request (application/json)
+ Headers
Accept: application/json
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Body
{
"score": 5,
"comment": "Example Comment"
}
+ Response 201
+ Headers
Location: http://marketplace.lab.fiware.org/api/v2/store/{store_name}/review/0
+ Response 400 (application/json)
+ Body
{
"error": {
"field": "score",
"type": "VALIDATION_ERROR",
"message": "Score should be an integer between 1 and 5."
}
}
+ Response 403 (application/json)
+ Body
{
"error": {
"type": "FORBIDDEN",
"message": "You are not authorized to review Store. An entity can only be reviewed once"
}
}
+ Response 404 (application/json)
+ Body
{
"error": {
"type": "NOT_FOUND",
"message": "Store wstore not found"
}
}
### List existing Store Reviews [GET]
+ Parameters
+ offset: 0 (optional, int) - The first element to be retrieved
+ max: 100 (optional, int) - The number of elements to be retrieved
+ orderBy: id (optional, string) - Order used to retrieve the reviews
+ desc: false (optional, boolean) - Use descending order
+ detailed: false (optional, boolean) - If true, the user fields won't contain the user name but all the user's information (email, displayName...)
+ Request
+ Headers
Accept: application/json
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Response 200 (application/json)
{
"reviews": [
{
"id": 1,
"score": 5,
"user": "USER_NAME",
"comment": "Example Comment",
"createdAt": 1435248117000,
"updatedAt": 1435248117000
}
]
}
+ Response 404 (application/json)
{
"error": {
"type": "NOT_FOUND",
"message": "Store wstore not found"
}
}
## Managing an existing Store Review [/api/v2/store/{store_name}/review/{review_id}{?detailed}]
+ Parameters
+ store_name: wstore (required, string) - The ID of the store to which the review belongs
+ review_id: 0 (required, int) - The ID of the review to be managed
### Get Review Details [GET]
+ Parameters
+ detailed: false (optional, boolean) - If true, the user filed won't contain the user name but all the user's information (email, displayName...)
+ Request
+ Headers
Accept: application/json
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Response 200 (application/json)
{
"id": 1,
"score": 5,
"user": "USER_NAME",
"comment": "Example Comment",
"createdAt": 1435248117000,
"updatedAt": 1435248117000
}
+ Response 404 (application/json)
{
"error": {
"message": "Review 0 not found in Store wstore",
"type": "NOT_FOUND"
}
}
### Update an existing Store Review [POST]
+ Request (application/json)
+ Headers
Accept: application/json
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Body
{
"score": 5,
"comment": "Example Comment"
}
+ Response 200
+ Response 400 (application/json)
+ Body
{
"error": {
"field": "score",
"type": "VALIDATION_ERROR",
"message": "Score should be an integer between 1 and 5."
}
}
+ Response 403 (application/json)
+ Body
{
"error": {
"message": "You are not authorized to update review 0 in Store wstore",
"type": "FORBIDDEN"
}
}
+ Response 404 (application/json)
{
"error": {
"message": "Review 0 not found in Store wstore",
"type": "NOT_FOUND"
}
}
### Delete an existing Store Review [DELETE]
+ Request
+ Headers
Accept: application/json
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Response 204 (application/json)
+ Response 404 (application/json)
{
"error": {
"message": "Review 0 not found in Store wstore",
"type": "NOT_FOUND"
}
}
# Group Descriptions
API to create, retrieve, edit and delete Descriptions.
When you are creating or updating a description, you can set the following fields:
+ displayName - the display name of the Description (the one used in the User Interface). This field will be used to automatically generate the description identifier (name)
+ url - The URL where the description is located. This URL must be accessible by the server and should point to a RDF file
+ comment - (optional) Additional information about the Description
However, some additional fields will be automatically generated for you:
+ name - Description identifier based on the display name of the Description. One store **cannot** host two descriptions with the same name, but two different stores **can** host two descriptions with the same name
+ createdAt - Date of creation
+ updatedAt - Date of the last update
+ creator - The user that created the Description
+ lastEditor - The last user that updated the Description
## Creating and/or Listing Descriptions in a Store [/api/v2/store/{store_name}/description/{?offset}{?max}]
+ Parameters
+ store_name: wstore (required, string) - The ID of the Store where the description will be created
### Create a new Description [POST]
+ Request (application/json)
+ Headers
Accept: application/json
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Body
{
"displayName": "Offerings1",
"url": "http://example.com/some.rdf",
"comment": "Example comment"
}
+ Response 201
+ Headers
Location: http://marketplace.lab.fiware.org/api/v2/store/wstore/description/offering-1
+ Response 400 (application/json)
{
"error": {
"field": "url",
"type": "VALIDATION_ERROR",
"message": "Your RDF could not be parsed."
}
}
+ Response 404 (application/json)
{
"error": {
"type": "NOT_FOUND",
"message": "Store wstore not found"
}
}
### List existing Descriptions in a Store [GET]
+ Parameters
+ offset: 0 (optional, int) - The first element to be retrieved
+ max: 100 (optional, int) - The number of elements to be retrieved
+ Request
+ Headers
Accept: application/json
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Response 200 (application/json)
{
"descriptions": [
{
"id": 5,
"url": "http://example.com/some.rdf",
"name": "offerings1",
"displayName": "Offerings1",
"createdAt": 1437398271000,
"updatedAt": 1437398936000,
"store": "wstore",
"lasteditor": "aitor",
"creator": "aitor",
"offerings": []
}
]
}
## Managing an existing Description [/api/v2/store/{store_name}/description/{description_name}]
+ Parameters
+ store_name: wstore (required, string) - The ID of the Store to which the description belongs
+ description_name: offerings1 (required, string) - The ID of the description to be managed
### Get Description Details [GET]
+ Request
+ Headers
Accept: application/json
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Response 200 (application/json)
{
"id": 5,
"url": "http://example.com/some.rdf",
"name": "offering-1",
"displayName": "Offering 1",
"createdAt": 1437398271000,
"updatedAt": 1437398936000,
"store": "wstore",
"lasteditor": "aitor",
"creator": "aitor",
"offerings": []
}
+ Response 404 (application/json)
{
"error": {
"message": "Description offerings1 not found",
"type": "NOT_FOUND"
}
}
### Update an existing Description [POST]
+ Request (application/json)
+ Headers
Accept: application/json
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Body
{
"displayName": "Offerings1",
"url": "http://example.com/some.rdf",
"comment": "Example comment"
}
+ Response 200
+ Response 400 (application/json)
{
"error": {
"field": "url",
"type": "VALIDATION_ERROR",
"message": "Your RDF could not be parsed."
}
}
+ Response 403 (application/json)
{
"error": {
"message": "You are not authorized to update description offerings1",
"type": "FORBIDDEN"
}
}
+ Response 404 (application/json)
{
"error": {
"message": "Description offerings1 not found in Store wstore",
"type": "NOT_FOUND"
}
}
### Delete an existing Description [DELETE]
+ Request
+ Headers
Accept: application/json
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Response 204
+ Response 403 (application/json)
{
"error": {
"message": "You are not authorized to delete description offerings1",
"type": "FORBIDDEN"
}
}
+ Response 404 (application/json)
{
"error": {
"message": "Description offerings1 not found in Store wstore",
"type": "NOT_FOUND"
}
}
## Listing all the Descriptions [/api/v2/description{?offset}{?max}]
In some cases, users can be interested in retrieving all the descriptions which have been registered into the MaketPlace without
taking into account the store used to register these descriptions.
+ Parameters
+ offset: 0 (optional, int) - The first element to be retrieved
+ max: 100 (optional, int) - The number of elements to be retrieved
### List all the Descriptions [GET]
+ Request
+ Headers
Accept: application/json
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Response 200 (application/json)
{
"descriptions": [
{
"id": 5,
"url": "http://example.com/some.rdf",
"name": "offerings1",
"displayName": "Offerings1",
"createdAt": 1437398271000,
"updatedAt": 1437398936000,
"store": "wstore",
"lasteditor": "aitor",
"creator": "aitor",
"offerings": []
}
]
}
# Group Offerings
When descriptions are correctly created and the contained USDL is parsed, the offerings contained in this USDL file will be accessible through
a REST API. At this point, users will be able to interact with these offerings to obtain their details and much more (bookmarking, reviewing...).
Here is the list with all the information that is gathered from an offering:
+ displayName - The display name of the Offering (the one used in the User Interface).
+ name - Offering identifier based on the display name of the Offering. One description **cannot** contain two offerings with the same name, but two descriptions **can** contain two offerings with same name
+ description - Additional information about the Offering
+ uri - The URI to identify the offering within the USDL
+ describedIn - The description where the offering is contained
+ imageUrl - URL which points to an image that will help to identify the offering more easily
+ acqusitionUrl - URL which points to the Store page where the offering can be acquired
+ views - Number of times which the offering has been viewed
+ averageScore - Based on the reviews made by users
+ describedIn - The description where the offering is described
+ pricePlans - The price plans that can be used to acquire the offerings. Each price plan can contain zero or more price components
+ services - All the services included in the offering
+ categories - Based on the categories of the services included in the offering
## Listing all the offerings contained in a Description [/api/v2/store/{store_name}/description/{description_name}/offering]
+ Parameters
+ store_name: wstore (required, string) - The ID of the Store to which the description belongs
+ description_name: offerings1 (required, string) - The ID of the description whose offerings want to be retrieved
### List all the offerings contained in a Description [GET]
+ Request
+ Headers
Accept: application/json
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Response 200 (application/json)
{
"offerings": [
{
"averageScore": 0,
"name": "offering1",
"displayName": "Offering1",
"uri": "http://130.206.81.113/FiwareRepository/v1/storeOfferingCollection/offering1#off",
"description": "Example Description",
"version": "1.0",
"describedIn": {
"name": "offerings1",
"store": "wstore"
},
"imageUrl": "IMAGE_URL",
"acquisitionUrl": "ACQUISITION_URL",
"views": 1,
"pricePlans": [],
"services": [],
"categories": []
}
]
}
+ Response 404 (application/json)