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

# List secrets with imports

> List a folder's secrets and imported secrets in one array with the Node.js SDK.

`client.secrets().listSecretsWithImports()` returns the secrets in a folder and the secrets that the folder [imports](https://infisical.com/docs/documentation/platform/secret-reference.md#secret-imports) in one array. If an imported secret has the same name as a secret in the folder, the array contains only the folder's secret.

## Parameters

The same options as [`listSecrets`](https://infisical.com/docs/sdks/languages/node/secrets/list-secrets#parameters), except `includeImports`.

## Returns

**secrets** `Secret[]`

The secrets in the folder, followed by the imported secrets. Each secret has the fields that [`getSecret`](https://infisical.com/docs/sdks/languages/node/secrets/get-secret#returns) returns.
An imported secret has no tags, and its `createdAt` and `updatedAt` hold the time of the call.

```typescript Basic theme={"dark"}
const secrets = await client.secrets().listSecretsWithImports({
  projectId: "<project-id>",
  environment: "dev",
  secretPath: "/backend",
});
```

```json Response theme={"dark"}
[
  {
    "id": "0b7c4a7e-5f3e-4d8a-9a51-2f6c1c0b3e21",
    "environment": "dev",
    "secretKey": "DATABASE_URL",
    "secretValue": "postgres://app:<password>@db.internal:5432/app",
    "secretValueHidden": false,
    "secretComment": "",
    "secretPath": "/backend",
    "type": "shared",
    "version": 4,
    "tags": [],
    "secretMetadata": [],
    "createdAt": "2026-11-02T09:14:27.512Z",
    "updatedAt": "2026-11-30T16:41:03.208Z"
  },
  {
    "id": "6f1d2c3b-8e4a-4b7f-9c2d-1a0e5f6b7c8d",
    "environment": "dev",
    "secretKey": "SENTRY_DSN",
    "secretValue": "https://<key>@o0.ingest.sentry.io/0",
    "secretValueHidden": false,
    "secretComment": "",
    "secretPath": "/shared",
    "type": "shared",
    "version": 1,
    "tags": [],
    "secretMetadata": [],
    "createdAt": "2026-12-02T12:00:00.000Z",
    "updatedAt": "2026-12-02T12:00:00.000Z"
  }
]
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.