List the domain's certificates
const url = 'https://api.nsin.ir/domains/example.com/ssl/certificates';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.nsin.ir/domains/example.com/ssl/certificates \ --header 'Authorization: Bearer <token>'A domain can hold more than one certificate at a time: the one NSIN
issues and renews for it, and any you upload. Only one of them answers
the handshake for a given hostname — in_use_for says which hostnames
each certificate is serving right now, and an empty in_use_for means
the domain holds it but is serving something else.
covers is the subset of this domain’s hostnames the certificate could
serve, i.e. what selecting it would switch over. selectable is false
when it cannot serve at all — expired, no stored private key, not
trusted by browsers, or covering none of the domain’s names — and
reason says which.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The domain name (for example example.com) — not a numeric id.
Example
example.comResponses
Section titled “ Responses ”The domain’s certificates, the one in use first.
object
One certificate a domain holds. id is what
/ssl/certificates/{certificateId}/select takes.
object
NSIN issues and renews this one.
Every name on the certificate.
The certificate chains to a public root. Absent when it has not been evaluated.
The bundle carries no intermediate certificate.
The private key is stored. Without it the edge cannot complete a handshake, so the certificate cannot be selected.
The domain’s hostnames this certificate is serving right now. Empty means the domain holds it but is serving something else.
The domain’s hostnames this certificate could serve — what selecting it would switch over.
Whether this certificate can be selected right now.
Why it cannot be, when selectable is false.
Example
{ "certificates": [ { "source": "acme" } ]}Missing, malformed, revoked or expired API key — or the owning account is inactive.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Examples
{ "error": "invalid API key"}No such domain, or it is not visible to this account. Domains you cannot access are reported as not found rather than forbidden.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Example
{ "error": "read-only API key"}The key exceeded its request budget (300 requests per minute by default).
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Examples
{ "error": "rate limit exceeded"}