我试图从angularjs项目中使用Redmine API.
我最终使用jsonp来解决CORS问题.
我打电话给这个时收到404:
var url = 'http://muser:mpasswd@myredmine/issues.json?callback=displayIssues';
$http({
method: 'JSONP',
url: url
}).
success(function (data, status) {
console.log("success");
console.log(data);
}).
error(function (data, status) {
console.log("Error: " + status);
});
...
function displayIssues(issues) {
console.log('displayIssues');
...
}
Run Code Online (Sandbox Code Playgroud)
但是当我用Postman调用相同的URL时,它可以工作.
为什么我收到这个404?
这是我的控制台:
GET http://muser:mpasswd@myredmine/issues.json?callback=displayIssues jsonpReq @ angular.js:8576(anonymous function) @ angular.js:8420sendReq @ angular.js:8291serverRequest @ angular.js:8025wrappedCallback @ angular.js:11498wrappedCallback @ angular.js:11498(anonymous function) @ angular.js:11584Scope.$eval @ angular.js:12608Scope.$digest @ angular.js:12420Scope.$apply @ angular.js:12712(anonymous function) @ angular.js:18980x.event.dispatch @ jquery-2.0.3.min.js:5y.handle @ jquery-2.0.3.min.js:5
authentication.service.js:100 Error: 404
Run Code Online (Sandbox Code Playgroud)
Rest- API和jsonp都在admin-> setting-> auth中启用
我也尝试过: …
我想通过导入我的存储库和问题从 Redmine 迁移到 GitHub。
在我的提交中,我使用 #343 等问题编号来引用问题。
由于问题编号是Redmine内部的跨项目,我想更改GitHub中的问题ID以与Redmine中的相同。
是否可以?
我需要使用REST API登录Redmine.是否可以使用REST API登录Redmine?我该怎么处理?
我正在尝试使用 redmine Rest api 创建一个 wiki 页面。身份验证已成功,但由于 422 错误,未创建 wiki 页面。
Redmine 文档说:“当尝试创建或更新属性参数无效或缺失的对象时,您将收到 422 Unprocessable Entity 响应。这意味着无法创建或更新该对象。”
但我似乎可以找出我哪里搞砸了。当我执行第二个请求“PUT REQUEST”时,问题出现了。
所以我们知道问题出在该部分的某个地方。
我的猜测是,它是文件路径或内容类型。
这就是我到目前为止所拥有的......
const wordDocument="C:\Users\adasani\Desktop\practice\RedmineApi/RedmineText.txt";
creatingWikiPage_Request(wordDocument);
function creatingWikiPage_Request(wordDocument) {
axios({
method: 'post',
url: '<redmine_url>/uploads.json',
headers: { 'Content-Type': 'application/octet-stream' },
params: { 'key': '<api-key>' },
data: wordDocument
})
.then(function (response) {
console.log("succeeed---> ");
console.log(response.data.upload.token)
axios({
method: 'put',
url: '<redmine_url>/projects/Testing/wiki/WikiTesting.json',
headers: { 'Content-Type': 'application/octet-stream' },
params: { 'key': '<api-key>' },
data: {
"wiki_page": {
"text": "This is a wiki page with images, and …Run Code Online (Sandbox Code Playgroud) 有没有 redmine REST API可用于公司管理员通过向用户提供电子邮件ID来获取用户的详细信息。
像redmine KEY这样的细节
我正在尝试从 redmine 中获取所有问题
list_1 = []
issuess = conn_red.issue.all()
for i in issuess:
list_1.append(i)
print len(list_1)
Run Code Online (Sandbox Code Playgroud)
打印语句结果为 575
但是在 Redmine 中,我有 2735 问题。我想知道,
redmine-api ×6
redmine ×4
angularjs ×1
api ×1
axios ×1
file-upload ×1
github ×1
github-api ×1
javascript ×1
jsonp ×1
python ×1
web-services ×1