Most of the time,the API requires authentication. To enable the API-style authentication,you have to check Enable REST API in administration -> Settings -> Authentication.
Then,authentication can be done in 2 different ways:
using your regular login/password via http Basic authentication.
using your API key which is a handy way to avoID putting a password in a script.
The API key may be attached to each request in one of the following way:
passed in as a “key” parameter
passed in as a username with a random password via http Basic authentication
passed in as a “X-Redmine-API-Key” http header (added in Redmine 1.1.0)
You can find your API key on your account page ( /my/account ) when logged in,on the right-hand pane of the default layout.
如果你想使用HTTP Basic Authentication你可以使用这个:
1.http Basic auth – http://login:[email protected]/issues.xml2.http Basic auth with API token and login – http://login:[email protected]/issues.xml- (not supported yet)3.http Basic auth with API token – http://RANDOM_KEY:[email protected]/issues.xml4.Full token auth – http://redmine.org/issues.xml?key=RANDOM_KEY总结
以上是内存溢出为你收集整理的web-services – 如何使用REST API登录Redmine全部内容,希望文章能够帮你解决web-services – 如何使用REST API登录Redmine所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)