# Get Folder

Retrieve a folder’s metadata by ID.

> Kind: REST endpoint · Updated: May 30, 2026 · GET /v1/folders/:folderId

Returns metadata for a single folder resource. Works identically across providers; provider-specific fields are nested under native.

### Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| folderId | string | required | CloudFiles resource ID of the folder. |

### Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| fields | string | optional | Comma-separated projection, e.g. id,name,path. |
| library | string | optional | Disambiguate when the same ID exists in two connected libraries (rare). |

**cURL**
```bash
curl https://api.cloudfiles.io/v1/folders/01ABC \
  -H "Authorization: Bearer $CLOUDFILES_API_KEY"
```

**JavaScript**
```js
const res = await fetch(
  'https://api.cloudfiles.io/v1/folders/01ABC',
  { headers: { Authorization: `Bearer ${KEY}` } }
);
const folder = await res.json();
```

**Python**
```py
import requests
r = requests.get(
  "https://api.cloudfiles.io/v1/folders/01ABC",
  headers={"Authorization": f"Bearer {KEY}"})
folder = r.json()
```

**Apex**
```apex
// In Salesforce, prefer the Apex client:
Resource r = Client.getResourceDetails('01ABC', null);
```

## Response · 200

```json
{
  "id": "01ABC",
  "type": "folder",
  "name": "Contracts",
  "path": "/Accounts/Acme Corp/Contracts",
  "library": "sharepoint_a8x2",
  "driveId": "b!xT9k",
  "parentId": "01AA0",
  "childCount": 14,
  "updatedAt": "2026-05-29T08:11:02Z",
  "native": { "webUrl": "https://acme.sharepoint.com/..." }
}
```

## Errors

| Status | Code | When |
|---|---|---|
| 401 | unauthorized | Missing or invalid API key. |
| 403 | plan_required | API access not in your plan — see the 403 guide. |
| 404 | not_found | Unknown folder ID, or resource is in an unregistered site. |
