Support Questions

Find answers, ask questions, and share your expertise

Invalid period specified: Problem using Navigator API, Audit

avatar
New Contributor

Hi,

 

I am having problems using the Navigator API for audits. I'm using this documentation as a reference for how I should write the curl, when using version V9.

 

curl http://Navigator_Metadata_Server_host:port/api/v9/audits/?query=service%3D%3Dhive&startTime=1431025200000&endTime=1431032400000\
&limit=5&offset=0&format=JSON&attachment=false -X GET -u username:password

 

This is my resulting query:

curl -X GET -u user:pass https://our_navigator_metdata_server:7187/api/v9/audits/?query=service%3D%3Dhive&startTime=1487160000000&endTime=1487163600000&limit=5&offset=0&format=JSON&attachment=true

 

Result:

No matter how large a distance I make between start- and endTime I end up getting the same error message:

  "message" : "Invalid period specified: 'endTime' must be later than 'startTime'."

 

- I have verified that the address and port that I'm using is correct

- I have verified that my startTime is less than endTime

 

Question:

Can anybody see what is wrong here, or knows why it keeps returning the same error message?

 

Thanks for helping me out, 

Best

Rachel

 

 

 

 

 

1 ACCEPTED SOLUTION

avatar
Master Guru

@Rachel

 

Try adding quotation marks around your URL.  I think the shell is interpretting and is messing up the string that is sent.  To debug curl and see the problem with the URL that is sent to Navigator, add the "-v" option.

 

Ben

View solution in original post

1 REPLY 1

avatar
Master Guru

@Rachel

 

Try adding quotation marks around your URL.  I think the shell is interpretting and is messing up the string that is sent.  To debug curl and see the problem with the URL that is sent to Navigator, add the "-v" option.

 

Ben