Create Project Using REST API with JSON

I am trying to create a project using the REST API by performing a POST with some JSON and am getting back an error code of 405 every time. Here is the exact error I am receiving: Expected status code in (200-299), got 405


Here is my JSON that I am sendingin the body with a POST (prettied up to be readable):

{

  "newProjectDescription" : {

    "name" : "Testing This"

  }

}

I went through and double checked this versus the JSON structure that comes from the XSD and WADL file, but it appears this just doesn't want to work.

Does anybody see any obvious issues with it?

Cheers!

2 comments
Comment actions Permalink

I should also state that I am performing the POST to this URL: http://localhost:8111/httpAuth/app/rest/projects/createProject

I am sending the username/password combo as well with all the other HTTP headers using default values.

0
Comment actions Permalink

It knows you are trying to create a new project already by simply POST'ing to the correct url. Skip the outer dictionary and it'll work.


ie, just send

{"name" : "Testing This"}

0

Please sign in to leave a comment.