DocdokuPlmApi.RolesApi

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

Method HTTP request Description
createRole POST /workspaces/{workspaceId}/roles Create a new role
deleteRole DELETE /workspaces/{workspaceId}/roles/{roleName} Delete a role
getRolesInUseInWorkspace GET /workspaces/{workspaceId}/roles/inuse Get roles in use in given workspace
getRolesInWorkspace GET /workspaces/{workspaceId}/roles Get roles in given workspace
updateRole PUT /workspaces/{workspaceId}/roles/{roleName} Update a role

createRole

RoleDTO createRole(workspaceId, body)

Create a new role

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.RolesApi();

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

var body = new DocdokuPlmApi.RoleDTO(); // RoleDTO | Role to create


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

Parameters

Name Type Description Notes
workspaceId String Workspace id
body RoleDTO Role to create

Return type

RoleDTO

Authorization

authorization

HTTP request headers

deleteRole

deleteRole(workspaceId, roleName)

Delete a role

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.RolesApi();

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

var roleName = "roleName_example"; // String | Role name


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

Parameters

Name Type Description Notes
workspaceId String Workspace id
roleName String Role name

Return type

null (empty response body)

Authorization

authorization

HTTP request headers

getRolesInUseInWorkspace

[RoleDTO] getRolesInUseInWorkspace(workspaceId)

Get roles in use in given workspace

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.RolesApi();

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.getRolesInUseInWorkspace(workspaceId, callback);

Parameters

Name Type Description Notes
workspaceId String Workspace id

Return type

[RoleDTO]

Authorization

authorization

HTTP request headers

getRolesInWorkspace

[RoleDTO] getRolesInWorkspace(workspaceId)

Get roles in given workspace

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.RolesApi();

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.getRolesInWorkspace(workspaceId, callback);

Parameters

Name Type Description Notes
workspaceId String Workspace id

Return type

[RoleDTO]

Authorization

authorization

HTTP request headers

updateRole

RoleDTO updateRole(workspaceId, roleName, body)

Update a role

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.RolesApi();

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

var roleName = "roleName_example"; // String | Role name

var body = new DocdokuPlmApi.RoleDTO(); // RoleDTO | Role to update


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

Parameters

Name Type Description Notes
workspaceId String Workspace id
roleName String Role name
body RoleDTO Role to update

Return type

RoleDTO

Authorization

authorization

HTTP request headers