API
Endpoints
/my/widgets/public/my/widgets/private/my/widgets/meta/my/widget-configs
tenent-id
tenent-id – is an ID for identify the vendor. Each vendor has it's own tenent-id.
public
/my/widgets/public endpoint does not need Bearer token.
From this endpoint you can get public widgets. Only thing you need is Tenent ID.
Method: GET
X-tenent-id: 54baa4fd-bbda-4f7c-9a88-2d43d0bc73ed // this is fake tenent-id
private
/my/widgets/private endpoint provides list of private widgets. To get the widgets, add X-tenent-id and Authorization headers.
Method: GET
X-tenent-id: 54baa4fd-bbda-4f7c-9a88-2d43d0bc73ed // this is fake tenent-id
Authorization: Bearer ....
meta
/my/widgets/meta public endpoint provides additional information about widget.
Method: GET
X-tenent-id: 54baa4fd-bbda-4f7c-9a88-2d43d0bc73ed // this is fake tenent-id
widget-configs
/my/widget-configs protected endpoint adds new config to the widget store. If widget is already exists, then it updates. The config is sent in the body of the request
Method: POST
X-tenent-id: 54baa4fd-bbda-4f7c-9a88-2d43d0bc73ed // this is fake tenent-id
X-config-token: bb3954eb-b8e2-46de-9387-a0670a9d14f9
Content-Type: application/json
{
"id": 100,
"port": 5100,
"name": "VENDOR_Widget",
"issuer": "Invent",
"domain": "domain",
"url": "url",
"version": "0.1.1",
"widgetType": 1,
"vendorPrefix": "vendor",
"tenentSlug": "vendor",
"defaultBranch": "master",
"exposes": {
"./Widget": "./src/widget/widget",
"./WidgetSettings": "./src/widget/settings",
"./WidgetPreview": "./src/widget/preview"
},
"widgetDetails": {
},
"defaultProps": {
"apiUrl": "_internal_api_"
},
"layout": {
"minW": 5,
"maxW": 1000,
"minH": 5,
"maxH": 1000
}
}