Splunk API : {“preview“:false,“lastrow“:true}

最近客户要用api 来实现对数据的提取,报错:{"preview":false,"lastrow":true}

下面我来trouble shooting:

1: 先对API的功能进行测试:

curl -k <server:port>/services/auth/login -d username=<username> -d password=<password>

注意:上面要写成:

curl -k https://hostname:8089/services/auth/login -d username=<username> -d password=<password>

如果返回:

<response>
  <sessionKey>RoqWezzjqckDcZmNb_AP XXXXXXXXEXLwb8aEhhojgnayTML_kqzYO45dMvsP6VLOPhWfyZTC3t8NwLHtywdvHsFmu6EXpxVtE3RwxeRMAXXXXXXXXXXXX/sessionKey>
  <messages>
    <msg code=""></msg>
  </messages>
</response>

就说明是正常的。

2:


版权声明:本文为shenghuiping2001原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。