- It is an easy to use REST-based API that uses HTTP basic AUTH for authentication.
- All data gets uploaded to your specific project location on the API. A typical link would look like following - https://api.promptcloud.com/v2/data/info?id=demo&client_auth_key=hR6-MaPUHo_1Gse8QBJDx8gp_v7gadWdT-r-7p9yO8zY
- Project ID is supplied at the beginning of any project
- It has provision to only give you files after a particular timestamp, when you have already downloaded data up to a certain point
- For more details, visit API FAQs.
Once the data upload starts, we'll intimate you regarding the same. You use the following command to fetch the data:
- GET http://api.promptcloud.com/data/info?id=demo– this by default lists files uploaded in the last 2 days.
- GET http://api.promptcloud.com/data/info?id=demo&ts=0 – this gets all files uploaded since the beginning. Providing a different timestamp value will only fetch files after that timestamp. Timestamp formats are numeric eg. 1347866558160978794.
- You could use the following parameters too with the API link to return filtered files instead of using “ts”:
- from_date (YYYYMMDD)
- to_date (YYYYMMDD)
- cat (prefix of the site name)
The above commands give back list of XML data files in the result. To access each of those files you need to pass user name and password which has been separately supplied.
One of the following methods can be used to provide authentication and download files in a single step:
- wget –user –password URL
- Or using curl –user name:password URL
- if you use ruby then following is a very popular library that you can use: https://github.com/typhoeus/typhoeus