web-services – 如何使用REST API登录Redmine

web-services – 如何使用REST API登录Redmine,第1张

概述我需要使用REST API登录Redmine.是否可以使用REST API登录Redmine?我该怎么处理? 在 Redmine API wiki上,您可以看到以下内容: Most of the time, the API requires authentication. To enable the API-style authentication, you have to check Enabl 我需要使用REST API登录Redmine.是否可以使用REST API登录Redmine?我该怎么处理?解决方法 在 Redmine API wiki上,您可以看到以下内容:

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所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1068263.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-26
下一篇 2022-05-26

发表评论

登录后才能评论

评论列表(0条)

保存