DocdokuPlmApi.WebhookApi

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

Method HTTP request Description
createWebhook POST /workspaces/{workspaceId}/webhooks Create a new webhook in given workspace
deleteWebhook DELETE /workspaces/{workspaceId}/webhooks/{webhookId} Delete a webhook
getWebhook GET /workspaces/{workspaceId}/webhooks/{webhookId} Get webhook by id
getWebhooks GET /workspaces/{workspaceId}/webhooks Get webhooks in given workspace
updateWebhook PUT /workspaces/{workspaceId}/webhooks/{webhookId} Update a webhook

createWebhook

WebhookDTO createWebhook(workspaceId, body)

Create a new webhook 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.WebhookApi();

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

var body = new DocdokuPlmApi.WebhookDTO(); // WebhookDTO | Webhook definition


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

Parameters

Name Type Description Notes
workspaceId String Workspace id
body WebhookDTO Webhook definition

Return type

WebhookDTO

Authorization

authorization

HTTP request headers

deleteWebhook

deleteWebhook(workspaceId, webhookId)

Delete a webhook

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

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

var webhookId = 56; // Number | Webhook id


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

Parameters

Name Type Description Notes
workspaceId String Workspace id
webhookId Number Webhook id

Return type

null (empty response body)

Authorization

authorization

HTTP request headers

getWebhook

WebhookDTO getWebhook(workspaceId, webhookId)

Get webhook 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.WebhookApi();

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

var webhookId = 56; // Number | Webhook id


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

Parameters

Name Type Description Notes
workspaceId String Workspace id
webhookId Number Webhook id

Return type

WebhookDTO

Authorization

authorization

HTTP request headers

getWebhooks

[WebhookDTO] getWebhooks(workspaceId)

Get webhooks 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.WebhookApi();

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

Parameters

Name Type Description Notes
workspaceId String Workspace id

Return type

[WebhookDTO]

Authorization

authorization

HTTP request headers

updateWebhook

WebhookDTO updateWebhook(workspaceId, webhookId, body)

Update a webhook

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

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

var webhookId = 56; // Number | Webhook id

var body = new DocdokuPlmApi.WebhookDTO(); // WebhookDTO | Webhook definition


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

Parameters

Name Type Description Notes
workspaceId String Workspace id
webhookId Number Webhook id
body WebhookDTO Webhook definition

Return type

WebhookDTO

Authorization

authorization

HTTP request headers