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

# folderById

> Gets a folder by its global id. Fails with `NotFoundError` when no folder has it.



**query** `folderById(id: ID!): Folder!`

## Arguments

**`id`**: `ID!` (required)

Global id of the folder (`Folder.id`).

## Returns

`Folder!`

**`activeTask`**: `QueuedTask`

Task working on this folder or its entries, or null. Changes to the folder fail until the task finishes.

---

**`children`**: `ChildrenConnection`

Folders directly under this folder.

**Arguments:**

- `after`: `String` — Returns the elements in the list that come after the specified cursor.
- `before`: `String` — Returns the elements in the list that come before the specified cursor.
- `first`: `Int` — Returns the first _n_ elements from the list.
- `last`: `Int` — Returns the last _n_ elements from the list.
- `order`: `[FolderSortInput!]`
- `where`: `FolderFilterInput`

---

**`createdAt`**: `DateTime!`

When the folder was created (UTC).

---

**`createdByUser`**: `UUID!`

Id of the user who created the folder.

---

**`dataSource`**: `DataSource!`

Source the folder belongs to.

---

**`dataSourceId`**: `ID!`

Global id of the source the folder belongs to (`DataSource.id`).

---

**`descendantFileCount`**: `Long!`

Number of entries in this folder and every folder below it.

**Arguments:**

- `uploadStatus`: `[MediaUploadStatus!]` — Counts only entries with one of these upload statuses. Omit it to count every entry.

---

**`displayName`**: `String!`

Name of the folder, shown in Studio. The root folder carries the source's name.

---

**`fileCount`**: `Long!`

Number of entries directly in this folder.

**Arguments:**

- `uploadStatus`: `[MediaUploadStatus!]` — Counts only entries with one of these upload statuses. Omit it to count every entry.

---

**`id`**: `ID!`

Global id of the folder. `folderById` and the folder id arguments of this API take it.

---

**`isSystem`**: `Boolean!`

True for the source's root folder, which every other folder descends from. It can't be renamed, moved or deleted, and entries go into it unless put elsewhere.

---

**`lastModified`**: `DateTime!`

When the folder last changed (UTC).

---

**`lastModifiedByUser`**: `UUID!`

Id of the user who last changed the folder.

---

**`parent`**: `Folder`

Parent folder. Null for the root folder.

---

**`parentFolderId`**: `ID`

Global id of the parent folder. Null only for the root folder.

---

**`path`**: `String!`

Path of the folder: the `safeName`s from the root folder down, joined by `/`. The root folder's path is the source's raw id. Unique within the source.

---

**`propertyGroups`**: `[PropertyGroup!]`

Groups that arrange source properties in Studio for this folder. Null = the source's `propertyGroups` apply.

---

**`propertyOverrides`**: `PropertyOverridesConnection`

Source property overrides of this folder: display settings and allowed values.

**Arguments:**

- `after`: `String` — Returns the elements in the list that come after the specified cursor.
- `before`: `String` — Returns the elements in the list that come before the specified cursor.
- `first`: `Int` — Returns the first _n_ elements from the list.
- `last`: `Int` — Returns the last _n_ elements from the list.
- `where`: `FolderDataSourcePropertyFilterInput`

---

**`safeName`**: `String!`

Name of the folder in its `path`: letters and digits only.

---

**`tenantId`**: `UUID!`

Id of the tenant that owns the folder.

## Examples

```graphql Query
query FolderById($id: ID!) {
  folderById(id: $id) {
    activeTask {
      artifacts {
        available
        completedAt
        createdAt
        filename
        kind
        sizeBytes
      }
      awaitingConfirmation
      configuration {
        __typename
        ... on CardsImportConfiguration {
          __typename
        }
      }
      createdAt
      createdBy
      details {
        __typename
        ... on CardsImportDetails {
          __typename
        }
      }
    }
    children {
      edges {
        cursor
        node {
          __typename
        }
      }
      nodes {
        __typename
      }
      pageInfo {
        endCursor
        hasNextPage
        hasPreviousPage
        startCursor
      }
      totalCount
    }
    createdAt
    createdByUser
    dataSource {
      cardDefinitions {
        edges {
          __typename
        }
        nodes {
          __typename
        }
        pageInfo {
          __typename
        }
        totalCount
      }
      createdAt
      dataProviders {
        edges {
          __typename
        }
        nodes {
          __typename
        }
        pageInfo {
          __typename
        }
        totalCount
      }
      deletedAt
      description
      entries {
        edges {
          __typename
        }
        nodes {
          __typename
        }
        pageInfo {
          __typename
        }
        totalCount
      }
    }
    dataSourceId
  }
}
```

```json Variables
{
  "id": "id"
}
```

```json Response
{
  "data": {
    "folderById": {
      "activeTask": {
        "artifacts": [
          {
            "available": true,
            "completedAt": "value",
            "createdAt": "value",
            "filename": "string",
            "kind": "INPUT",
            "sizeBytes": "value"
          }
        ],
        "awaitingConfirmation": true,
        "configuration": {
          "__typename": "CardsImportConfiguration"
        },
        "createdAt": "value",
        "createdBy": "value",
        "details": {
          "__typename": "CardsImportDetails"
        }
      },
      "children": {
        "edges": [
          {
            "cursor": "string",
            "node": {
              "__typename": "Folder"
            }
          }
        ],
        "nodes": [
          {
            "__typename": "Folder"
          }
        ],
        "pageInfo": {
          "endCursor": "string",
          "hasNextPage": true,
          "hasPreviousPage": true,
          "startCursor": "string"
        },
        "totalCount": 1
      },
      "createdAt": "value",
      "createdByUser": "value",
      "dataSource": {
        "cardDefinitions": {
          "edges": [
            {
              "__typename": "CardDefinitionsEdge"
            }
          ],
          "nodes": [
            {
              "__typename": "CardDefinition"
            }
          ],
          "pageInfo": {
            "__typename": "PageInfo"
          },
          "totalCount": 1
        },
        "createdAt": "value",
        "dataProviders": {
          "edges": [
            {
              "__typename": "DataProvidersEdge"
            }
          ],
          "nodes": [
            {
              "__typename": "DataProvider"
            }
          ],
          "pageInfo": {
            "__typename": "PageInfo"
          },
          "totalCount": 1
        },
        "deletedAt": "value",
        "description": "string",
        "entries": {
          "edges": [
            {
              "__typename": "SourceEntriesEdge"
            }
          ],
          "nodes": [
            {
              "__typename": "SourceEntry"
            }
          ],
          "pageInfo": {
            "__typename": "PageInfo"
          },
          "totalCount": "value"
        }
      },
      "dataSourceId": "id"
    }
  }
}
```


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