Getting service response when running async service

I’m new to the API / Services field and am struggling to build our API to expose some data. I can read and send the relevant data as a response using the built-in Data Source field under the Response Data tab but when I’m trying to build a customer response body my service times out as discussed here Error message when running a service: FunctionEvalTimeoutError: Eval timeout - function took too long to execute (>2000ms)

I’m wondering if running the GET request with async might help me but I’m struggling with accessing the data processed on the job. Does anyone have some suggestions on how to access the data processed using the JobID?

Hi, we have had som problems with the same error previously. In our case it was a combination of reading many objects that had function attributes in the object class. We soved it by toggeling off “calculate function properties” on the object class. And implementing a limit, so that the service never reads more than say 1000 objects. Not sure excactly how things are set up for you but our learning was to avoid many objects and functions running on all of them😊

1 Like

Thank you, Sondre.
This seems like the best way of doing it. At the moment we solved it by just sending out all relevant data and doing the data transformation in a Python script rather than doing the transformation as part of a custom response body. Doing it this way doesn’t invoke the timeout (yet)

1 Like