---
title: entities.data
description: Read data records with the data repository, and change them with the data mutations. Same records as the REST Data entity.
canonical: https://developers.coevera.com/reference/graphql/data/
section: graphql
verification: schema
generatedFrom: schema f155746 (2026-10-20)
publisher: Coevera
---

# entities.data

Read data records with the data repository, and change them with the data mutations. Same records as the REST Data entity.

REST: [Data](https://developers.coevera.com/reference/rest/data.md).

## Queries

- `getById(entityId: ID!): DataEntity` Returns the record with the given id, or null when there is none. Deleted records are returned as well.
- `getByIds(entityIds: [ID!]!): [DataEntity!]!` Returns the records with the given ids; ids without a record are left out. Deleted records are returned as well.
- `getAll(limit: Int, offset: Int, filter: DataFilterInput, orderBy: [DataOrderByInput!], includeDeleted: Boolean): [DataEntity!]!` Returns the records that match the filter, paged with limit and offset.
- `getByCriteria(filter: DataFilterInput, orderBy: [DataOrderByInput!], includeDeleted: Boolean, before: String, after: String, first: Int, last: Int): DataEntityConnection` Returns the records that match the filter as a cursor-paginated connection.
- `getPublished(limit: Int, offset: Int, filter: DataFilterInput, orderBy: [DataOrderByInput!], includeDeleted: Boolean): [DataEntity!]!` Returns the published records that match the filter, paged with limit and offset.
- `getDrafts(filter: DataFilterInput, orderBy: [DataOrderByInput!]): [DataEntity!]!` Returns the records that match the filter, with pending unpublished changes applied where a draft exists.
- `getDraftById(entityId: ID!): DataEntity!` Returns the record with the given id, with its pending unpublished changes applied when a draft exists.

## Mutations

- `restoreData(input: RestoreDataInput!): RestoreDataPayload` Restore a deleted record.
- `deleteData(input: DeleteDataInput!): DeleteDataPayload` Soft-delete.
- `createData(input: CreateDataInput!, validationLevel: [ValidationLevel!]): CreateDataPayload` Create one record.
- `updateData(input: UpdateDataInput!, validationLevel: [ValidationLevel!]): UpdateDataPayload` Update fields.

## Types

### DataEntity (object)

Option of a dropdown or multi-select field, one of the values users can choose from.

- `isDeleteProtected: Boolean!` True when the record is protected against deletion because it must always exist in the space. Deleting a record that is not protected can still fail on other checks. Read-only.
- `hasDraft: Boolean` True when the record has unpublished draft changes, including pending translation changes, that can be published.
- `id: ID!` Unique identifier of entity.
- `isDeleted: Boolean` Specifies if the entity is considered deleted.
- `modified: DateTime` Last modification time.
- `created: DateTime` Creation time.
- `allowedBy: JSONString` For dependent dropdowns, the parent-field values this option is available for, as a JSON array of identifiers (option ids or enum names). Empty when always available.
- `calcValue: Float` Numeric value associated with the option, used in calculation formulas (e.g. score of a dropdown option).
- `dataSetId: ID!` Identifier of the data set this option belongs to. Shared by all options of a dropdown / radio / multiselect field.
- `optionName: String!` Name of the entity and its default text representation.
- `sortOrder: Int!` Position of the option within its data set; lower values appear first.
- `isPublished: Boolean` True when the entity configuration is published; false while it exists only as an unpublished draft.
- `revision: Int` Revision when entity was lastly changed.
- `optionNameTranslations: JSONString!` Map of locale codes to translated option names (e.g. {"en-US": "Hot", "de-DE": "Heiß"}). Empty when no translations are defined.
- `optionNameTranslated: String` Option name in the current user's language, taken from optionNameTranslations. Empty when no translation is available for that language.
- `instancePermissions: [EntityPermsEnum!]! (1 args)` Permissions the current user has on this record, out of the requested ones.

### DataEntityConnection (object)

Paginated list of Data records.

- `pageInfo: PageInfo!` Pagination data for this connection.
- `edges: [DataEntityEdge]!` Contains the nodes in this connection.
- `totalCount: Int` Total number of items in the connection.

### DataEntityEdge (object)

A Relay edge containing a `DataEntity` and its cursor.

- `node: DataEntity` The item at the end of the edge
- `cursor: String!` A cursor for use in pagination

### DataFilterInput (input)

Filter conditions for Data records. Conditions on different fields are combined with AND; use OR, AND and NOT for other combinations.

- `OR: [DataFilterInput!]` Matches records that meet at least one of the listed filters.
- `AND: [DataFilterInput!]` Matches records that meet all of the listed filters.
- `NOT: DataFilterInput` Matches records that do not meet this filter.
- `globalSearchQuery: String` Search term matched against the fields that the global search covers for this entity.
- `id: EntityFilterStringField` Unique identifier of entity.
- `isDeleted: Boolean` Specifies if the entity is considered deleted.
- `modified: EntityFilterDateTimeField` Last modification time.
- `created: EntityFilterDateTimeField` Creation time.
- `calcValue: EntityFilterNumberField` Numeric value associated with the option, used in calculation formulas (e.g. score of a dropdown option).
- `dataSetId: EntityFilterStringField` Identifier of the data set this option belongs to. Shared by all options of a dropdown / radio / multiselect field.
- `optionName: EntityFilterStringField` Name of the entity and its default text representation.
- `sortOrder: EntityFilterNumberField` Position of the option within its data set; lower values appear first.
- `isPublished: Boolean` True when the entity configuration is published; false while it exists only as an unpublished draft.
- `revision: EntityFilterNumberField` Revision when entity was lastly changed.

### DataOrderByInput (input)

Sorting of Data records. Set exactly one field in each item; list several items to sort by more fields, in order of priority.

- `id: OrderByEnum` Unique identifier of entity.
- `isDeleted: OrderByEnum` Specifies if the entity is considered deleted.
- `modified: OrderByEnum` Last modification time.
- `created: OrderByEnum` Creation time.
- `calcValue: OrderByEnum` Numeric value associated with the option, used in calculation formulas (e.g. score of a dropdown option).
- `optionName: OrderByEnum` Name of the entity and its default text representation.
- `sortOrder: OrderByEnum` Position of the option within its data set; lower values appear first.
- `isPublished: OrderByEnum` True when the entity configuration is published; false while it exists only as an unpublished draft.
- `revision: OrderByEnum` Revision when entity was lastly changed.

### CreateDataInput (input)

Field values of a new Data record.

- `clientMutationId: String` Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
- `modified: DateTime` Last modification time.
- `created: DateTime` Creation time.
- `allowedBy: JSONString` For dependent dropdowns, the parent-field values this option is available for, as a JSON array of identifiers (option ids or enum names). Empty when always available.
- `calcValue: Float` Numeric value associated with the option, used in calculation formulas (e.g. score of a dropdown option).
- `dataSetId: ID!` Identifier of the data set this option belongs to. Shared by all options of a dropdown / radio / multiselect field.
- `optionName: String!` Name of the entity and its default text representation.
- `sortOrder: Int!` Position of the option within its data set; lower values appear first.
- `isPublished: Boolean` True when the entity configuration is published; false while it exists only as an unpublished draft.
- `revision: Int` Revision when entity was lastly changed.
- `optionNameTranslations: JSONString` Map of locale codes to translated option names (e.g. {"en-US": "Hot", "de-DE": "Heiß"}). Empty when no translations are defined.

### DeleteDataInput (input)

Id of the Data record to delete.

- `clientMutationId: String` Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
- `id: ID!` Unique identifier of entity.

### RestoreDataInput (input)

Parameters of the restoreData mutation.

- `sortOrder: Int!` Zero-based position of the restored option within its data set; the other options are renumbered around it.
- `id: ID!` Identifier of the DataEntity to perform the action on.
- `clientMutationId: String` Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).

