For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/stefon.simmons/docs-astro-web-10435/ko/api/latest/software-catalog/create-or-update-entities.md. A documentation index is available at /llms.txt.
Language
Datadog site

엔터티 생성 또는 업데이트

POSThttps://api.datadoghq.com/api/v2/catalog/entityhttps://api.us3.datadoghq.com/api/v2/catalog/entityhttps://api.us5.datadoghq.com/api/v2/catalog/entityhttps://api.datadoghq.eu/api/v2/catalog/entityhttps://api.ap1.datadoghq.com/api/v2/catalog/entityhttps://api.ap2.datadoghq.com/api/v2/catalog/entityhttps://api.uk1.datadoghq.com/api/v2/catalog/entityhttps://api.ddog-gov.com/api/v2/catalog/entityhttps://api.us2.ddog-gov.com/api/v2/catalog/entity

개요

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

OAuth apps require the apm_service_catalog_write authorization scope to access this endpoint.

요청

Body Data (required)

엔터티 YAML 또는 JSON.

항목
유형
설명
Option 1
<oneOf>

엔터티 생성 또는 업데이트 요청입니다.

Option 2
string

Entity definition in raw JSON or YAML representation.

응답

ACCEPTED

Upsert entity response.

항목
유형
설명
data
[object]

List of entity data.

included
[<oneOf>]

Upsert entity response included.

meta
object

Entity metadata.

코드 예시

Create or update software catalog entity using schema v3 returns "ACCEPTED" response
# Set your Datadog site and credentials
export DD_SITE="datadoghq.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
# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.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
# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.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
# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
# 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
# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.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
# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.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
# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.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
# Set your Datadog site and credentials
export DD_SITE="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
# Set your Datadog site and credentials
export DD_SITE="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