TLS CA Certificate Retrieval (v1)¶
Create the bearer_token and store in a file in a secure local directory with 0600 permissions.
See API Request Authorization and Authentication.
Note
The following example shows use of the API over curl in a bash terminal. The concepts are fully portable to any other REST client (eg PostMan or python requests)
Set the URL (for example):
$ export URL=https://synsation.1234-5678.nodes.archivist.jitsuin.io
TLS CA Certificate records in Jitsuin Archivist are tokenized at creation time and referred to in all API calls and smart contracts throughout the system by a unique identity of the form:
tlscacertificates/12345678-90ab-cdef-1234-567890abcdef.
If you do not know the certificate’s identity you can fetch TLS CA Certificate records using other information you do know, such as the certificate’s name.
Fetch all TLS CA Certificates (v1)¶
To fetch all TLS CA certificates records, simply GET the tlscacertificates resource:
$ curl -v -X GET \
-H "@$BEARER_TOKEN_FILE" \
$URL/archivist/v1/tlscacertificates
Fetch specific TLS CA Certificate by identity (v1)¶
If you know the unique identity of the TLS CA certificate Record simply GET the resource:
$ curl -v -X GET \
-H "@$BEARER_TOKEN_FILE" \
$URL/archivist/v1/tlscacertificates/6a951b62-0a26-4c22-a886-1082297b063b
Fetch TLS CA Certificates by name (v1)¶
To fetch all TLS CA Certificates with a specific name, GET the tlscacertificates resource and filter on display_name:
$ curl -g -v -X GET \
-H "@$BEARER_TOKEN_FILE" \
$URL/archivist/v1/tlscacertificates?display_name=Acme
Each of these calls returns a list of matching TLS CA Certificate records in the form (certificate field shortened for brevity):
{
"certificates": [
{
"identity": "tlscacertificates/6a951b62-0a26-4c22-a886-1082297b063b",
"display_name": "Some description",
"certificate": "-----BEGIN CERTIFICATE----- MIIEBDCCAuygAwIBAgIDAjppMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVT -----END CERTIFICATE----- "
},
{
"identity": "tlscacertificates/12345678-0a26-4c22-a886-1082297b063b",
"display_name": "Some other description",
"certificate": "-----BEGIN CERTIFICATE----- XYZEBDCCAuygAwIBAgIDAjppMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVT -----END CERTIFICATE----- "
}
]
}
Note
The number of records returned has a maximum limit. If this limit is too small then one must use API Request Paging.
Note
The total number of certificates that exist is returned in the response header field ‘x-total-count’ if the ‘x-request-total-count’ header on the request is set to ‘true’. The curl option ‘-i’ will emit this to stdout.
Note
A full API reference is available in Swagger GET API