# infoplus.WorkApi All URIs are relative to *https://kingsrook.localhost-testsubdomain1.infopluswms.com:8443/infoplus-wms/api* Method | HTTP request | Description ------------- | ------------- | ------------- [**addWorkAudit**](WorkApi.md#addWorkAudit) | **PUT** /beta/work/{workId}/audit/{workAudit} | Add new audit for a work [**addWorkFile**](WorkApi.md#addWorkFile) | **POST** /beta/work/{workId}/file/{fileName} | Attach a file to a work [**addWorkFileByURL**](WorkApi.md#addWorkFileByURL) | **POST** /beta/work/{workId}/file | Attach a file to a work by URL. [**addWorkTag**](WorkApi.md#addWorkTag) | **PUT** /beta/work/{workId}/tag/{workTag} | Add new tags for a work. [**deleteWorkFile**](WorkApi.md#deleteWorkFile) | **DELETE** /beta/work/{workId}/file/{fileId} | Delete a file for a work. [**deleteWorkTag**](WorkApi.md#deleteWorkTag) | **DELETE** /beta/work/{workId}/tag/{workTag} | Delete a tag for a work. [**getDuplicateWorkById**](WorkApi.md#getDuplicateWorkById) | **GET** /beta/work/duplicate/{workId} | Get a duplicated a work by id [**getWorkByFilter**](WorkApi.md#getWorkByFilter) | **GET** /beta/work/search | Search works by filter [**getWorkById**](WorkApi.md#getWorkById) | **GET** /beta/work/{workId} | Get a work by id [**getWorkFiles**](WorkApi.md#getWorkFiles) | **GET** /beta/work/{workId}/file | Get the files for a work. [**getWorkTags**](WorkApi.md#getWorkTags) | **GET** /beta/work/{workId}/tag | Get the tags for a work. [**updateWork**](WorkApi.md#updateWork) | **PUT** /beta/work | Update a work [**updateWorkCustomFields**](WorkApi.md#updateWorkCustomFields) | **PUT** /beta/work/customFields | Update a work custom fields # **addWorkAudit** > addWorkAudit(workId, workAudit) Add new audit for a work Adds an audit to an existing work. ### Example ```javascript var infoplus = require('infoplus-javascript-client'); var defaultClient = infoplus.ApiClient.instance; // Configure API key authorization: api_key var api_key = defaultClient.authentications['api_key']; api_key.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //api_key.apiKeyPrefix = 'Token'; var apiInstance = new infoplus.WorkApi(); var workId = 56; // Number | Id of the work to add an audit to var workAudit = "workAudit_example"; // String | The audit to add var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully.'); } }; apiInstance.addWorkAudit(workId, workAudit, callback); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **workId** | **Number**| Id of the work to add an audit to | **workAudit** | **String**| The audit to add | ### Return type null (empty response body) ### Authorization [api_key](../README.md#api_key) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **addWorkFile** > addWorkFile(workId, fileName) Attach a file to a work Adds a file to an existing work. ### Example ```javascript var infoplus = require('infoplus-javascript-client'); var defaultClient = infoplus.ApiClient.instance; // Configure API key authorization: api_key var api_key = defaultClient.authentications['api_key']; api_key.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //api_key.apiKeyPrefix = 'Token'; var apiInstance = new infoplus.WorkApi(); var workId = 56; // Number | Id of the work to add a file to var fileName = "fileName_example"; // String | Name of file var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully.'); } }; apiInstance.addWorkFile(workId, fileName, callback); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **workId** | **Number**| Id of the work to add a file to | **fileName** | **String**| Name of file | ### Return type null (empty response body) ### Authorization [api_key](../README.md#api_key) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **addWorkFileByURL** > addWorkFileByURL(body, workId) Attach a file to a work by URL. Adds a file to an existing work by URL. ### Example ```javascript var infoplus = require('infoplus-javascript-client'); var defaultClient = infoplus.ApiClient.instance; // Configure API key authorization: api_key var api_key = defaultClient.authentications['api_key']; api_key.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //api_key.apiKeyPrefix = 'Token'; var apiInstance = new infoplus.WorkApi(); var body = new infoplus.RecordFile(); // RecordFile | The url and optionly fileName to be used. var workId = 56; // Number | Id of the work to add an file to var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully.'); } }; apiInstance.addWorkFileByURL(body, workId, callback); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**RecordFile**](RecordFile.md)| The url and optionly fileName to be used. | **workId** | **Number**| Id of the work to add an file to | ### Return type null (empty response body) ### Authorization [api_key](../README.md#api_key) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **addWorkTag** > addWorkTag(workId, workTag) Add new tags for a work. Adds a tag to an existing work. ### Example ```javascript var infoplus = require('infoplus-javascript-client'); var defaultClient = infoplus.ApiClient.instance; // Configure API key authorization: api_key var api_key = defaultClient.authentications['api_key']; api_key.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //api_key.apiKeyPrefix = 'Token'; var apiInstance = new infoplus.WorkApi(); var workId = 56; // Number | Id of the work to add a tag to var workTag = "workTag_example"; // String | The tag to add var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully.'); } }; apiInstance.addWorkTag(workId, workTag, callback); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **workId** | **Number**| Id of the work to add a tag to | **workTag** | **String**| The tag to add | ### Return type null (empty response body) ### Authorization [api_key](../README.md#api_key) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **deleteWorkFile** > deleteWorkFile(workId, fileId) Delete a file for a work. Deletes an existing work file using the specified data. ### Example ```javascript var infoplus = require('infoplus-javascript-client'); var defaultClient = infoplus.ApiClient.instance; // Configure API key authorization: api_key var api_key = defaultClient.authentications['api_key']; api_key.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //api_key.apiKeyPrefix = 'Token'; var apiInstance = new infoplus.WorkApi(); var workId = 56; // Number | Id of the work to remove file from var fileId = 56; // Number | Id of the file to delete var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully.'); } }; apiInstance.deleteWorkFile(workId, fileId, callback); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **workId** | **Number**| Id of the work to remove file from | **fileId** | **Number**| Id of the file to delete | ### Return type null (empty response body) ### Authorization [api_key](../README.md#api_key) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **deleteWorkTag** > deleteWorkTag(workId, workTag) Delete a tag for a work. Deletes an existing work tag using the specified data. ### Example ```javascript var infoplus = require('infoplus-javascript-client'); var defaultClient = infoplus.ApiClient.instance; // Configure API key authorization: api_key var api_key = defaultClient.authentications['api_key']; api_key.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //api_key.apiKeyPrefix = 'Token'; var apiInstance = new infoplus.WorkApi(); var workId = 56; // Number | Id of the work to remove tag from var workTag = "workTag_example"; // String | The tag to delete var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully.'); } }; apiInstance.deleteWorkTag(workId, workTag, callback); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **workId** | **Number**| Id of the work to remove tag from | **workTag** | **String**| The tag to delete | ### Return type null (empty response body) ### Authorization [api_key](../README.md#api_key) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **getDuplicateWorkById** > Work getDuplicateWorkById(workId) Get a duplicated a work by id Returns a duplicated work identified by the specified id. ### Example ```javascript var infoplus = require('infoplus-javascript-client'); var defaultClient = infoplus.ApiClient.instance; // Configure API key authorization: api_key var api_key = defaultClient.authentications['api_key']; api_key.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //api_key.apiKeyPrefix = 'Token'; var apiInstance = new infoplus.WorkApi(); var workId = 56; // Number | Id of the work to be duplicated. var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully. Returned data: ' + data); } }; apiInstance.getDuplicateWorkById(workId, callback); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **workId** | **Number**| Id of the work to be duplicated. | ### Return type [**Work**](Work.md) ### Authorization [api_key](../README.md#api_key) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **getWorkByFilter** > [Work] getWorkByFilter(opts) Search works by filter Returns the list of works that match the given filter. ### Example ```javascript var infoplus = require('infoplus-javascript-client'); var defaultClient = infoplus.ApiClient.instance; // Configure API key authorization: api_key var api_key = defaultClient.authentications['api_key']; api_key.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //api_key.apiKeyPrefix = 'Token'; var apiInstance = new infoplus.WorkApi(); var opts = { 'filter': "filter_example", // String | Query string, used to filter results. 'page': 56, // Number | Result page number. Defaults to 1. 'limit': 56, // Number | Maximum results per page. Defaults to 20. Max allowed value is 250. 'sort': "sort_example" // String | Sort results by specified field. }; var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully. Returned data: ' + data); } }; apiInstance.getWorkByFilter(opts, callback); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **filter** | **String**| Query string, used to filter results. | [optional] **page** | **Number**| Result page number. Defaults to 1. | [optional] **limit** | **Number**| Maximum results per page. Defaults to 20. Max allowed value is 250. | [optional] **sort** | **String**| Sort results by specified field. | [optional] ### Return type [**[Work]**](Work.md) ### Authorization [api_key](../README.md#api_key) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **getWorkById** > Work getWorkById(workId) Get a work by id Returns the work identified by the specified id. ### Example ```javascript var infoplus = require('infoplus-javascript-client'); var defaultClient = infoplus.ApiClient.instance; // Configure API key authorization: api_key var api_key = defaultClient.authentications['api_key']; api_key.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //api_key.apiKeyPrefix = 'Token'; var apiInstance = new infoplus.WorkApi(); var workId = 56; // Number | Id of the work to be returned. var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully. Returned data: ' + data); } }; apiInstance.getWorkById(workId, callback); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **workId** | **Number**| Id of the work to be returned. | ### Return type [**Work**](Work.md) ### Authorization [api_key](../README.md#api_key) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **getWorkFiles** > getWorkFiles(workId) Get the files for a work. Get all existing work files. ### Example ```javascript var infoplus = require('infoplus-javascript-client'); var defaultClient = infoplus.ApiClient.instance; // Configure API key authorization: api_key var api_key = defaultClient.authentications['api_key']; api_key.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //api_key.apiKeyPrefix = 'Token'; var apiInstance = new infoplus.WorkApi(); var workId = 56; // Number | Id of the work to get files for var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully.'); } }; apiInstance.getWorkFiles(workId, callback); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **workId** | **Number**| Id of the work to get files for | ### Return type null (empty response body) ### Authorization [api_key](../README.md#api_key) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **getWorkTags** > getWorkTags(workId) Get the tags for a work. Get all existing work tags. ### Example ```javascript var infoplus = require('infoplus-javascript-client'); var defaultClient = infoplus.ApiClient.instance; // Configure API key authorization: api_key var api_key = defaultClient.authentications['api_key']; api_key.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //api_key.apiKeyPrefix = 'Token'; var apiInstance = new infoplus.WorkApi(); var workId = 56; // Number | Id of the work to get tags for var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully.'); } }; apiInstance.getWorkTags(workId, callback); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **workId** | **Number**| Id of the work to get tags for | ### Return type null (empty response body) ### Authorization [api_key](../README.md#api_key) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **updateWork** > updateWork(body) Update a work Updates an existing work using the specified data. ### Example ```javascript var infoplus = require('infoplus-javascript-client'); var defaultClient = infoplus.ApiClient.instance; // Configure API key authorization: api_key var api_key = defaultClient.authentications['api_key']; api_key.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //api_key.apiKeyPrefix = 'Token'; var apiInstance = new infoplus.WorkApi(); var body = new infoplus.Work(); // Work | Work to be updated. var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully.'); } }; apiInstance.updateWork(body, callback); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**Work**](Work.md)| Work to be updated. | ### Return type null (empty response body) ### Authorization [api_key](../README.md#api_key) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **updateWorkCustomFields** > updateWorkCustomFields(body) Update a work custom fields Updates an existing work custom fields using the specified data. ### Example ```javascript var infoplus = require('infoplus-javascript-client'); var defaultClient = infoplus.ApiClient.instance; // Configure API key authorization: api_key var api_key = defaultClient.authentications['api_key']; api_key.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //api_key.apiKeyPrefix = 'Token'; var apiInstance = new infoplus.WorkApi(); var body = new infoplus.Work(); // Work | Work to be updated. var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully.'); } }; apiInstance.updateWorkCustomFields(body, callback); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**Work**](Work.md)| Work to be updated. | ### Return type null (empty response body) ### Authorization [api_key](../README.md#api_key) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json