-
Notifications
You must be signed in to change notification settings - Fork 21
/
apiary.apib
4093 lines (3403 loc) · 160 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 Business API Ecosystem Open API Specification
DATE: 23 January 2017
VERSION: v8.0.0
PREVIOUS_VERSION: v7.8.0
APIARY_PROJECT: fiwaretmfbizecosystem
SPEC_URL: https://fiwareckanextensions.docs.apiary.io/#
GITHUB_SOURCE: https://github.com/FIWARE-TMForum
# FIWARE TMF Business API Ecosystem
The Business API Ecosystem is a joint component made up of the FIWARE Business Framework
and a set of APIs (and its reference implementations) provided by the TMForum.
This component allows the monetization of different kind of assets (both digital and physical)
during the whole service life cycle, from offering creation to its charging, accounting and
revenue settlement and sharing. The Business API Ecosystem exposes its complete functionality
through TMForum standard APIs; concretely, it includes the catalog management, ordering management,
inventory management, usage management, billing, customer, and party APIs.
## 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 [GitHub](https://github.com/FIWARE-TMForum/Business-API-Ecosystem).
The current specification includes the latest API specification. For the API specification
of particular releases, please refer to [GitHub Pages](https://fiware-tmforum.github.io/Business-API-Ecosystem/)
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 Aitor Magán and Álvaro Arranz who actively contributed to this specification.
## Copyright
* Copyright © 2016 - 2017 by Universidad Politénica de Madrid
* Copyright © 2016 - 2017 by TM Forum
## License
This specification is licensed under the
[FIWARE Open Specification License (implicit patent license)](https://forge.fiware.org/plugins/mediawiki/wiki/fiware/index.php/Implicit_Patents_License).
## Specification
### Authentication
Each HTTP request against the Business API Ecosystem 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).
The reference implementation of the Business API Ecosystem provides support for 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": "No JSON object could be decoded",
}
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 |
| 401 | Unauthorized | You are not logged in or the Authorization token you are providing is not valid |
| 403 | Forbidden | You have no rights to perform the request |
| 404 | Not Found | The resource you are looking for does not exists |
| 409 | Conflict | The resource you are tring to create already exists |
| 422 | Unprocessable Entity | The entity included in the request cannot be processed (e.g. It includes invalid fields)
| 500 | Internal server error | There was an internal error in the system so your request cannot be completed |
# Group Software Status API
API for retrieving information about the running instance. It manages the following fields:
* **version** - Current version of the software
* **release_date** - Release date of the current version
* **uptime** - Time the current version is up and running
* **git_hash** - Hash of the release of the current version
* **doc** - URL of the documentation
* **user_doc** - URL of the user guide
## Status API [/version]
### Get Status [GET]
+ Response 200 (application/json)
{
"version": "v7.8.0",
"release_date": "2018-10-12",
"uptime": "2 d, 3 h, 15 m, 50 s",
"git_hash": "808f4bf995bddf0f6a05576956987f2568522062",
"doc": "http://business-api-ecosystem.readthedocs.io/",
"user_doc": "http://business-api-ecosystem.readthedocs.io/en/v7.8.0/user-guide.html"
}
# Group Asset Type Management API
API for the management of asset types. These asset types represent the different kind of digital assets that can be validated, managed, and activated by the system.
The different asset types are included in the system by the admins, who can install them as plugins.
This API manages the following fields:
* **id** - id in the system of the asset type
* **href** - URL pointing to the asset type info
* **name** - Name of the asset type
* **author** - Author of the installed plugin that implements the asset type
* **version** - Version of the plugin that implements the asset type
* **mediaTypes** - List of media types that are valid when provided an asset of the given type. If this field is empty, any media type is allowed
* **formats** - List of formats that are valid when providing an asset of the given type. URL and FILE formats are supported
* **overrides** - List of product fields whose value will be overrided by the plugin implementation, when a product spec is created including the asset
* **form** - (Optional) Defines the structure of a dynamic form to be used for rertieving asset-specific metadata
## Asset Types Collection [/charging/api/assetManagement/assetTypes]
### List asset types [GET]
+ Request
+ Headers
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Response 200 (application/json)
[
{
"id": "1",
"href": "https://store.lab.fiware.org/charging/api/assetManagement/assetTypes/1",
"name": "Java App",
"author": "fdelavega",
"version": "1",
"mediaTypes": ["application/zip"],
"formats": ["FILE"],
"overrides": [],
"form": {
"auth_type": {
"type": "select",
"label": "Auth type",
"options": [{
"text": "OAuth2",
"value": "oauth2"
}, {
"text": "API Key",
"value": "key"
}]
},
"token_required": {
"type": "checkbox",
"label": "Token required?",
"default": true
},
"auth_server": {
"type": "text",
"label": "Auth Server",
"placeholder": "https://authservice.com/auth"
}
}
}
]
## Asset Type Entry [/charging/api/assetManagement/assetTypes/{id}]
### Get asset type [GET]
+ Request
+ Headers
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Response 200 (application/json)
{
"id": "1",
"href": "https://store.lab.fiware.org/charging/api/assetManagement/assetTypes/1",
"name": "Java App",
"author": "fdelavega",
"version": "1",
"mediaTypes": ["application/zip"],
"formats": ["FILE"],
"overrides": []
}
# Group Asset Management API
API for the management of digital assets. These assets can be used by the Business API Ecosystem
for the creation of digital products or as attachments in product specifications (e.g the logo, a pdf document, etc)
This API manages the following fields:
* **id** - Id in the system of the digital asset
* **href** - URL that can be used to retrieve the information of the digital asset
* **version** - Version of the digital asset
* **contentType** - Media type of the digital asset (e.g application/pdf)
* **state** - Current status of the asset in its life cycle
* **location** - URL where it is possible to download the digital asset itself
* **resourceType** - Type of digital asset chosen between the supported by the system
* **metadata** - A generic field with information provided by the owner of the asset
Additionally, for uploading assets the API manages the following fields:
* **isPublic** - Specifies whether the asset could be downloaded by any user or only by the authorized ones (typically the owner and customers if the assets has been included in a product)
* **content** - Object containing the file itself. This object includes the following fields:
* **name** - Name of the asset file being uploaded
* **data** - Base64 encoded raw data of the asset file being uploaded
## Asset Info collection [/charging/api/assetManagement/assets{?offset}{?size}]
### List seller assets [GET]
+ Parameters
+ offset: 1 (optional) - Optional parameter used to specify the first element to be returned
+ size: 10 (optional) - Optional parameter used to limit the number of elements returned
+ Request
+ Headers
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Response 200 (application/json)
[
{
"id": "1",
"href": "https://store.lab.fiware.org/charging/api/assetManagement/assets/1",
"version": "1",
"contentType": "application/zip",
"state": "Active",
"location": "https://store.lab.fiware.org/charging/api/media/application.war",
"resourceType": "Java App",
"metadata": {}
}
]
## Asset Info Entry [/charging/api/assetManagement/assets/{id}]
### Get asset [GET]
+ Parameters
+ id: 1 - Id of the element to be retrieved
+ Request
+ Headers
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Response 200 (application/json)
{
"id": "1",
"href": "https://store.lab.fiware.org/charging/api/assetManagement/assets/1",
"version": "1",
"contentType": "application/zip",
"state": "Active",
"location": "https://store.lab.fiware.org/charging/api/media/application.war",
"resourceType": "Java App",
"metadata": {}
}
## Product Asset Info Collection [/charging/api/assetManagement/assets/product/{id}]
### Get asset [GET]
+ Parameters
+ id: 1 - Id of the product whose assets are retrieved
+ Request
+ Headers
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Response 200 (application/json)
[
{
"id": "1",
"href": "https://store.lab.fiware.org/charging/api/assetManagement/assets/1",
"version": "1",
"contentType": "application/zip",
"state": "Active",
"location": "https://store.lab.fiware.org/charging/api/media/application.war",
"resourceType": "Java App",
"metadata": {}
}
]
## Upload asset task [/charging/api/assetManagement/assets/uploadJob/]
There are two different ways of uploading digital assets in the Business API Ecosystem GE.
On the one hand, it is possible to encode the asset in base64 and make a pure JSON request including
the encoded data. On the other hand, it is possible to make a multipart form request, providing a JSON with
the asset metadata and including the asset as a file in the HTTP request.
### Upload base64 encoded asset [POST]
+ Request (application/json)
+ Headers
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Body
{
"contentType": "application/zip",
"isPublic": false,
"metadata": {},
"content": {
"name": "application.war",
"data": "encoded data"
}
}
+ Request (multipart/form-data)
+ Headers
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Body
{
"contentType": "application/zip",
"isPublic": false,
"metadata": {},
}
+
FILE
+ Response 201
+ Headers
Location: URL_TO_YOUR_ASSET
## Ugrade asset task [/charging/api/assetManagement/assets/{id}/upgradeJob/]
In a similar way as it is done for uploading assets, it is possible to encode the new version of
an asset in base64 and make a pure JSON request including the encoded data, or it is possible to
make a multipart form request.
### Upgrade base64 encoded asset [POST]
+ Parameters
+ id: 1 - Id of the asset to be upgraded
+ Request (application/json)
+ Headers
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Body
{
"contentType": "application/zip",
"isPublic": false,
"metadata": {},
"content": {
"name": "application.war",
"data": "encoded data"
}
}
+ Request (multipart/form-data)
+ Headers
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Body
{
"contentType": "application/zip",
"isPublic": false,
"metadata": {},
}
+
FILE
+ Response 201
+ Headers
Location: URL_TO_YOUR_ASSET
# Group Category Management API
API for the management of categories. A Category is used to group catalogs and product offerings in logical
containers. Categories can contain other categories being possible to create a tree of categories.
Category Management API uses the following fields:
* **id** - Unique identifier of the category
* **href** - URL pointing to the category info
* **version** - Version of the category
* **lastUpdate** - Date and time of the last update
* **name** - Name of the category
* **lifecycleStatus** - Current lifecycle status
* **parentId** - Id of the parent of the current category. If this field has a value, *isRoot* must be false
* **isRoot** - Specifies whether this category is a root category or has a parent
* **description** - Descrfiption of the category
## Category Collection [/DSProductCatalog/api/catalogManagement/v2/category{?offset}{?size}]
### List Categories [GET]
+ Parameters
+ offset: 1 (optional) - Optional parameter used to specify the first element to be returned
+ size: 10 (optional) - Optional parameter used to limit the number of elements returned
+ Request
+ Headers
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Response 200 (application/json)
[
{
"id": "41",
"href": "https://store.lab.fiware.org/DSProductCatalog/api/catalogManagement/v2/category/41",,
"lastUpdate": "2013-04-19T16:42:23.0Z",
"version": "2.0",
"lifecycleStatus": "Active",
"parentId": "",
"isRoot": true,
"name": "Digital Service",
"description": "A category to hold all available digital services"
},
{
"id": "42",
"href": "https://store.lab.fiware.org/DSProductCatalog/api/catalogManagement/v2/category/42",,
"lastUpdate": "2013-04-19T16:42:23.0Z",
"version": "2.0",
"lifecycleStatus": "Active",
"parentId": "41",
"isRoot": false,
"name": "Cloud Service",
"description": "A category to hold all available cloud service offers"
}
]
### Create Category [POST]
+ Request (application/json)
+ Headers
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Body
{
"version": "2.0",
"lifecycleStatus": "Active",
"parentId": "",
"isRoot": true,
"name": "Digital Service",
"description": "A category to hold all available digital services"
}
+ Response 201 (application/json)
{
"id": "41",
"href": "https://store.lab.fiware.org/DSProductCatalog/api/catalogManagement/v2/category/41",,
"lastUpdate": "2013-04-19T16:42:23.0Z",
"version": "2.0",
"lifecycleStatus": "Active",
"parentId": "",
"isRoot": true,
"name": "Digital Service",
"description": "A category to hold all available digital services"
}
## Category Entry [/DSProductCatalog/api/catalogManagement/v2/category/{id}]
### Get Category [GET]
+ Parameters
+ id: 1 - Id of the category to be returned
+ Request
+ Headers
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Response 200 (application/json)
{
"id": "41",
"href": "https://store.lab.fiware.org/DSProductCatalog/api/catalogManagement/v2/category/41",,
"lastUpdate": "2013-04-19T16:42:23.0Z",
"version": "2.0",
"lifecycleStatus": "Active",
"parentId": "",
"isRoot": true,
"name": "Digital Service",
"description": "A category to hold all available digital services"
}
### Update Category [PATCH]
+ Parameters
+ id: 1 - Id of the category to be updated
+ Request - Partial update of the category, only the fields to be updated need to be provided - (application/json)
+ Headers
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Body
{
"lifecycleStatus": "Retired"
}
+ Response 200 (application/json)
{
"id": "41",
"href": "https://store.lab.fiware.org/DSProductCatalog/api/catalogManagement/v2/category/41",
"lastUpdate": "2013-04-19T16:42:23.0Z",
"version": "2.0",
"lifecycleStatus": "Retired",
"parentId": "",
"isRoot": true,
"name": "Digital Service",
"description": "A category to hold all available digital services"
}
# Group Product Catalog Management API
API for the management of catalogs. These catalogs are collections of product offerings that are grouped togueter
according to the seller needs.
The product catalog management API uses the following fields:
* **id** - Unique identifier of the catalog
* **href** - URL pointing to the catalog info
* **version** - Version of the catalog
* **lastUpdate** - Date and time of the last update
* **category** - List of categories of the catalog. For each category the id, href, and name fields are included as described in Category Management section.
* **name** - Name of the catalog
* **lifecycleStatus** - Current lifecycle status
* **relatedParty** - List of parties and its roles related to the current catalog. For each party, it is included the id and the href as described in the Party Management section. Additionally, it is inlcluded a *role* field specifing the role of the user in the current catalog
## Product Catalog Collection [/DSProductCatalog/api/catalogManagement/v2/catalog{?offset}{?size}{?name}{?relatedParty.id}{?lifecycleStatus}{?sort}{?body}]
### List Product Catalogs [GET]
+ Parameters
+ offset: 1 (optional) - Optional parameter used to specify the first element to be returned
+ size: 10 (optional) - Optional parameter used to limit the number of elements returned
+ name: Cloud (optional) - Optional paramener used to filter the returned catalogs by name
+ relatedParty.id: fdelavega (optional) - Optional parameter used to filter the returned catalogs by owner
+ lifecycleStatus: Active (optional) - Optional parameter used to filter the returned catalogs by lifecycle status
+ sort: name (optional) - Optional parameter used to specify how to sort results
+ body: Cloud (optional) - Optional parameter used to make keyword searches
+ Request
+ Headers
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Response 200 (application/json)
[
{
"id": "1",
"version": "",
"href": "https://store.lab.fiware.org/DSProductCatalog/api/catalogManagement/v2/catalog/1",
"name": "Cloud Services",
"lastUpdate": "2016-07-20T10:03:59.000+0000",
"lifecycleStatus": "Launched",
"relatedParty": [
{
"id": "fdelavega",
"href": "https://store.lab.fiware.org/DSPartyManagement/api/partyManagement/v2/individual/fdelavega",
"role": "Owner"
}
],
"category": [
{
"id": "12",
"href": "https://store.lab.fiware.org/DSProductCatalog/api/catalogManagement/v2/category/12",
"name": "Digital Service"
}
]
}
]
### Create Product Catalog [POST]
+ Request (application/json)
+ Headers
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Body
{
"version": "1.0",
"name": "Cloud Services",
"lifecycleStatus": "Launched",
"relatedParty": [
{
"id": "fdelavega",
"href": "https://store.lab.fiware.org/DSPartyManagement/api/partyManagement/v2/individual/fdelavega",
"role": "Owner"
}
],
"category": [
{
"id": "12",
"href": "https://store.lab.fiware.org/DSProductCatalog/api/catalogManagement/v2/category/12",
"name": "Digital Service"
}
]
}
+ Response 201 (application/json)
{
"id": "1",
"version": "1.0",
"href": "https://store.lab.fiware.org/DSProductCatalog/api/catalogManagement/v2/catalog/1",
"name": "Cloud Services",
"lastUpdate": "2016-07-20T10:03:59.000+0000",
"lifecycleStatus": "Launched",
"relatedParty": [
{
"id": "fdelavega",
"href": "https://store.lab.fiware.org/DSPartyManagement/api/partyManagement/v2/individual/fdelavega",
"role": "Owner"
}
],
"category": [
{
"id": "12",
"href": "https://store.lab.fiware.org/DSProductCatalog/api/catalogManagement/v2/category/12",
"name": "Digital Service"
}
]
}
## Product Catalog Entry [/DSProductCatalog/api/catalogManagement/v2/catalog/{id}]
### Get Product Catalog [GET]
+ Parameters
+ id: 1 - Id of the catalog to be retrieved
+ Request
+ Headers
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Response 200 (application/json)
{
"id": "1",
"version": "",
"href": "https://store.lab.fiware.org/DSProductCatalog/api/catalogManagement/v2/catalog/1",
"name": "Cloud Services",
"lastUpdate": "2016-07-20T10:03:59.000+0000",
"lifecycleStatus": "Launched",
"relatedParty": [
{
"id": "fdelavega",
"href": "https://store.lab.fiware.org/DSPartyManagement/api/partyManagement/v2/individual/fdelavega",
"role": "Owner"
}
],
"category": [
{
"id": "12",
"href": "https://store.lab.fiware.org/DSProductCatalog/api/catalogManagement/v2/category/12",
"name": "Digital Service"
}
]
}
### Update Product Catalog [PATCH]
+ Parameters
+ id: 1 - Id of the catalog to be updated
+ Request - Partial update of the catalog, only the fields to be updated need to be provided - (application/json)
+ Headers
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Body
{
"lifecycleStatus": "Retired"
}
+ Response 200 (application/json)
{
"id": "1",
"version": "",
"href": "https://store.lab.fiware.org/DSProductCatalog/api/catalogManagement/v2/catalog/1",
"name": "Cloud Services",
"lastUpdate": "2016-07-20T10:03:59.000+0000",
"lifecycleStatus": "Retired",
"relatedParty": [
{
"id": "fdelavega",
"href": "https://store.lab.fiware.org/DSPartyManagement/api/partyManagement/v2/individual/fdelavega",
"role": "Owner"
}
],
"category": [
{
"id": "12",
"href": "https://store.lab.fiware.org/DSProductCatalog/api/catalogManagement/v2/category/12",
"name": "Digital Service"
}
]
}
# Group Product Specification Management API
API for the management of Product Specifications. A Product Specification is a detailed description of a tangible
or intangible object made available in the form of a Product Offering to customers or other parties playing
a party role.
The Product Specification Management API uses the folowing fields:
* **id** - Unique identifier of the product specification
* **href** - URL pointing to the product specification info
* **productNumber** - An id number asigned by the seller to identify its product specification
* **version** - Version of the product specification
* **lastUpdate** - Date and time of the last update
* **name** - Name of the product specification
* **description** - Narrative text that explains what the product specification is
* **isBundle** - Determines whether the current specification represents a single product specification or a bundle of product specifications
* **brand** - The manufacturer or trademark of the specification
* **lifecycleStatus** - Current lifecycle status of the product specification
* **relatedParty** - List of parties and its roles related to the current product specification. For each party, it is included the id and the href as described in the Party Management section. Additionally, it is inlcluded a *role* field specifing the role of the user in the current product specifrication
* **attachment** - List of product attachments, such as video, pictures, pdf documents, etc. Which help describing the product specification. Each attachment contains the following fields:
* **type** - Attachment type, video, picture, document, etc. The type *Picture* can be included only once and is used by the platform as the logo of the product specification (and its product offering)
* **url** - URL pointing to the attachment itself. Note that if the attachment has been uploaded to the system using the asset management API, you can use the URL returned by the upload task in the *Location* header
* **bundledProductSpecification** - In case the current product is a bundle (isBundle is true), this field contains the list of product specifications that made up the bundle. Each element of the list must contain the id, the href and the name of the product specification being bundled
* **productSpecificationRelationship** - Describes the relationships of the current product specification with other product specifications of the system. For each relationship, it is required to include the id and the href of the related product specification, and a *type* which describes the type of relationship. The supported types are *migration*, *substitution*, *dependency*, and *exclusivity*
* **productSpecCharacteristic** - A characteristic or distintive feature of the product specification. Characteristics can be a discrete value, such as color, or can be a range of values. Additionally, some characteristics may be selected during the ordering process. Characteristics have the following fields:
* **configurable** - Determines whether the characteristic can be configured during the ordering process
* **name** - Name of the characteristic
* **description** - Narrative text explaining what the characteristic is
* **valueType** - The kind of value the characteristic could have. Valid values are *String* and *Number*
* **productSpecCharacteristicValue** - List of values of the characteristic. If configurable is false, this field must contain a single value. Each of these elements contain the following fields:
* **default** - Indicates whether tghe current value is the default for the characteristic
* **unitOfMeasure** - Could be minutes, MB, etc. This field is only used when the type is *Number*
* **value** - Value of the characteristic when it is a discrete value. If this field is included, valueFrom and valueTo must be empty
* **valueFrom** - Starting value of the characteristic when it is a range. If this field is included, valueTo must be also included and value must be empty
* **valueTo** - Ending value of the characteristic when it is a range. If this field is included, valueFrom must be also included and value must be empty
* **valueType** - The kind of value the characteristic could have. Valid values are *String* and *Number*
## Product Specification Collection [/DSProductCatalog/api/catalogManagement/v2/productSpecification{?offset}{?size}{?isBundle}{?productNumber}{?relatedParty.id}{?lifecycleStatus}{?sort}{?body}]
### List Product Specifications [GET]
+ Parameters
+ offset: 1 (optional) - Optional parameter used to specify the first element to be returned
+ size: 10 (optional) - Optional parameter used to limit the number of elements returned
+ isBundle: true (optional) - Optional parameter used to filter the returned product specifications by isBundle
+ productNumber: 1 (optional)- Optional parameter used to filter the returned product specifications by product number
+ relatedParty.id: fdelavega (optional) - Optional parameter used to filter the returned product specifications by owner
+ lifecycleStatus: Active (optional) - Optional parameter used to filter the returned product specifications by lifecycle status
+ sort: name (optional) - Optional parameter used to specify how to sort results
+ body: Cloud (optional) - Optional parameter used to make keyword searches
+ Request
+ Headers
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Response 200 (application/json)
[
{
"id": "22",
"href": "https://store.lab.fiware.org/DSProductCatalog/api/catalogManagement/v2/productSpecification/22",
"productNumber": "I42-340-DX",
"version": "2.0",
"lastUpdate": "2013-04-19T16:42:23.0Z",
"name": "Services Bundle",
"description": "A bundle of services",
"isBundle": true,
"brand": "UPM",
"lifecycleStatus": "Active",
"relatedParty": [
{
"id": "fdelavega",
"href": "https://store.lab.fiware.org/DSPartyManagement/api/partyManagement/v2/individual/fdelavega",
"role": "Owner"
}
],
"attachment": [
{
"type": "Picture",
"url": "https://store.lab.fiware.org/media/picture.png"
}
],
"bundledProductSpecification": [
{
"id": "15",
"href": "https://store.lab.fiware.org/DSProductCatalog/api/catalogManagement/v2/productSpecification/15",
"name": "Service 15"
}, {
"id": "64",
"href": "https://store.lab.fiware.org/DSProductCatalog/api/catalogManagement/v2/productSpecification/64",
"name": "Service 64"
}
],
"productSpecificationRelationship": [
{
"id": "23",
"href": "https://store.lab.fiware.org/DSProductCatalog/api/catalogManagement/v2/productSpecification/23",
"type": "dependency"
}
],
"productSpecCharacteristic": [
{
"name": "Speed",
"description": "Speed of the service",
"valueType": "number",
"configurable": false,
"productSpecCharacteristicValue": [
{
"valueType": "number",
"default": true,
"value": "100",
"unitOfMeasure": "mb/s",
"valueFrom": "",
"valueTo": ""
}
]
}
]
}
]
### Create Product Specification [POST]
+ Request (application/json)
+ Headers
Authorization: Bearer YOUR_OAUTH2_TOKEN
+ Body
{
"productNumber": "I42-340-DX",
"version": "2.0",
"lastUpdate": "2013-04-19T16:42:23.0Z",
"name": "Services Bundle",
"description": "A bundle of services",
"isBundle": true,
"brand": "UPM",
"lifecycleStatus": "Active",
"relatedParty": [
{
"id": "fdelavega",
"href": "https://store.lab.fiware.org/DSPartyManagement/api/partyManagement/v2/individual/fdelavega",
"role": "Owner"
}
],
"attachment": [
{
"type": "Picture",
"url": "https://store.lab.fiware.org/media/picture.png"
}
],
"bundledProductSpecification": [
{
"id": "15",
"href": "https://store.lab.fiware.org/DSProductCatalog/api/catalogManagement/v2/productSpecification/15",
"name": "Service 15"
}, {
"id": "64",
"href": "https://store.lab.fiware.org/DSProductCatalog/api/catalogManagement/v2/productSpecification/64",
"name": "Service 64"
}
],
"productSpecificationRelationship": [
{
"id": "23",
"href": "https://store.lab.fiware.org/DSProductCatalog/api/catalogManagement/v2/productSpecification/23",
"type": "dependency"
}
],
"productSpecCharacteristic": [
{
"name": "Speed",
"description": "Speed of the service",
"valueType": "number",
"configurable": false,
"productSpecCharacteristicValue": [
{
"valueType": "number",
"default": true,
"value": "100",
"unitOfMeasure": "mb/s",
"valueFrom": "",
"valueTo": ""
}
]
}
]
}
+ Response 201 (application/json)
{
"id": "22",
"href": "https://store.lab.fiware.org/DSProductCatalog/api/catalogManagement/v2/productSpecification/22",
"productNumber": "I42-340-DX",
"version": "2.0",
"lastUpdate": "2013-04-19T16:42:23.0Z",
"name": "Services Bundle",
"description": "A bundle of services",
"isBundle": true,
"brand": "UPM",
"lifecycleStatus": "Active",
"relatedParty": [
{
"id": "fdelavega",
"href": "https://store.lab.fiware.org/DSPartyManagement/api/partyManagement/v2/individual/fdelavega",
"role": "Owner"
}
],
"attachment": [
{
"type": "Picture",
"url": "https://store.lab.fiware.org/media/picture.png"
}
],
"bundledProductSpecification": [
{
"id": "15",
"href": "https://store.lab.fiware.org/DSProductCatalog/api/catalogManagement/v2/productSpecification/15",
"name": "Service 15"