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_Mqr2xyFo5NSI7QKJPwvN4q5nuODpV6EQCq","status":"success","files":[{"reference_id":"","file_token":"file_7zb2x5mc37x7bcn3cnz0b2zvy0me1235g2w","directory":"img\/","filename":"logo.png","type":"image\/png","size":218,"action":"save","status":"processed","url":"http:\/\/www.example.com\/img\/logo.jpg"},{"reference_id":"plskk","file_token":"file_f_m12jmm7x9s7dsj2u3b2dsc8_k773q_08jfvzh4","directory":"img\/","filename":"header.png","type":"image\/png","size":0,"action":"resize","status":"pending"},{"reference_id":"","file_token":"file_fokv2d9pxmhk8lbpquk6yl10_787_gmehld","directory":"img\/","filename":"banner.png","type":"image\/png","size":0,"action":"crop","status":"error"}]}

Example Error Response

{"request_id":"req_Mqr2xyFo5NSI7QKJPwvN4q5nuODpV6EQCq","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_Mqr2xyFo5NSI7QKJPwvN4q5nuODpV6EQCq","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

requiredYour API key.
request_id

string

10...100

conditionalThe 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

conditionalAn 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.
files[]

struct

A file.
file_token*

string

30...70

requiredThe file_token of the file for which you want to get the status. This returned as part of the response of a request to the schedule-tasks service.

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.
files[]

struct

A file.
reference_id

string

The unique reference identifier that was optionally provided for the file.
file_token

string

The token of the file.
directory

string

The targeted directory in the associated storage location where the file is stored.
filename

string

The file name of the file.
type

string

The mime type of the file.
size

string

The size of the file on disk in bytes.
Unless the file was successful processed (the value of "status" will be flagged as "processed") a value of 0 will be returned.
action

string

The action that was requested for the file.
status

string

One of the following values:
  • pending
  • processed
  • error

Note that information of files that have been deleted, will not be returned.
url

string

The url where the file can be accessed from. This is only returned if the file was successful processed (the value of "status" will be "processed").
error_msgs

array

An array of errors.
Error messages will only be included as part of the response if the request was not successful.
error_msgs[]

struct

An error.
code

string

The error code.
short

string

The short error message.
long

string

The long and more detailed error message.
warning_msgs

array

An array of warnings.
Warning messages will only be included as part of the response if the request was successful.
warning_msgs[]

struct

A warning.
code

string

The warning code.
short

string

The short warning message.
long

string

The long and more detailed warning message.

Still Have Questions?

We're always happy to help with code and integrations. Talk to us!