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

# entities.entity

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

REST: [Entities](https://developers.coevera.com/reference/rest/entities.md).

## Queries

- `getById(entityId: ID!): EntityEntity` Returns the record with the given id, or null when there is none. Deleted records are returned as well.
- `getByIds(entityIds: [ID!]!): [EntityEntity!]!` 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: EntityFilterInput, orderBy: [EntityOrderByInput!], includeDeleted: Boolean): [EntityEntity!]!` Returns the records that match the filter, paged with limit and offset.
- `getByCriteria(filter: EntityFilterInput, orderBy: [EntityOrderByInput!], includeDeleted: Boolean, before: String, after: String, first: Int, last: Int): EntityEntityConnection` Returns the records that match the filter as a cursor-paginated connection.
- `getChangedFieldsSinceRevision(id: UUID!, revision: Int!): [UUID!]!` Returns the ids of the fields of a record that changed after the given revision. Returns an empty list for entities without change tracking.

## Types

### EntityEntity (object)

Kind of record in the space, such as Account, Lead or a custom entity, with its display names and behavior.

- `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.
- `id: ID!` Unique identifier of entity.
- `entityName: String` Stable identifier of the entity (e.g. "Account", "Lead", "Opportunity").
- `tableName: String` Storage identifier of the entity. Read-only.
- `tableEx: String` Storage identifier of the entity's custom-field data. Read-only.
- `tableDataEx: String` Storage identifier of the entity's option relation data. Read-only.
- `defaultViewFieldId: ID!` Id of the field used as the default display label for records of this entity.
- `abstractEntityId: ID!` For sub-entities (e.g. Lead/Opportunity sharing a LeadOppty parent), the entity name of the parent abstract entity. Empty for stand-alone entities.
- `entityType: Int!` Kind of the entity in the platform: business entity, system schema, custom entity, etc.
- `preferenceOrder: Int!` Display order used to sort entities in pickers and navigation lists; lower values appear first.
- `allowsMultipleRelation: Boolean` True when records of this entity can be linked to multiple records of the same other entity through the same relation.
- `hasDraft: Boolean!` True when records of this entity support drafts (changes go through a draft before being published).
- `accessMode: Int!` Access scope of records of this entity: shared across the entire space, scoped to a sales unit, or owner-only.
- `icon: Int!` Numeric icon identifier used to render the entity in the UI.
- `isDeleted: Boolean` True when the entity is marked as deleted (soft-delete). Read-only at the entity-metadata level.
- `modified: DateTime` Last modification time.
- `created: DateTime` Creation time.
- `settings: JSONString` Optional space-level configuration for the entity (e.g. UI/feature flags). Empty when no overrides are set.
- `nameSingular: String` Display name of the entity in singular form (e.g. "Account").
- `namePlural: String` Display name of the entity in plural form (e.g. "Accounts").
- `instancePermissions: [EntityPermsEnum!]! (1 args)` Permissions the current user has on this record, out of the requested ones.

### EntityEntityConnection (object)

Paginated list of Entity records.

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

### EntityEntityEdge (object)

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

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

### EntityFilterInput (input)

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

- `OR: [EntityFilterInput!]` Matches records that meet at least one of the listed filters.
- `AND: [EntityFilterInput!]` Matches records that meet all of the listed filters.
- `NOT: EntityFilterInput` 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.
- `entityName: EntityFilterStringField` Stable identifier of the entity (e.g. "Account", "Lead", "Opportunity").
- `tableName: EntityFilterStringField` Storage identifier of the entity. Read-only.
- `tableEx: EntityFilterStringField` Storage identifier of the entity's custom-field data. Read-only.
- `tableDataEx: EntityFilterStringField` Storage identifier of the entity's option relation data. Read-only.
- `defaultViewFieldId: EntityFilterStringField` Id of the field used as the default display label for records of this entity.
- `abstractEntityId: EntityFilterStringField` For sub-entities (e.g. Lead/Opportunity sharing a LeadOppty parent), the entity name of the parent abstract entity. Empty for stand-alone entities.
- `entityType: EntityFilterNumberField` Kind of the entity in the platform: business entity, system schema, custom entity, etc.
- `preferenceOrder: EntityFilterNumberField` Display order used to sort entities in pickers and navigation lists; lower values appear first.
- `allowsMultipleRelation: Boolean` True when records of this entity can be linked to multiple records of the same other entity through the same relation.
- `hasDraft: Boolean` True when records of this entity support drafts (changes go through a draft before being published).
- `accessMode: EntityFilterNumberField` Access scope of records of this entity: shared across the entire space, scoped to a sales unit, or owner-only.
- `icon: EntityFilterNumberField` Numeric icon identifier used to render the entity in the UI.
- `isDeleted: Boolean` True when the entity is marked as deleted (soft-delete). Read-only at the entity-metadata level.
- `modified: EntityFilterDateTimeField` Last modification time.
- `created: EntityFilterDateTimeField` Creation time.
- `nameSingular: EntityFilterStringField` Display name of the entity in singular form (e.g. "Account").
- `namePlural: EntityFilterStringField` Display name of the entity in plural form (e.g. "Accounts").

### EntityOrderByInput (input)

Sorting of Entity 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.
- `entityName: OrderByEnum` Stable identifier of the entity (e.g. "Account", "Lead", "Opportunity").
- `tableName: OrderByEnum` Storage identifier of the entity. Read-only.
- `tableEx: OrderByEnum` Storage identifier of the entity's custom-field data. Read-only.
- `tableDataEx: OrderByEnum` Storage identifier of the entity's option relation data. Read-only.
- `defaultViewFieldId: OrderByEnum` Id of the field used as the default display label for records of this entity.
- `abstractEntityId: OrderByEnum` For sub-entities (e.g. Lead/Opportunity sharing a LeadOppty parent), the entity name of the parent abstract entity. Empty for stand-alone entities.
- `entityType: OrderByEnum` Kind of the entity in the platform: business entity, system schema, custom entity, etc.
- `preferenceOrder: OrderByEnum` Display order used to sort entities in pickers and navigation lists; lower values appear first.
- `allowsMultipleRelation: OrderByEnum` True when records of this entity can be linked to multiple records of the same other entity through the same relation.
- `hasDraft: OrderByEnum` True when records of this entity support drafts (changes go through a draft before being published).
- `accessMode: OrderByEnum` Access scope of records of this entity: shared across the entire space, scoped to a sales unit, or owner-only.
- `icon: OrderByEnum` Numeric icon identifier used to render the entity in the UI.
- `isDeleted: OrderByEnum` True when the entity is marked as deleted (soft-delete). Read-only at the entity-metadata level.
- `modified: OrderByEnum` Last modification time.
- `created: OrderByEnum` Creation time.
- `nameSingular: OrderByEnum` Display name of the entity in singular form (e.g. "Account").
- `namePlural: OrderByEnum` Display name of the entity in plural form (e.g. "Accounts").

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 FirstEntitys {
  entities {
    entity {
      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 FirstEntitys { entities { entity { getByCriteria(first: 3, orderBy: [{ modified: Desc }]) { totalCount edges { node { id modified } } } } } }"}'
```
