Certificates

From SafeStamper API documentation
Revision as of 06:27, 17 October 2023 by Adminwiki (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This operation lists the certificates of the authorizing user.

URL

https://www.safestamper.com/api/certificates

Parameters

  • sharedkey: Your API client shared key
  • authkey: Authorization key
  • type: Type of certificate to search
    • web_static Static web pages
    • web_snapshots Web browsing sessions with snapshots
    • web_video Web browsing sessions with video
    • web Web certificates, includes web_static, web_snapshots and web_video certificates
    • mail E-mail certificates
    • photo Geo-located photographs
    • file Files
  • fromDate: Return certificates generated from this date on (optional, format yyyy-MM-dd)
  • toDate: Return certificates generated up to this date (optional, format yyyy-MM-dd)
  • filter: Text for searching certificates (optional)
  • page: Page number to return (optional, defaults to 1)
  • signature: Parameters signature, as explained in Signature parameter

Returns

A JSON object with the following fields:

  • pageSize: Maximum number of certificates per page
  • count: Total number of certificates
  • pageTotal: Total number of pages
  • list: array of JSON with the certificates data
    • entryDate: Date of certificate
    • code: Certificate code
    • url: Public URL for certificate download
    • thumbnailUrl: URL of thumbnail of certificate (optional, just for web and photo certificates)
    • properties: JSON with the properties of the certificate
      • Web certificates
        • url: URL that was certified
      • Mail certificates
        • toAddresses: E-mail destinataries
        • subject: Subject of e-mail
      • Photo certificates
        • latitude: Latitude where the photo was taken
        • longitude: Longitude where the photo was taken
        • accuracy: Accuracy of geographic location, in meters
        • address: Human-readable photo location
      • File certificates
        • filename: File name
        • size: Size of file
        • md5: MD5 hash of file
        • sha1: SHA1 hash of file
        • sha256: SHA256 hash of file
        • sha512: SHA512 hash of file

HTTP Errors

  • 403 Forbidden: the sharedkey or signature are not valid
  • 401 Unauthorized: authkey is not valid or not authorized

Example

REQUEST:

https://www.safestamper.com/api/certificates
?authkey=0dbb406d-cc0c-4ef8-ae80-971ed108c2f9
&sharedkey=axvmfqn8aex21mxhq5zsj7l482saxfu7j4hh
&type=web
&signature=b1b22b34967fdf2eb67c3569a1e8b90f9fb63e77

RESPONSE (actual response has no line breaks or indentation):

{
    "pageSize":50,
    "count":1, 
    "pageTotal":1,
    "list":[
        {
          "entryDate":"2016-11-11T12:59:36Z",
          "code":"161111-8CM65B",
          "url":"http://dev.safestamper.com:9001/certificate/161111-8CM65B",
          "thumbnailUrl":"https://pagestamper-dev.s3.amazonaws.com/16/11/11/161111-8CM65B.png?AWSAccessKeyId\u003dAKIAI2GFJVQOFPVV5SZA\u0026Expires\u003d1480695450\u0026Signature\u003dL7TBOPa6gKVS5OTGASfq68XMxGk%3D",
          "properties":{"url":"https://informaticaglobaldariomo.blogspot.com.es/2016/08/startup-manager-una-aplicacion-android.html"}
        }
    ]
}