Download presentation
Presentation is loading. Please wait.
Published byElaine Morrison Modified over 8 years ago
1
WStore Programmer Guide Resources management integration
2
Agenda 1.Introduction 2.Resources management integration – Registering resources Downloadable resource Downloadable resource providing link – Getting resources
3
INTRODUCTION WStore Programmer Guide
4
Introduction It is possible for a developer to integrate the Resources API in order to monetize different catalogues included in the developer solution. To perform this monetization, it is necessary to register the resources using a POST request, making them available to be bound in an offering.
5
RESOURCES MANAGEMENT INTEGRATION WStore Programmer Guide
6
Registering resources The contents of the request depends on the resource characteristics and the developer criteria. Downloadable resource If the resource is a downloadable resource and the resource is provided, it is possible to provide the resource itself by creating a multipart request or encode it in base64 and include this encoding in the JSON: POST /api/offering/resources HTTP 1.1 Content-type: multipart/form-data { “name”: “Smart City Lights Mashup”, “version”: “1.0”, “description”: “This resource contains a mashup for Smart City Lights”, “content_type”: “application/x-mashup+mashable-application-component” } + FILE POST /api/offering/resources HTTP 1.1 Content-type: application/json { “name”: “Smart City Lights Mashup”, “version”: “1.0”, “description”: “This resource contains a mashup for Smart City Lights”, “content_type”: “application/x-mashup+mashable-application-component”, “content”: { “name”: “SmartCityLights.wgt”, “data”: “encoded_data” }
7
Registering resources Downloadable resource providing link If the resource is a downloadable resource but the service provider has her own server to serve media files, s/he can provide an URL where the resource can be downloaded instead of the resource itself, making the request as follows: POST /api/offering/resources HTTP 1.1 Content-type: application/json { “name”: “Smart City Lights Mashup”, “version”: “1.0”, “description”: “This resource contains a mashup for Smart City Lights”, “content_type”: “application//x-mashup+mashable-application-component”, “link”: “https://downloadmashuplink.com/smartcity” } All this requests return a 201 code if everything is successful
8
Getting resources It is also possible to retrieve the information of the different resources belonging to the user making the following call: GET /api/offering/resources HTTP 1.1 Accept: application/json This call returns a list with the following format: HTTP/1.1 200 OK Content-Type: application/json Vary: Cookie { [ { “content_type”: "application/x-mashup+mashable-application-component" “description”: "Smart City Lights is an app" “name”: "Smart City Management" “version”: "1.0" } ] }
9
Thanks!
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.