packages/api-client/TemplateCenterTemplateAPIApi.md
All URIs are relative to http://backend/api/v1
| Method | HTTP request | Description |
|---|---|---|
| create | POST /template/create | Create Template |
| delete5 | DELETE /template/delete/{templateId} | Delete Template |
| directory | GET /template/directory | Get Template Directory Info |
| getCategoryContent | GET /template/categories/{categoryCode} | Get The Template Category Content |
| getCategoryList | GET /template/categoryList | Get Template Category List |
| getSpaceTemplates | GET /spaces/{spaceId}/templates | Get Space Templates |
| globalSearch | GET /template/global/search | Template Global Search |
| quote | POST /template/quote | Quote Template |
| recommend | GET /template/recommend | Get Template Recommend Content |
| validate | GET /template/validate | Check if the template name already exists |
ResponseDataString create(createTemplateRo)
Created nodes (including child descendant nodes) have administrative rights and are not associated with data tables other than nodes.
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .TemplateCenterTemplateAPIApi(configuration);
let body:.TemplateCenterTemplateAPIApiCreateRequest = {
// CreateTemplateRo
createTemplateRo: {
name: "This is a template",
nodeId: "nod10",
data: true,
},
};
apiInstance.create(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
| Name | Type | Description | Notes |
|---|---|---|---|
| createTemplateRo | CreateTemplateRo |
ResponseDataString
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]
ResponseDataVoid delete5()
Deletion objects: main administrator, sub-admins with template permissions, creator of the template
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .TemplateCenterTemplateAPIApi(configuration);
let body:.TemplateCenterTemplateAPIApiDelete5Request = {
// string | Template ID
templateId: "tplHTbkg7qbNJ",
};
apiInstance.delete5(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
| Name | Type | Description | Notes |
|---|---|---|---|
| templateId | [string] | Template ID | defaults to undefined |
ResponseDataVoid
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]
ResponseDataTemplateDirectoryVo directory()
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .TemplateCenterTemplateAPIApi(configuration);
let body:.TemplateCenterTemplateAPIApiDirectoryRequest = {
// string | Template Id
templateId: "tplHTbkg7qbNJ",
// string | Official Template Category Code (optional)
categoryCode: "tpcEm7VDcbnnr",
// boolean | Whether it is a private template in the space station (optional)
isPrivate: true,
};
apiInstance.directory(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
| Name | Type | Description | Notes |
|---|---|---|---|
| templateId | [string] | Template Id | defaults to undefined |
| categoryCode | [string] | Official Template Category Code | (optional) defaults to undefined |
| isPrivate | [boolean] | Whether it is a private template in the space station | (optional) defaults to undefined |
ResponseDataTemplateDirectoryVo
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]
ResponseDataTemplateCategoryContentVo getCategoryContent()
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .TemplateCenterTemplateAPIApi(configuration);
let body:.TemplateCenterTemplateAPIApiGetCategoryContentRequest = {
// string | Template Category Code
categoryCode: "tpcEm7VDcbnnr",
};
apiInstance.getCategoryContent(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
| Name | Type | Description | Notes |
|---|---|---|---|
| categoryCode | [string] | Template Category Code | defaults to undefined |
ResponseDataTemplateCategoryContentVo
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]
ResponseDataListTemplateCategoryMenuVo getCategoryList()
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .TemplateCenterTemplateAPIApi(configuration);
let body:any = {};
apiInstance.getCategoryList(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.
ResponseDataListTemplateCategoryMenuVo
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]
ResponseDataListTemplateVo getSpaceTemplates()
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .TemplateCenterTemplateAPIApi(configuration);
let body:.TemplateCenterTemplateAPIApiGetSpaceTemplatesRequest = {
// string
spaceId: "spaceId_example",
// string | Space Id
xSpaceId: "spczJrh2i3tLW",
};
apiInstance.getSpaceTemplates(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
| Name | Type | Description | Notes |
|---|---|---|---|
| spaceId | [string] | defaults to undefined | |
| xSpaceId | [string] | Space Id | defaults to undefined |
ResponseDataListTemplateVo
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]
ResponseDataTemplateSearchResultVo globalSearch()
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .TemplateCenterTemplateAPIApi(configuration);
let body:.TemplateCenterTemplateAPIApiGlobalSearchRequest = {
// string | Search Keyword
keyword: "plan",
// string | Highlight Style Class Name (optional)
className: "highLight",
};
apiInstance.globalSearch(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
| Name | Type | Description | Notes |
|---|---|---|---|
| keyword | [string] | Search Keyword | defaults to undefined |
| className | [string] | Highlight Style Class Name | (optional) defaults to undefined |
ResponseDataTemplateSearchResultVo
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]
ResponseDataNodeInfoVo quote(quoteTemplateRo)
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .TemplateCenterTemplateAPIApi(configuration);
let body:.TemplateCenterTemplateAPIApiQuoteRequest = {
// QuoteTemplateRo
quoteTemplateRo: {
templateId: "tplHTbkg7qbNJ",
parentId: "fodSf4PZBNwut",
data: true,
},
// string | user socket id (optional)
xSocketId: "QkKp9XJEl",
};
apiInstance.quote(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
| Name | Type | Description | Notes |
|---|---|---|---|
| quoteTemplateRo | QuoteTemplateRo | ||
| xSocketId | [string] | user socket id | (optional) defaults to undefined |
ResponseDataNodeInfoVo
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]
ResponseDataRecommendVo recommend()
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .TemplateCenterTemplateAPIApi(configuration);
let body:any = {};
apiInstance.recommend(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.
ResponseDataRecommendVo
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]
ResponseDataBoolean validate()
Called before creating a template, the same name will overwrite the old template. you need to confirm the operation again
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .TemplateCenterTemplateAPIApi(configuration);
let body:.TemplateCenterTemplateAPIApiValidateRequest = {
// string | Template Name
name: "i am template",
// string | Space Id
xSpaceId: "spczJrh2i3tLW",
};
apiInstance.validate(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
| Name | Type | Description | Notes |
|---|---|---|---|
| name | [string] | Template Name | defaults to undefined |
| xSpaceId | [string] | Space Id | defaults to undefined |
ResponseDataBoolean
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]