---
title: 엔터티 생성 또는 업데이트
description: Software Catalog에서 엔터티를 생성하거나 업데이트합니다.
breadcrumbs: 문서 > API > 엔터티 생성 또는 업데이트
---

> For the complete documentation index, see [llms.txt](https://dnd37xeb23o8n.cloudfront.net/stefon.simmons/docs-astro-web-10435/llms.txt).

# 엔터티 생성 또는 업데이트

## v2 (latest)

| Datadog site      | API endpoint                                             |
| ----------------- | -------------------------------------------------------- |
| app.datadoghq.com | POST https://api.datadoghq.com/api/v2/catalog/entity     |
| us3.datadoghq.com | POST https://api.us3.datadoghq.com/api/v2/catalog/entity |
| us5.datadoghq.com | POST https://api.us5.datadoghq.com/api/v2/catalog/entity |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/api/v2/catalog/entity      |
| ap1.datadoghq.com | POST https://api.ap1.datadoghq.com/api/v2/catalog/entity |
| ap2.datadoghq.com | POST https://api.ap2.datadoghq.com/api/v2/catalog/entity |
| uk1.datadoghq.com | POST https://api.uk1.datadoghq.com/api/v2/catalog/entity |
| app.ddog-gov.com  | POST https://api.ddog-gov.com/api/v2/catalog/entity      |
| us2.ddog-gov.com  | POST https://api.us2.ddog-gov.com/api/v2/catalog/entity  |

### Overview

Software Catalog에서 엔터티를 생성하거나 업데이트합니다.

OAuth apps require the `apm_service_catalog_write` authorization [scope](https://dnd37xeb23o8n.cloudfront.net/stefon.simmons/docs-astro-web-10435/ko/api/latest/scopes.md#software-catalog) to access this endpoint.

### Request

#### Body Data (required)

엔터티 YAML 또는 JSON.

{% tabs %}
{% tab label="Model" %}
| Parent field     | Field                   | Type     | Description                                                                                                                                                                                                                                                     |
| ---------------- | ----------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                  | Option 1                | <oneOf>  | 엔터티 생성 또는 업데이트 요청입니다.                                                                                                                                                                                                                                           |
| Option 1         | <kind=service>          | object   | Schema for service entities.                                                                                                                                                                                                                                    |
| <kind=service>   | apiVersion [*required*] | enum     | The version of the schema data that was used to populate this entity's data. This could be via the API, Terraform, or YAML file in a repository. The field is known as schema-version in the previous version. Allowed enum values: `v3`, `v2.2`, `v2.1`, `v2`. |
| <kind=service>   | datadog                 | object   | Datadog product integrations for the service entity.                                                                                                                                                                                                            |
| datadog          | codeLocations           | [object] | Schema for mapping source code locations to an entity.                                                                                                                                                                                                          |
| codeLocations    | paths                   | [string] | The paths (glob) to the source code of the service.                                                                                                                                                                                                             |
| codeLocations    | repositoryURL           | string   | The repository path of the source code of the entity.                                                                                                                                                                                                           |
| datadog          | events                  | [object] | Events associations.                                                                                                                                                                                                                                            |
| events           | name                    | string   | The name of the query.                                                                                                                                                                                                                                          |
| events           | query                   | string   | The query to run.                                                                                                                                                                                                                                               |
| datadog          | logs                    | [object] | Logs association.                                                                                                                                                                                                                                               |
| logs             | name                    | string   | The name of the query.                                                                                                                                                                                                                                          |
| logs             | query                   | string   | The query to run.                                                                                                                                                                                                                                               |
| datadog          | performanceData         | object   | Performance stats association.                                                                                                                                                                                                                                  |
| performanceData  | tags                    | [string] | A list of APM entity tags that associates the APM Stats data with the entity.                                                                                                                                                                                   |
| datadog          | pipelines               | object   | CI Pipelines association.                                                                                                                                                                                                                                       |
| pipelines        | fingerprints            | [string] | A list of CI Fingerprints that associate CI Pipelines with the entity.                                                                                                                                                                                          |
| <kind=service>   | extensions              | object   | Custom extensions. This is the free-formed field to send client-side metadata. No Datadog features are affected by this field.                                                                                                                                  |
| <kind=service>   | integrations            | object   | A base schema for defining third-party integrations.                                                                                                                                                                                                            |
| integrations     | opsgenie                | object   | An Opsgenie integration schema.                                                                                                                                                                                                                                 |
| opsgenie         | region                  | string   | The region for the Opsgenie integration.                                                                                                                                                                                                                        |
| opsgenie         | serviceURL [*required*] | string   | The service URL for the Opsgenie integration.                                                                                                                                                                                                                   |
| integrations     | pagerduty               | object   | A PagerDuty integration schema.                                                                                                                                                                                                                                 |
| pagerduty        | serviceURL [*required*] | string   | The service URL for the PagerDuty integration.                                                                                                                                                                                                                  |
| <kind=service>   | kind [*required*]       | enum     | The definition of Entity V3 Service Kind object. Allowed enum values: `service`.                                                                                                                                                                                |
| <kind=service>   | metadata [*required*]   | object   | The definition of Entity V3 Metadata object.                                                                                                                                                                                                                    |
| metadata         | additionalOwners        | [object] | The additional owners of the entity, usually a team.                                                                                                                                                                                                            |
| additionalOwners | name [*required*]       | string   | Team name.                                                                                                                                                                                                                                                      |
| additionalOwners | type                    | string   | Team type.                                                                                                                                                                                                                                                      |
| metadata         | contacts                | [object] | A list of contacts for the entity.                                                                                                                                                                                                                              |
| contacts         | contact [*required*]    | string   | Contact value.                                                                                                                                                                                                                                                  |
| contacts         | name                    | string   | Contact name.                                                                                                                                                                                                                                                   |
| contacts         | type [*required*]       | string   | Contact type.                                                                                                                                                                                                                                                   |
| metadata         | description             | string   | Short description of the entity. The UI can leverage the description for display.                                                                                                                                                                               |
| metadata         | displayName             | string   | User friendly name of the entity. The UI can leverage the display name for display.                                                                                                                                                                             |
| metadata         | id                      | string   | A read-only globally unique identifier for the entity generated by Datadog.  User supplied values are ignored.                                                                                                                                                  |
| metadata         | inheritFrom             | string   | The entity reference from which to inherit metadata                                                                                                                                                                                                             |
| metadata         | links                   | [object] | A list of links for the entity.                                                                                                                                                                                                                                 |
| links            | name [*required*]       | string   | Link name.                                                                                                                                                                                                                                                      |
| links            | provider                | string   | Link provider.                                                                                                                                                                                                                                                  |
| links            | type [*required*]       | string   | Link type. Default: `other`.                                                                                                                                                                                                                                    |
| links            | url [*required*]        | string   | Link URL.                                                                                                                                                                                                                                                       |
| metadata         | managed                 | object   | A read-only set of Datadog managed attributes generated by Datadog.  User supplied values are ignored.                                                                                                                                                          |
| metadata         | name [*required*]       | string   | Unique name given to an entity under the kind/namespace.                                                                                                                                                                                                        |
| metadata         | namespace               | string   | Namespace is a part of unique identifier. It has a default value of 'default'.                                                                                                                                                                                  |
| metadata         | owner                   | string   | The owner of the entity, usually a team.                                                                                                                                                                                                                        |
| metadata         | tags                    | [string] | A set of custom tags.                                                                                                                                                                                                                                           |
| <kind=service>   | spec                    | object   | The definition of Entity V3 Service Spec object.                                                                                                                                                                                                                |
| spec             | componentOf             | [string] | A list of components the service is a part of                                                                                                                                                                                                                   |
| spec             | dependsOn               | [string] | A list of components the service depends on.                                                                                                                                                                                                                    |
| spec             | languages               | [string] | The service's programming language.                                                                                                                                                                                                                             |
| spec             | lifecycle               | string   | The lifecycle state of the component.                                                                                                                                                                                                                           |
| spec             | tier                    | string   | The importance of the component.                                                                                                                                                                                                                                |
| spec             | type                    | string   | The type of service.                                                                                                                                                                                                                                            |
| Option 1         | <kind=datastore>        | object   | Schema for datastore entities.                                                                                                                                                                                                                                  |
| <kind=datastore> | apiVersion [*required*] | enum     | The version of the schema data that was used to populate this entity's data. This could be via the API, Terraform, or YAML file in a repository. The field is known as schema-version in the previous version. Allowed enum values: `v3`, `v2.2`, `v2.1`, `v2`. |
| <kind=datastore> | datadog                 | object   | Datadog product integrations for the datastore entity.                                                                                                                                                                                                          |
| datadog          | events                  | [object] | Events associations.                                                                                                                                                                                                                                            |
| events           | name                    | string   | The name of the query.                                                                                                                                                                                                                                          |
| events           | query                   | string   | The query to run.                                                                                                                                                                                                                                               |
| datadog          | logs                    | [object] | Logs association.                                                                                                                                                                                                                                               |
| logs             | name                    | string   | The name of the query.                                                                                                                                                                                                                                          |
| logs             | query                   | string   | The query to run.                                                                                                                                                                                                                                               |
| datadog          | performanceData         | object   | Performance stats association.                                                                                                                                                                                                                                  |
| performanceData  | tags                    | [string] | A list of APM entity tags that associates the APM Stats data with the entity.                                                                                                                                                                                   |
| <kind=datastore> | extensions              | object   | Custom extensions. This is the free-formed field to send client side metadata. No Datadog features are affected by this field.                                                                                                                                  |
| <kind=datastore> | integrations            | object   | A base schema for defining third-party integrations.                                                                                                                                                                                                            |
| integrations     | opsgenie                | object   | An Opsgenie integration schema.                                                                                                                                                                                                                                 |
| opsgenie         | region                  | string   | The region for the Opsgenie integration.                                                                                                                                                                                                                        |
| opsgenie         | serviceURL [*required*] | string   | The service URL for the Opsgenie integration.                                                                                                                                                                                                                   |
| integrations     | pagerduty               | object   | A PagerDuty integration schema.                                                                                                                                                                                                                                 |
| pagerduty        | serviceURL [*required*] | string   | The service URL for the PagerDuty integration.                                                                                                                                                                                                                  |
| <kind=datastore> | kind [*required*]       | enum     | The definition of Entity V3 Datastore Kind object. Allowed enum values: `datastore`.                                                                                                                                                                            |
| <kind=datastore> | metadata [*required*]   | object   | The definition of Entity V3 Metadata object.                                                                                                                                                                                                                    |
| metadata         | additionalOwners        | [object] | The additional owners of the entity, usually a team.                                                                                                                                                                                                            |
| additionalOwners | name [*required*]       | string   | Team name.                                                                                                                                                                                                                                                      |
| additionalOwners | type                    | string   | Team type.                                                                                                                                                                                                                                                      |
| metadata         | contacts                | [object] | A list of contacts for the entity.                                                                                                                                                                                                                              |
| contacts         | contact [*required*]    | string   | Contact value.                                                                                                                                                                                                                                                  |
| contacts         | name                    | string   | Contact name.                                                                                                                                                                                                                                                   |
| contacts         | type [*required*]       | string   | Contact type.                                                                                                                                                                                                                                                   |
| metadata         | description             | string   | Short description of the entity. The UI can leverage the description for display.                                                                                                                                                                               |
| metadata         | displayName             | string   | User friendly name of the entity. The UI can leverage the display name for display.                                                                                                                                                                             |
| metadata         | id                      | string   | A read-only globally unique identifier for the entity generated by Datadog.  User supplied values are ignored.                                                                                                                                                  |
| metadata         | inheritFrom             | string   | The entity reference from which to inherit metadata                                                                                                                                                                                                             |
| metadata         | links                   | [object] | A list of links for the entity.                                                                                                                                                                                                                                 |
| links            | name [*required*]       | string   | Link name.                                                                                                                                                                                                                                                      |
| links            | provider                | string   | Link provider.                                                                                                                                                                                                                                                  |
| links            | type [*required*]       | string   | Link type. Default: `other`.                                                                                                                                                                                                                                    |
| links            | url [*required*]        | string   | Link URL.                                                                                                                                                                                                                                                       |
| metadata         | managed                 | object   | A read-only set of Datadog managed attributes generated by Datadog.  User supplied values are ignored.                                                                                                                                                          |
| metadata         | name [*required*]       | string   | Unique name given to an entity under the kind/namespace.                                                                                                                                                                                                        |
| metadata         | namespace               | string   | Namespace is a part of unique identifier. It has a default value of 'default'.                                                                                                                                                                                  |
| metadata         | owner                   | string   | The owner of the entity, usually a team.                                                                                                                                                                                                                        |
| metadata         | tags                    | [string] | A set of custom tags.                                                                                                                                                                                                                                           |
| <kind=datastore> | spec                    | object   | The definition of Entity V3 Datastore Spec object.                                                                                                                                                                                                              |
| spec             | componentOf             | [string] | A list of components the datastore is a part of                                                                                                                                                                                                                 |
| spec             | lifecycle               | string   | The lifecycle state of the datastore.                                                                                                                                                                                                                           |
| spec             | tier                    | string   | The importance of the datastore.                                                                                                                                                                                                                                |
| spec             | type                    | string   | The type of datastore.                                                                                                                                                                                                                                          |
| Option 1         | <kind=queue>            | object   | Schema for queue entities.                                                                                                                                                                                                                                      |
| <kind=queue>     | apiVersion [*required*] | enum     | The version of the schema data that was used to populate this entity's data. This could be via the API, Terraform, or YAML file in a repository. The field is known as schema-version in the previous version. Allowed enum values: `v3`, `v2.2`, `v2.1`, `v2`. |
| <kind=queue>     | datadog                 | object   | Datadog product integrations for the datastore entity.                                                                                                                                                                                                          |
| datadog          | events                  | [object] | Events associations.                                                                                                                                                                                                                                            |
| events           | name                    | string   | The name of the query.                                                                                                                                                                                                                                          |
| events           | query                   | string   | The query to run.                                                                                                                                                                                                                                               |
| datadog          | logs                    | [object] | Logs association.                                                                                                                                                                                                                                               |
| logs             | name                    | string   | The name of the query.                                                                                                                                                                                                                                          |
| logs             | query                   | string   | The query to run.                                                                                                                                                                                                                                               |
| datadog          | performanceData         | object   | Performance stats association.                                                                                                                                                                                                                                  |
| performanceData  | tags                    | [string] | A list of APM entity tags that associates the APM Stats data with the entity.                                                                                                                                                                                   |
| <kind=queue>     | extensions              | object   | Custom extensions. This is the free-formed field to send client-side metadata. No Datadog features are affected by this field.                                                                                                                                  |
| <kind=queue>     | integrations            | object   | A base schema for defining third-party integrations.                                                                                                                                                                                                            |
| integrations     | opsgenie                | object   | An Opsgenie integration schema.                                                                                                                                                                                                                                 |
| opsgenie         | region                  | string   | The region for the Opsgenie integration.                                                                                                                                                                                                                        |
| opsgenie         | serviceURL [*required*] | string   | The service URL for the Opsgenie integration.                                                                                                                                                                                                                   |
| integrations     | pagerduty               | object   | A PagerDuty integration schema.                                                                                                                                                                                                                                 |
| pagerduty        | serviceURL [*required*] | string   | The service URL for the PagerDuty integration.                                                                                                                                                                                                                  |
| <kind=queue>     | kind [*required*]       | enum     | The definition of Entity V3 Queue Kind object. Allowed enum values: `queue`.                                                                                                                                                                                    |
| <kind=queue>     | metadata [*required*]   | object   | The definition of Entity V3 Metadata object.                                                                                                                                                                                                                    |
| metadata         | additionalOwners        | [object] | The additional owners of the entity, usually a team.                                                                                                                                                                                                            |
| additionalOwners | name [*required*]       | string   | Team name.                                                                                                                                                                                                                                                      |
| additionalOwners | type                    | string   | Team type.                                                                                                                                                                                                                                                      |
| metadata         | contacts                | [object] | A list of contacts for the entity.                                                                                                                                                                                                                              |
| contacts         | contact [*required*]    | string   | Contact value.                                                                                                                                                                                                                                                  |
| contacts         | name                    | string   | Contact name.                                                                                                                                                                                                                                                   |
| contacts         | type [*required*]       | string   | Contact type.                                                                                                                                                                                                                                                   |
| metadata         | description             | string   | Short description of the entity. The UI can leverage the description for display.                                                                                                                                                                               |
| metadata         | displayName             | string   | User friendly name of the entity. The UI can leverage the display name for display.                                                                                                                                                                             |
| metadata         | id                      | string   | A read-only globally unique identifier for the entity generated by Datadog.  User supplied values are ignored.                                                                                                                                                  |
| metadata         | inheritFrom             | string   | The entity reference from which to inherit metadata                                                                                                                                                                                                             |
| metadata         | links                   | [object] | A list of links for the entity.                                                                                                                                                                                                                                 |
| links            | name [*required*]       | string   | Link name.                                                                                                                                                                                                                                                      |
| links            | provider                | string   | Link provider.                                                                                                                                                                                                                                                  |
| links            | type [*required*]       | string   | Link type. Default: `other`.                                                                                                                                                                                                                                    |
| links            | url [*required*]        | string   | Link URL.                                                                                                                                                                                                                                                       |
| metadata         | managed                 | object   | A read-only set of Datadog managed attributes generated by Datadog.  User supplied values are ignored.                                                                                                                                                          |
| metadata         | name [*required*]       | string   | Unique name given to an entity under the kind/namespace.                                                                                                                                                                                                        |
| metadata         | namespace               | string   | Namespace is a part of unique identifier. It has a default value of 'default'.                                                                                                                                                                                  |
| metadata         | owner                   | string   | The owner of the entity, usually a team.                                                                                                                                                                                                                        |
| metadata         | tags                    | [string] | A set of custom tags.                                                                                                                                                                                                                                           |
| <kind=queue>     | spec                    | object   | The definition of Entity V3 Queue Spec object.                                                                                                                                                                                                                  |
| spec             | componentOf             | [string] | A list of components the queue is a part of                                                                                                                                                                                                                     |
| spec             | lifecycle               | string   | The lifecycle state of the queue.                                                                                                                                                                                                                               |
| spec             | tier                    | string   | The importance of the queue.                                                                                                                                                                                                                                    |
| spec             | type                    | string   | The type of queue.                                                                                                                                                                                                                                              |
| Option 1         | <kind=system>           | object   | Schema for system entities.                                                                                                                                                                                                                                     |
| <kind=system>    | apiVersion [*required*] | enum     | The version of the schema data that was used to populate this entity's data. This could be via the API, Terraform, or YAML file in a repository. The field is known as schema-version in the previous version. Allowed enum values: `v3`, `v2.2`, `v2.1`, `v2`. |
| <kind=system>    | datadog                 | object   | Datadog product integrations for the service entity.                                                                                                                                                                                                            |
| datadog          | events                  | [object] | Events associations.                                                                                                                                                                                                                                            |
| events           | name                    | string   | The name of the query.                                                                                                                                                                                                                                          |
| events           | query                   | string   | The query to run.                                                                                                                                                                                                                                               |
| datadog          | logs                    | [object] | Logs association.                                                                                                                                                                                                                                               |
| logs             | name                    | string   | The name of the query.                                                                                                                                                                                                                                          |
| logs             | query                   | string   | The query to run.                                                                                                                                                                                                                                               |
| datadog          | performanceData         | object   | Performance stats association.                                                                                                                                                                                                                                  |
| performanceData  | tags                    | [string] | A list of APM entity tags that associates the APM Stats data with the entity.                                                                                                                                                                                   |
| datadog          | pipelines               | object   | CI Pipelines association.                                                                                                                                                                                                                                       |
| pipelines        | fingerprints            | [string] | A list of CI Fingerprints that associate CI Pipelines with the entity.                                                                                                                                                                                          |
| <kind=system>    | extensions              | object   | Custom extensions. This is the free-formed field to send client-side metadata. No Datadog features are affected by this field.                                                                                                                                  |
| <kind=system>    | integrations            | object   | A base schema for defining third-party integrations.                                                                                                                                                                                                            |
| integrations     | opsgenie                | object   | An Opsgenie integration schema.                                                                                                                                                                                                                                 |
| opsgenie         | region                  | string   | The region for the Opsgenie integration.                                                                                                                                                                                                                        |
| opsgenie         | serviceURL [*required*] | string   | The service URL for the Opsgenie integration.                                                                                                                                                                                                                   |
| integrations     | pagerduty               | object   | A PagerDuty integration schema.                                                                                                                                                                                                                                 |
| pagerduty        | serviceURL [*required*] | string   | The service URL for the PagerDuty integration.                                                                                                                                                                                                                  |
| <kind=system>    | kind [*required*]       | enum     | The definition of Entity V3 System Kind object. Allowed enum values: `system`.                                                                                                                                                                                  |
| <kind=system>    | metadata [*required*]   | object   | The definition of Entity V3 Metadata object.                                                                                                                                                                                                                    |
| metadata         | additionalOwners        | [object] | The additional owners of the entity, usually a team.                                                                                                                                                                                                            |
| additionalOwners | name [*required*]       | string   | Team name.                                                                                                                                                                                                                                                      |
| additionalOwners | type                    | string   | Team type.                                                                                                                                                                                                                                                      |
| metadata         | contacts                | [object] | A list of contacts for the entity.                                                                                                                                                                                                                              |
| contacts         | contact [*required*]    | string   | Contact value.                                                                                                                                                                                                                                                  |
| contacts         | name                    | string   | Contact name.                                                                                                                                                                                                                                                   |
| contacts         | type [*required*]       | string   | Contact type.                                                                                                                                                                                                                                                   |
| metadata         | description             | string   | Short description of the entity. The UI can leverage the description for display.                                                                                                                                                                               |
| metadata         | displayName             | string   | User friendly name of the entity. The UI can leverage the display name for display.                                                                                                                                                                             |
| metadata         | id                      | string   | A read-only globally unique identifier for the entity generated by Datadog.  User supplied values are ignored.                                                                                                                                                  |
| metadata         | inheritFrom             | string   | The entity reference from which to inherit metadata                                                                                                                                                                                                             |
| metadata         | links                   | [object] | A list of links for the entity.                                                                                                                                                                                                                                 |
| links            | name [*required*]       | string   | Link name.                                                                                                                                                                                                                                                      |
| links            | provider                | string   | Link provider.                                                                                                                                                                                                                                                  |
| links            | type [*required*]       | string   | Link type. Default: `other`.                                                                                                                                                                                                                                    |
| links            | url [*required*]        | string   | Link URL.                                                                                                                                                                                                                                                       |
| metadata         | managed                 | object   | A read-only set of Datadog managed attributes generated by Datadog.  User supplied values are ignored.                                                                                                                                                          |
| metadata         | name [*required*]       | string   | Unique name given to an entity under the kind/namespace.                                                                                                                                                                                                        |
| metadata         | namespace               | string   | Namespace is a part of unique identifier. It has a default value of 'default'.                                                                                                                                                                                  |
| metadata         | owner                   | string   | The owner of the entity, usually a team.                                                                                                                                                                                                                        |
| metadata         | tags                    | [string] | A set of custom tags.                                                                                                                                                                                                                                           |
| <kind=system>    | spec                    | object   | The definition of Entity V3 System Spec object.                                                                                                                                                                                                                 |
| spec             | components              | [string] | A list of components belongs to the system.                                                                                                                                                                                                                     |
| spec             | lifecycle               | string   | The lifecycle state of the component.                                                                                                                                                                                                                           |
| spec             | tier                    | string   | An entity reference to the owner of the component.                                                                                                                                                                                                              |
| Option 1         | <kind=api>              | object   | Schema for API entities.                                                                                                                                                                                                                                        |
| <kind=api>       | apiVersion [*required*] | enum     | The version of the schema data that was used to populate this entity's data. This could be via the API, Terraform, or YAML file in a repository. The field is known as schema-version in the previous version. Allowed enum values: `v3`, `v2.2`, `v2.1`, `v2`. |
| <kind=api>       | datadog                 | object   | Datadog product integrations for the API entity.                                                                                                                                                                                                                |
| datadog          | codeLocations           | [object] | Schema for mapping source code locations to an entity.                                                                                                                                                                                                          |
| codeLocations    | paths                   | [string] | The paths (glob) to the source code of the service.                                                                                                                                                                                                             |
| codeLocations    | repositoryURL           | string   | The repository path of the source code of the entity.                                                                                                                                                                                                           |
| datadog          | events                  | [object] | Events associations.                                                                                                                                                                                                                                            |
| events           | name                    | string   | The name of the query.                                                                                                                                                                                                                                          |
| events           | query                   | string   | The query to run.                                                                                                                                                                                                                                               |
| datadog          | logs                    | [object] | Logs association.                                                                                                                                                                                                                                               |
| logs             | name                    | string   | The name of the query.                                                                                                                                                                                                                                          |
| logs             | query                   | string   | The query to run.                                                                                                                                                                                                                                               |
| datadog          | performanceData         | object   | Performance stats association.                                                                                                                                                                                                                                  |
| performanceData  | tags                    | [string] | A list of APM entity tags that associates the APM Stats data with the entity.                                                                                                                                                                                   |
| datadog          | pipelines               | object   | CI Pipelines association.                                                                                                                                                                                                                                       |
| pipelines        | fingerprints            | [string] | A list of CI Fingerprints that associate CI Pipelines with the entity.                                                                                                                                                                                          |
| <kind=api>       | extensions              | object   | Custom extensions. This is the free-formed field to send client-side metadata. No Datadog features are affected by this field.                                                                                                                                  |
| <kind=api>       | integrations            | object   | A base schema for defining third-party integrations.                                                                                                                                                                                                            |
| integrations     | opsgenie                | object   | An Opsgenie integration schema.                                                                                                                                                                                                                                 |
| opsgenie         | region                  | string   | The region for the Opsgenie integration.                                                                                                                                                                                                                        |
| opsgenie         | serviceURL [*required*] | string   | The service URL for the Opsgenie integration.                                                                                                                                                                                                                   |
| integrations     | pagerduty               | object   | A PagerDuty integration schema.                                                                                                                                                                                                                                 |
| pagerduty        | serviceURL [*required*] | string   | The service URL for the PagerDuty integration.                                                                                                                                                                                                                  |
| <kind=api>       | kind [*required*]       | enum     | The definition of Entity V3 API Kind object. Allowed enum values: `api`.                                                                                                                                                                                        |
| <kind=api>       | metadata [*required*]   | object   | The definition of Entity V3 Metadata object.                                                                                                                                                                                                                    |
| metadata         | additionalOwners        | [object] | The additional owners of the entity, usually a team.                                                                                                                                                                                                            |
| additionalOwners | name [*required*]       | string   | Team name.                                                                                                                                                                                                                                                      |
| additionalOwners | type                    | string   | Team type.                                                                                                                                                                                                                                                      |
| metadata         | contacts                | [object] | A list of contacts for the entity.                                                                                                                                                                                                                              |
| contacts         | contact [*required*]    | string   | Contact value.                                                                                                                                                                                                                                                  |
| contacts         | name                    | string   | Contact name.                                                                                                                                                                                                                                                   |
| contacts         | type [*required*]       | string   | Contact type.                                                                                                                                                                                                                                                   |
| metadata         | description             | string   | Short description of the entity. The UI can leverage the description for display.                                                                                                                                                                               |
| metadata         | displayName             | string   | User friendly name of the entity. The UI can leverage the display name for display.                                                                                                                                                                             |
| metadata         | id                      | string   | A read-only globally unique identifier for the entity generated by Datadog.  User supplied values are ignored.                                                                                                                                                  |
| metadata         | inheritFrom             | string   | The entity reference from which to inherit metadata                                                                                                                                                                                                             |
| metadata         | links                   | [object] | A list of links for the entity.                                                                                                                                                                                                                                 |
| links            | name [*required*]       | string   | Link name.                                                                                                                                                                                                                                                      |
| links            | provider                | string   | Link provider.                                                                                                                                                                                                                                                  |
| links            | type [*required*]       | string   | Link type. Default: `other`.                                                                                                                                                                                                                                    |
| links            | url [*required*]        | string   | Link URL.                                                                                                                                                                                                                                                       |
| metadata         | managed                 | object   | A read-only set of Datadog managed attributes generated by Datadog.  User supplied values are ignored.                                                                                                                                                          |
| metadata         | name [*required*]       | string   | Unique name given to an entity under the kind/namespace.                                                                                                                                                                                                        |
| metadata         | namespace               | string   | Namespace is a part of unique identifier. It has a default value of 'default'.                                                                                                                                                                                  |
| metadata         | owner                   | string   | The owner of the entity, usually a team.                                                                                                                                                                                                                        |
| metadata         | tags                    | [string] | A set of custom tags.                                                                                                                                                                                                                                           |
| <kind=api>       | spec                    | object   | The definition of Entity V3 API Spec object.                                                                                                                                                                                                                    |
| spec             | implementedBy           | [string] | Services which implemented the API.                                                                                                                                                                                                                             |
| spec             | interface               | <oneOf>  | The API definition.                                                                                                                                                                                                                                             |
| interface        | Object 1                | object   | The definition of `EntityV3APISpecInterfaceFileRef` object.                                                                                                                                                                                                     |
| Object 1         | fileRef                 | string   | The reference to the API definition file.                                                                                                                                                                                                                       |
| interface        | Object 2                | object   | The definition of `EntityV3APISpecInterfaceDefinition` object.                                                                                                                                                                                                  |
| Object 2         | definition              | object   | The API definition.                                                                                                                                                                                                                                             |
| spec             | lifecycle               | string   | The lifecycle state of the component.                                                                                                                                                                                                                           |
| spec             | tier                    | string   | The importance of the component.                                                                                                                                                                                                                                |
| spec             | type                    | string   | The type of API.                                                                                                                                                                                                                                                |
|                  | Option 2                | string   | Entity definition in raw JSON or YAML representation.                                                                                                                                                                                                           |
{% /tab %}

{% tab label="Example" %}
```json
{
  "apiVersion": "v3",
  "datadog": {
    "codeLocations": [
      {
        "paths": []
      }
    ],
    "events": [
      {}
    ],
    "logs": [
      {}
    ],
    "performanceData": {
      "tags": []
    },
    "pipelines": {
      "fingerprints": []
    }
  },
  "integrations": {
    "opsgenie": {
      "serviceURL": "https://www.opsgenie.com/service/shopping-cart"
    },
    "pagerduty": {
      "serviceURL": "https://www.pagerduty.com/service-directory/Pshopping-cart"
    }
  },
  "kind": "service",
  "metadata": {
    "additionalOwners": [],
    "contacts": [
      {
        "contact": "https://slack/",
        "type": "slack"
      }
    ],
    "id": "4b163705-23c0-4573-b2fb-f6cea2163fcb",
    "inheritFrom": "application:default/myapp",
    "links": [
      {
        "name": "mylink",
        "type": "link",
        "url": "https://mylink"
      }
    ],
    "name": "service-examplesoftwarecatalog",
    "tags": [
      "this:tag",
      "that:tag"
    ]
  },
  "spec": {
    "dependsOn": [],
    "languages": []
  }
}
```
{% /tab %}
{% /tabs %}

### Response

{% tabs %}
{% tab label="202" %}
ACCEPTED

{% tabs %}
{% tab label="Model" %}
Upsert entity response.

| Parent field     | Field                   | Type      | Description                                                                                                                                                                                                                                                     |
| ---------------- | ----------------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                  | data                    | [object]  | List of entity data.                                                                                                                                                                                                                                            |
| data             | attributes              | object    | Entity attributes.                                                                                                                                                                                                                                              |
| attributes       | apiVersion              | string    | The API version.                                                                                                                                                                                                                                                |
| attributes       | description             | string    | The description.                                                                                                                                                                                                                                                |
| attributes       | displayName             | string    | The display name.                                                                                                                                                                                                                                               |
| attributes       | kind                    | string    | The kind.                                                                                                                                                                                                                                                       |
| attributes       | name                    | string    | The name.                                                                                                                                                                                                                                                       |
| attributes       | namespace               | string    | The namespace.                                                                                                                                                                                                                                                  |
| attributes       | owner                   | string    | The owner.                                                                                                                                                                                                                                                      |
| attributes       | tags                    | [string]  | The tags.                                                                                                                                                                                                                                                       |
| data             | id                      | string    | Entity ID.                                                                                                                                                                                                                                                      |
| data             | meta                    | object    | Entity metadata.                                                                                                                                                                                                                                                |
| meta             | createdAt               | string    | The creation time.                                                                                                                                                                                                                                              |
| meta             | ingestionSource         | string    | The ingestion source.                                                                                                                                                                                                                                           |
| meta             | modifiedAt              | string    | The modification time.                                                                                                                                                                                                                                          |
| meta             | origin                  | string    | The origin.                                                                                                                                                                                                                                                     |
| data             | relationships           | object    | Entity relationships.                                                                                                                                                                                                                                           |
| relationships    | incidents               | object    | Entity to incidents relationship.                                                                                                                                                                                                                               |
| incidents        | data                    | [object]  | Relationships.                                                                                                                                                                                                                                                  |
| data             | id                      | string    | Associated data ID.                                                                                                                                                                                                                                             |
| data             | type                    | string    | Relationship type.                                                                                                                                                                                                                                              |
| relationships    | oncall                  | object    | Entity to oncalls relationship.                                                                                                                                                                                                                                 |
| oncall           | data                    | [object]  | Relationships.                                                                                                                                                                                                                                                  |
| data             | id                      | string    | Associated data ID.                                                                                                                                                                                                                                             |
| data             | type                    | string    | Relationship type.                                                                                                                                                                                                                                              |
| relationships    | rawSchema               | object    | Entity to raw schema relationship.                                                                                                                                                                                                                              |
| rawSchema        | data                    | object    | Relationship entry.                                                                                                                                                                                                                                             |
| data             | id                      | string    | Associated data ID.                                                                                                                                                                                                                                             |
| data             | type                    | string    | Relationship type.                                                                                                                                                                                                                                              |
| relationships    | relatedEntities         | object    | Entity to related entities relationship.                                                                                                                                                                                                                        |
| relatedEntities  | data                    | [object]  | Relationships.                                                                                                                                                                                                                                                  |
| data             | id                      | string    | Associated data ID.                                                                                                                                                                                                                                             |
| data             | type                    | string    | Relationship type.                                                                                                                                                                                                                                              |
| relationships    | schema                  | object    | Entity to detail schema relationship.                                                                                                                                                                                                                           |
| schema           | data                    | object    | Relationship entry.                                                                                                                                                                                                                                             |
| data             | id                      | string    | Associated data ID.                                                                                                                                                                                                                                             |
| data             | type                    | string    | Relationship type.                                                                                                                                                                                                                                              |
| data             | type                    | string    | Entity.                                                                                                                                                                                                                                                         |
|                  | included                | [<oneOf>] | Upsert entity response included.                                                                                                                                                                                                                                |
| included         | <type=schema>           | object    | Included detail entity schema.                                                                                                                                                                                                                                  |
| <type=schema>    | attributes              | object    | Included schema.                                                                                                                                                                                                                                                |
| attributes       | schema                  | <oneOf>   | Entity schema v3.                                                                                                                                                                                                                                               |
| schema           | <kind=service>          | object    | Schema for service entities.                                                                                                                                                                                                                                    |
| <kind=service>   | apiVersion [*required*] | enum      | The version of the schema data that was used to populate this entity's data. This could be via the API, Terraform, or YAML file in a repository. The field is known as schema-version in the previous version. Allowed enum values: `v3`, `v2.2`, `v2.1`, `v2`. |
| <kind=service>   | datadog                 | object    | Datadog product integrations for the service entity.                                                                                                                                                                                                            |
| datadog          | codeLocations           | [object]  | Schema for mapping source code locations to an entity.                                                                                                                                                                                                          |
| codeLocations    | paths                   | [string]  | The paths (glob) to the source code of the service.                                                                                                                                                                                                             |
| codeLocations    | repositoryURL           | string    | The repository path of the source code of the entity.                                                                                                                                                                                                           |
| datadog          | events                  | [object]  | Events associations.                                                                                                                                                                                                                                            |
| events           | name                    | string    | The name of the query.                                                                                                                                                                                                                                          |
| events           | query                   | string    | The query to run.                                                                                                                                                                                                                                               |
| datadog          | logs                    | [object]  | Logs association.                                                                                                                                                                                                                                               |
| logs             | name                    | string    | The name of the query.                                                                                                                                                                                                                                          |
| logs             | query                   | string    | The query to run.                                                                                                                                                                                                                                               |
| datadog          | performanceData         | object    | Performance stats association.                                                                                                                                                                                                                                  |
| performanceData  | tags                    | [string]  | A list of APM entity tags that associates the APM Stats data with the entity.                                                                                                                                                                                   |
| datadog          | pipelines               | object    | CI Pipelines association.                                                                                                                                                                                                                                       |
| pipelines        | fingerprints            | [string]  | A list of CI Fingerprints that associate CI Pipelines with the entity.                                                                                                                                                                                          |
| <kind=service>   | extensions              | object    | Custom extensions. This is the free-formed field to send client-side metadata. No Datadog features are affected by this field.                                                                                                                                  |
| <kind=service>   | integrations            | object    | A base schema for defining third-party integrations.                                                                                                                                                                                                            |
| integrations     | opsgenie                | object    | An Opsgenie integration schema.                                                                                                                                                                                                                                 |
| opsgenie         | region                  | string    | The region for the Opsgenie integration.                                                                                                                                                                                                                        |
| opsgenie         | serviceURL [*required*] | string    | The service URL for the Opsgenie integration.                                                                                                                                                                                                                   |
| integrations     | pagerduty               | object    | A PagerDuty integration schema.                                                                                                                                                                                                                                 |
| pagerduty        | serviceURL [*required*] | string    | The service URL for the PagerDuty integration.                                                                                                                                                                                                                  |
| <kind=service>   | kind [*required*]       | enum      | The definition of Entity V3 Service Kind object. Allowed enum values: `service`.                                                                                                                                                                                |
| <kind=service>   | metadata [*required*]   | object    | The definition of Entity V3 Metadata object.                                                                                                                                                                                                                    |
| metadata         | additionalOwners        | [object]  | The additional owners of the entity, usually a team.                                                                                                                                                                                                            |
| additionalOwners | name [*required*]       | string    | Team name.                                                                                                                                                                                                                                                      |
| additionalOwners | type                    | string    | Team type.                                                                                                                                                                                                                                                      |
| metadata         | contacts                | [object]  | A list of contacts for the entity.                                                                                                                                                                                                                              |
| contacts         | contact [*required*]    | string    | Contact value.                                                                                                                                                                                                                                                  |
| contacts         | name                    | string    | Contact name.                                                                                                                                                                                                                                                   |
| contacts         | type [*required*]       | string    | Contact type.                                                                                                                                                                                                                                                   |
| metadata         | description             | string    | Short description of the entity. The UI can leverage the description for display.                                                                                                                                                                               |
| metadata         | displayName             | string    | User friendly name of the entity. The UI can leverage the display name for display.                                                                                                                                                                             |
| metadata         | id                      | string    | A read-only globally unique identifier for the entity generated by Datadog.  User supplied values are ignored.                                                                                                                                                  |
| metadata         | inheritFrom             | string    | The entity reference from which to inherit metadata                                                                                                                                                                                                             |
| metadata         | links                   | [object]  | A list of links for the entity.                                                                                                                                                                                                                                 |
| links            | name [*required*]       | string    | Link name.                                                                                                                                                                                                                                                      |
| links            | provider                | string    | Link provider.                                                                                                                                                                                                                                                  |
| links            | type [*required*]       | string    | Link type. Default: `other`.                                                                                                                                                                                                                                    |
| links            | url [*required*]        | string    | Link URL.                                                                                                                                                                                                                                                       |
| metadata         | managed                 | object    | A read-only set of Datadog managed attributes generated by Datadog.  User supplied values are ignored.                                                                                                                                                          |
| metadata         | name [*required*]       | string    | Unique name given to an entity under the kind/namespace.                                                                                                                                                                                                        |
| metadata         | namespace               | string    | Namespace is a part of unique identifier. It has a default value of 'default'.                                                                                                                                                                                  |
| metadata         | owner                   | string    | The owner of the entity, usually a team.                                                                                                                                                                                                                        |
| metadata         | tags                    | [string]  | A set of custom tags.                                                                                                                                                                                                                                           |
| <kind=service>   | spec                    | object    | The definition of Entity V3 Service Spec object.                                                                                                                                                                                                                |
| spec             | componentOf             | [string]  | A list of components the service is a part of                                                                                                                                                                                                                   |
| spec             | dependsOn               | [string]  | A list of components the service depends on.                                                                                                                                                                                                                    |
| spec             | languages               | [string]  | The service's programming language.                                                                                                                                                                                                                             |
| spec             | lifecycle               | string    | The lifecycle state of the component.                                                                                                                                                                                                                           |
| spec             | tier                    | string    | The importance of the component.                                                                                                                                                                                                                                |
| spec             | type                    | string    | The type of service.                                                                                                                                                                                                                                            |
| schema           | <kind=datastore>        | object    | Schema for datastore entities.                                                                                                                                                                                                                                  |
| <kind=datastore> | apiVersion [*required*] | enum      | The version of the schema data that was used to populate this entity's data. This could be via the API, Terraform, or YAML file in a repository. The field is known as schema-version in the previous version. Allowed enum values: `v3`, `v2.2`, `v2.1`, `v2`. |
| <kind=datastore> | datadog                 | object    | Datadog product integrations for the datastore entity.                                                                                                                                                                                                          |
| datadog          | events                  | [object]  | Events associations.                                                                                                                                                                                                                                            |
| events           | name                    | string    | The name of the query.                                                                                                                                                                                                                                          |
| events           | query                   | string    | The query to run.                                                                                                                                                                                                                                               |
| datadog          | logs                    | [object]  | Logs association.                                                                                                                                                                                                                                               |
| logs             | name                    | string    | The name of the query.                                                                                                                                                                                                                                          |
| logs             | query                   | string    | The query to run.                                                                                                                                                                                                                                               |
| datadog          | performanceData         | object    | Performance stats association.                                                                                                                                                                                                                                  |
| performanceData  | tags                    | [string]  | A list of APM entity tags that associates the APM Stats data with the entity.                                                                                                                                                                                   |
| <kind=datastore> | extensions              | object    | Custom extensions. This is the free-formed field to send client side metadata. No Datadog features are affected by this field.                                                                                                                                  |
| <kind=datastore> | integrations            | object    | A base schema for defining third-party integrations.                                                                                                                                                                                                            |
| integrations     | opsgenie                | object    | An Opsgenie integration schema.                                                                                                                                                                                                                                 |
| opsgenie         | region                  | string    | The region for the Opsgenie integration.                                                                                                                                                                                                                        |
| opsgenie         | serviceURL [*required*] | string    | The service URL for the Opsgenie integration.                                                                                                                                                                                                                   |
| integrations     | pagerduty               | object    | A PagerDuty integration schema.                                                                                                                                                                                                                                 |
| pagerduty        | serviceURL [*required*] | string    | The service URL for the PagerDuty integration.                                                                                                                                                                                                                  |
| <kind=datastore> | kind [*required*]       | enum      | The definition of Entity V3 Datastore Kind object. Allowed enum values: `datastore`.                                                                                                                                                                            |
| <kind=datastore> | metadata [*required*]   | object    | The definition of Entity V3 Metadata object.                                                                                                                                                                                                                    |
| metadata         | additionalOwners        | [object]  | The additional owners of the entity, usually a team.                                                                                                                                                                                                            |
| additionalOwners | name [*required*]       | string    | Team name.                                                                                                                                                                                                                                                      |
| additionalOwners | type                    | string    | Team type.                                                                                                                                                                                                                                                      |
| metadata         | contacts                | [object]  | A list of contacts for the entity.                                                                                                                                                                                                                              |
| contacts         | contact [*required*]    | string    | Contact value.                                                                                                                                                                                                                                                  |
| contacts         | name                    | string    | Contact name.                                                                                                                                                                                                                                                   |
| contacts         | type [*required*]       | string    | Contact type.                                                                                                                                                                                                                                                   |
| metadata         | description             | string    | Short description of the entity. The UI can leverage the description for display.                                                                                                                                                                               |
| metadata         | displayName             | string    | User friendly name of the entity. The UI can leverage the display name for display.                                                                                                                                                                             |
| metadata         | id                      | string    | A read-only globally unique identifier for the entity generated by Datadog.  User supplied values are ignored.                                                                                                                                                  |
| metadata         | inheritFrom             | string    | The entity reference from which to inherit metadata                                                                                                                                                                                                             |
| metadata         | links                   | [object]  | A list of links for the entity.                                                                                                                                                                                                                                 |
| links            | name [*required*]       | string    | Link name.                                                                                                                                                                                                                                                      |
| links            | provider                | string    | Link provider.                                                                                                                                                                                                                                                  |
| links            | type [*required*]       | string    | Link type. Default: `other`.                                                                                                                                                                                                                                    |
| links            | url [*required*]        | string    | Link URL.                                                                                                                                                                                                                                                       |
| metadata         | managed                 | object    | A read-only set of Datadog managed attributes generated by Datadog.  User supplied values are ignored.                                                                                                                                                          |
| metadata         | name [*required*]       | string    | Unique name given to an entity under the kind/namespace.                                                                                                                                                                                                        |
| metadata         | namespace               | string    | Namespace is a part of unique identifier. It has a default value of 'default'.                                                                                                                                                                                  |
| metadata         | owner                   | string    | The owner of the entity, usually a team.                                                                                                                                                                                                                        |
| metadata         | tags                    | [string]  | A set of custom tags.                                                                                                                                                                                                                                           |
| <kind=datastore> | spec                    | object    | The definition of Entity V3 Datastore Spec object.                                                                                                                                                                                                              |
| spec             | componentOf             | [string]  | A list of components the datastore is a part of                                                                                                                                                                                                                 |
| spec             | lifecycle               | string    | The lifecycle state of the datastore.                                                                                                                                                                                                                           |
| spec             | tier                    | string    | The importance of the datastore.                                                                                                                                                                                                                                |
| spec             | type                    | string    | The type of datastore.                                                                                                                                                                                                                                          |
| schema           | <kind=queue>            | object    | Schema for queue entities.                                                                                                                                                                                                                                      |
| <kind=queue>     | apiVersion [*required*] | enum      | The version of the schema data that was used to populate this entity's data. This could be via the API, Terraform, or YAML file in a repository. The field is known as schema-version in the previous version. Allowed enum values: `v3`, `v2.2`, `v2.1`, `v2`. |
| <kind=queue>     | datadog                 | object    | Datadog product integrations for the datastore entity.                                                                                                                                                                                                          |
| datadog          | events                  | [object]  | Events associations.                                                                                                                                                                                                                                            |
| events           | name                    | string    | The name of the query.                                                                                                                                                                                                                                          |
| events           | query                   | string    | The query to run.                                                                                                                                                                                                                                               |
| datadog          | logs                    | [object]  | Logs association.                                                                                                                                                                                                                                               |
| logs             | name                    | string    | The name of the query.                                                                                                                                                                                                                                          |
| logs             | query                   | string    | The query to run.                                                                                                                                                                                                                                               |
| datadog          | performanceData         | object    | Performance stats association.                                                                                                                                                                                                                                  |
| performanceData  | tags                    | [string]  | A list of APM entity tags that associates the APM Stats data with the entity.                                                                                                                                                                                   |
| <kind=queue>     | extensions              | object    | Custom extensions. This is the free-formed field to send client-side metadata. No Datadog features are affected by this field.                                                                                                                                  |
| <kind=queue>     | integrations            | object    | A base schema for defining third-party integrations.                                                                                                                                                                                                            |
| integrations     | opsgenie                | object    | An Opsgenie integration schema.                                                                                                                                                                                                                                 |
| opsgenie         | region                  | string    | The region for the Opsgenie integration.                                                                                                                                                                                                                        |
| opsgenie         | serviceURL [*required*] | string    | The service URL for the Opsgenie integration.                                                                                                                                                                                                                   |
| integrations     | pagerduty               | object    | A PagerDuty integration schema.                                                                                                                                                                                                                                 |
| pagerduty        | serviceURL [*required*] | string    | The service URL for the PagerDuty integration.                                                                                                                                                                                                                  |
| <kind=queue>     | kind [*required*]       | enum      | The definition of Entity V3 Queue Kind object. Allowed enum values: `queue`.                                                                                                                                                                                    |
| <kind=queue>     | metadata [*required*]   | object    | The definition of Entity V3 Metadata object.                                                                                                                                                                                                                    |
| metadata         | additionalOwners        | [object]  | The additional owners of the entity, usually a team.                                                                                                                                                                                                            |
| additionalOwners | name [*required*]       | string    | Team name.                                                                                                                                                                                                                                                      |
| additionalOwners | type                    | string    | Team type.                                                                                                                                                                                                                                                      |
| metadata         | contacts                | [object]  | A list of contacts for the entity.                                                                                                                                                                                                                              |
| contacts         | contact [*required*]    | string    | Contact value.                                                                                                                                                                                                                                                  |
| contacts         | name                    | string    | Contact name.                                                                                                                                                                                                                                                   |
| contacts         | type [*required*]       | string    | Contact type.                                                                                                                                                                                                                                                   |
| metadata         | description             | string    | Short description of the entity. The UI can leverage the description for display.                                                                                                                                                                               |
| metadata         | displayName             | string    | User friendly name of the entity. The UI can leverage the display name for display.                                                                                                                                                                             |
| metadata         | id                      | string    | A read-only globally unique identifier for the entity generated by Datadog.  User supplied values are ignored.                                                                                                                                                  |
| metadata         | inheritFrom             | string    | The entity reference from which to inherit metadata                                                                                                                                                                                                             |
| metadata         | links                   | [object]  | A list of links for the entity.                                                                                                                                                                                                                                 |
| links            | name [*required*]       | string    | Link name.                                                                                                                                                                                                                                                      |
| links            | provider                | string    | Link provider.                                                                                                                                                                                                                                                  |
| links            | type [*required*]       | string    | Link type. Default: `other`.                                                                                                                                                                                                                                    |
| links            | url [*required*]        | string    | Link URL.                                                                                                                                                                                                                                                       |
| metadata         | managed                 | object    | A read-only set of Datadog managed attributes generated by Datadog.  User supplied values are ignored.                                                                                                                                                          |
| metadata         | name [*required*]       | string    | Unique name given to an entity under the kind/namespace.                                                                                                                                                                                                        |
| metadata         | namespace               | string    | Namespace is a part of unique identifier. It has a default value of 'default'.                                                                                                                                                                                  |
| metadata         | owner                   | string    | The owner of the entity, usually a team.                                                                                                                                                                                                                        |
| metadata         | tags                    | [string]  | A set of custom tags.                                                                                                                                                                                                                                           |
| <kind=queue>     | spec                    | object    | The definition of Entity V3 Queue Spec object.                                                                                                                                                                                                                  |
| spec             | componentOf             | [string]  | A list of components the queue is a part of                                                                                                                                                                                                                     |
| spec             | lifecycle               | string    | The lifecycle state of the queue.                                                                                                                                                                                                                               |
| spec             | tier                    | string    | The importance of the queue.                                                                                                                                                                                                                                    |
| spec             | type                    | string    | The type of queue.                                                                                                                                                                                                                                              |
| schema           | <kind=system>           | object    | Schema for system entities.                                                                                                                                                                                                                                     |
| <kind=system>    | apiVersion [*required*] | enum      | The version of the schema data that was used to populate this entity's data. This could be via the API, Terraform, or YAML file in a repository. The field is known as schema-version in the previous version. Allowed enum values: `v3`, `v2.2`, `v2.1`, `v2`. |
| <kind=system>    | datadog                 | object    | Datadog product integrations for the service entity.                                                                                                                                                                                                            |
| datadog          | events                  | [object]  | Events associations.                                                                                                                                                                                                                                            |
| events           | name                    | string    | The name of the query.                                                                                                                                                                                                                                          |
| events           | query                   | string    | The query to run.                                                                                                                                                                                                                                               |
| datadog          | logs                    | [object]  | Logs association.                                                                                                                                                                                                                                               |
| logs             | name                    | string    | The name of the query.                                                                                                                                                                                                                                          |
| logs             | query                   | string    | The query to run.                                                                                                                                                                                                                                               |
| datadog          | performanceData         | object    | Performance stats association.                                                                                                                                                                                                                                  |
| performanceData  | tags                    | [string]  | A list of APM entity tags that associates the APM Stats data with the entity.                                                                                                                                                                                   |
| datadog          | pipelines               | object    | CI Pipelines association.                                                                                                                                                                                                                                       |
| pipelines        | fingerprints            | [string]  | A list of CI Fingerprints that associate CI Pipelines with the entity.                                                                                                                                                                                          |
| <kind=system>    | extensions              | object    | Custom extensions. This is the free-formed field to send client-side metadata. No Datadog features are affected by this field.                                                                                                                                  |
| <kind=system>    | integrations            | object    | A base schema for defining third-party integrations.                                                                                                                                                                                                            |
| integrations     | opsgenie                | object    | An Opsgenie integration schema.                                                                                                                                                                                                                                 |
| opsgenie         | region                  | string    | The region for the Opsgenie integration.                                                                                                                                                                                                                        |
| opsgenie         | serviceURL [*required*] | string    | The service URL for the Opsgenie integration.                                                                                                                                                                                                                   |
| integrations     | pagerduty               | object    | A PagerDuty integration schema.                                                                                                                                                                                                                                 |
| pagerduty        | serviceURL [*required*] | string    | The service URL for the PagerDuty integration.                                                                                                                                                                                                                  |
| <kind=system>    | kind [*required*]       | enum      | The definition of Entity V3 System Kind object. Allowed enum values: `system`.                                                                                                                                                                                  |
| <kind=system>    | metadata [*required*]   | object    | The definition of Entity V3 Metadata object.                                                                                                                                                                                                                    |
| metadata         | additionalOwners        | [object]  | The additional owners of the entity, usually a team.                                                                                                                                                                                                            |
| additionalOwners | name [*required*]       | string    | Team name.                                                                                                                                                                                                                                                      |
| additionalOwners | type                    | string    | Team type.                                                                                                                                                                                                                                                      |
| metadata         | contacts                | [object]  | A list of contacts for the entity.                                                                                                                                                                                                                              |
| contacts         | contact [*required*]    | string    | Contact value.                                                                                                                                                                                                                                                  |
| contacts         | name                    | string    | Contact name.                                                                                                                                                                                                                                                   |
| contacts         | type [*required*]       | string    | Contact type.                                                                                                                                                                                                                                                   |
| metadata         | description             | string    | Short description of the entity. The UI can leverage the description for display.                                                                                                                                                                               |
| metadata         | displayName             | string    | User friendly name of the entity. The UI can leverage the display name for display.                                                                                                                                                                             |
| metadata         | id                      | string    | A read-only globally unique identifier for the entity generated by Datadog.  User supplied values are ignored.                                                                                                                                                  |
| metadata         | inheritFrom             | string    | The entity reference from which to inherit metadata                                                                                                                                                                                                             |
| metadata         | links                   | [object]  | A list of links for the entity.                                                                                                                                                                                                                                 |
| links            | name [*required*]       | string    | Link name.                                                                                                                                                                                                                                                      |
| links            | provider                | string    | Link provider.                                                                                                                                                                                                                                                  |
| links            | type [*required*]       | string    | Link type. Default: `other`.                                                                                                                                                                                                                                    |
| links            | url [*required*]        | string    | Link URL.                                                                                                                                                                                                                                                       |
| metadata         | managed                 | object    | A read-only set of Datadog managed attributes generated by Datadog.  User supplied values are ignored.                                                                                                                                                          |
| metadata         | name [*required*]       | string    | Unique name given to an entity under the kind/namespace.                                                                                                                                                                                                        |
| metadata         | namespace               | string    | Namespace is a part of unique identifier. It has a default value of 'default'.                                                                                                                                                                                  |
| metadata         | owner                   | string    | The owner of the entity, usually a team.                                                                                                                                                                                                                        |
| metadata         | tags                    | [string]  | A set of custom tags.                                                                                                                                                                                                                                           |
| <kind=system>    | spec                    | object    | The definition of Entity V3 System Spec object.                                                                                                                                                                                                                 |
| spec             | components              | [string]  | A list of components belongs to the system.                                                                                                                                                                                                                     |
| spec             | lifecycle               | string    | The lifecycle state of the component.                                                                                                                                                                                                                           |
| spec             | tier                    | string    | An entity reference to the owner of the component.                                                                                                                                                                                                              |
| schema           | <kind=api>              | object    | Schema for API entities.                                                                                                                                                                                                                                        |
| <kind=api>       | apiVersion [*required*] | enum      | The version of the schema data that was used to populate this entity's data. This could be via the API, Terraform, or YAML file in a repository. The field is known as schema-version in the previous version. Allowed enum values: `v3`, `v2.2`, `v2.1`, `v2`. |
| <kind=api>       | datadog                 | object    | Datadog product integrations for the API entity.                                                                                                                                                                                                                |
| datadog          | codeLocations           | [object]  | Schema for mapping source code locations to an entity.                                                                                                                                                                                                          |
| codeLocations    | paths                   | [string]  | The paths (glob) to the source code of the service.                                                                                                                                                                                                             |
| codeLocations    | repositoryURL           | string    | The repository path of the source code of the entity.                                                                                                                                                                                                           |
| datadog          | events                  | [object]  | Events associations.                                                                                                                                                                                                                                            |
| events           | name                    | string    | The name of the query.                                                                                                                                                                                                                                          |
| events           | query                   | string    | The query to run.                                                                                                                                                                                                                                               |
| datadog          | logs                    | [object]  | Logs association.                                                                                                                                                                                                                                               |
| logs             | name                    | string    | The name of the query.                                                                                                                                                                                                                                          |
| logs             | query                   | string    | The query to run.                                                                                                                                                                                                                                               |
| datadog          | performanceData         | object    | Performance stats association.                                                                                                                                                                                                                                  |
| performanceData  | tags                    | [string]  | A list of APM entity tags that associates the APM Stats data with the entity.                                                                                                                                                                                   |
| datadog          | pipelines               | object    | CI Pipelines association.                                                                                                                                                                                                                                       |
| pipelines        | fingerprints            | [string]  | A list of CI Fingerprints that associate CI Pipelines with the entity.                                                                                                                                                                                          |
| <kind=api>       | extensions              | object    | Custom extensions. This is the free-formed field to send client-side metadata. No Datadog features are affected by this field.                                                                                                                                  |
| <kind=api>       | integrations            | object    | A base schema for defining third-party integrations.                                                                                                                                                                                                            |
| integrations     | opsgenie                | object    | An Opsgenie integration schema.                                                                                                                                                                                                                                 |
| opsgenie         | region                  | string    | The region for the Opsgenie integration.                                                                                                                                                                                                                        |
| opsgenie         | serviceURL [*required*] | string    | The service URL for the Opsgenie integration.                                                                                                                                                                                                                   |
| integrations     | pagerduty               | object    | A PagerDuty integration schema.                                                                                                                                                                                                                                 |
| pagerduty        | serviceURL [*required*] | string    | The service URL for the PagerDuty integration.                                                                                                                                                                                                                  |
| <kind=api>       | kind [*required*]       | enum      | The definition of Entity V3 API Kind object. Allowed enum values: `api`.                                                                                                                                                                                        |
| <kind=api>       | metadata [*required*]   | object    | The definition of Entity V3 Metadata object.                                                                                                                                                                                                                    |
| metadata         | additionalOwners        | [object]  | The additional owners of the entity, usually a team.                                                                                                                                                                                                            |
| additionalOwners | name [*required*]       | string    | Team name.                                                                                                                                                                                                                                                      |
| additionalOwners | type                    | string    | Team type.                                                                                                                                                                                                                                                      |
| metadata         | contacts                | [object]  | A list of contacts for the entity.                                                                                                                                                                                                                              |
| contacts         | contact [*required*]    | string    | Contact value.                                                                                                                                                                                                                                                  |
| contacts         | name                    | string    | Contact name.                                                                                                                                                                                                                                                   |
| contacts         | type [*required*]       | string    | Contact type.                                                                                                                                                                                                                                                   |
| metadata         | description             | string    | Short description of the entity. The UI can leverage the description for display.                                                                                                                                                                               |
| metadata         | displayName             | string    | User friendly name of the entity. The UI can leverage the display name for display.                                                                                                                                                                             |
| metadata         | id                      | string    | A read-only globally unique identifier for the entity generated by Datadog.  User supplied values are ignored.                                                                                                                                                  |
| metadata         | inheritFrom             | string    | The entity reference from which to inherit metadata                                                                                                                                                                                                             |
| metadata         | links                   | [object]  | A list of links for the entity.                                                                                                                                                                                                                                 |
| links            | name [*required*]       | string    | Link name.                                                                                                                                                                                                                                                      |
| links            | provider                | string    | Link provider.                                                                                                                                                                                                                                                  |
| links            | type [*required*]       | string    | Link type. Default: `other`.                                                                                                                                                                                                                                    |
| links            | url [*required*]        | string    | Link URL.                                                                                                                                                                                                                                                       |
| metadata         | managed                 | object    | A read-only set of Datadog managed attributes generated by Datadog.  User supplied values are ignored.                                                                                                                                                          |
| metadata         | name [*required*]       | string    | Unique name given to an entity under the kind/namespace.                                                                                                                                                                                                        |
| metadata         | namespace               | string    | Namespace is a part of unique identifier. It has a default value of 'default'.                                                                                                                                                                                  |
| metadata         | owner                   | string    | The owner of the entity, usually a team.                                                                                                                                                                                                                        |
| metadata         | tags                    | [string]  | A set of custom tags.                                                                                                                                                                                                                                           |
| <kind=api>       | spec                    | object    | The definition of Entity V3 API Spec object.                                                                                                                                                                                                                    |
| spec             | implementedBy           | [string]  | Services which implemented the API.                                                                                                                                                                                                                             |
| spec             | interface               | <oneOf>   | The API definition.                                                                                                                                                                                                                                             |
| interface        | Object 1                | object    | The definition of `EntityV3APISpecInterfaceFileRef` object.                                                                                                                                                                                                     |
| Object 1         | fileRef                 | string    | The reference to the API definition file.                                                                                                                                                                                                                       |
| interface        | Object 2                | object    | The definition of `EntityV3APISpecInterfaceDefinition` object.                                                                                                                                                                                                  |
| Object 2         | definition              | object    | The API definition.                                                                                                                                                                                                                                             |
| spec             | lifecycle               | string    | The lifecycle state of the component.                                                                                                                                                                                                                           |
| spec             | tier                    | string    | The importance of the component.                                                                                                                                                                                                                                |
| spec             | type                    | string    | The type of API.                                                                                                                                                                                                                                                |
| <type=schema>    | id                      | string    | Entity ID.                                                                                                                                                                                                                                                      |
| <type=schema>    | type                    | enum      | Schema type. Allowed enum values: `schema`.                                                                                                                                                                                                                     |
|                  | meta                    | object    | Entity metadata.                                                                                                                                                                                                                                                |
| meta             | count                   | int64     | Total entities count.                                                                                                                                                                                                                                           |
| meta             | includeCount            | int64     | Total included data count.                                                                                                                                                                                                                                      |
{% /tab %}

{% tab label="Example" %}
```json
{
  "data": [
    {
      "attributes": {
        "apiVersion": "string",
        "description": "string",
        "displayName": "string",
        "kind": "string",
        "name": "string",
        "namespace": "string",
        "owner": "string",
        "tags": []
      },
      "id": "string",
      "meta": {
        "createdAt": "string",
        "ingestionSource": "string",
        "modifiedAt": "string",
        "origin": "string"
      },
      "relationships": {
        "incidents": {
          "data": [
            {
              "id": "string",
              "type": "string"
            }
          ]
        },
        "oncall": {
          "data": [
            {
              "id": "string",
              "type": "string"
            }
          ]
        },
        "rawSchema": {
          "data": {
            "id": "string",
            "type": "string"
          }
        },
        "relatedEntities": {
          "data": [
            {
              "id": "string",
              "type": "string"
            }
          ]
        },
        "schema": {
          "data": {
            "id": "string",
            "type": "string"
          }
        }
      },
      "type": "string"
    }
  ],
  "included": [
    {
      "attributes": {
        "schema": {
          "apiVersion": "v3",
          "datadog": {
            "codeLocations": [
              {
                "paths": [],
                "repositoryURL": "string"
              }
            ],
            "events": [
              {
                "name": "string",
                "query": "string"
              }
            ],
            "logs": [
              {
                "name": "string",
                "query": "string"
              }
            ],
            "performanceData": {
              "tags": []
            },
            "pipelines": {
              "fingerprints": []
            }
          },
          "extensions": {},
          "integrations": {
            "opsgenie": {
              "region": "string",
              "serviceURL": "https://www.opsgenie.com/service/shopping-cart"
            },
            "pagerduty": {
              "serviceURL": "https://www.pagerduty.com/service-directory/Pshopping-cart"
            }
          },
          "kind": "service",
          "metadata": {
            "additionalOwners": [
              {
                "name": "",
                "type": "string"
              }
            ],
            "contacts": [
              {
                "contact": "https://slack/",
                "name": "string",
                "type": "slack"
              }
            ],
            "description": "string",
            "displayName": "string",
            "id": "4b163705-23c0-4573-b2fb-f6cea2163fcb",
            "inheritFrom": "application:default/myapp",
            "links": [
              {
                "name": "mylink",
                "provider": "string",
                "type": "link",
                "url": "https://mylink"
              }
            ],
            "managed": {},
            "name": "myService",
            "namespace": "default",
            "owner": "string",
            "tags": [
              "this:tag",
              "that:tag"
            ]
          },
          "spec": {
            "componentOf": [],
            "dependsOn": [],
            "languages": [],
            "lifecycle": "string",
            "tier": "string",
            "type": "string"
          }
        }
      },
      "id": "string",
      "type": "string"
    }
  ],
  "meta": {
    "count": "integer",
    "includeCount": "integer"
  }
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="400" %}
Bad Request

{% tabs %}
{% tab label="Model" %}
API error response.

| Field               | Type     | Description       |
| ------------------- | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    "Bad Request"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="403" %}
Forbidden

{% tabs %}
{% tab label="Model" %}
API error response.

| Field               | Type     | Description       |
| ------------------- | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    "Bad Request"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="429" %}
Too many requests

{% tabs %}
{% tab label="Model" %}
API error response.

| Field               | Type     | Description       |
| ------------------- | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    "Bad Request"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}
{% /tabs %}

### Code Example

{% tabs %}
{% tab label="Curl" %}
```bash
# Set your Datadog site and credentials
export DD_SITE="datadoghq.com" # Or us3.datadoghq.com, us5.datadoghq.com, datadoghq.eu, ap1.datadoghq.com, ap2.datadoghq.com, uk1.datadoghq.com, ddog-gov.com, us2.ddog-gov.com
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/catalog/entity" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "apiVersion": "v3",
  "datadog": {
    "codeLocations": [
      {
        "paths": []
      }
    ],
    "events": [
      {}
    ],
    "logs": [
      {}
    ],
    "performanceData": {
      "tags": []
    },
    "pipelines": {
      "fingerprints": []
    }
  },
  "integrations": {
    "opsgenie": {
      "serviceURL": "https://www.opsgenie.com/service/shopping-cart"
    },
    "pagerduty": {
      "serviceURL": "https://www.pagerduty.com/service-directory/Pshopping-cart"
    }
  },
  "kind": "service",
  "metadata": {
    "additionalOwners": [],
    "contacts": [
      {
        "contact": "https://slack/",
        "type": "slack"
      }
    ],
    "id": "4b163705-23c0-4573-b2fb-f6cea2163fcb",
    "inheritFrom": "application:default/myapp",
    "links": [
      {
        "name": "mylink",
        "type": "link",
        "url": "https://mylink"
      }
    ],
    "name": "service-examplesoftwarecatalog",
    "tags": [
      "this:tag",
      "that:tag"
    ]
  },
  "spec": {
    "dependsOn": [],
    "languages": []
  }
}
EOF
```
{% /tab %}

{% tab label="Go" %}
```go
// Create or update software catalog entity using schema v3 returns "ACCEPTED" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)

func main() {
	body := datadogV2.UpsertCatalogEntityRequest{
		EntityV3: &datadogV2.EntityV3{
			EntityV3Service: &datadogV2.EntityV3Service{
				ApiVersion: datadogV2.ENTITYV3APIVERSION_V3,
				Datadog: &datadogV2.EntityV3ServiceDatadog{
					CodeLocations: []datadogV2.EntityV3DatadogCodeLocationItem{
						{
							Paths: []string{},
						},
					},
					Events: []datadogV2.EntityV3DatadogEventItem{
						{},
					},
					Logs: []datadogV2.EntityV3DatadogLogItem{
						{},
					},
					PerformanceData: &datadogV2.EntityV3DatadogPerformance{
						Tags: []string{},
					},
					Pipelines: &datadogV2.EntityV3DatadogPipelines{
						Fingerprints: []string{},
					},
				},
				Integrations: &datadogV2.EntityV3Integrations{
					Opsgenie: &datadogV2.EntityV3DatadogIntegrationOpsgenie{
						ServiceUrl: "https://www.opsgenie.com/service/shopping-cart",
					},
					Pagerduty: &datadogV2.EntityV3DatadogIntegrationPagerduty{
						ServiceUrl: "https://www.pagerduty.com/service-directory/Pshopping-cart",
					},
				},
				Kind: datadogV2.ENTITYV3SERVICEKIND_SERVICE,
				Metadata: datadogV2.EntityV3Metadata{
					AdditionalOwners: []datadogV2.EntityV3MetadataAdditionalOwnersItems{},
					Contacts: []datadogV2.EntityV3MetadataContactsItems{
						{
							Contact: "https://slack/",
							Type:    "slack",
						},
					},
					Id:          datadog.PtrString("4b163705-23c0-4573-b2fb-f6cea2163fcb"),
					InheritFrom: datadog.PtrString("application:default/myapp"),
					Links: []datadogV2.EntityV3MetadataLinksItems{
						{
							Name: "mylink",
							Type: "link",
							Url:  "https://mylink",
						},
					},
					Name: "service-examplesoftwarecatalog",
					Tags: []string{
						"this:tag",
						"that:tag",
					},
				},
				Spec: &datadogV2.EntityV3ServiceSpec{
					DependsOn: []string{},
					Languages: []string{},
				},
			}}}
	ctx := datadog.NewDefaultContext(context.Background())
	ctx = context.WithValue(ctx, datadog.ContextAccessToken, os.Getenv("DD_BEARER_TOKEN"))
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewSoftwareCatalogApi(apiClient)
	resp, r, err := api.UpsertCatalogEntity(ctx, body)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SoftwareCatalogApi.UpsertCatalogEntity`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SoftwareCatalogApi.UpsertCatalogEntity`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://dnd37xeb23o8n.cloudfront.net/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:

```bash
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"
```
{% /tab %}

{% tab label="Java" %}
```java
// Create or update software catalog entity using schema v3 returns "ACCEPTED" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.SoftwareCatalogApi;
import com.datadog.api.client.v2.model.EntityV3;
import com.datadog.api.client.v2.model.EntityV3APIVersion;
import com.datadog.api.client.v2.model.EntityV3DatadogCodeLocationItem;
import com.datadog.api.client.v2.model.EntityV3DatadogEventItem;
import com.datadog.api.client.v2.model.EntityV3DatadogIntegrationOpsgenie;
import com.datadog.api.client.v2.model.EntityV3DatadogIntegrationPagerduty;
import com.datadog.api.client.v2.model.EntityV3DatadogLogItem;
import com.datadog.api.client.v2.model.EntityV3DatadogPerformance;
import com.datadog.api.client.v2.model.EntityV3DatadogPipelines;
import com.datadog.api.client.v2.model.EntityV3Integrations;
import com.datadog.api.client.v2.model.EntityV3Metadata;
import com.datadog.api.client.v2.model.EntityV3MetadataContactsItems;
import com.datadog.api.client.v2.model.EntityV3MetadataLinksItems;
import com.datadog.api.client.v2.model.EntityV3Service;
import com.datadog.api.client.v2.model.EntityV3ServiceDatadog;
import com.datadog.api.client.v2.model.EntityV3ServiceKind;
import com.datadog.api.client.v2.model.EntityV3ServiceSpec;
import com.datadog.api.client.v2.model.UpsertCatalogEntityRequest;
import com.datadog.api.client.v2.model.UpsertCatalogEntityResponse;
import java.util.Arrays;
import java.util.Collections;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN"));
    SoftwareCatalogApi apiInstance = new SoftwareCatalogApi(defaultClient);

    UpsertCatalogEntityRequest body =
        new UpsertCatalogEntityRequest(
            new EntityV3(
                new EntityV3Service()
                    .apiVersion(EntityV3APIVersion.V3)
                    .datadog(
                        new EntityV3ServiceDatadog()
                            .codeLocations(
                                Collections.singletonList(new EntityV3DatadogCodeLocationItem()))
                            .events(Collections.singletonList(new EntityV3DatadogEventItem()))
                            .logs(Collections.singletonList(new EntityV3DatadogLogItem()))
                            .performanceData(new EntityV3DatadogPerformance())
                            .pipelines(new EntityV3DatadogPipelines()))
                    .integrations(
                        new EntityV3Integrations()
                            .opsgenie(
                                new EntityV3DatadogIntegrationOpsgenie()
                                    .serviceUrl("https://www.opsgenie.com/service/shopping-cart"))
                            .pagerduty(
                                new EntityV3DatadogIntegrationPagerduty()
                                    .serviceUrl(
                                        "https://www.pagerduty.com/service-directory/Pshopping-cart")))
                    .kind(EntityV3ServiceKind.SERVICE)
                    .metadata(
                        new EntityV3Metadata()
                            .contacts(
                                Collections.singletonList(
                                    new EntityV3MetadataContactsItems()
                                        .contact("https://slack/")
                                        .type("slack")))
                            .id("4b163705-23c0-4573-b2fb-f6cea2163fcb")
                            .inheritFrom("application:default/myapp")
                            .links(
                                Collections.singletonList(
                                    new EntityV3MetadataLinksItems()
                                        .name("mylink")
                                        .type("link")
                                        .url("https://mylink")))
                            .name("service-examplesoftwarecatalog")
                            .tags(Arrays.asList("this:tag", "that:tag")))
                    .spec(new EntityV3ServiceSpec())));

    try {
      UpsertCatalogEntityResponse result = apiInstance.upsertCatalogEntity(body);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SoftwareCatalogApi#upsertCatalogEntity");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://dnd37xeb23o8n.cloudfront.net/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:

```bash
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"
```
{% /tab %}

{% tab label="Python" %}
```python
"""
Create or update software catalog entity using schema v3 returns "ACCEPTED" response
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.software_catalog_api import SoftwareCatalogApi
from datadog_api_client.v2.model.entity_v3_api_version import EntityV3APIVersion
from datadog_api_client.v2.model.entity_v3_datadog_code_location_item import EntityV3DatadogCodeLocationItem
from datadog_api_client.v2.model.entity_v3_datadog_event_item import EntityV3DatadogEventItem
from datadog_api_client.v2.model.entity_v3_datadog_integration_opsgenie import EntityV3DatadogIntegrationOpsgenie
from datadog_api_client.v2.model.entity_v3_datadog_integration_pagerduty import EntityV3DatadogIntegrationPagerduty
from datadog_api_client.v2.model.entity_v3_datadog_log_item import EntityV3DatadogLogItem
from datadog_api_client.v2.model.entity_v3_datadog_performance import EntityV3DatadogPerformance
from datadog_api_client.v2.model.entity_v3_datadog_pipelines import EntityV3DatadogPipelines
from datadog_api_client.v2.model.entity_v3_integrations import EntityV3Integrations
from datadog_api_client.v2.model.entity_v3_metadata import EntityV3Metadata
from datadog_api_client.v2.model.entity_v3_metadata_contacts_items import EntityV3MetadataContactsItems
from datadog_api_client.v2.model.entity_v3_metadata_links_items import EntityV3MetadataLinksItems
from datadog_api_client.v2.model.entity_v3_service import EntityV3Service
from datadog_api_client.v2.model.entity_v3_service_datadog import EntityV3ServiceDatadog
from datadog_api_client.v2.model.entity_v3_service_kind import EntityV3ServiceKind
from datadog_api_client.v2.model.entity_v3_service_spec import EntityV3ServiceSpec

body = EntityV3Service(
    api_version=EntityV3APIVersion.V3,
    datadog=EntityV3ServiceDatadog(
        code_locations=[
            EntityV3DatadogCodeLocationItem(
                paths=[],
            ),
        ],
        events=[
            EntityV3DatadogEventItem(),
        ],
        logs=[
            EntityV3DatadogLogItem(),
        ],
        performance_data=EntityV3DatadogPerformance(
            tags=[],
        ),
        pipelines=EntityV3DatadogPipelines(
            fingerprints=[],
        ),
    ),
    integrations=EntityV3Integrations(
        opsgenie=EntityV3DatadogIntegrationOpsgenie(
            service_url="https://www.opsgenie.com/service/shopping-cart",
        ),
        pagerduty=EntityV3DatadogIntegrationPagerduty(
            service_url="https://www.pagerduty.com/service-directory/Pshopping-cart",
        ),
    ),
    kind=EntityV3ServiceKind.SERVICE,
    metadata=EntityV3Metadata(
        additional_owners=[],
        contacts=[
            EntityV3MetadataContactsItems(
                contact="https://slack/",
                type="slack",
            ),
        ],
        id="4b163705-23c0-4573-b2fb-f6cea2163fcb",
        inherit_from="application:default/myapp",
        links=[
            EntityV3MetadataLinksItems(
                name="mylink",
                type="link",
                url="https://mylink",
            ),
        ],
        name="service-examplesoftwarecatalog",
        tags=[
            "this:tag",
            "that:tag",
        ],
    ),
    spec=EntityV3ServiceSpec(
        depends_on=[],
        languages=[],
    ),
)

configuration = Configuration()
configuration.access_token = environ["DD_BEARER_TOKEN"]
with ApiClient(configuration) as api_client:
    api_instance = SoftwareCatalogApi(api_client)
    response = api_instance.upsert_catalog_entity(body=body)

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://dnd37xeb23o8n.cloudfront.net/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:

```bash
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"
```
{% /tab %}

{% tab label="Ruby" %}
```ruby
# Create or update software catalog entity using schema v3 returns "ACCEPTED" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
  config.access_token = ENV["DD_BEARER_TOKEN"]
end
api_instance = DatadogAPIClient::V2::SoftwareCatalogAPI.new

body = DatadogAPIClient::V2::EntityV3Service.new({
  api_version: DatadogAPIClient::V2::EntityV3APIVersion::V3,
  datadog: DatadogAPIClient::V2::EntityV3ServiceDatadog.new({
    code_locations: [
      DatadogAPIClient::V2::EntityV3DatadogCodeLocationItem.new({
        paths: [],
      }),
    ],
    events: [
      DatadogAPIClient::V2::EntityV3DatadogEventItem.new({}),
    ],
    logs: [
      DatadogAPIClient::V2::EntityV3DatadogLogItem.new({}),
    ],
    performance_data: DatadogAPIClient::V2::EntityV3DatadogPerformance.new({
      tags: [],
    }),
    pipelines: DatadogAPIClient::V2::EntityV3DatadogPipelines.new({
      fingerprints: [],
    }),
  }),
  integrations: DatadogAPIClient::V2::EntityV3Integrations.new({
    opsgenie: DatadogAPIClient::V2::EntityV3DatadogIntegrationOpsgenie.new({
      service_url: "https://www.opsgenie.com/service/shopping-cart",
    }),
    pagerduty: DatadogAPIClient::V2::EntityV3DatadogIntegrationPagerduty.new({
      service_url: "https://www.pagerduty.com/service-directory/Pshopping-cart",
    }),
  }),
  kind: DatadogAPIClient::V2::EntityV3ServiceKind::SERVICE,
  metadata: DatadogAPIClient::V2::EntityV3Metadata.new({
    additional_owners: [],
    contacts: [
      DatadogAPIClient::V2::EntityV3MetadataContactsItems.new({
        contact: "https://slack/",
        type: "slack",
      }),
    ],
    id: "4b163705-23c0-4573-b2fb-f6cea2163fcb",
    inherit_from: "application:default/myapp",
    links: [
      DatadogAPIClient::V2::EntityV3MetadataLinksItems.new({
        name: "mylink",
        type: "link",
        url: "https://mylink",
      }),
    ],
    name: "service-examplesoftwarecatalog",
    tags: [
      "this:tag",
      "that:tag",
    ],
  }),
  spec: DatadogAPIClient::V2::EntityV3ServiceSpec.new({
    depends_on: [],
    languages: [],
  }),
})
p api_instance.upsert_catalog_entity(body)
```

#### Instructions

First [install the library and its dependencies](https://dnd37xeb23o8n.cloudfront.net/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:

```bash
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"
```
{% /tab %}

{% tab label="Rust" %}
```rust
// Create or update software catalog entity using schema v3 returns "ACCEPTED"
// response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_software_catalog::SoftwareCatalogAPI;
use datadog_api_client::datadogV2::model::EntityV3;
use datadog_api_client::datadogV2::model::EntityV3APIVersion;
use datadog_api_client::datadogV2::model::EntityV3DatadogCodeLocationItem;
use datadog_api_client::datadogV2::model::EntityV3DatadogEventItem;
use datadog_api_client::datadogV2::model::EntityV3DatadogIntegrationOpsgenie;
use datadog_api_client::datadogV2::model::EntityV3DatadogIntegrationPagerduty;
use datadog_api_client::datadogV2::model::EntityV3DatadogLogItem;
use datadog_api_client::datadogV2::model::EntityV3DatadogPerformance;
use datadog_api_client::datadogV2::model::EntityV3DatadogPipelines;
use datadog_api_client::datadogV2::model::EntityV3Integrations;
use datadog_api_client::datadogV2::model::EntityV3Metadata;
use datadog_api_client::datadogV2::model::EntityV3MetadataContactsItems;
use datadog_api_client::datadogV2::model::EntityV3MetadataLinksItems;
use datadog_api_client::datadogV2::model::EntityV3Service;
use datadog_api_client::datadogV2::model::EntityV3ServiceDatadog;
use datadog_api_client::datadogV2::model::EntityV3ServiceKind;
use datadog_api_client::datadogV2::model::EntityV3ServiceSpec;
use datadog_api_client::datadogV2::model::UpsertCatalogEntityRequest;

#[tokio::main]
async fn main() {
    let body = UpsertCatalogEntityRequest::EntityV3(Box::new(EntityV3::EntityV3Service(Box::new(
        EntityV3Service::new(
            EntityV3APIVersion::V3,
            EntityV3ServiceKind::SERVICE,
            EntityV3Metadata::new("service-examplesoftwarecatalog".to_string())
                .additional_owners(vec![])
                .contacts(vec![EntityV3MetadataContactsItems::new(
                    "https://slack/".to_string(),
                    "slack".to_string(),
                )])
                .id("4b163705-23c0-4573-b2fb-f6cea2163fcb".to_string())
                .inherit_from("application:default/myapp".to_string())
                .links(vec![EntityV3MetadataLinksItems::new(
                    "mylink".to_string(),
                    "link".to_string(),
                    "https://mylink".to_string(),
                )])
                .tags(vec!["this:tag".to_string(), "that:tag".to_string()]),
        )
        .datadog(
            EntityV3ServiceDatadog::new()
                .code_locations(vec![EntityV3DatadogCodeLocationItem::new().paths(vec![])])
                .events(vec![EntityV3DatadogEventItem::new()])
                .logs(vec![EntityV3DatadogLogItem::new()])
                .performance_data(EntityV3DatadogPerformance::new().tags(vec![]))
                .pipelines(EntityV3DatadogPipelines::new().fingerprints(vec![])),
        )
        .integrations(
            EntityV3Integrations::new()
                .opsgenie(EntityV3DatadogIntegrationOpsgenie::new(
                    "https://www.opsgenie.com/service/shopping-cart".to_string(),
                ))
                .pagerduty(EntityV3DatadogIntegrationPagerduty::new(
                    "https://www.pagerduty.com/service-directory/Pshopping-cart".to_string(),
                )),
        )
        .spec(
            EntityV3ServiceSpec::new()
                .depends_on(vec![])
                .languages(vec![]),
        ),
    ))));
    let configuration = datadog::Configuration::new();
    let api = SoftwareCatalogAPI::with_config(configuration);
    let resp = api.upsert_catalog_entity(body).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://dnd37xeb23o8n.cloudfront.net/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:

```bash
DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
```
{% /tab %}

{% tab label="TypeScript" %}
```typescript
/**
 * Create or update software catalog entity using schema v3 returns "ACCEPTED" response
 */

import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration({
  authMethods: {
    AuthZ: {
      accessToken: process.env.DD_BEARER_TOKEN as string,
    },
  },
});
const apiInstance = new v2.SoftwareCatalogApi(configuration);

const params: v2.SoftwareCatalogApiUpsertCatalogEntityRequest = {
  body: {
    apiVersion: "v3",
    datadog: {
      codeLocations: [
        {
          paths: [],
        },
      ],
      events: [{}],
      logs: [{}],
      performanceData: {
        tags: [],
      },
      pipelines: {
        fingerprints: [],
      },
    },
    integrations: {
      opsgenie: {
        serviceUrl: "https://www.opsgenie.com/service/shopping-cart",
      },
      pagerduty: {
        serviceUrl:
          "https://www.pagerduty.com/service-directory/Pshopping-cart",
      },
    },
    kind: "service",
    metadata: {
      additionalOwners: [],
      contacts: [
        {
          contact: "https://slack/",
          type: "slack",
        },
      ],
      id: "4b163705-23c0-4573-b2fb-f6cea2163fcb",
      inheritFrom: "application:default/myapp",
      links: [
        {
          name: "mylink",
          type: "link",
          url: "https://mylink",
        },
      ],
      name: "service-examplesoftwarecatalog",
      tags: ["this:tag", "that:tag"],
    },
    spec: {
      dependsOn: [],
      languages: [],
    },
  },
};

apiInstance
  .upsertCatalogEntity(params)
  .then((data: v2.UpsertCatalogEntityResponse) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://dnd37xeb23o8n.cloudfront.net/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:

```bash
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"
```
{% /tab %}
{% /tabs %}
