[DOCU-2231] DOC: properties endpoint throws 400 for every POST request Created: 01/Nov/17 Updated: 28/Feb/22 Resolved: 25/Feb/22 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Minor |
| Reporter: | Richard Gange | Assignee: | Martin DrĂ¡pela |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Template: |
|
||||||||||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||||||||||
| Task DoR: |
Empty
|
||||||||||||||||||||
| Documentation update required: |
Yes
|
||||||||||||||||||||
| Date of First Response: | |||||||||||||||||||||
| Description |
|
Using the POST for properties endpoint never works as the value array is always empty on the server side. Take the example: curl http://localhost:8080/magnoliaAuthor/.rest/properties/v1/website/travel/title \ -H "Content-Type: application/json" \ -X POST -i \ --user superuser:superuser \ --data \ '{ "value": [ "Magnolia Travels Home " ] }' When I debug the call I see that the bad request comes from: if (!multiple && valueStrings.size() != 1) { return Response.status(Response.Status.BAD_REQUEST).build(); } valueStrings is always of size 0. |
| Comments |
| Comment by Richard Gange [ 17/Mar/20 ] |
|
It should be mentioned that it's possible to workaround this issue by simply using the Nodes endpoint to update properties. |
| Comment by Christopher Chard [ 24/Aug/20 ] |
|
Hi Richard, see https://jira.magnolia-cms.com/browse/SUPPORT-11698 - Nodes endpoint seems to be pretty much disfunctional, so not a real workaround |
| Comment by Richard Gange [ 24/Aug/20 ] |
|
Hello cchard- Sorry, what? This ticket is for one very specific case of the properties endpoint. IMHO this endpoint is redundant anyway. Please see my comment on 11698. The problem there is you did not format your call correctly. Regards |