•  
      request #13368 EndPoint POST /projects return html content instead of json content
    Infos
    #13368
    David ROGER (droger)
    2019-05-16 14:11
    2019-05-08 18:40
    14115
    Details
    EndPoint POST /projects return html content instead of json content
    The endpoint POST /projects used to create a new project return a html content body instead of json content.
    Also response content-type is set to text/html instead of application/json
    API (SOAP|REST)
    11.0
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Thomas Gerbet (tgerbet)
    Closed
    2019-05-16
    Attachments
    result of creation project
    References

    Follow-ups

    • User avatar
      Joris MASSON (jmasson)2019-05-16 14:11
      • Status changed from Under review to Closed
      • Connected artifacts
      • Close date set to 2019-05-16
    • User avatar
      Joris MASSON (jmasson)2019-05-16 14:10
      gerrit #14980 integrated into Tuleap 11.1.99.78
    • User avatar
      Thomas Gerbet (tgerbet)2019-05-16 12:02
      Lowering the severity since the endpoint works as expected when correct information are given.
    • User avatar
      Thomas Gerbet (tgerbet)2019-05-16 11:00
      • Status changed from Under implementation to Under review
    • User avatar
      Thomas Gerbet (tgerbet)2019-05-16 10:59
      Fix can be reviewed here: gerrit #14980.
    • User avatar
      Thomas Gerbet (tgerbet)2019-05-16 09:54
      Issue is triggered when an invalid project ID is used for the template ID.
    • User avatar
      Thomas Gerbet (tgerbet)2019-05-16 08:51
      Thanks, got it.

      I confirm the issue and working on a fix.

      • Status changed from Waiting for information to Under implementation
      • Assigned to changed from None to Thomas Gerbet (tgerbet)
    • User avatar
      David ROGER (droger)2019-05-15 19:34
      Hi,

      I use a simple request as a example in the API explorer.
      curl -k -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -u user:password -d '{"shortname":"mynewproject", "description":"test of creation of project", "label":"mylabel", "is_public":true, "template_id":0}' 'https://localhost/api/projects'

      But I hit an API endpoint because my project was create without any error.

      I work with the docker image from the dockerhub, the complete tuleap version is: 11.0.99.11.
    • User avatar
      Thomas Gerbet (tgerbet)2019-05-15 08:48
      Hi,

      Can you please tell us/show us how you try to use the API.
      It's a bit weird, it's almost like if you weren't hitting an API endpoint.
    • User avatar
      David ROGER (droger)2019-05-09 18:56
      Hello,
      I attach the html content to this artifact. I hope this could help you.
      I notice that I have the same behavior on the Api explorer.
      But on the Api explorer they have also a bad header: 'Accept: text/html' on the request.
    • User avatar
      David ROGER (droger)2019-05-09 18:50
    • User avatar
      Thomas Gerbet (tgerbet)2019-05-09 08:45
      Hello,

      I'm not able to reproduce the issue.

      Can you post the HTML content you are getting back from the API, it might help troubleshooting what's going on.

      • Status changed from New to Waiting for information