3

I need to get a list of all columns in one request and manual states that I should pass query string parameter:

Most index endpoints default to a page size of 100 results. If you need all results at once, you should specify the includeAll=true query string parameter.

Here is that I tried:

var options = {
    sheetId: 2252168947361668,
    includeAll: true
};

smartsheet.sheets.getColumns(options)
    .then(function (data) {
        console.log(data);
    })
    .catch(function (error) {
        console.log(error);
    });

But it returns me only first 100 columns. How should I pass query string parameters to smartsheet-api from node.js?

untitled
  • 1,037
  • 2
  • 12
  • 27

1 Answers1

5

The includeAll parameter is a query string parameter so it must be included in the queryParameters object. The following should work for you:

var options = {
    sheetId: 2252168947361668,
    queryParameters: {
      includeAll: true
    }
};

smartsheet.sheets.getColumns(options)
    .then(function (data) {
        console.log(data);
    })
    .catch(function (error) {
        console.log(error);
    });
Brett
  • 2,502
  • 19
  • 30