Create project api

Hi

We have been using your new API for a while now for creating issues, updating and removing without any problem in Golang. We have managed to generate the API well with the open API generator.

Now we also want to create projects via this API, but unfortunately this is not going as expected. In the example on your page (with curl) I see that only a small number of fields would be necessary such as name, shortname, description and leader. However, when I take over this in Golang, I get a 400 bad request message back.

I call the code like this:
``
records, resp, err = youtrack.client.DefaultApi.
AdminProjectsPost (youtrack.ctx).
Fields ("id, shortName, name, leader (id, login, name)").
Project (project).
Template ("").
Execute ()
``

The Project is set with a new created project, this new created project has a name, shortname, description and a leader set.
What am I doing wrong in this situation.

Thank you for helping out.

 

1 comment
Comment actions Permalink

Hello Danny,

Apologies for the delayed response. You can create a request to our support directly at https://jbs.zendesk.com/hc/en-us/requests/new to receive an answer faster.

Name, shortname, description, and leader fields are sufficient enough for the project creation. The error 400 means some syntax error, so most probably, you are specifying an incorrect leader ID, please re-check that.

0

Please sign in to leave a comment.