Rest API Server 500 Server Error - /rest/serverengine/entity/datarecords/values

Hi,

So I am getting:

14/02/2025 03:45:44: [2025-02-14 03:45:44] Message: Server error: POST http://192.168.70.19:9340/rest/serverengine/entity/datarecords/values resulted in a 500 Server Error response:
{“error”:{“status”:500,“message”:“Request failed.”,“parameter”:“”}}

When calling the end point.
Mind you I am passing 13000 recordIDs from /rest/serverengine/entity/datasets/{dataSetId}

So Im guessing this is too much for the server to complete the request?

Is there a better way?
Thank you in advanced.

Kind regards,
Ernani

Does the server log have more error details?

I have no idea if the data was too much to handle, but you can test that yourself by making the same request while passing only a small subset of the record ids you sent earlier.

Hi Sander,

It works on smaller sets with no issue.

I have feeling its just the amount.Ive looked abit more on the options/parameters I could be passing and changed it to this:

{
“recordids”: [35415258,35415269 … upto 13K recordIDs],
“recursive”: false,
“outputFormat”: “simplified”
}

This one seems to work as I dont need schema information. I just want the field values.

Guessing it cant handle that amount including extra information:

https://help.uplandsoftware.com/objectiflune/en/olconnect-api/2023.2/Cookbook/Technical_Overview/JSON_Structures/Specific_Structures/JSON_Data_Record_Identifier_List_(with_Parameters).html

Thank you

Hello @edanting,

Given the number of passed record ID’s, this sounds like the same issue as the one reported via the forum post Check Progress of a Job in V2024.2. You may want to test the workaround mentioned for the issue you are facing too.

Hi Marten,

Yes that looks pretty similar to the result Im getting.

Take note that Im already passing “auth_token” when calling this EP http://192.168.70.19:9340/rest/serverengine/entity/datarecords/values

I have added this to the call
setRequestHeader(“Authorization”, “Basic ”);

But in PHP. I have added the work around and still no change. Im still getting the 500 error.

This software is full of surprises. :frowning:

Any other ideas?

Update: The only way for me to get it to work is to restart Connect Service.

Thank you
Kind regards
E

Can you please share the part of your PHP code by which you are setting the extra header?

P.S. Please don’t forget to wrap the code in between three backtick characters (```).

Hi Marten,

Im using guzzle/http

I am thinking that maybe I could just split the request and merge the resulting records into one.

Thank you

Hi @edanting,

I did a quick test myself passing recordids: Array(30000).fill(2770513) where 2770513 is an arbitrary record id, but that did not error out and produced the expected result. Perhaps the record I used was too simplistic.

Can you please try passing optimized: true? Limitations: this only processes unique ids, and the entries in the response are always in ascending order.

I’m not sure why the “optimized” option is not mentioned in our REST API documentation, but it is an official feature that is used by Workflow (see the “Optimized” checkbox in the Retrieve Items task).

Hi Sander,

Will try. Although I have resolved the issue once again by just chunking the request.
And it hasnt errored since.

Thanks so much!
Kind regards,
Ernani