# Entity definitions API

Use the Entity definitions API to manage entity definitions or retrieve all entities for a specific defintion.
## Authentication
To use this API, you need:
- The URL of your Content Hub server. You can get this from your Content Hub
  Administrator. Enter this URL in the <b>{{server}}</b> variable by hovering your mouse
  over the variable in the <b>Try it</b> pane and then clicking <b>Edit</b>.

- An access token and the client ID. Both are sent with every request. You
  can create a token through the [Content Hub
  interface](https://doc.sitecore.com/ch/en/users/content-hub/create-an-oauth-client.html)
  or by [requesting one using the API
  itself](https://doc.sitecore.com/ch/en/developers/cloud-dev/oauth-tokens.html#grant-flows).

Version: v1.0
License: closed source

Metadata:
  - product: Content Hub

## Servers

```
https://{server}
```

Variables:
- `server`
  Default: "your-server"

## Security

### OAuth2.0

Type: oauth2
Token URL: /oauth/token
Scopes:

## Download OpenAPI description

 - [Entity definitions API](https://api-docs.sitecore.com/_bundle/ch/entity-definitions-api/index.yaml)

## Entity definitions

 - [GET /api/entitydefinitions](https://api-docs.sitecore.com/ch/entity-definitions-api/entity-definitions/entitydefinitions.md): Lists all entity definitions.
 - [GET /api/entitydefinitions/{name}](https://api-docs.sitecore.com/ch/entity-definitions-api/entity-definitions/entitydefinitionbyname.md): Retrieves an entity definition using its name, with options to include conditional members, load permissions, and exclude light entity definitions.
 - [POST /api/entitydefinitions/{name}](https://api-docs.sitecore.com/ch/entity-definitions-api/entity-definitions/addentitydefinition.md): Creates a new entity definition with the provided details.
 - [PUT /api/entitydefinitions/{name}](https://api-docs.sitecore.com/ch/entity-definitions-api/entity-definitions/updateentitydefinition.md): Updates an entity definition with the details provided.
 - [DELETE /api/entitydefinitions/{name}](https://api-docs.sitecore.com/ch/entity-definitions-api/entity-definitions/deleteentitydefinitionbyname.md): Removes the entity definition with a specific name.
 - [GET /api/entitydefinitions/name/{name}](https://api-docs.sitecore.com/ch/entity-definitions-api/entity-definitions/entitydefinitionbynamev2.md): Retrieves an entity definition by its name (V2 endpoint).
 - [GET /api/entitydefinitions/{id}](https://api-docs.sitecore.com/ch/entity-definitions-api/entity-definitions/entitydefinitionbyid.md): Retrieves an entity definition by its ID, with options to include conditional members, load permissions, and exclude light entity definitions.
 - [DELETE /api/entitydefinitions/{id}](https://api-docs.sitecore.com/ch/entity-definitions-api/entity-definitions/deleteentitydefinitionbyid.md): Removes the entity definition identified by the given ID.
 - [POST /api/entitydefinitions/{name}/impact](https://api-docs.sitecore.com/ch/entity-definitions-api/entity-definitions/calculategraphimpact.md): Submits a modified version of an entity definition and returns an analysis of the impact those changes would have compared to the current definition. Used to preview the effects of schema changes befo
## Entities

 - [GET /api/entitydefinitions/{name}/entities](https://api-docs.sitecore.com/ch/entity-definitions-api/entities/entitiesbydefinition.md): Lists all entities that match a specific entity definition, with support for filtering, pagination, and localization.
