v1

latestOpenAPI 3.0.02026-07-141,4077,1665.2 MB
Service Definition

Create or update service definition

Create or update service definition in the Datadog Service Catalog.

post/api/v2/services/definitions

Request body

OR
OR
OR
string required

Service Definition in raw JSON/YAML representation.

Example request

{
  "application": "my-app",
  "ci-pipeline-fingerprints": [
    "j88xdEy0J5lc",
    "eZ7LMljCk8vo"
  ],
  "contacts": [
    {
      "contact": "https://teams.microsoft.com/myteam",
      "name": "My team channel",
      "type": "slack"
    }
  ],
  "dd-service": "my-service",
  "description": "My service description",
  "extensions": {
    "myorg/extension": "extensionValue"
  },
  "integrations": {
    "opsgenie": {
      "region": "US",
      "service-url": "https://my-org.opsgenie.com/service/123e4567-e89b-12d3-a456-426614174000"
    },
    "pagerduty": {
      "service-url": "https://my-org.pagerduty.com/service-directory/PMyService"
    }
  },
  "languages": [
    "dotnet",
    "go",
    "java",
    "js",
    "php",
    "python",
    "ruby",
    "c++"
  ],
  "lifecycle": "sandbox",
  "links": [
    {
      "name": "Runbook",
      "provider": "Github",
      "type": "runbook",
      "url": "https://my-runbook"
    }
  ],
  "schema-version": "v2.2",
  "tags": [
    "my:tag",
    "service:tag"
  ],
  "team": "my-team",
  "tier": "High",
  "type": "web"
}

Response

CREATED

Example response

{
  "data": [
    {
      "attributes": {
        "schema": {
          "contact": {
            "email": "contact@datadoghq.com",
            "slack": "https://yourcompany.slack.com/archives/channel123"
          },
          "extensions": {
            "myorg/extension": "extensionValue"
          },
          "external-resources": [
            {
              "name": "Runbook",
              "type": "runbook",
              "url": "https://my-runbook"
            }
          ],
          "info": {
            "dd-service": "myservice",
            "description": "A shopping cart service",
            "display-name": "My Service",
            "service-tier": "Tier 1"
          },
          "integrations": {
            "pagerduty": "https://my-org.pagerduty.com/service-directory/PMyService"
          },
          "org": {
            "application": "E-Commerce",
            "team": "my-team"
          },
          "schema-version": "v1",
          "tags": [
            "my:tag",
            "service:tag"
          ]
        }
      }
    }
  ]
}