# certificate.query

Type: object

##

Type: array
No Additional Items

#### Tuple Validation

##### Parameter 1: filters

#### filters

Type: array Default: []

List of filters for query results. See API documentation for "Query Methods" for more guidance.

No Additional Items

##### Each item of this array must be:

Type: object
Examples:

    [
        [
            "name",
            "=",
            "bob"
        ]
    ]

    [
        [
            "OR",
            [
                [
                    "name",
                    "=",
                    "bob"
                ],
                [
                    "name",
                    "=",
                    "larry"
                ]
            ]
        ]
    ]

##### Parameter 2: options

#### options

Type: object
Default:
{ "extra": {}, "order_by": [], "select": [], "count": false, "get": false, "offset": 0, "limit": 0, "force_sql_filters": false }

Query options including pagination, ordering, and additional parameters.

No Additional Properties

##

#### Extra

Type: object Default: {}

Extra options are defined on a per-endpoint basis and are described in the documentation for the associated query method.

##

#### Order By

Type: array of string Default: []

An array of field names describing the manner in which query results should be ordered. The field names may also have one of more of the following special prefixes: `-` (reverse sort direction), `nulls_first:` (place any null values at the head of the results list), `nulls_last:` (place any null values at the tail of the results list).

No Additional Items

##### Each item of this array must be:

Type: string
Example:

    [
        "size",
        "-devname",
        "nulls_first:-expiretime"
    ]

##

#### Select

Type: array Default: []

An array of field names specifying the exact fields to include in the query return. The dot character `.` may be used to explicitly select only subkeys of the query result.

No Additional Items

##### Each item of this array must be:

## Any of

Type: string
Type: array
No Additional Items

##### Each item of this array must be:

Type: object
Example:

    [
        "username",
        "Authentication.status"
    ]

##

#### Count

Type: boolean Default: false

Return a numeric value representing the number of items that match the specified `query-filters`.

##

#### Get

Type: boolean Default: false

Return the JSON object of the first result matching the specified `query-filters`. The query fails if there specified `query-filters` return no results.

##

#### Offset

Type: integer Default: 0

This specifies the beginning offset of the results array. When combined with the `limit` query-option it may be used to implement pagination of large results arrays. WARNING: some query methods provide volatile results and the onus is on the developer to understand whether pagination is appropriate for a particular query API method.

##

#### Limit

Type: integer Default: 0

This specifies the maximum number of results matching the specified `query-filters` to return. When combined wtih the `offset` query-option it may be used to implement pagination of large results arrays.

WARNING: Some query methods provide volatile results and the onus is on the developer to understand whether pagination is appropriate for a particular query API method.

##

#### Force Sql Filters

Type: boolean Default: false

Force use of SQL for result filtering to reduce response time. May not work for all methods.

##

#### Result

## Any of

Type: array of object
No Additional Items

##### Each item of this array must be:

#### CertificateQueryResultItem

Type: object
No Additional Properties

##

#### Id

Type: integer

Unique identifier for this certificate entry.

##

#### Type

Type: integer

Internal certificate type identifier used to determine certificate capabilities.

##

#### Name

Type: string

Human-readable name for this certificate. Must be unique and contain only alphanumeric characters, dashes, and underscores.

Must be at least `1` characters long

##

#### Certificate

PEM-encoded X.509 certificate data. `null` for certificate signing requests (CSR) that have not yet been signed.

## Any of

Type: string
Type: null

##

#### Privatekey

PEM-encoded private key corresponding to the certificate. `null` if no private key is available or for imported certificates without keys.

## Any of

Type: string
Type: null

##

#### Csr

PEM-encoded Certificate Signing Request (CSR) data. `null` for imported certificates or completed ACME certificates.

## Any of

Type: string
Type: null

##

#### Acme Uri

ACME directory server URI used for automated certificate management. `null` for non-ACME certificates.

## Any of

Type: string
Type: null

##

#### Domains Authenticators

Mapping of domain names to ACME DNS authenticator IDs for domain validation. `null` for non-ACME certificates.

## Any of

Type: object
Type: null

##

#### Renew Days

Number of days before expiration to attempt automatic renewal. Only applicable for ACME certificates. `null` for non-renewable certificates.

## Any of

Type: integer
Type: null

##

#### Acme

ACME registration and account information used for certificate lifecycle management. `null` for non-ACME certificates.

## Any of

Type: object
Type: null

##

#### Add To Trusted Store

Type: boolean

Whether this certificate should be added to the system's trusted certificate store.

##

#### Root Path

Type: string

Filesystem path where certificate-related files are stored.

Must be at least `1` characters long

##

#### Certificate Path

Filesystem path to the certificate file (.crt). `null` if no certificate is available.

## Any of

Type: string

Must be at least `1` characters long

Type: null

##

#### Privatekey Path

Filesystem path to the private key file (.key). `null` if no private key is available.

## Any of

Type: string

