I am evaluating the Aspose REST API, and would like to use it with some different languages than you currently offer for SDKs and examples in the documentation. I’ve been testing for now with just a simple bash script making use of curl. I’m attempting to get usage for the current period at http://api.aspose.com/1.1/usage/currentPeriod , but I’m getting a 404 Not Found. However, no matter what endpoint I try, I only get 404s.
Could you please check my logic to see if I’m calculating the signature correctly? If it helps, I can send the appSID and key for you to test on your end. Also, since I’m getting 404, are the endpoints not correct?
Here’s my bash script:
sha=$(echo -n $preurl | openssl dgst -sha1 -hmac $key | sed -e “s/^.*= //”)
curl -G -H “Accept: application/xml” “$preurl” --data-urlencode “signature=$sha”
The other language I’m testing with is getting a 404 as well, so either my signature calculation is wrong, or the endpoints are wrong. Any help you can provide is welcomed.
Thank you for the reply Imran, but it is not very helpful for my application.
I’ve read the PHP, Python, Perl, Java, and Node methods for signing, so having me look at those examples isn’t telling me why my specific bash/Linux example is not working. I do not intend to use your API with any of these languages for which you currently provide examples. If I can’t get the product to work with my languages of choice – after all REST is just HTTP and should work from any language – then I’ll have to remove it from consideration.
Why am I getting a 404 if that base URL exists? I could understand it being 400 if the appSID or signature param values are incorrect, but not 404.
Shouldn’t I send you the appSID and the key for you test directly with the bash example I’ve provided?
clayredding:Shouldn’t I send you the appSID and the key for you test directly with the bash example I’ve provided?