# List PKI trust stores (/docs/apis/management/trust-stores/GetAllPkiTrustStores)

`GET /truststores/pki`

Retrieves a paginated list of PKI trust stores. Optional query parameters allow sorting of the results.

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

- `page` (query) (integer, int32, default 1) The page number to retrieve.
- `size` (query) (integer, int32, default 10) The number of trust stores to return per page.
- `sort` (query) (string) Sort expression in the format `field:direction`, where direction is `1` for ascending or `-1` for descending. Supported fields include - `name`, `creation_time` and `last_updated`

## Response body

`200`, JSON. The trust stores were retrieved successfully

Returns `PkiTrustStoreSummary[]`. Each item has these fields:

- `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.
- `certificate_count` (integer, required, int32) The total number of certificates contained in the trust store.
- `banned_certificates_count` (integer, required, int32) The total number of certificates explicitly marked as banned in the trust store.
- `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).

## Errors

- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
  - `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.

## Example (MonoCloud .NET SDK)

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

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


var page = 1;

var size = 10;

var sort = "name:1";


var result = await apiClient.TrustStores.GetAllPkiTrustStoresAsync(page, size, sort);
```

## Example (MonoCloud Javascript SDK)

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

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

const page = 1;

const size = 10;

const sort = 'name:1';

const result = apiClient.trustStores.getAllPkiTrustStores(page, size, sort);
```