alfresco-js-api icon indicating copy to clipboard operation
alfresco-js-api copied to clipboard

NodesApi.getTargetAssociations() does not support pagination parameters

Open stefanFCB94 opened this issue 6 years ago • 0 comments

Type of issue:

- [ ] New feature request
- [x] Bug  
- [ ] Support request

Current behavior:

The function getTargetAssociations of the nodes API does not accept the parameters maxItems and skipCount to control how many entries are returned. The Alfresco Content Services API supports both parameters.

This does not work at the moment:

this.alfrescoApiService.nodesApi.getTargetAssociations('nodeId', { skipCount: 10, maxItems: 5 });

Workaround:

const options = {
  skipCount: 10,
  maxItems: 5
};

this.alfrescoApiService.getInstance().ecmClient.callApi(
  `/nodes/${nodeId}/targets`, 'GET', {}, options, {}, {}, null, ['basicAuth'],
  ['application/json'], ['application/json'], Object
);

Expected behavior: The parameters skipCount and maxItems should be supported

stefanFCB94 avatar Jan 09 '19 11:01 stefanFCB94