Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCU-2231

DOC: properties endpoint throws 400 for every POST request

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • Minor
    • None
    • None
    • None
    • None
    • Yes

    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.

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                mdrapela Martin DrĂ¡pela
                rgange Richard Gange
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Task DoR