DocdokuPlmApi.DocumentTemplatesApi

All URIs are relative to http://docdokuplm.net/eplmp-server-rest/api

Method HTTP request Description
createDocumentMasterTemplate POST /workspaces/{workspaceId}/document-templates Create a new document template
deleteDocumentMasterTemplate DELETE /workspaces/{workspaceId}/document-templates/{templateId} Delete document template
generateDocumentMasterId GET /workspaces/{workspaceId}/document-templates/{templateId}/generate_id Generate document template id
getDocumentMasterTemplate GET /workspaces/{workspaceId}/document-templates/{templateId} Get document template by id
getDocumentMasterTemplates GET /workspaces/{workspaceId}/document-templates Get document templates
removeAttachedFileFromDocumentTemplate DELETE /workspaces/{workspaceId}/document-templates/{templateId}/files/{fileName} Remove attached file from document template
renameAttachedFileInDocumentTemplate PUT /workspaces/{workspaceId}/document-templates/{templateId}/files/{fileName} Rename attached file in document template
updateDocumentMasterTemplate PUT /workspaces/{workspaceId}/document-templates/{templateId} Update document template
updateDocumentMasterTemplateACL PUT /workspaces/{workspaceId}/document-templates/{templateId}/acl Update document template ACL

createDocumentMasterTemplate

DocumentMasterTemplateDTO createDocumentMasterTemplate(workspaceId, body)

Create a new document template

Example

var DocdokuPlmApi = require('docdoku-plm-api');
var defaultClient = DocdokuPlmApi.ApiClient.instance;

// Configure API key authorization: authorization
var authorization = defaultClient.authentications['authorization'];
authorization.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//authorization.apiKeyPrefix = 'Token';

var apiInstance = new DocdokuPlmApi.DocumentTemplatesApi();

var workspaceId = "workspaceId_example"; // String | Workspace id

var body = new DocdokuPlmApi.DocumentTemplateCreationDTO(); // DocumentTemplateCreationDTO | Document master template to create


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.createDocumentMasterTemplate(workspaceId, body, callback);

Parameters

Name Type Description Notes
workspaceId String Workspace id
body DocumentTemplateCreationDTO Document master template to create

Return type

DocumentMasterTemplateDTO

Authorization

authorization

HTTP request headers

deleteDocumentMasterTemplate

deleteDocumentMasterTemplate(workspaceId, templateId)

Delete document template

Example

var DocdokuPlmApi = require('docdoku-plm-api');
var defaultClient = DocdokuPlmApi.ApiClient.instance;

// Configure API key authorization: authorization
var authorization = defaultClient.authentications['authorization'];
authorization.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//authorization.apiKeyPrefix = 'Token';

var apiInstance = new DocdokuPlmApi.DocumentTemplatesApi();

var workspaceId = "workspaceId_example"; // String | Workspace id

var templateId = "templateId_example"; // String | Template id


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.deleteDocumentMasterTemplate(workspaceId, templateId, callback);

Parameters

Name Type Description Notes
workspaceId String Workspace id
templateId String Template id

Return type

null (empty response body)

Authorization

authorization

HTTP request headers

generateDocumentMasterId

TemplateGeneratedIdDTO generateDocumentMasterId(workspaceId, templateId)

Generate document template id

Example

var DocdokuPlmApi = require('docdoku-plm-api');
var defaultClient = DocdokuPlmApi.ApiClient.instance;

// Configure API key authorization: authorization
var authorization = defaultClient.authentications['authorization'];
authorization.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//authorization.apiKeyPrefix = 'Token';

var apiInstance = new DocdokuPlmApi.DocumentTemplatesApi();

var workspaceId = "workspaceId_example"; // String | Workspace id

var templateId = "templateId_example"; // String | Template id


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.generateDocumentMasterId(workspaceId, templateId, callback);

Parameters

Name Type Description Notes
workspaceId String Workspace id
templateId String Template id

Return type

TemplateGeneratedIdDTO

Authorization

authorization

HTTP request headers

getDocumentMasterTemplate

DocumentMasterTemplateDTO getDocumentMasterTemplate(workspaceId, templateId)

Get document template by id

Example

var DocdokuPlmApi = require('docdoku-plm-api');
var defaultClient = DocdokuPlmApi.ApiClient.instance;

// Configure API key authorization: authorization
var authorization = defaultClient.authentications['authorization'];
authorization.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//authorization.apiKeyPrefix = 'Token';

var apiInstance = new DocdokuPlmApi.DocumentTemplatesApi();

var workspaceId = "workspaceId_example"; // String | Workspace id

var templateId = "templateId_example"; // String | Template id


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getDocumentMasterTemplate(workspaceId, templateId, callback);

Parameters

Name Type Description Notes
workspaceId String Workspace id
templateId String Template id

Return type

DocumentMasterTemplateDTO

Authorization

authorization

HTTP request headers

getDocumentMasterTemplates

