SumoLogic search jobs API always returning 301 regardless of request
I have tried all types of request combinations with the correct access ID and key. Regardless of the request (valid or not) the API returns error 301 with the following response: { "status" : 301, "id" : "M7Y66-K63F5-DQK5F", "code" : "moved", "message" : "The requested resource SHOULD be accessed through returned URI in Location Header." } I am submitting a request like this: C:\dev\tools\curl_7_51_0_openssl_nghttp2_x64>curl --user accessID:accessKey -X GET https://api.sumo logic.com/api/v1/search/jobs?query="_sourceCategory=some_known_string" and all I get is the above error with changing id. If I submit a wrong url such as https://api.sumo logic.com/api/v1/search/job?query...... I even get the same response! What did I miss from the docs? Thank You.
-
Ended up using -v option to get the correct location I should be using, which is https://api.us2sumologic.com/api/v1/search/jobs
Please sign in to leave a comment.
Comments
1 comment