Must be at least `1` characters long

Type: null

##

#### Csr Path

Filesystem path to the certificate signing request file (.csr). `null` if no CSR is available.

## Any of

Type: string

Must be at least `1` characters long

Type: null

##

#### Cert Type

Type: string

Human-readable certificate type, typically 'CERTIFICATE' for standard certificates.

Must be at least `1` characters long

##

#### Cert Type Existing

Type: boolean

Whether this is an existing certificate (imported or generated).

##

#### Cert Type Csr

Type: boolean

Whether this entry represents a Certificate Signing Request (CSR) rather than a signed certificate.

##

#### Cert Type Ca

Type: boolean

Whether this certificate is a Certificate Authority (CA) certificate.

##

#### Chain List

Type: array of string

Array of PEM-encoded certificates in the certificate chain, starting with the leaf certificate.

No Additional Items

##### Each item of this array must be:

Type: string

##

#### Key Length

Size of the cryptographic key in bits. `null` if key information is unavailable.

## Any of

Type: integer
Type: null

##

#### Key Type

Type of cryptographic key algorithm (e.g., 'RSA', 'EC', 'DSA'). `null` if key information is unavailable.

## Any of

Type: string

Must be at least `1` characters long

Type: null

##

#### Country

ISO 3166-1 alpha-2 country code from the certificate subject. `null` if not specified.

## Any of

Type: string
Type: null

##

#### State

State or province name from the certificate subject. `null` if not specified.

## Any of

Type: string
Type: null

##

#### City

City or locality name from the certificate subject. `null` if not specified.

## Any of

Type: string
Type: null

##

#### Organization

Organization name from the certificate subject. `null` if not specified.

## Any of

Type: string
Type: null

##

#### Organizational Unit

Organizational unit from the certificate subject. `null` if not specified.

## Any of

Type: string
Type: null

##

#### Common

Common name (CN) from the certificate subject. `null` if not specified.

## Any of

Type: string
Type: null

##

#### San

Subject Alternative Names (SAN) from the certificate extension. `null` if no SAN extension is present.

## Any of

Type: array of string
No Additional Items

##### Each item of this array must be:

Type: string
Type: null

##

#### Email

Email address from the certificate subject. `null` if not specified.

## Any of

Type: string
Type: null

##

#### Dn

Distinguished Name (DN) of the certificate subject in RFC 2253 format. `null` if certificate parsing failed.

## Any of

Type: string
Type: null

##

#### Subject Name Hash

Hash of the certificate subject name. `null` if certificate parsing failed.

## Any of

Type: integer
Type: null

##

#### Extensions

Type: object

X.509 certificate extensions parsed into a dictionary structure.

##

#### Digest Algorithm

Cryptographic hash algorithm used for certificate signing (e.g., 'SHA256'). `null` if unavailable.

## Any of

Type: string
Type: null

##

#### Lifetime

Certificate validity period in seconds. `null` if certificate parsing failed.

## Any of

Type: integer
Type: null

##

#### From

Certificate validity start date in ISO 8601 format. `null` if certificate parsing failed.

## Any of

Type: string
Type: null

##

#### Until

Certificate validity end date in ISO 8601 format. `null` if certificate parsing failed.

## Any of

Type: string
Type: null

##

#### Serial

Certificate serial number. `null` if certificate parsing failed.

## Any of

Type: integer
Type: null

##

#### Chain

Whether this certificate has an associated certificate chain. `null` if unavailable.

## Any of

Type: boolean
Type: null

##

#### Fingerprint

SHA-256 fingerprint of the certificate in hexadecimal format. `null` if certificate parsing failed.

## Any of

Type: string
Type: null

##

#### Expired

Whether the certificate has expired. `null` if certificate parsing failed.

## Any of

Type: boolean
Type: null

##

#### Parsed

Type: boolean

Whether the certificate data was successfully parsed and validated.

#### CertificateQueryResultItem

Type: object
No Additional Properties

##

#### Id

Type: integer

Unique identifier for this certificate entry.

##

#### Type

Type: integer

Internal certificate type identifier used to determine certificate capabilities.

##

#### Name

Type: string

Human-readable name for this certificate. Must be unique and contain only alphanumeric characters, dashes, and underscores.

Must be at least `1` characters long

##

#### Certificate

PEM-encoded X.509 certificate data. `null` for certificate signing requests (CSR) that have not yet been signed.

## Any of

Type: string
Type: null

##

#### Privatekey

PEM-encoded private key corresponding to the certificate. `null` if no private key is available or for imported certificates without keys.

## Any of

Type: string
Type: null

##

#### Csr

PEM-encoded Certificate Signing Request (CSR) data. `null` for imported certificates or completed ACME certificates.

## Any of

Type: string
Type: null

##

#### Acme Uri

ACME directory server URI used for automated certificate management. `null` for non-ACME certificates.

## Any of

Type: string
Type: null

##

#### Domains Authenticators