[DocumentMasterTemplateDTO] getDocumentMasterTemplates(workspaceId)

Get document templates

Example

var DocdokuPlmApi = require('docdoku-plm-api');
var defaultClient = DocdokuPlmApi.ApiClient.instance;

// Configure API key authorization: authorization
var authorization = defaultClient.authentications['authorization'];
authorization.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//authorization.apiKeyPrefix = 'Token';

var apiInstance = new DocdokuPlmApi.DocumentTemplatesApi();

var workspaceId = "workspaceId_example"; // String | Workspace id


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getDocumentMasterTemplates(workspaceId, callback);

Parameters

Name Type Description Notes
workspaceId String Workspace id

Return type

[DocumentMasterTemplateDTO]

Authorization

authorization

HTTP request headers

removeAttachedFileFromDocumentTemplate

removeAttachedFileFromDocumentTemplate(workspaceId, templateId, fileName)

Remove attached file from document template

Example

var DocdokuPlmApi = require('docdoku-plm-api');
var defaultClient = DocdokuPlmApi.ApiClient.instance;

// Configure API key authorization: authorization
var authorization = defaultClient.authentications['authorization'];
authorization.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//authorization.apiKeyPrefix = 'Token';

var apiInstance = new DocdokuPlmApi.DocumentTemplatesApi();

var workspaceId = "workspaceId_example"; // String | Workspace id

var templateId = "templateId_example"; // String | Template id

var fileName = "fileName_example"; // String | File name


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.removeAttachedFileFromDocumentTemplate(workspaceId, templateId, fileName, callback);

Parameters

Name Type Description Notes
workspaceId String Workspace id
templateId String Template id
fileName String File name

Return type

null (empty response body)

Authorization

authorization

HTTP request headers

renameAttachedFileInDocumentTemplate

FileDTO renameAttachedFileInDocumentTemplate(workspaceId, templateId, fileName, body)

Rename attached file in document template

Example

var DocdokuPlmApi = require('docdoku-plm-api');
var defaultClient = DocdokuPlmApi.ApiClient.instance;

// Configure API key authorization: authorization
var authorization = defaultClient.authentications['authorization'];
authorization.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//authorization.apiKeyPrefix = 'Token';

var apiInstance = new DocdokuPlmApi.DocumentTemplatesApi();

var workspaceId = "workspaceId_example"; // String | Workspace id

var templateId = "templateId_example"; // String | Template id

var fileName = "fileName_example"; // String | File name

var body = new DocdokuPlmApi.FileDTO(); // FileDTO | File to rename


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.renameAttachedFileInDocumentTemplate(workspaceId, templateId, fileName, body, callback);

Parameters

Name Type Description Notes
workspaceId String Workspace id
templateId String Template id
fileName String File name
body FileDTO File to rename

Return type

FileDTO

Authorization

authorization

HTTP request headers

updateDocumentMasterTemplate

DocumentMasterTemplateDTO updateDocumentMasterTemplate(workspaceId, templateId, body)

Update document template

Example

var DocdokuPlmApi = require('docdoku-plm-api');
var defaultClient = DocdokuPlmApi.ApiClient.instance;

// Configure API key authorization: authorization
var authorization = defaultClient.authentications['authorization'];
authorization.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//authorization.apiKeyPrefix = 'Token';

var apiInstance = new DocdokuPlmApi.DocumentTemplatesApi();

var workspaceId = "workspaceId_example"; // String | Workspace id

var templateId = "templateId_example"; // String | Template id

var body = new DocdokuPlmApi.DocumentMasterTemplateDTO(); // DocumentMasterTemplateDTO | Document master template to update


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.updateDocumentMasterTemplate(workspaceId, templateId, body, callback);

Parameters

Name Type Description Notes
workspaceId String Workspace id
templateId String Template id
body DocumentMasterTemplateDTO Document master template to update

Return type

DocumentMasterTemplateDTO

Authorization

authorization

HTTP request headers

updateDocumentMasterTemplateACL

updateDocumentMasterTemplateACL(workspaceId, templateId, body)

Update document template ACL

Example

var DocdokuPlmApi = require('docdoku-plm-api');
var defaultClient = DocdokuPlmApi.ApiClient.instance;

// Configure API key authorization: authorization
var authorization = defaultClient.authentications['authorization'];
authorization.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//authorization.apiKeyPrefix = 'Token';

var apiInstance = new DocdokuPlmApi.DocumentTemplatesApi();

var workspaceId = "workspaceId_example"; // String | Workspace id

var templateId = "templateId_example"; // String | Template id

var body = new DocdokuPlmApi.ACLDTO(); // ACLDTO | ACL rules to set


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.updateDocumentMasterTemplateACL(workspaceId, templateId, body, callback);

Parameters

Name Type Description Notes
workspaceId String Workspace id
templateId String Template id
body ACLDTO ACL rules to set

Return type

null (empty response body)

Authorization

authorization

HTTP request headers