<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[`Workspace`](Workspace) › [`getLeafById`](Workspace/getLeafById)
## Workspace.getLeafById() method
Retrieve a leaf by its id.
**Signature:**
```typescript
getLeafById(id: string): WorkspaceLeaf | null;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| <code>id</code> | <code>string</code> | <p>id of the leaf to retrieve.</p><p> 1.5.1</p> |
**Returns:**
[`WorkspaceLeaf`](WorkspaceLeaf)` | null`