Mapping of domain names to ACME DNS authenticator IDs for domain validation. `null` for non-ACME certificates.

## Any of

Type: object
Type: null

##

#### Renew Days

Number of days before expiration to attempt automatic renewal. Only applicable for ACME certificates. `null` for non-renewable certificates.

## Any of

Type: integer
Type: null

##

#### Acme

ACME registration and account information used for certificate lifecycle management. `null` for non-ACME certificates.

## Any of

Type: object
Type: null

##

#### Add To Trusted Store

Type: boolean

Whether this certificate should be added to the system's trusted certificate store.

##

#### Root Path

Type: string

Filesystem path where certificate-related files are stored.

Must be at least `1` characters long

##

#### Certificate Path

Filesystem path to the certificate file (.crt). `null` if no certificate is available.

## Any of

Type: string

Must be at least `1` characters long

Type: null

##

#### Privatekey Path

Filesystem path to the private key file (.key). `null` if no private key is available.

## Any of

Type: string

Must be at least `1` characters long

Type: null

##

#### Csr Path

Filesystem path to the certificate signing request file (.csr). `null` if no CSR is available.

## Any of

Type: string

Must be at least `1` characters long

Type: null

##

#### Cert Type

Type: string

Human-readable certificate type, typically 'CERTIFICATE' for standard certificates.

Must be at least `1` characters long

##

#### Cert Type Existing

Type: boolean

Whether this is an existing certificate (imported or generated).

##

#### Cert Type Csr

Type: boolean

Whether this entry represents a Certificate Signing Request (CSR) rather than a signed certificate.

##

#### Cert Type Ca

Type: boolean

Whether this certificate is a Certificate Authority (CA) certificate.

##

#### Chain List

Type: array of string

Array of PEM-encoded certificates in the certificate chain, starting with the leaf certificate.

No Additional Items

##### Each item of this array must be:

Type: string

##

#### Key Length

Size of the cryptographic key in bits. `null` if key information is unavailable.

## Any of

Type: integer
Type: null

##

#### Key Type

Type of cryptographic key algorithm (e.g., 'RSA', 'EC', 'DSA'). `null` if key information is unavailable.

## Any of

Type: string

Must be at least `1` characters long

Type: null

##

#### Country

ISO 3166-1 alpha-2 country code from the certificate subject. `null` if not specified.

## Any of

Type: string
Type: null

##

#### State

State or province name from the certificate subject. `null` if not specified.

## Any of

Type: string
Type: null

##

#### City

City or locality name from the certificate subject. `null` if not specified.

## Any of

Type: string
Type: null

##

#### Organization

Organization name from the certificate subject. `null` if not specified.

## Any of

Type: string
Type: null

##

#### Organizational Unit

Organizational unit from the certificate subject. `null` if not specified.

## Any of

Type: string
Type: null

##

#### Common

Common name (CN) from the certificate subject. `null` if not specified.

## Any of

Type: string
Type: null

##

#### San

Subject Alternative Names (SAN) from the certificate extension. `null` if no SAN extension is present.

## Any of

Type: array of string
No Additional Items

##### Each item of this array must be:

Type: string
Type: null

##

#### Email

Email address from the certificate subject. `null` if not specified.

## Any of

Type: string
Type: null

##

#### Dn

Distinguished Name (DN) of the certificate subject in RFC 2253 format. `null` if certificate parsing failed.

## Any of

Type: string
Type: null

##

#### Subject Name Hash

Hash of the certificate subject name. `null` if certificate parsing failed.

## Any of

Type: integer
Type: null

##

#### Extensions

Type: object

X.509 certificate extensions parsed into a dictionary structure.

##

#### Digest Algorithm

Cryptographic hash algorithm used for certificate signing (e.g., 'SHA256'). `null` if unavailable.

## Any of

Type: string
Type: null

##

#### Lifetime

Certificate validity period in seconds. `null` if certificate parsing failed.

## Any of

Type: integer
Type: null

##

#### From

Certificate validity start date in ISO 8601 format. `null` if certificate parsing failed.

## Any of

Type: string
Type: null

##

#### Until

Certificate validity end date in ISO 8601 format. `null` if certificate parsing failed.

## Any of

Type: string
Type: null

##

#### Serial

Certificate serial number. `null` if certificate parsing failed.

## Any of

Type: integer
Type: null

##

#### Chain

Whether this certificate has an associated certificate chain. `null` if unavailable.

## Any of

Type: boolean
Type: null

##

#### Fingerprint

SHA-256 fingerprint of the certificate in hexadecimal format. `null` if certificate parsing failed.

## Any of

Type: string
Type: null

##

#### Expired

Whether the certificate has expired. `null` if certificate parsing failed.

## Any of

Type: boolean
Type: null

##

#### Parsed

Type: boolean

Whether the certificate data was successfully parsed and validated.

Type: integer

Required roles: CERTIFICATE_READ