what is a good way to get around the limitation of...
# ask-stanley-ai
p
what is a good way to get around the limitation of the rest api to only show a list of links when listing records, for example jobs. I can use suiteql, but then I have to either subsequently load the individual rest jobs (100s, 1000s?), or manually clone the suiteql job to a rest job in my programming language. neither seems great.
c
AI generated answer (using internal Slack threads):
Based on the conversations, it seems that using SuiteQL via the REST API is a good way to get around the limitation of the REST API to only show a list of links when listing records. SuiteQL allows you to define the data you need and eliminate the need to iterate through a list to get details of each record. Here's how you can do it: 1. Use SuiteQL to write a query that extracts the information you need. For example, if you're dealing with jobs, you might write a query like
SELECT * FROM Job WHERE ...
and specify the conditions you need. 2. Use the REST API to execute this SuiteQL query. The REST API allows you to execute SuiteQL queries by making a POST request to the
/query/v1/suiteql
endpoint. The body of the request should be a JSON object that contains your SuiteQL query. 3. Process the response from the REST API. The response will be a JSON object that contains the results of your SuiteQL query. You can then use this data as needed in your application. Remember, SuiteQL has a limit of 1000 results per query. If you need to retrieve more than 1000 records, you can use the
offset
parameter in your query to get the next set of results. Also, if you're dealing with large amounts of data, you might run into governance or time limit issues. In such cases, you could consider using a RESTlet, which allows you to add paging to get more than 5000 results. ****** 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.844955266
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.830587924
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.823801
Please provide your feedback on this answer.
p
I think you're wrong bro, suiteql API endpoint does not return the exact same data and types as the rest api, but nice try...