Partners API and Web/status: Difference between pages

From SafeStamper API documentation
(Difference between pages)
Jump to navigation Jump to search
api>Admin
No edit summary
 
m (1 revision imported)
 
Line 1: Line 1:
These operations are only available for designated partners, as they allow to create and modify other users' accounts.
This operation returns the status of a certification job.


= URL =
<nowiki>https://www.safestamper.com/api/web/status</nowiki>


= User authorization =
= Parameters =
* '''sharedkey''': Your API client shared key
* '''jobId''': The job identifier returned by the [[stamp]] operation
* '''signature''': Parameters signature, as explained in [[Signature parameter]]


To get an authorization key using the e-mail address and password of a user.
= Returns =


== API operations ==
A JSON object with the following fields:


* [[authorize]]: Returns an authorization key linked to a user, using their e-mail address and password
* '''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.


= User API Reference =
= Example =


To create and link user accounts and activate professional services.
REQUEST:
<pre>
https://www.safestamper.com/api/web/status
?sharedkey=5hmpod0d2vx7fnh6ysxab3olz
&jobId=c498d3e0-aedb-48fe-82d5-5dec4270318b
&signature=5784ad59c9fb400451887a138bf8ad36cee729d2
</pre>


== API operations ==
RESPONSE (actual response has no line breaks or indentation):
These components are only available for Partners API:
<pre>
 
{
* [[newuser]]: Create user in Safe Stamper. Also used to create authorization for an existing Safe Stamper user.
  "jobId":"c498d3e0-aedb-48fe-82d5-5dec4270318b",
* [[modifyuser]]: Modify Safe Stamper user data.
  "results":[
* [[addcredits]]: Add certification credits or navigation credits to the authorization.
      {"url":"http://www.safestamper.com","status":"READY",
* [[newuserpack]]: Enable professional services linked to the authorization.
      "certificateId":"160419-BQS763",
* [[deleteuserpack]]: Disable professional services linked to the authorization.
      "certificateUrl":"https://web.safestamper.com/certificate/160419-BQS763"},
* [[users]]: Get users authorizated by api client
      {"url":"NON-VALID-URL","status":"ERROR","error":"bad-url"},
 
      {"url":"http://www.safecreative.org","status":"INPROGRESS","progress":66}
 
  ]
 
}
= Operators API Reference =
</pre>
 
To manage operators (additional users) of subscription accounts. Operators are disabled when the subscription expire or is annulled.
 
== API operations ==
These components are only available for Partners API:
 
* [[newoperator]]: Create an authorized operator for the subscription
* [[modifyoperator]]: Modify Safe Stamper operator data.
* [[deleteoperator]]: Delete authorized operator.
* [[enableoperator]]: Enable access to authorized operator.
* [[disableoperator]]: Disable access to authorized operator.
* [[operators]]: Get authorized operator list from the subscription

Latest revision as of 15:27, 17 October 2023

This operation returns the status of a certification job.

URL

https://www.safestamper.com/api/web/status

Parameters

  • sharedkey: Your API client shared key
  • jobId: The job identifier returned by the stamp operation
  • signature: Parameters signature, as explained in Signature parameter

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://www.safestamper.com/api/web/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}
   ]
}