我正在尝试从处于活动状态的 Service Now 获取事件列表。我只需要数据中名为due_date 的特定字段。如果我使用 JSON
curl -s -L --user username:password --header "Accept: application/json" --header "Content-Type:application/json" "https://myservicenow.com/api/now/table/incident?sysparm_query=opened_atRELATIVEGE@dayofweek@ago@100"
我得到一个像
{
"active": "true",
......
"due_date": "2015-07-22 07:07:28",
}
我想使用 CSV 网络服务做同样的事情。所以我用
curl -s -L --user username:password "https://myservicenow.com/incident.do?CSV&sysparm_query=opened_atRELATIVEGE@dayofweek@ago@100"
我得到像
"number","sys_created_by","caller_id","short_description","subcategory","u_subcategory_detail","category","priority","state","assignment_group","assigned_to","opened_at","resolved_at"
但是字段due_date 不存在。如何指定要以 CSV 格式检索的字段?