Scott_Jones | 2018-12-06 04:59:19 UTC | #1
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
tim.smith | 2018-12-06 15:25:08 UTC | #2
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
system | 2019-01-06 15:33:48 UTC | #3
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 4122