Batch Processing - Services - Get Info
Service Endpoint
http://api.sandcage.com/0.2/get-info
Example Request Payload
{"key":"Your API key.","request_id":"req_d1TDRlv_bZDdmYlqPGzNz5Q18yOVRPti0NzMC2g7"}
Example Success Response
{"request_id":"req_YodfsZdyKsXY1fpuZNQh4qi9QhC_ps","status":"success","files":[{"reference_id":"","file_token":"file_kkht7qtvj1ropi88byg2qmgxc64_ci","directory":"img\/","filename":"logo.png","type":"image\/png","size":9414,"action":"save","status":"processed","url":"http:\/\/www.example.com\/img\/logo.jpg"},{"reference_id":"o43t9j","file_token":"file_rhv6wto9io1f2rhn__9tpt3ifr_6iv","directory":"img\/","filename":"header.png","type":"image\/png","size":0,"action":"resize","status":"pending"},{"reference_id":"","file_token":"file_wtwesxl43yspozdrnwu9jrb1vekytbdg186ee5t","directory":"img\/","filename":"banner.png","type":"image\/png","size":0,"action":"crop","status":"error"}]}
Example Error Response
{"request_id":"req_YodfsZdyKsXY1fpuZNQh4qi9QhC_ps","status":"error","error_msgs":[{"code":1234,"short":"Short error message","long":"This is a long error message that describes in more detail the error that occurred."}]}
Example Success Response With Warning
{"request_id":"req_YodfsZdyKsXY1fpuZNQh4qi9QhC_ps","status":"success","warning_msgs":[{"code":1234,"short":"Short warning message","long":"This is a long warning message that describes in more detail the issue that occurred."}]}
Request Parameters | |||||||
---|---|---|---|---|---|---|---|
key* string | required | Your API key. | |||||
request_id string 10...100 | conditional | The request_id that was returned in the request for which you want to get the status. If provided, the response will include details for all the files that where part of the request. If a value is not provided for this parameter, then an array of files must be provided. | |||||
files array 1...10000 | conditional | An array of files. If a value is not provided for this parameter, then a value must be provided for the "request_id" parameter. If a value is provided for the "request_id" parameter, then this array of files will be disregarded.
|
Response Format | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request_id string | A unique identifier for this request. | ||||||||||||||||||||
status string | Either "success" or "error". | ||||||||||||||||||||
files array | An array of files. Will only be included as part of the response if the request was successful.
| ||||||||||||||||||||
error_msgs array | An array of errors. Error messages will only be included as part of the response if the request was not successful.
| ||||||||||||||||||||
warning_msgs array | An array of warnings. Warning messages will only be included as part of the response if the request was successful.
|
Still Have Questions?
We're always happy to help with code and integrations. Talk to us!