how to provide api access KEY when using POST in REST API
I need to provide api access key when creating issue via HTTP POST request in REST API.
how do I provide it? in the URL?
in HTTP request headers? in the request body together with the issue xml text? somehow else?
I can create issue with basic HTTP authorization (username & password), but need to use api access key.
RE: how to provide api access KEY when using POST in REST API - Added by Chrisitian Noack over 7 years ago
It work, if you have it in the URL, like this:
echo '<issue></issue>' | curl -X PUT -H 'Content-type: text/xml' -H 'Accept: text/xml' -d @- http://localhost:3000/issues/11?format=xml\&key=123456aef3948ef2939
This is just a simple example using curl for a PUT request with almost no payload. This request would UPDATE the issue. Should work with POST also.
thanks. I posted a reply here http://www.redmine.org/boards/2/topics/16260?r=16782