OpenRefineAPI POST 'apply-operations' with response Error 500 "content is null"

51 views
Skip to first unread message

Michael Markert

unread,
Aug 9, 2022, 3:18:54 AM8/9/22
to OpenRefine
Dear all,

I am trying to get a response from a project using the OpenRefineAPI (3.6) and I am struggling with POST /command/core/apply-operations? as I always get the response

"HTTP ERROR 500 java.lang.IllegalArgumentException: argument "content" is null"

Everything else so far is working like POST /command/core/delete-project 
Likely, there is a problem with my POST body. Here is the code I am using:

curl -i -X POST \
   -H "Content-Type:application/json" \
   -d \
'"operations":[{"op":"core/text-transform","engineConfig":{"facets":[],"mode":"row-based"},"columnName":"Column 1","expression":"grel:value+value","onError":"keep-original","repeat":false,"repeatCount":10,"description":"Text transform on cells in column Column 1 using expression grel:value+value"}]' \

Any ideas what I am doing wrong?

Kind regards,
Michael

Felix Lohmeier

unread,
Aug 9, 2022, 3:48:38 AM8/9/22
to OpenRefine
Dear Michael,

I guess that the cURL option --data-urlencode instead of -d might help (cf. https://everything.curl.dev/http/post/url-encode).

Here is a template of how it works for me:

Best wishes,
Felix
Reply all
Reply to author
Forward
0 new messages