I am trying to return all records from one object ...
# suitescript
m
I am trying to return all records from one object from suitescript? and want to pass object name dynamically to suite script. Any help pls?
b
closest you get to that is using N/query and query.runSuiteQLPaged
you can choose the sql for your query
you can do much the same thing with with the suitetalk rest api
m
can you pls provide the steps/details for suitetalk rest api
m
I am trying to call netsuite rest api in postman like https://xxx.suitetalk.api.netsuite.com/services/rest/record/v1/customer can you help me to understand what/how the security things should be passed. I have already add role and authorization for api access.
there is an example collection and environment that it will guide you through
alternatively you will be using the OAuth 1 Auth type
m
I have provided full access to my role
but still not able to open https://<accountID>.app.netsuite.com/app/external/integration/integrationDownloadPage.nl
the blue note
m
everytime I am trying to download the mentioned environemtn file It says An unexpected error has occurred. Please go back and try again.
thats really irritating. All did all the steps mentioned https://stackoverflow.com/questions/58924460/where-is-the-netsuite-webservices-postman-collection but https://[accountID].app.netsuite.com/app/external/integration/integrationDownloadPage.nl is not working says ''An unexpected error has occurred. Please go back and try again."
Am I skipping anything?
?
b
what does your download page look like
m
message has been deleted
b
the page before that
m
message has been deleted
thats the page when I paste the https://xxxx.app.netsuite.com/app/external/integration/integrationDownloadPage.nl in browser and considering I am already login as admin in netsuite
b
your account appears broken
you probably want to submit a support case to netsuite
1
while you are waiting, you can learn how to setup oauth 1 in postman
m
ah
do you have the oauth1 postman URL handy?
b
m
sure I will further test it in the meantime
I got the environment and collection file downloaded and working on authentication side.
thanks for this
This was for postman if I want to call rest api let's say in python how will I pass this all params, is there any example for that?
Let me explain the use case also, so you can suggest me the best way
I need to write code in python where I need to call each netsuite object/table individually get all records in loop . lets say there are 150+ objects(Account, etc..), each object in loop need to get all records in respective objects and return the result as json
b
general answer is find your favorite http client, combine it with a library that does oauth 1 authentication
copy whatever request you make in postman
alternatively, you may be able to use a library that supports openapi 3, and use the metadata from the rest api to generate a client.