packages/api-client/WidgetSDKWidgetApiApi.md
All URIs are relative to http://backend/api/v1
| Method | HTTP request | Description |
|---|---|---|
| copyWidget | POST /widget/copy | Copy widget |
| createWidget1 | POST /widget/create | Create widget |
| findTemplatePackageList | GET /widget/template/package/list | Get package teamplates |
| findWidgetInfoByNodeId | GET /node/{nodeId}/widget | get the widget information of the node |
| findWidgetInfoBySpaceId | GET /space/{spaceId}/widget | Get the space widgets |
| findWidgetPackByNodeId | GET /node/{nodeId}/widgetPack | Get the node widget package |
| findWidgetPackByWidgetIds | GET /widget/get | Get widget info |
| widgetStoreList | POST /widget/package/store/list | Get widget store |
ResponseDataListWidgetPack copyWidget(widgetCopyRo)
Scenario: 1、dashboard import widget2:the widget panel sends applets to the dashboard; 3:copy widget
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .WidgetSDKWidgetApiApi(configuration);
let body:.WidgetSDKWidgetApiApiCopyWidgetRequest = {
// WidgetCopyRo
widgetCopyRo: {
nodeId: "dst11/dsb11",
widgetIds: ["wdtiJjVmNFcFmNtQFA","wdtSbp8TkH7gTGAYR1"],
},
};
apiInstance.copyWidget(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
| Name | Type | Description | Notes |
|---|---|---|---|
| widgetCopyRo | WidgetCopyRo |
ResponseDataListWidgetPack
No authorization required
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ResponseDataWidgetPack createWidget1(widgetCreateRo)
Scenario:1、dashboard new applet 2、datasheet widget panel new widget
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .WidgetSDKWidgetApiApi(configuration);
let body:.WidgetSDKWidgetApiApiCreateWidget1Request = {
// WidgetCreateRo
widgetCreateRo: {
nodeId: "dstAAA/dsbBBB",
widgetPackageId: "wpkBBB",
name: "This is a widget",
},
};
apiInstance.createWidget1(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
| Name | Type | Description | Notes |
|---|---|---|---|
| widgetCreateRo | WidgetCreateRo |
ResponseDataWidgetPack
No authorization required
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ResponseDataListWidgetTemplatePackageInfo findTemplatePackageList()
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .WidgetSDKWidgetApiApi(configuration);
let body:any = {};
apiInstance.findTemplatePackageList(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
This endpoint does not need any parameter.
ResponseDataListWidgetTemplatePackageInfo
No authorization required
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ResponseDataListWidgetInfo findWidgetInfoByNodeId()
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .WidgetSDKWidgetApiApi(configuration);
let body:.WidgetSDKWidgetApiApiFindWidgetInfoByNodeIdRequest = {
// string | node id
nodeId: "dstJ2oRZxsh2yld4MA",
};
apiInstance.findWidgetInfoByNodeId(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
| Name | Type | Description | Notes |
|---|---|---|---|
| nodeId | [string] | node id | defaults to undefined |
ResponseDataListWidgetInfo
No authorization required
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ResponseDataListWidgetInfo findWidgetInfoBySpaceId()
get the widgets under the entire space
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .WidgetSDKWidgetApiApi(configuration);
let body:.WidgetSDKWidgetApiApiFindWidgetInfoBySpaceIdRequest = {
// string | space id
spaceId: "spczJrh2i3tLW",
// number | load quantity (optional)
count: 10,
};
apiInstance.findWidgetInfoBySpaceId(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
| Name | Type | Description | Notes |
|---|---|---|---|
| spaceId | [string] | space id | defaults to undefined |
| count | [number] | load quantity | (optional) defaults to undefined |
ResponseDataListWidgetInfo
No authorization required
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ResponseDataListWidgetPack findWidgetPackByNodeId()
Node types are limited to dashboards and datasheet
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .WidgetSDKWidgetApiApi(configuration);
let body:.WidgetSDKWidgetApiApiFindWidgetPackByNodeIdRequest = {
// string | node id
nodeId: "dstJ2oRZxsh2yld4MA",
// string | association id:node share id、template id (optional)
linkId: "shr8T8vAfehg3yj3McmDG",
// string | space id (optional)
xSpaceId: "spczJrh2i3tLW",
};
apiInstance.findWidgetPackByNodeId(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
| Name | Type | Description | Notes |
|---|---|---|---|
| nodeId | [string] | node id | defaults to undefined |
| linkId | [string] | association id:node share id、template id | (optional) defaults to undefined |
| xSpaceId | [string] | space id | (optional) defaults to undefined |
ResponseDataListWidgetPack
No authorization required
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ResponseDataListWidgetPack findWidgetPackByWidgetIds()
get widget info by widget id
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .WidgetSDKWidgetApiApi(configuration);
let body:.WidgetSDKWidgetApiApiFindWidgetPackByWidgetIdsRequest = {
// string | widget ids
widgetIds: "wdtlMDweJzTsbSJAFY,wdt923ZpvvRhD8kVLs",
// string | Association ID: node sharing ID and template ID (optional)
linkId: "shr8T8vAfehg3yj3McmDG",
};
apiInstance.findWidgetPackByWidgetIds(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
| Name | Type | Description | Notes |
|---|---|---|---|
| widgetIds | [string] | widget ids | defaults to undefined |
| linkId | [string] | Association ID: node sharing ID and template ID | (optional) defaults to undefined |
ResponseDataListWidgetPack
No authorization required
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ResponseDataListWidgetStoreListInfo widgetStoreList(widgetStoreListRo, )
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .WidgetSDKWidgetApiApi(configuration);
let body:.WidgetSDKWidgetApiApiWidgetStoreListRequest = {
// WidgetStoreListRo
widgetStoreListRo: {
filter: false,
type: 1,
previewSearchKeyword: "previewSearchKeyword_example",
},
// string | space id
xSpaceId: "spczJrh2i3tLW",
};
apiInstance.widgetStoreList(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
| Name | Type | Description | Notes |
|---|---|---|---|
| widgetStoreListRo | WidgetStoreListRo | ||
| xSpaceId | [string] | space id | defaults to undefined |
ResponseDataListWidgetStoreListInfo
No authorization required
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]