Possible issues with the Javascript SDK

I have noticed a couple of inconsistencies with the javascript sdk. For example:
(https://developer.mypurecloud.com/api/rest/v2/architect/index.html)

var api = new platformClient.architectApi();

expand = "";
pageNumber = 1;
pageSize = 25;
sortBy = "id";
sortOrder = "ascending";

api.getFlowsDatatables(expand, pageNumber, pageSize, sortBy, sortOrder).then(...

this example does not appear to recognize the parameters. However if I wrap the params in an object it works:

const api = new platformClient.ArchitectApi();
const opts = {
pageNumber: 1,
pageSize: 100,
sortBy: 'id',
sortOrder: 'descending',
};
api.getFlowsDatatables(opts).then(...

Another example:

var api = new platformClient.architectApi();

datatableId = "";
pageNumber = 1;
pageSize = 25;
showbrief = true;

api.getFlowsDatatableRows(datatableId, pageNumber, pageSize, showbrief).then(...

In this call I had to separate the datatableId and other params. Also I had to send showbrief as a string e.g. 'false'. It did not recognize the boolean otherwise:

const api = new platformClient.ArchitectApi();
const datatableId = 'Some ID";
const opts = {
pageNumber: 1,
pageSize: 100,
showbrief: 'false',
};
api.getFlowsDatatableRows(datatableId, opts).then(...

FYI.

~ Thanks

Please refer to the SDK documentation. Those inline examples are known to be incorrect in a few situations. https://developer.mypurecloud.com/api/rest/client-libraries/javascript/ArchitectApi.html#getFlowsDatatables

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.