我的 Pentaho 服务器中的 Kettle api 请求 return 404
Kettle api request in my Pentaho Server return 404
我使用 pentaho 服务器来调用 localhost:8080/pentaho/home
中的 Web 服务。
事实是,当我想发出激活存储在该位置的转换(ktr)的请求时,调用服务 return 错误 404。
简单示例无效:localhost:8080/kettle/status/?xml=Y
.
我从 nodejs 调用 api rest,正如它在 pentaho 文档中所说的那样
function launchTrans(req, res) {
let options = {
url: `http://localhost:8080/kettle/status/?xml=Y`,
method: 'GET',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'Access-Control-Allow-Credentials': 'true',
'Cookie': globalString
},
};
request(options, (error, response, body) => {
if (!error && response.statusCode == 200) {
res.status(200).send(response);
} else {
console.log("There was an error " + error);
res.status(500).send(response);
}
});
}
URL 应该是 http://localhost:8080/pentaho/kettle/status/?xml=y
而不是 http://localhost:8080/kettle/status/?xml=y
。您的 URL 格式不正确。您使用的格式适用于旧的 PDI 独立服务器。在报告和 PDI 合并到一个服务器的新合并服务器中,您需要包含 URL.
的 "pentaho" 部分
我使用 pentaho 服务器来调用 localhost:8080/pentaho/home
中的 Web 服务。
事实是,当我想发出激活存储在该位置的转换(ktr)的请求时,调用服务 return 错误 404。
简单示例无效:localhost:8080/kettle/status/?xml=Y
.
我从 nodejs 调用 api rest,正如它在 pentaho 文档中所说的那样
function launchTrans(req, res) {
let options = {
url: `http://localhost:8080/kettle/status/?xml=Y`,
method: 'GET',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'Access-Control-Allow-Credentials': 'true',
'Cookie': globalString
},
};
request(options, (error, response, body) => {
if (!error && response.statusCode == 200) {
res.status(200).send(response);
} else {
console.log("There was an error " + error);
res.status(500).send(response);
}
});
}
URL 应该是 http://localhost:8080/pentaho/kettle/status/?xml=y
而不是 http://localhost:8080/kettle/status/?xml=y
。您的 URL 格式不正确。您使用的格式适用于旧的 PDI 独立服务器。在报告和 PDI 合并到一个服务器的新合并服务器中,您需要包含 URL.