Safe Stamper Web API: Difference between revisions

From Safe Creative API
Jump to navigation Jump to search
w>Jguillo
m (29 revisions imported)
 
(24 intermediate revisions by one other user not shown)
Line 4: Line 4:
* A '''private key''' used for signing your requests
* A '''private key''' used for signing your requests


To get your pair of API keys, you can contact us through [[Safe Stamper contact form | https://www.safestamper.com/contact]]
To get your pair of API keys, you can contact us through [https://www.safestamper.com/contact Safe Stamper contact form]


= API operations =
= API reference =


All operations return their results in JSON format.
All operations may be called by POST or GET, and return their results in JSON format.


== Stamp ==
== Authentication ==


Launches the certification of a single web page.
For authentication, all requests must include a signature parameter calculated from the request parameters and the API client private key.  


=== URL ===
* [[Safe Stamper Web API parameters signature]]
https://web.safestamper.com/api/stamp


=== Parameters ===  
== API operations ==
* '''sharedkey''': Your API client shared key
* [[stamp]]: Send URLs to certificate
* '''url''': The URL you want to certificate
* [[status]]: Check the status of a certification job
* '''signature''': Parameters signature, as explained in [[#Parameters signature]]


=== Returns ===
== Callbacks ==
A job identifier that can be used to check the status of the operation with [[#Status]].
When calling [[stamp]] you can provide a callback URL:
It returns the identifier between double quotes, in order to be a valid JSON.


=== HTTP Errors ===
* [[Safe Stamper Web API callbacks]]
 
* '''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 ===
 
<pre>
https://web.safestamper.com/api/stamp
</pre>
 
== Status ==
 
This operation returns the status of a certification job.
 
=== URL ===
[https://web.safestamper.com/api/status/<JOB_ID> 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
 
== Example ==

Latest revision as of 08:07, 7 May 2021

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 Safe Stamper contact form

API reference

All operations may be called by POST or GET, and return their results in JSON format.

Authentication

For authentication, all requests must include a signature parameter calculated from the request parameters and the API client private key.

API operations

  • stamp: Send URLs to certificate
  • status: Check the status of a certification job

Callbacks

When calling stamp you can provide a callback URL: