> ## 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.

# DataSource

> Holds entries of one kind, such as products or uploaded files, and the source properties found in them. Card definitions are built on sources.



**Kind**: `object`

## Implements

- `Node`

## Fields

**`cardDefinitions`**: `CardDefinitionsConnection`

Card definitions built on the source, archived ones included.

**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`: `[CardDefinitionSortInput!]`
- `where`: `CardDefinitionFilterInput`

---

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

When the source was created (UTC).

---

**`dataProviders`**: `DataProvidersConnection`

Applications that can write to the source: every live application with `write:sources` (or the older `import-datasource` scope) on this source or on all sources, ordered by name. Empty for an archived source.

**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`: `DataSourceDataProviderFilterInput`

---

**`deletedAt`**: `DateTime`

When `deleteDataSource` archived the source (UTC). Null = live. `createDataSource` with the same id restores it.

---

**`description`**: `String`

Free-text note about the source.

---

**`entries`**: `SourceEntriesConnection`

The source's entries with typed properties, filters and forward paging, as sourceEntries returns them. Paged: select the items under `nodes`.

**Arguments:**

- `after`: `String` — Returns the elements in the list that come after the specified cursor.
- `first`: `Int` — Returns the first _n_ elements from the list.
- `language`: `String` — Language code (e.g. `en`) that localized properties use in `where`, `sort` and facets. Required when any of them uses a localized property; there's no fallback language. Property values still return every stored language.
- `sort`: `[SortInput!]` — Sort keys, applied in order: a source property id, `id`, `@createdAt` or `@updatedAt`. At most 16 keys, each once (case-insensitive), with `id` only as the last key. Null or empty sorts by entry id ascending, and entry id ascending breaks ties. Missing values sort last.
- `where`: `Predicate` — Filters the source entries, as a `Predicate` over source properties; `segment`, `relation` and `lifecycle` aren't supported. Null returns every entry of the source.

---

**`entriesCount`**: `Long!`

Number of entries in the source. -1, with an error in the response, when the count can't be read.

---

**`entriesLastModifiedAt`**: `DateTime`

When an entry of the source was last created, changed or deleted. Null when no change has been recorded.

---

**`folders`**: `FoldersConnection`

Folders of the source at every level, its root folder included.

**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`

---

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

Global id of the source: base64 of `DataSource:<raw id>`. `dataSourceById` and the `dataSourceId` arguments of this API take it. The raw id (e.g. `products`) is what REST `/v1/sources/{sourceId}` and `DataSourceProperty.dataSourceId` use.

---

**`name`**: `String!`

Name of the source, shown in Studio. Renaming the source renames its root folder too.

---

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

Groups that arrange the source properties of the source in Studio. A folder uses them unless it sets its own.

---

**`relatedDataSources`**: `RelatedDataSourcesConnection`

Sources linked to this one through `relatedDataSources` on `createDataSource` or `updateDataSource`.

**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`: `[DataSourceSortInput!]`
- `where`: `DataSourceFilterInput`

---

**`sourceProperties`**: `SourcePropertiesConnection`

Source properties of the source, most recently changed first. Source properties being deleted are left out.

**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`: `[DataSourcePropertySortInput!]`
- `where`: `DataSourcePropertyFilterInput`

---

**`spottedLanguages`**: `[String!]!`

Language codes found in the source's data.

---

**`spottedProperties`**: `[String!]!`

Display names of the source's source properties, up to 1000. Use `sourceProperties` instead.

> Deprecated: Use `sourceProperties` field instead

---

**`status`**: `DataSourceStatus!`

Lifecycle state of the source. See `DataSourceStatus`.

---

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

Id of the tenant that owns the source.

---

**`ttl`**: `TimeSpan`

Time an entry may go without a content change before it is deleted. Null = entries are kept.

---

**`type`**: `DataSourceType!`

Kind of source: `GENERIC` holds data entries, `MEDIA` holds uploaded files. Set when the source is created.

---

**`updatedAt`**: `DateTime!`

When the source last changed (UTC).



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