One certificate.
GET /organizations/{organizationId}/certificates/{certificateId}
GET https://dev.zanpki.com/organizations/{organizationId}/certificates/{certificateId}
| Operation ID |
organizations.organizationId.certificates.certificateId.get
|
|---|---|
| Access | Signed in through ZanAuth: the access token cookie, with its ID token and refresh token companions. Or: An access token the site's ZanAuth issuer minted for its app, or a static key. |
Parameters
| Name | In | Type | Description | |
|---|---|---|---|---|
organizationId
| Path | Required | string (snowflake) | The organization. |
certificateId
| Path | Required | string (snowflake) | The certificate. |
Responses
| Status | Description | Schema | Content type |
|---|---|---|---|
| 200 | One certificate. | CertificatePage | application/json, text/html, text/markdown |
| 403 | Your roles here do not allow this. | Problem | application/json, text/html, text/markdown |
| 422 | The input was rejected; errors names each failure. | ValidationProblem | application/json, text/html, text/markdown |
| Any other status | The request was refused. The problem's type names why, and its detail explains it for people to read. | Problem | application/json, text/html, text/markdown |
200 One certificate.
| Property | Type | Description | |
|---|---|---|---|
pki_organizations_id
| string (snowflake) | Required | The organization's ID. |
pki_organizations_name
| string | Required | One customer, product or team: what holds authorities, certificates and machines; up to 100 characters. |
pki_agencies_id
| string (snowflake) | Required | The agency's ID; for an organization, the ID of the agency that holds it. |
pki_agencies_name
| string | Required | Your company, or the agency you run for your clients, up to 100 characters; it holds their organizations. |
certificates_id
| string (snowflake) | Required | The certificate's ID. |
certificates_name
| string | Required | What you call the certificate in ZanPKI, up to 100 characters; its exported files are named after it. |
certificates_common_name
| string, or null | Required | The subject common name, such as the host name. |
country
| string, or null | Required | Its two letters, such as US. |
state
| string, or null | Required | The subject's state or province, up to 64 characters; empty for none. |
city
| string, or null | Required | The subject's city or locality, up to 64 characters; empty for none. |
organization
| string, or null | Required | The company or other organization the subject belongs to, as the certificate names it, up to 64 characters; empty for none. |
unit
| string, or null | Required | A department or team within the subject's organization, up to 64 characters; empty for none. |
email
| string, or null | Required | An email address in the subject; empty for none. It must be one the signing authority and every authority above it permit. |
certificates_profile
| one of: 1, 2, 3, 4 | Required | What the certificate is for, which sets its key purposes: 1 TLS server, for a website, service or VPN; 2 mTLS client, for a service; 3 VPN user, for client authentication; or 4 TLS server and client, for a service both ways. A search takes null for any. |
profile_label
| string | Required | What it is for, written out for display: TLS server (website, service, or VPN), mTLS client (service), VPN user (client authentication) or TLS server and client (a service both ways). |
certificates_profile_id
| string (snowflake), or null | Required | One of the organization's own profiles, by its ID, made from the certificate's profile; null for ZanPKI's profile alone, or once that profile is deleted. |
certificate_profiles_name
| string, or null | Required | What the organization calls the profile, 1 to 100 characters. The forms that make a certificate offer it by this name. |
sans
| list of string | Required | Its subject alternative names, each written as OpenSSL writes it, such as DNS:example.com, IP:10.0.0.1, Email:admin@example.com or URI:https://example.com; empty for none. |
certificates_authority_id
| string (snowflake), or null | Required | The organization's authority that signed it, by its ID; null for a certificate imported that none of them signed. |
authorities_name
| string, or null | Required | What you call the authority in ZanPKI, up to 100 characters; its exported files are named after it. |
certificates_created_at
| integer (int64) | Required | When the certificate starts, as it says, in seconds since the Unix epoch. |
certificates_expires_at
| integer (int64) | Required | When the certificate ends, as it says, in seconds since the Unix epoch; for a certificate request, null until it holds one. |
serial
| string | Required | The certificate's serial number, as uppercase hex pairs joined by colons. |
certificates_key_type
| one of: 1, 2, 3, 4, 5 | Required | The key's type. EC P-256 suits nearly every client and is the fastest; RSA is for devices that take nothing else. |
key_type_label
| string | Required | The key's type written out for display: RSA 2048, RSA 3072, RSA 4096, EC P-256 or EC P-384. |
certificates_digest
| one of: 1, 2, 3 | Required | What its authority signs it over; empty for the one that matches the authority's key: SHA-384 for P-384, SHA-256 for the rest. |
digest_label
| string | Required | The digest its authority signed it over, written out for display: SHA-256, SHA-384 or SHA-512. |
certificates_status
| one of: 1, 2 | Required | Where it stands: 1 active, in force until it ends, or 2 revoked, which its authority's revocation list tells everyone. An active one whose end has passed has ended, which status_label says. |
status_label
| string | Required | Its status written out for display: Active, Revoked, or Ended for one still active whose end has passed. |
certificates_revoked_at
| integer (int64), or null | Required | When it was revoked, in seconds since the Unix epoch; null while it is not. |
certificates_revocation_reason
| one of: 0, 1, 2, 3, 4, 5, 9, null | Required | Why it was revoked, as its authority's revocation list says: 0 unspecified, 1 key compromised, 2 authority compromised, 3 affiliation changed, 4 superseded, 5 no longer in use or 9 privilege withdrawn; null while it is not revoked. |
revocation_reason_label
| string, or null | Required | Why it was revoked, written out for display, such as Key compromised; null while it is not revoked. |
certificates_origin
| one of: 1, 2, 3 | Required | Where it came from: 1 internal, made by ZanPKI; 2 imported; or 3 public authority, signed by a public certificate authority (Let's Encrypt, ZeroSSL or Google) through one of the organization's public authorities. |
origin_label
| string | Required | Where it came from, written out for display: Internal, Imported or Public authority. |
holds_private_key
| boolean | Required | Whether its private key is held here, which exporting the key needs; it is not when the key was handed over once at issue, or never came here. |
certificates_replaces_certificate_id
| string (snowflake), or null | Required | The certificate it was reissued to replace; null for none. |
replaces_name
| string, or null | Required | The name of the certificate it was reissued to replace; null for none. |
replaced_by_id
| string (snowflake), or null | Required | The newest certificate reissued to replace it; null for none. |
replaced_by_name
| string, or null | Required | The name of the newest certificate reissued to replace it; null for none. |
may_reissue
| boolean | Required | Whether you may reissue it now: your roles let you issue certificates (certificates:issue), it is active, ZanPKI made it, and its authority can still issue, being active and in force with its key held here and nothing in its issuer chain revoked. |
may_revoke
| boolean | Required | Whether you may revoke it now: your roles let you issue certificates (certificates:issue), it is active, and its authority here can sign, being active and in force with its key held here. |
revocation_unpublished
| boolean | Required | Whether it is revoked but the revocation list its authority serves now was signed before that, so it does not name it yet; false when it is not revoked, or its authority here cannot sign. |
may_publish_revocation_list
| boolean | Required | Whether you may publish its authority's revocation list now: it is revoked, its authority here can sign, and your roles let you issue certificates (certificates:issue). |
fingerprint_sha256
| string | Required | The certificate's SHA-256 fingerprint, as uppercase hex pairs joined by colons. |
may_export_private_key
| boolean | Required | Whether your roles let you export its private key (certificates:issue); an export of the key also needs it held here. |
may_delete
| boolean | Required | Whether you may delete it now: your roles let you issue certificates (certificates:issue), and no revocation list can need it any more. |
deletable_from
| integer (int64), or null | Required | When it can be deleted, once no revocation list can need it, in seconds since the Unix epoch; null when it can be deleted now, or your roles don't let you delete it. |
revocation_list_named
| string, or null | Required | The revocation list address the certificate names when that is not its authority's list here, as for one signed before its authority was imported; null when it names that list or none, or its authority is not here. |
403 Your roles here do not allow this.
| Property | Type | Description | |
|---|---|---|---|
type
| string | Required | A URL that identifies the kind of problem. Its last segment, such as auth_required or input_invalid, is the code your app should check. |
title
| string | Required | The HTTP status as text, such as Not Found. |
status
| integer (int32) | Required | The HTTP status code of the response. |
detail
| string | Required | An explanation of what went wrong, written for people to read. |
instance
| string | Required | The path the request was sent to. |
422 The input was rejected; errors names each failure.
| Property | Type | Description | |
|---|---|---|---|
type
| string | Required | A URL that identifies the kind of problem. Its last segment, such as auth_required or input_invalid, is the code your app should check. |
title
| string | Required | The HTTP status as text, such as Not Found. |
status
| integer (int32) | Required | The HTTP status code of the response. |
detail
| string | Required | An explanation of what went wrong, written for people to read. |
instance
| string | Required | The path the request was sent to. |
errors
| InputErrors | Required | What is wrong with each refused value. Parameters come as a list, and body errors as a tree shaped like the body. |
Any other status: The request was refused. The problem's type names why, and its detail explains it for people to read.
| Property | Type | Description | |
|---|---|---|---|
type
| string | Required | A URL that identifies the kind of problem. Its last segment, such as auth_required or input_invalid, is the code your app should check. |
title
| string | Required | The HTTP status as text, such as Not Found. |
status
| integer (int32) | Required | The HTTP status code of the response. |
detail
| string | Required | An explanation of what went wrong, written for people to read. |
instance
| string | Required | The path the request was sent to. |
Example
curl -X GET 'https://dev.zanpki.com/organizations/{organizationId}/certificates/{certificateId}' \
-H 'Authorization: Bearer <access token>'