## Get Directory

`DirectoryGetResponse Beta.Directories.Get(DirectoryGetParamsparameters, CancellationTokencancellationToken = default)`

**get** `/api/v1/beta/directories/{directory_id}`

Retrieve a directory by its identifier.

### Parameters

- `DirectoryGetParams parameters`

  - `required string directoryID`

  - `string? organizationID`

  - `string? projectID`

### Returns

- `class DirectoryGetResponse:`

  API response schema for a directory.

  - `required string ID`

    Unique identifier for the directory.

  - `required string Name`

    Human-readable name for the directory.

  - `required string ProjectID`

    Project the directory belongs to.

  - `DateTimeOffset? CreatedAt`

    Creation datetime

  - `DateTimeOffset? DeletedAt`

    Optional timestamp of when the directory was deleted. Null if not deleted.

  - `string? Description`

    Optional description shown to users.

  - `DateTimeOffset? ExpiresAt`

    When this directory expires and is eligible for cleanup.

  - `IReadOnlyDictionary<string, JsonElement>? SystemMetadata`

    Reserved system-managed metadata.

  - `Type? Type`

    Directory type: 'user', 'index', or 'ephemeral'.

    - `"ephemeral"Ephemeral`

    - `"index"Index`

    - `"user"User`

  - `DateTimeOffset? UpdatedAt`

    Update datetime

### Example

```csharp
DirectoryGetParams parameters = new() { DirectoryID = "directory_id" };

var directory = await client.Beta.Directories.Get(parameters);

Console.WriteLine(directory);
```

#### Response

```json
{
  "id": "id",
  "name": "x",
  "project_id": "project_id",
  "created_at": "2019-12-27T18:11:19.117Z",
  "deleted_at": "2019-12-27T18:11:19.117Z",
  "description": "description",
  "expires_at": "2019-12-27T18:11:19.117Z",
  "system_metadata": {
    "foo": "bar"
  },
  "type": "ephemeral",
  "updated_at": "2019-12-27T18:11:19.117Z"
}
```
