---
title: "Listing all Security Objects"
slug: "dsm-example-code-listing-all-security-objects"
updated: 2024-12-10T18:02:17Z
published: 2024-12-10T18:02:17Z
canonical: "support.fortanix.com/dsm-example-code-listing-all-security-objects"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://support.fortanix.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Listing all Security Objects

The `getSecurityObjects` API returns a list of all security objects that the currently authorized entity can access. This supports some filter and sort parameters.

- [C#](/docs/dsm-example-code-listing-all-security-objects#tabs-1)
- [Go](/docs/dsm-example-code-listing-all-security-objects#tabs-2)
- [Java](/docs/dsm-example-code-listing-all-security-objects#tabs-3)
- [Python](/docs/dsm-example-code-listing-all-security-objects#tabs-4)
- [REST API using curl](/docs/dsm-example-code-listing-all-security-objects#tabs-5)

### C#

```bash
SecurityObjectsApi sObjectApi = new SecurityObjectsApi();
List<KeyObject> sObjects = sObjectApi.GetSecurityObjects();
```

### Go

```bash
keys, err := client.ListSobjects(ctx, nil)
```

### Java

```bash
SecurityObjectsApi sobjectsApi = new SecurityObjectsApi();
List<KeyObject> allKeys = sobjectsApi.getSecurityObjects(null, null, null);
```

### Python

```bash
api_instance = sdkms.v1.SecurityObjectsApi(api_client=client)
sobjects = api_instance.get_security_objects()
```

### REST API using curl

```bash
curl <Endpoint URL>/crypto/v1/keys -H 'Authorization: Bearer YhXwwa-6C...ig5g'
```

## Related

- [Unwrapping a Key](/dsm-example-code-unwrapping-a-key.md)
- [Configure API Client](/dsm-example-code-configure-api-client.md)
