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

# dataSourcesByIds

> Gets several sources by global id, in the order given. Fails if any id doesn't exist.



**query** `dataSourcesByIds(id: [ID!]!): [DataSource!]!`

## Arguments

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

Global ids of the sources.

## Returns

`[DataSource!]!`

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

## Examples

```graphql Query
query DataSourcesByIds($id: [ID!]!) {
  dataSourcesByIds(id: $id) {
    cardDefinitions {
      edges {
        cursor
        node {
          __typename
        }
      }
      nodes {
        activationStatus {
          __typename
        }
        activePropertySet {
          __typename
        }
        allowsEnrichment
        cardsCount
        createdAt
        createdByUser
      }
      pageInfo {
        endCursor
        hasNextPage
        hasPreviousPage
        startCursor
      }
      totalCount
    }
    createdAt
    dataProviders {
      edges {
        cursor
        node {
          __typename
        }
      }
      nodes {
        accessToken {
          __typename
        }
        createdAt
        createdByUser
        dataSources {
          __typename
        }
        id
        isDeleted
      }
      pageInfo {
        endCursor
        hasNextPage
        hasPreviousPage
        startCursor
      }
      totalCount
    }
    deletedAt
    description
    entries {
      edges {
        cursor
        node {
          __typename
        }
      }
      nodes {
        createdAt
        entryId
        id
        properties {
          __typename
        }
        source {
          __typename
        }
        sourceId
      }
      pageInfo {
        endCursor
        hasNextPage
        hasPreviousPage
        startCursor
      }
      totalCount
    }
  }
}
```

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

```json Response
{
  "data": {
    "dataSourcesByIds": [
      {
        "cardDefinitions": {
          "edges": [
            {
              "cursor": "string",
              "node": {
                "__typename": "CardDefinition"
              }
            }
          ],
          "nodes": [
            {
              "activationStatus": {
                "__typename": "WorkflowStatus"
              },
              "activePropertySet": {
                "__typename": "PropertySet"
              },
              "allowsEnrichment": true,
              "cardsCount": "value",
              "createdAt": "value",
              "createdByUser": "value"
            }
          ],
          "pageInfo": {
            "endCursor": "string",
            "hasNextPage": true,
            "hasPreviousPage": true,
            "startCursor": "string"
          },
          "totalCount": 1
        },
        "createdAt": "value",
        "dataProviders": {
          "edges": [
            {
              "cursor": "string",
              "node": {
                "__typename": "DataProvider"
              }
            }
          ],
          "nodes": [
            {
              "accessToken": {
                "__typename": "AccessToken"
              },
              "createdAt": "value",
              "createdByUser": "value",
              "dataSources": {
                "__typename": "DataSourcesConnection"
              },
              "id": "id",
              "isDeleted": true
            }
          ],
          "pageInfo": {
            "endCursor": "string",
            "hasNextPage": true,
            "hasPreviousPage": true,
            "startCursor": "string"
          },
          "totalCount": 1
        },
        "deletedAt": "value",
        "description": "string",
        "entries": {
          "edges": [
            {
              "cursor": "string",
              "node": {
                "__typename": "SourceEntry"
              }
            }
          ],
          "nodes": [
            {
              "createdAt": "value",
              "entryId": "string",
              "id": "id",
              "properties": [
                {
                  "__typename": "Property"
                }
              ],
              "source": {
                "__typename": "DataSource"
              },
              "sourceId": "string"
            }
          ],
          "pageInfo": {
            "endCursor": "string",
            "hasNextPage": true,
            "hasPreviousPage": true,
            "startCursor": "string"
          },
          "totalCount": "value"
        }
      }
    ]
  }
}
```


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