有人遇到过这种情况吗?通样的程序版本,使用的都是超级用户权限,调用两个环境的trigger信息,一个正常获取,一个获取不到,这种情况是什么导致的呢?接口都没有报错只是一个数据为空
const apiUrl = 'http://1.1.1.1:1808/api_jsonrpc.php';
const requestData = {
"jsonrpc": "2.0",
"params": {
"output": [
"triggerid",
"description",
"lastchange",
"priority"
],
"filter": {
"value": 1,
"status": 0
},
"selectLastEvent": "extend",
"limit": 1000,
"sortorder": "DESC",
"sortfield": "priority",
"skipDependent": 1
},
"method": "trigger.get",
"auth": "94d**************a",
"id": 320 }
fetch(apiUrl, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(requestData),})
.then(response => response.json())
.then(data => {
if (data.result) {
console.log('Authentication Token:', data.result);
} else {
console.error('Authentication failed:', data.error);
}
})
.catch(error => console.error('Error:', error));
const apiUrl = 'http://1.1.1.1:1808/api_jsonrpc.php';
const requestData = {
"jsonrpc": "2.0",
"params": {
"output": [
"triggerid",
"description",
"lastchange",
"priority"
],
"filter": {
"value": 1,
"status": 0
},
"selectLastEvent": "extend",
"limit": 1000,
"sortorder": "DESC",
"sortfield": "priority",
"skipDependent": 1
},
"method": "trigger.get",
"auth": "94d**************a",
"id": 320 }
fetch(apiUrl, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(requestData),})
.then(response => response.json())
.then(data => {
if (data.result) {
console.log('Authentication Token:', data.result);
} else {
console.error('Authentication failed:', data.error);
}
})
.catch(error => console.error('Error:', error));