How to send a long HTML body in a cURL request to create or update a wiki page

Hi, I am trying to use the API to post HTML in a wiki page using cURL. This works fine:

curl -H "Rest-User-Token: <mytoken>" -H "Rest-Method: PUT" -d "Body=text" -X POST https://<mysite>/api.ashx/v2/wikis/8/pages/207.xml

But when the HTML body is long, this error is returned: Argument list too long

I would expect something like this to work:

curl -H "Rest-User-Token: <mytoken>" -H "Content-Type: multipart/form-data" -H "Rest-Method: PUT" -d body=@html.html -X POST https://<mysite>/api.ashx/v2/wikis/8/pages/207.xml

But it simply posts the literal text @html.html on the wiki page.

Does anyone know how to send a long HTML body to the Telligent wiki with a cURL request?

Thank you for any help.

Top Replies

Parents Reply
  • Thank you Ben Tiedt.

    Unfortunately the script still fails to post anything but the string @file.html on the page.

    We were on Jive/Aurea and had no limitations on length that I ever experienced - 

    curl -X PUT -u username:password -H "Content-Type: application/json" -H "Accept: application/json" -H "Cache-Control: no-cache" -d @"file.json" "https://<my site>/api/core/v3/contents/ID"

    (file.json had the html)

Children