-
Re: Is it possible to update Outcome Type on a Document via v3 REST API?
mattj18 Dec 2, 2019 3:00 PM (in response to gbrettmiller)1 person found this helpfulYes, it is possible. See: Jive REST API v3.14 → Outcome entity
If you know the content id, you make the POST request to the url: https://mycommunity.com/api/core/v3/contents/123456/outcomes
The JSON payload is a simple object of:
{ "outcomeType" : {"id" : 2} }
Where the id is mapped to a specific OutcomeType. There should be a lookup table somewhere. Note: not all OutcomeTypess will work. I recommend checking via the endpoint:https://mycommunity.com/api/core/v3/contents/123456/outcomeTypes . Some example are:
OFFICIAL("8"),
PENDING("3"),
SUCCESS("6"),
FINALIZED("2"),
WIP("9"),
OUTDATED("7");
If you are looking at a content object either by https://mycommunity.com/docs/DOC-123456/api/v3 or https://mycommunity.com/api/core/v3/contents/123456 , the resources object will have the /outcomes URL in it.
-
Re: Is it possible to update Outcome Type on a Document via v3 REST API?
gbrettmiller Dec 3, 2019 3:06 PM (in response to mattj18)Thanks, Matt. That's basically what I was thinking, just wasn't sure of the best endpoint to use, the contentID or the outcomeID. However, ...
... when I try this I am getting a 415 (Unsupported Media Type) error when I run the POST request. As far as I can tell I am passing a properly formatted request. Any thoughts or insights greatly appreciated.
-
Re: Is it possible to update Outcome Type on a Document via v3 REST API?
mattj18 Dec 4, 2019 7:05 AM (in response to gbrettmiller)1 person found this helpful415 error is usually when you forget or erroneously set the "Content-Type" header on the request.
I am using JSON for the payload so it should be something similar to this: "Content-Type", "application/json;charset=utf-8"
-
Re: Is it possible to update Outcome Type on a Document via v3 REST API?
gbrettmiller Dec 4, 2019 12:40 PM (in response to mattj18)That's exactly what it was. Thanks again.
-
-
-
Re: Is it possible to update Outcome Type on a Document via v3 REST API?
gbrettmiller Dec 3, 2019 3:06 PM (in response to mattj18)My issue was, of course, operator error
Thanks again for the insight.
-