# Retrieve a PKI trust store (/docs/apis/management/trust-stores/FindPkiTrustStoreById)

`GET /truststores/pki/{trust_store_id}`

Retrieves detailed information for the specified PKI trust store.

Base URL: `https://{tenant}.{region}.monocloud.com/api`, where `{tenant}`, `{region}` (one of us, eu, in) come from your tenant. Authentication: send your Management API key in the `X-API-KEY` header.

## Parameters

- `trust_store_id` (path) (string, required) The unique identifier of the trust store.

## Response body

`200`, JSON. The trust store was retrieved successfully

Returns `PkiTrustStore`.

- `id` (string, required) The unique identifier of the trust store.
- `name` (string, required) Human-readable name for the trust store.
- `enabled` (boolean, required) Indicates whether the trust store is enabled.
- `is_default` (boolean, required) Indicates whether this trust store is configured as the default store for the mTLS endpoint.
- `show_in_discovery_document` (boolean, required) Specifies whether this trust store’s mTLS endpoint aliases are published under `mtls_additional_endpoint_aliases` in the OpenID Connect discovery document.
- `options` (PkiTrustStoreOptions, required) Trust store validation settings (certificate type, revocation, caching, and related policies).
  - `validate_certificate_use` (boolean, required) Indicates whether the client certificate is validated for client authentication, including Client Authentication EKU checks across the certificate chain.
  - `validate_validity_period` (boolean, required) Indicates whether the certificate validity period (`NotBefore` / `NotAfter`) is enforced.
  - `revocation_mode` (string, required) Specifies how certificate revocation status is evaluated. One of: `no_check`, `online`, `offline`.
  - `revocation_check_depth` (string, required) Specifies how revocation checks are applied across the certificate chain. One of: `end_certificate_only`, `exclude_root`, `entire_chain`.
  - `revocation_check_clock_skew` (integer, required, int32) Specifies the allowed clock skew used when validating CRL issuance times and OCSP responses (in seconds).
  - `ocsp_check_timeout` (integer, required, int32) Specifies the timeout for OCSP responder calls when online revocation checking is enabled (in seconds).
  - `online_crl_check_timeout` (integer, required, int32) Specifies the timeout for downloading CRLs from certificate distribution points (CDPs) when online revocation checking is enabled (in seconds).
  - `certificate_auth_cache_duration` (integer, required, int32) Specifies how long certificate authentication results are cached (in seconds).
  - `ocsp_cache_duration` (integer, required, int32) Specifies how long OCSP responses are cached when online OCSP checking is enabled (in seconds).
  - `online_crl_cache_duration` (integer, required, int32) Specifies how long downloaded CRLs are cached when online CRL checking is enabled (in seconds).
- `creation_time` (integer, required, date-time) Specifies the creation time of the trust store (in Epoch).
- `last_updated` (integer, required, date-time) Specifies the last update time of the trust store (in Epoch).
- `cert_chain` (string, required) PEM-encoded certificate chain (concatenated), used as the trust anchor and intermediates for mTLS validation.

## Errors

- `400` Bad Request
  - `type` (string, required) A URI reference that identifies the error type. When accessed, it may provide human-readable documentation.
  - `title` (string, required) A short, human-readable summary of the error.
  - `status` (integer, required, int32) The HTTP status code associated with this error response.
  - `trace_id` (string, required) A unique identifier for the request, used for tracing and diagnostics.
  - `detail` (string) A human-readable explanation specific to this occurrence of the error.
  - `instance` (string) A URI reference that identifies the specific occurrence of the error.
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
  Same body as `400`.
- `422` Unprocessable Entity
  - `type` (string, required) A URI reference that identifies the error type. When accessed, it may provide human-readable documentation.
  - `title` (string, required) A short, human-readable summary of the error.
  - `status` (integer, required, int32) The HTTP status code associated with this error response.
  - `trace_id` (string, required) A unique identifier for the request, used for tracing and diagnostics.
  - `detail` (string) A human-readable explanation specific to this occurrence of the error.
  - `instance` (string) A URI reference that identifies the specific occurrence of the error.
  - `errors` (Record<string, string[]>, required) A key-value map of validation errors, where each key represents a request field and the value contains one or more messages describing why the request could not be processed.

## Example (MonoCloud .NET SDK)

```csharp
using MonoCloud.Management;
using MonoCloud.Management.Core.Base;

var apiClient = new MonoCloudManagementClient(new MonoCloudConfig("<your-domain>", "[[API-Key]]"));


var trustStoreId = "9qVBxPQiZqtUsBOykavK6";


var result = await apiClient.TrustStores.FindPkiTrustStoreByIdAsync(trustStoreId);
```

## Example (MonoCloud Javascript SDK)

```javascript
import { MonoCloudManagementClient } from '@monocloud/management';

const apiClient = MonoCloudManagementClient.init({ domain: '<your-domain>', apiKey: '[[API-Key]]' });

const trustStoreId = '9qVBxPQiZqtUsBOykavK6';

const result = apiClient.trustStores.findPkiTrustStoreById(trustStoreId);
```