Status: Difference between revisions
Jump to navigation
Jump to search
w>Jguillo |
m 15 revisions imported |
||
(11 intermediate revisions by one other user not shown) | |||
Line 3: | Line 3: | ||
= URL = | = URL = | ||
<nowiki>https://web.safestamper.com/api/status</nowiki> | <nowiki>https://web.safestamper.com/api/status</nowiki> | ||
= Parameters = | |||
* '''sharedkey''': Your API client shared key | |||
* '''jobId''': The job identifier returned by the [[stamp]] operation | |||
* '''signature''': Parameters signature, as explained in [[Safe Stamper Web API parameters signature]] | |||
= Returns = | = Returns = | ||
Line 12: | Line 17: | ||
** '''url''': URL to be certified | ** '''url''': URL to be certified | ||
** '''status''': URL status, can be one of the following: | ** '''status''': URL status, can be one of the following: | ||
*** ''INPROGRESS'': | *** ''INPROGRESS'': URL certification is in progress | ||
*** ''ERROR'': The URL could not be certified | *** ''ERROR'': The URL could not be certified | ||
*** ''READY'': The URL certificate is ready for download | *** ''READY'': The URL certificate is ready for download | ||
** '''error''': Error | ** '''progress''': Percentage of completion (for ''INPROGRESS'' status) | ||
** '''error''': Error code (for ''ERROR'' status): | |||
*** ''bad-url'': URL is not valid | |||
*** ''quota-error'': User has no certificate credits | |||
*** ''quota-disk-error'': User has no storage space | |||
*** ''max-size'': URL content is too large (more than 5Mb) | |||
*** ''too-many-redirects'': URL has launched more than 10 redirects | |||
*** ''http-error-XXX'': URL returned an HTTP status other than 200 (success) or 30X (redirects) | |||
*** ''internal-error'': Unexpected internal error while processing URL certificate | |||
** '''certificateId''': Certificate code (for ''READY'' status) | ** '''certificateId''': Certificate code (for ''READY'' status) | ||
** '''certificateUrl''': Certificate download URL (for ''READY'' status) | ** '''certificateUrl''': Certificate download URL (for ''READY'' status) | ||
Line 25: | Line 38: | ||
= Example = | = Example = | ||
REQUEST: | |||
<pre> | |||
https://web.safestamper.com/api/status | |||
?sharedkey=5hmpod0d2vx7fnh6ysxab3olz | |||
&jobId=c498d3e0-aedb-48fe-82d5-5dec4270318b | |||
&signature=5784ad59c9fb400451887a138bf8ad36cee729d2 | |||
</pre> | |||
RESPONSE (actual response has no line breaks or indentation): | |||
<pre> | |||
{ | |||
"jobId":"c498d3e0-aedb-48fe-82d5-5dec4270318b", | |||
"results":[ | |||
{"url":"http://www.safestamper.com","status":"READY", | |||
"certificateId":"160419-BQS763", | |||
"certificateUrl":"https://web.safestamper.com/certificate/160419-BQS763"}, | |||
{"url":"NON-VALID-URL","status":"ERROR","error":"bad-url"}, | |||
{"url":"http://www.safecreative.org","status":"INPROGRESS","progress":66} | |||
] | |||
} | |||
</pre> |
Latest revision as of 08:07, 7 May 2021
This operation returns the status of a certification job.
URL
https://web.safestamper.com/api/status
Parameters
- sharedkey: Your API client shared key
- jobId: The job identifier returned by the stamp operation
- signature: Parameters signature, as explained in Safe Stamper Web API parameters signature
Returns
A JSON object with the following fields:
- jobId: Job identifier
- results: Array of JSON objects with the status of each URL included in the certification job
- url: URL to be certified
- status: URL status, can be one of the following:
- INPROGRESS: URL certification is in progress
- ERROR: The URL could not be certified
- READY: The URL certificate is ready for download
- progress: Percentage of completion (for INPROGRESS status)
- error: Error code (for ERROR status):
- bad-url: URL is not valid
- quota-error: User has no certificate credits
- quota-disk-error: User has no storage space
- max-size: URL content is too large (more than 5Mb)
- too-many-redirects: URL has launched more than 10 redirects
- http-error-XXX: URL returned an HTTP status other than 200 (success) or 30X (redirects)
- internal-error: Unexpected internal error while processing URL certificate
- certificateId: Certificate code (for READY status)
- certificateUrl: Certificate download URL (for READY status)
HTTP Errors
- 403 Forbidden: the sharedkey or signature are not valid, or the specified job does not belong to the API client
- 404 Not found: the job id is not correct.
Example
REQUEST:
https://web.safestamper.com/api/status ?sharedkey=5hmpod0d2vx7fnh6ysxab3olz &jobId=c498d3e0-aedb-48fe-82d5-5dec4270318b &signature=5784ad59c9fb400451887a138bf8ad36cee729d2
RESPONSE (actual response has no line breaks or indentation):
{ "jobId":"c498d3e0-aedb-48fe-82d5-5dec4270318b", "results":[ {"url":"http://www.safestamper.com","status":"READY", "certificateId":"160419-BQS763", "certificateUrl":"https://web.safestamper.com/certificate/160419-BQS763"}, {"url":"NON-VALID-URL","status":"ERROR","error":"bad-url"}, {"url":"http://www.safecreative.org","status":"INPROGRESS","progress":66} ] }