Safe Stamper Web API: Difference between revisions
w>Jguillo |
w>Jguillo No edit summary |
||
Line 44: | Line 44: | ||
=== URL === | === URL === | ||
https://web.safestamper.com/api/status/<JOB_ID> | |||
''<JOB_ID>'' is the job identifier returned by the [[#stamp]] operation. | ''<JOB_ID>'' is the job identifier returned by the [[#stamp]] operation. |
Revision as of 13:06, 15 April 2016
API keys
To use Safe Stamper Web through API, you need a pair of keys:
- A shared key that identifies your client application
- A private key used for signing your requests
To get your pair of API keys, you can contact us through https://www.safestamper.com/contact
API operations
All operations return their results in JSON format.
Stamp
Launches the certification of a single web page.
URL
https://web.safestamper.com/api/stamp
Parameters
- sharedkey: Your API client shared key
- url: The URL you want to certificate
- signature: Parameters signature, as explained in #Parameters signature
Returns
A job identifier that can be used to check the status of the operation with #Status. It returns the identifier between double quotes, in order to be a valid JSON.
HTTP Errors
- 403 Forbidden, the sharedkey or signature are not valid
- 400 Bad request, the URL is not valid
- 429 Your Safe Stamper user has no certification credits available
- 430 Your Safe Stamper user has no storage space available
Example
https://web.safestamper.com/api/stamp
Status
This operation returns the status of a certification job.
URL
https://web.safestamper.com/api/status/<JOB_ID>
<JOB_ID> is the job identifier returned by the #stamp operation.
Returns
A JSON object with the following fields:
- status Job status:
- UNKNOWN The job id is not correct
- PROCESSING The web page certification is in progress
- ERROR There was an error certificating the web page
- READY The web page has been successfully certificated
Depending on the job status, additional fields may be returned:
For PROCESSING status:
- progress Job progress as a completion percentage
For ERROR status:
- error Error description
For READY status:
- id Certificate ID
- url Certificate download URL