### UpdateDataInput (input)

Id of a Data record and the field values to change.

- `clientMutationId: String` Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
- `id: ID!` Unique identifier of entity.
- `modified: DateTime` Last modification time.
- `created: DateTime` Creation time.
- `allowedBy: JSONString` For dependent dropdowns, the parent-field values this option is available for, as a JSON array of identifiers (option ids or enum names). Empty when always available.
- `calcValue: Float` Numeric value associated with the option, used in calculation formulas (e.g. score of a dropdown option).
- `optionName: String` Name of the entity and its default text representation.
- `sortOrder: Int` Position of the option within its data set; lower values appear first.
- `revision: Int` Revision when entity was lastly changed.
- `optionNameTranslations: JSONString` Map of locale codes to translated option names (e.g. {"en-US": "Hot", "de-DE": "Heiß"}). Empty when no translations are defined.

### CreateDataPayload (object)

Result of the createData mutation.

- `data: DataEntity` The created record.
- `clientMutationId: String` Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).

### DeleteDataPayload (object)

Result of the deleteData mutation.

- `data: DataEntity` The deleted record.
- `clientMutationId: String` Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).

### RestoreDataPayload (object)

Result of the restoreData mutation.

- `result: DataEntity` The restored option.
- `clientMutationId: String` Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).

### UpdateDataPayload (object)

Result of the updateData mutation.

- `data: DataEntity` The updated record.
- `clientMutationId: String` Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).

Types several repositories share, such as `PageInfo` and the filter fields, are in the [types index](https://developers.coevera.com/reference/graphql/types.md). The [SDL](https://developers.coevera.com/graphql/schema.graphql) has the whole schema in one file.

## Example

```graphql
query FirstDatas {
  entities {
    data {
      getByCriteria(first: 3, orderBy: [{ modified: Desc }]) {
        totalCount
        edges { node { id modified } }
      }
    }
  }
}
```

```bash
curl 'https://{region}.api.coevera.com/api/v100/app/space/{space_id}/graphql/public' \
  --user "$COEVERA_API_KEY:$COEVERA_API_SECRET" \
  --header 'Content-Type: application/json' \
  --data '{"query":"query FirstDatas { entities { data { getByCriteria(first: 3, orderBy: [{ modified: Desc }]) { totalCount edges { node { id modified } } } } } }"}'
```
