sending a body like this: { "q": "SELECT id FROM...
# ask-stanley-ai
l
sending a body like this: { "q": "SELECT id FROM item ORDER BY itemId", "limit": 1000, "offset": 1000 } to the suiteql endpoint results in a 400 error. does the limit have to be inserted in the suiteql query?
c
AI generated answer (using internal Slack threads):
Based on the conversations provided, the
limit
and
offset
parameters do not need to be inserted in the SuiteQL query itself. Instead, they can be added as URL parameters. However, it's important to note that these parameters are part of the base string used to generate the signature for the authorization header. If you're using Token-Based Authentication (TBA), you need to ensure that these parameters are correctly included when generating the signature. Here's an example of how you might structure your request:
Copy code
javascript
fetch('https://<my_account>.<http://suitetalk.api.netsuite.com/services/rest/query/v1/suiteql?limit=1000&offset=1000|suitetalk.api.netsuite.com/services/rest/query/v1/suiteql?limit=1000&offset=1000>', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer ' + token,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "q": "SELECT id FROM item ORDER BY itemId"
  })
})
In this example, the
limit
and
offset
parameters are included in the URL, and the SuiteQL query is included in the body of the POST request. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.858117282
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.843418419
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.828806281
Please provide your feedback on this answer.
Thank you for your feedback