Closed shwetagopaul92 closed 7 years ago
I haven't tried out POSTMAN yet. Can you provide an equivalent curl request that demonstrates the problem?
A curl request would be curl -H "Content-Length:92" -H "User-Agent:python-requests/2.3.0 CPython/2.7.8 Darwin/14.0.0" -H "host:tall.test.hdfgroup.org" -H "Accept:/" -H "Accept-Encoding:gzip, deflate" -X POST http://54.163.220.201:5000/datasets/4e83ad1c-ab6e-11e4-babb-3c15c2da029e/value -d {"points": [19, 17, 13, 11, 7, 5, 3, 2]}
This is similar to the request format given on : http://h5serv.readthedocs.io/en/latest/DatasetOps/POST_Value.html
I'm able to curl using the tall.h5 file:
$ curl -H "host:tall.test.hdfgroup.org" -X POST http://127.0.0.1:5000/datasets/862165c0-06b6-11e7-a392-3c15c2da029e/value -d '{"points":[3,4,5,2]}'
{"value": [3, 4, 5, 2]}
The UUID would be different for your installation, but it's the dset1.1.2 dataset in the g1.1 group. Note you need to be quotes around the body in the curl request.
Also the extra header lines aren't needed. By default h5serv assumes JSON input and will give JSON output.
Thank you for checking this out! I did try it out with the UUID for my installation.
The UUID is: 89e5526b-0fdb-11e7-9992-12d1ec5e67fe
However, when I try the curl command,
I get a HTTP 410 error saying the dataset with uuid has been previously deleted. This seems to happen for any dataset I try to use a POST request with. A GET request to the server running on this IP using CURL or postman does work. Would there be any specific reason for this?
That seems really odd. Can you send me the tall.h5 file from the server data directory? I can experiment on my side.
Yes, I could email this to you. Would this email address work : jreadey@hdfgroup.org ?
I believe this was because the UUID used was of the file's group and not of the dataset's!
With the dataset id, this works perfectly fine.
I got your file, but hadn't had time to look at it yet. Are you good to go now?
yes, thank you!
Ok, great!
I am trying to use the RESTful API for POST Value with the app called POSTMAN. I have attached the screenshots of the request I tried for a hdf server running on an aws instance with ip : 54.163.220.201:5000. The image shows the headers and the body of the request used.
The request keeps loading and never returns a response. Is there something that should be different in my request?
Thank you!