Post

2 followers Follow
0
Avatar

Creation of discussion post no longer working with API call

I have been using a fairly simple API call to create a discussion in a project and return JSON containing the email address to be used to respond to the initial discussion post. This call is now returning an error.
The JSON for the call is as follows using PUT
{"Container":"/Project/1z9bvrco1x83qhlan8xvpp48u3722","Body":"<p>Hello</p>"}
The container comes from a previous PUSH
{"typeName": "WorkItem","fields": ["SYSID"],"where": {"and": [{"leftExpression":{"fieldName": "SYSID"},"operator": "Equal","rightExpression": {"value": "P-61002"}}]}}
which returns the JSON
{"entities":[{"id":"/Project/1z9bvrco1x83qhlan8xvpp48u3722","SYSID":"P-61002"}],"paging":{"from":1,"limit":100,"hasMore":false}}
The error coming back on the PUT is
<HTML><HEAD>
<TITLE>Bad Request</TITLE>
</HEAD><BODY>
in the DownloadData and
HTTP/1.1 411 Length Required
Server: AkamaiGHost
Mime-Version: 1.0
In the DownloadHeader
Could someone please advise me as to what may have changed in the API and/or what fix needs to be made to the PUT query.
Thanks,
Dan

Daniel Kelly Answered

Official comment

Avatar

Hi Dan,

Can you please share with me the URL you are using to call the API?

 

Thanks

Elad Franklin
Comment actions Permalink

Please sign in to leave a comment.

1 comment