Updating redmine problem logs through the Rest API

I need to create new notes in existing Redmine issues. It is better that this can be accomplished using the Rest API, but I am open to other solutions.

In some parts of the document this seems possible , but in others it is written (soon), as if it were not implemented in a stream.

I found this message asking the same, but without an answer.

I already tried this and appeared in the log:

Handling problems Controller # update for json (for 127.0.0.1 on 2012-01-12 16:07:03) [PUT] Parameters: {"format" => "json", "action" => "update", "id" => "8", "controller" => "issues"} Completed in 34 ms (view: 0, DB: 4) | 200 OK [http: //localhost/issues/8.json]

But it is not updated. I use this command to make a request

curl -v -H "Content-Type:text.json" -X PUT --data "@/tmp/8.json" -u admin:admin http://localhost:3000/issues/8.json 

and 8.json content:

 { "issue": { "subject": "subject123", "notes":"funciona el rest" } } 

What annoys me is that I use port 3000, but it seems to be ignored in the log response.

+4
source share
1 answer

This JSON should work. You do not want to work with the magazines themselves, you want to update the problem and add a new note. This way Redmine will create a magazine for you.

Is the topic updated? Do you have REST API enabled? Is an administrator account allowed to update this problem?

You can also try posting notes outside the problem object:

 { "issue": { "subject": "subject123" }, "notes":"funciona el rest" } 
+2
source

Source: https://habr.com/ru/post/1390671/


All Articles