Skip to main content
GET
/
certificates
Get all certificates.
curl --request GET \
  --url https://lab.trustos.telefonicatech.com/cert/v2/certificates \
  --header 'Authorization: Bearer <token>'
{
  "statusCode": 200,
  "message": "Retrieved 1 certificate(s) out of a total of 1",
  "data": {
    "certificates": [
      {
        "certID": "did:local:certid:123124",
        "data": {
          "name": "Certificate",
          "description": "Certificate description",
          "type": "content",
          "content": {},
          "issuer": "did:user:{issuer}",
          "issuedOn": 1696840286580,
          "hash": "a2ac9343a3d94e41bbc5c152fb8382c5233a47cee23cf765c7e6d67d9e61a142",
          "expires": 1696840286580
        },
        "metadata": [
          {
            "type": "Evidence",
            "networkId": 10004,
            "smartContract": "0xabcdbcbff5fa05e060e7dfe3e608cba010d11abc",
            "transactionHash": "0xabcdbcbff5fa05e060e7dfe3e608cba010d11abc",
            "trustPointHash": "a2ac9343a3d94e41bbc5c152fb8382c5233a47cee23cf765c7e6d67d9e61a142",
            "timestamp": 1696840286580
          }
        ],
        "access": {
          "public": true,
          "certificatePin": "1234",
          "externalId": "extcertid"
        }
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

access
enum<string>

Filter certificates by access type.

Available options:
public,
private
type
enum<string>

Filter certificates by type.

Available options:
content,
file,
asset,
url
from
number

Timestamp from which to start retrieving certificates.

to
number

Timestamp from which to stop retrieving certificates.

offset
number

Number of certificates to skip.

limit
number

Maximum number of certificates to return.

order
enum<string>

Sort certificates ascending or descending by date of creation.

Available options:
asc,
desc
fields
string

Fields to return in the response separated by commas.

Response

Successful certificates retrieval.

statusCode
integer

Request status code.

Example:

200

message
string

Message returned by the request.

Example:

"Retrieved 1 certificate(s) out of a total of 1"

data
object

Data returned by the request.

I