Back to Apitable

.TemplateCenterTemplateAPIApi

packages/api-client/TemplateCenterTemplateAPIApi.md

1.13.0-beta.114.7 KB
Original Source

.TemplateCenterTemplateAPIApi

All URIs are relative to http://backend/api/v1

MethodHTTP requestDescription
createPOST /template/createCreate Template
delete5DELETE /template/delete/{templateId}Delete Template
directoryGET /template/directoryGet Template Directory Info
getCategoryContentGET /template/categories/{categoryCode}Get The Template Category Content
getCategoryListGET /template/categoryListGet Template Category List
getSpaceTemplatesGET /spaces/{spaceId}/templatesGet Space Templates
globalSearchGET /template/global/searchTemplate Global Search
quotePOST /template/quoteQuote Template
recommendGET /template/recommendGet Template Recommend Content
validateGET /template/validateCheck if the template name already exists

create

ResponseDataString create(createTemplateRo)

Created nodes (including child descendant nodes) have administrative rights and are not associated with data tables other than nodes.

Example

typescript
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));

Parameters

NameTypeDescriptionNotes
createTemplateRoCreateTemplateRo

Return type

ResponseDataString

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: /

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete5

ResponseDataVoid delete5()

Deletion objects: main administrator, sub-admins with template permissions, creator of the template

Example

typescript
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));

Parameters

NameTypeDescriptionNotes
templateId[string]Template IDdefaults to undefined

Return type

ResponseDataVoid

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

directory

ResponseDataTemplateDirectoryVo directory()

Example

typescript
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));

Parameters

NameTypeDescriptionNotes
templateId[string]Template Iddefaults 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

Return type

ResponseDataTemplateDirectoryVo

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getCategoryContent

ResponseDataTemplateCategoryContentVo getCategoryContent()

Example

typescript
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));

Parameters

NameTypeDescriptionNotes
categoryCode[string]Template Category Codedefaults to undefined

Return type

ResponseDataTemplateCategoryContentVo

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getCategoryList

ResponseDataListTemplateCategoryMenuVo getCategoryList()

Example

typescript
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));

Parameters

This endpoint does not need any parameter.

Return type

ResponseDataListTemplateCategoryMenuVo

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getSpaceTemplates

ResponseDataListTemplateVo getSpaceTemplates()

Example

typescript
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));

Parameters

NameTypeDescriptionNotes
spaceId[string]defaults to undefined
xSpaceId[string]Space Iddefaults to undefined

Return type

ResponseDataListTemplateVo

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

globalSearch

ResponseDataTemplateSearchResultVo globalSearch()

Example

typescript
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));

Parameters

NameTypeDescriptionNotes
keyword[string]Search Keyworddefaults to undefined
className[string]Highlight Style Class Name(optional) defaults to undefined

Return type

ResponseDataTemplateSearchResultVo

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

quote

ResponseDataNodeInfoVo quote(quoteTemplateRo)

Example

typescript
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));

Parameters

NameTypeDescriptionNotes
quoteTemplateRoQuoteTemplateRo
xSocketId[string]user socket id(optional) defaults to undefined

Return type

ResponseDataNodeInfoVo

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: /

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

recommend

ResponseDataRecommendVo recommend()

Example

typescript
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));

Parameters

This endpoint does not need any parameter.

Return type

ResponseDataRecommendVo

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

validate

ResponseDataBoolean validate()

Called before creating a template, the same name will overwrite the old template. you need to confirm the operation again

Example

typescript
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));

Parameters

NameTypeDescriptionNotes
name[string]Template Namedefaults to undefined
xSpaceId[string]Space Iddefaults to undefined

Return type

ResponseDataBoolean

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-

[Back to top] [Back to API list] [Back to Model list] [Back to README]