Chilkat Online Tools

Go / Datadog API Collection / Create or update service definition

Back to Collection Items

    // This example assumes the Chilkat API to have been previously unlocked.
    // See Global_Ref.html">Global Unlock Sample for sample code.

    http := chilkat.NewHttp()
    var success bool

    // Use this online tool to generate code from sample JSON: Generate Code to Create JSON

    // The following JSON is sent in the request body.

    // {
    //   "schema-version": "v2.1",
    //   "dd-service": "<string>",
    //   "application": "<string>",
    //   "contacts": [
    //     {
    //       "type": "email",
    //       "contact": "<email>",
    //       "name": "<string>"
    //     },
    //     {
    //       "type": "email",
    //       "contact": "<email>",
    //       "name": "<string>"
    //     }
    //   ],
    //   "description": "<string>",
    //   "extensions": {
    //     "qui_6": {}
    //   },
    //   "integrations": {
    //     "opsgenie": {
    //       "service-url": "<string>",
    //       "region": "US"
    //     },
    //     "pagerduty": {
    //       "service-url": "<string>"
    //     }
    //   },
    //   "lifecycle": "<string>",
    //   "links": [
    //     {
    //       "name": "<string>",
    //       "type": "repo",
    //       "url": "<string>",
    //       "provider": "<string>"
    //     },
    //     {
    //       "name": "<string>",
    //       "type": "runbook",
    //       "url": "<string>",
    //       "provider": "<string>"
    //     }
    //   ],
    //   "tags": [
    //     "<string>",
    //     "<string>"
    //   ],
    //   "team": "<string>",
    //   "tier": "<string>"
    // }

    json := chilkat.NewJsonObject()
    json.UpdateString("schema-version","v2.1")
    json.UpdateString("dd-service","<string>")
    json.UpdateString("application","<string>")
    json.UpdateString("contacts[0].type","email")
    json.UpdateString("contacts[0].contact","<email>")
    json.UpdateString("contacts[0].name","<string>")
    json.UpdateString("contacts[1].type","email")
    json.UpdateString("contacts[1].contact","<email>")
    json.UpdateString("contacts[1].name","<string>")
    json.UpdateString("description","<string>")
    json.UpdateNewObject("extensions.qui_6")
    json.UpdateString("integrations.opsgenie.service-url","<string>")
    json.UpdateString("integrations.opsgenie.region","US")
    json.UpdateString("integrations.pagerduty.service-url","<string>")
    json.UpdateString("lifecycle","<string>")
    json.UpdateString("links[0].name","<string>")
    json.UpdateString("links[0].type","repo")
    json.UpdateString("links[0].url","<string>")
    json.UpdateString("links[0].provider","<string>")
    json.UpdateString("links[1].name","<string>")
    json.UpdateString("links[1].type","runbook")
    json.UpdateString("links[1].url","<string>")
    json.UpdateString("links[1].provider","<string>")
    json.UpdateString("tags[0]","<string>")
    json.UpdateString("tags[1]","<string>")
    json.UpdateString("team","<string>")
    json.UpdateString("tier","<string>")

    http.SetRequestHeader("Content-Type","application/json")
    http.SetRequestHeader("Accept","application/json")

    resp := http.PostJson3("https://api.app.ddog-gov.com/api/v2/services/definitions","application/json",json)
    if http.LastMethodSuccess() == false {
        fmt.Println(http.LastErrorText())
        http.DisposeHttp()
        json.DisposeJsonObject()
        return
    }

    sbResponseBody := chilkat.NewStringBuilder()
    resp.GetBodySb(sbResponseBody)

    jResp := chilkat.NewJsonObject()
    jResp.LoadSb(sbResponseBody)
    jResp.SetEmitCompact(false)

    fmt.Println("Response Body:")
    fmt.Println(*jResp.Emit())

    respStatusCode := resp.StatusCode()
    fmt.Println("Response Status Code = ", respStatusCode)
    if respStatusCode >= 400 {
        fmt.Println("Response Header:")
        fmt.Println(resp.Header())
        fmt.Println("Failed.")
        resp.DisposeHttpResponse()
        http.DisposeHttp()
        json.DisposeJsonObject()
        sbResponseBody.DisposeStringBuilder()
        jResp.DisposeJsonObject()
        return
    }

    resp.DisposeHttpResponse()

    // Sample JSON response:
    // (Sample code for parsing the JSON response is shown below)

    // {
    //   "data": [
    //     {
    //       "attributes": {
    //         "meta": {
    //           "github-html-url": "<string>",
    //           "ingested-schema-version": "<string>",
    //           "ingestion-source": "<string>",
    //           "last-modified-time": "<string>",
    //           "origin": "<string>",
    //           "origin-detail": "<string>",
    //           "warnings": [
    //             {
    //               "instance-location": "<string>",
    //               "keyword-location": "<string>",
    //               "message": "<string>"
    //             },
    //             {
    //               "instance-location": "<string>",
    //               "keyword-location": "<string>",
    //               "message": "<string>"
    //             }
    //           ]
    //         },
    //         "schema": {
    //           "schema-version": "v1",
    //           "info": {
    //             "dd-service": "<string>",
    //             "description": "<string>",
    //             "display-name": "<string>",
    //             "service-tier": "<string>"
    //           },
    //           "contact": {
    //             "email": "<email>",
    //             "slack": "<string>"
    //           },
    //           "extensions": {
    //             "Excepteur__84": {},
    //             "sit6cc": {}
    //           },
    //           "external-resources": [
    //             {
    //               "name": "<string>",
    //               "type": "wiki",
    //               "url": "<string>"
    //             },
    //             {
    //               "name": "<string>",
    //               "type": "dashboard",
    //               "url": "<string>"
    //             }
    //           ],
    //           "integrations": {
    //             "pagerduty": "<string>"
    //           },
    //           "org": {
    //             "application": "<string>",
    //             "team": "<string>"
    //           },
    //           "tags": [
    //             "<string>",
    //             "<string>"
    //           ]
    //         }
    //       },
    //       "id": "<string>",
    //       "type": "<string>"
    //     },
    //     {
    //       "attributes": {
    //         "meta": {
    //           "github-html-url": "<string>",
    //           "ingested-schema-version": "<string>",
    //           "ingestion-source": "<string>",
    //           "last-modified-time": "<string>",
    //           "origin": "<string>",
    //           "origin-detail": "<string>",
    //           "warnings": [
    //             {
    //               "instance-location": "<string>",
    //               "keyword-location": "<string>",
    //               "message": "<string>"
    //             },
    //             {
    //               "instance-location": "<string>",
    //               "keyword-location": "<string>",
    //               "message": "<string>"
    //             }
    //           ]
    //         },
    //         "schema": {
    //           "schema-version": "v1",
    //           "info": {
    //             "dd-service": "<string>",
    //             "description": "<string>",
    //             "display-name": "<string>",
    //             "service-tier": "<string>"
    //           },
    //           "contact": {
    //             "email": "<email>",
    //             "slack": "<string>"
    //           },
    //           "extensions": {
    //             "laboris_99d": {},
    //             "ad_7d0": {}
    //           },
    //           "external-resources": [
    //             {
    //               "name": "<string>",
    //               "type": "repo",
    //               "url": "<string>"
    //             },
    //             {
    //               "name": "<string>",
    //               "type": "url",
    //               "url": "<string>"
    //             }
    //           ],
    //           "integrations": {
    //             "pagerduty": "<string>"
    //           },
    //           "org": {
    //             "application": "<string>",
    //             "team": "<string>"
    //           },
    //           "tags": [
    //             "<string>",
    //             "<string>"
    //           ]
    //         }
    //       },
    //       "id": "<string>",
    //       "type": "<string>"
    //     }
    //   ]
    // }

    // Sample code for parsing the JSON response...
    // Use this online tool to generate parsing code from sample JSON: Generate JSON Parsing Code

Github_html_    var url *string = new(string)
    var Ingested_schema_version *string = new(string)
    var Ingestion_source *string = new(string)
    var Last_modified_time *string = new(string)
    var Origin *string = new(string)
    var Origin_detail *string = new(string)
    var Schema_version *string = new(string)
    var Dd_service *string = new(string)
    var Description *string = new(string)
    var Display_name *string = new(string)
    var Service_tier *string = new(string)
    var v_Email_Ref.html">Email *string = new(string)
    var Slack *string = new(string)
    var Pagerduty *string = new(string)
    var Application *string = new(string)
    var Team *string = new(string)
    var id *string = new(string)
    var v_type *string = new(string)
    var j int
    var count_j int
    var instance_location *string = new(string)
    var keyword_location *string = new(string)
    var message *string = new(string)
    var name *string = new(string)
    var url *string = new(string)
    var strVal *string = new(string)

    i := 0
    count_i := jResp.SizeOfArray("data")
    for i < count_i {
        jResp.SetI(i)
        Github_html_url = jResp.StringOf("data[i].attributes.meta.github-html-url")
        Ingested_schema_version = jResp.StringOf("data[i].attributes.meta.ingested-schema-version")
        Ingestion_source = jResp.StringOf("data[i].attributes.meta.ingestion-source")
        Last_modified_time = jResp.StringOf("data[i].attributes.meta.last-modified-time")
        Origin = jResp.StringOf("data[i].attributes.meta.origin")
        Origin_detail = jResp.StringOf("data[i].attributes.meta.origin-detail")
        Schema_version = jResp.StringOf("data[i].attributes.schema.schema-version")
        Dd_service = jResp.StringOf("data[i].attributes.schema.info.dd-service")
        Description = jResp.StringOf("data[i].attributes.schema.info.description")
        Display_name = jResp.StringOf("data[i].attributes.schema.info.display-name")
        Service_tier = jResp.StringOf("data[i].attributes.schema.info.service-tier")
        v_Email_Ref.html">Email = jResp.StringOf("data[i].attributes.schema.contact.email")
        Slack = jResp.StringOf("data[i].attributes.schema.contact.slack")
        Pagerduty = jResp.StringOf("data[i].attributes.schema.integrations.pagerduty")
        Application = jResp.StringOf("data[i].attributes.schema.org.application")
        Team = jResp.StringOf("data[i].attributes.schema.org.team")
        id = jResp.StringOf("data[i].id")
        v_type = jResp.StringOf("data[i].type")
        j = 0
        count_j = jResp.SizeOfArray("data[i].attributes.meta.warnings")
        for j < count_j {
            jResp.SetJ(j)
            instance_location = jResp.StringOf("data[i].attributes.meta.warnings[j].instance-location")
            keyword_location = jResp.StringOf("data[i].attributes.meta.warnings[j].keyword-location")
            message = jResp.StringOf("data[i].attributes.meta.warnings[j].message")
            j = j + 1
        }

        j = 0
        count_j = jResp.SizeOfArray("data[i].attributes.schema.external-resources")
        for j < count_j {
            jResp.SetJ(j)
            name = jResp.StringOf("data[i].attributes.schema.external-resources[j].name")
            v_type = jResp.StringOf("data[i].attributes.schema.external-resources[j].type")
            url = jResp.StringOf("data[i].attributes.schema.external-resources[j].url")
            j = j + 1
        }

        j = 0
        count_j = jResp.SizeOfArray("data[i].attributes.schema.tags")
        for j < count_j {
            jResp.SetJ(j)
            strVal = jResp.StringOf("data[i].attributes.schema.tags[j]")
            j = j + 1
        }

        i = i + 1
    }


    http.DisposeHttp()
    json.DisposeJsonObject()
    sbResponseBody.DisposeStringBuilder()
    jResp.DisposeJsonObject()

Curl Command

curl -X POST
	-H "Content-Type: application/json"
	-H "Accept: application/json"
	-d '{
  "schema-version": "v2.1",
  "dd-service": "<string>",
  "application": "<string>",
  "contacts": [
    {
      "type": "email",
      "contact": "<email>",
      "name": "<string>"
    },
    {
      "type": "email",
      "contact": "<email>",
      "name": "<string>"
    }
  ],
  "description": "<string>",
  "extensions": {
    "qui_6": {}
  },
  "integrations": {
    "opsgenie": {
      "service-url": "<string>",
      "region": "US"
    },
    "pagerduty": {
      "service-url": "<string>"
    }
  },
  "lifecycle": "<string>",
  "links": [
    {
      "name": "<string>",
      "type": "repo",
      "url": "<string>",
      "provider": "<string>"
    },
    {
      "name": "<string>",
      "type": "runbook",
      "url": "<string>",
      "provider": "<string>"
    }
  ],
  "tags": [
    "<string>",
    "<string>"
  ],
  "team": "<string>",
  "tier": "<string>"
}'
https://api.app.ddog-gov.com/api/v2/services/definitions

Postman Collection Item JSON

{
  "name": "Create or update service definition",
  "request": {
    "method": "POST",
    "header": [
      {
        "key": "Content-Type",
        "value": "application/json"
      },
      {
        "key": "Accept",
        "value": "application/json"
      }
    ],
    "body": {
      "mode": "raw",
      "raw": "{\n  \"schema-version\": \"v2.1\",\n  \"dd-service\": \"<string>\",\n  \"application\": \"<string>\",\n  \"contacts\": [\n    {\n      \"type\": \"email\",\n      \"contact\": \"<email>\",\n      \"name\": \"<string>\"\n    },\n    {\n      \"type\": \"email\",\n      \"contact\": \"<email>\",\n      \"name\": \"<string>\"\n    }\n  ],\n  \"description\": \"<string>\",\n  \"extensions\": {\n    \"qui_6\": {}\n  },\n  \"integrations\": {\n    \"opsgenie\": {\n      \"service-url\": \"<string>\",\n      \"region\": \"US\"\n    },\n    \"pagerduty\": {\n      \"service-url\": \"<string>\"\n    }\n  },\n  \"lifecycle\": \"<string>\",\n  \"links\": [\n    {\n      \"name\": \"<string>\",\n      \"type\": \"repo\",\n      \"url\": \"<string>\",\n      \"provider\": \"<string>\"\n    },\n    {\n      \"name\": \"<string>\",\n      \"type\": \"runbook\",\n      \"url\": \"<string>\",\n      \"provider\": \"<string>\"\n    }\n  ],\n  \"tags\": [\n    \"<string>\",\n    \"<string>\"\n  ],\n  \"team\": \"<string>\",\n  \"tier\": \"<string>\"\n}",
      "options": {
        "raw": {
          "headerFamily": "json",
          "language": "json"
        }
      }
    },
    "url": {
      "raw": "{{baseUrl}}/api/v2/services/definitions",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "api",
        "v2",
        "services",
        "definitions"
      ]
    },
    "description": "Create or update service definition in the Datadog Service Catalog."
  },
  "response": [
    {
      "name": "CREATED",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "description": "Added as a part of security scheme: apikey",
            "key": "DD-API-KEY",
            "value": "<API Key>"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"schema-version\": \"v2.1\",\n  \"dd-service\": \"<string>\",\n  \"application\": \"<string>\",\n  \"contacts\": [\n    {\n      \"type\": \"email\",\n      \"contact\": \"<email>\",\n      \"name\": \"<string>\"\n    },\n    {\n      \"type\": \"email\",\n      \"contact\": \"<email>\",\n      \"name\": \"<string>\"\n    }\n  ],\n  \"description\": \"<string>\",\n  \"extensions\": {\n    \"qui_6\": {}\n  },\n  \"integrations\": {\n    \"opsgenie\": {\n      \"service-url\": \"<string>\",\n      \"region\": \"US\"\n    },\n    \"pagerduty\": {\n      \"service-url\": \"<string>\"\n    }\n  },\n  \"lifecycle\": \"<string>\",\n  \"links\": [\n    {\n      \"name\": \"<string>\",\n      \"type\": \"repo\",\n      \"url\": \"<string>\",\n      \"provider\": \"<string>\"\n    },\n    {\n      \"name\": \"<string>\",\n      \"type\": \"runbook\",\n      \"url\": \"<string>\",\n      \"provider\": \"<string>\"\n    }\n  ],\n  \"tags\": [\n    \"<string>\",\n    \"<string>\"\n  ],\n  \"team\": \"<string>\",\n  \"tier\": \"<string>\"\n}",
          "options": {
            "raw": {
              "headerFamily": "json",
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseUrl}}/api/v2/services/definitions",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v2",
            "services",
            "definitions"
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"data\": [\n    {\n      \"attributes\": {\n        \"meta\": {\n          \"github-html-url\": \"<string>\",\n          \"ingested-schema-version\": \"<string>\",\n          \"ingestion-source\": \"<string>\",\n          \"last-modified-time\": \"<string>\",\n          \"origin\": \"<string>\",\n          \"origin-detail\": \"<string>\",\n          \"warnings\": [\n            {\n              \"instance-location\": \"<string>\",\n              \"keyword-location\": \"<string>\",\n              \"message\": \"<string>\"\n            },\n            {\n              \"instance-location\": \"<string>\",\n              \"keyword-location\": \"<string>\",\n              \"message\": \"<string>\"\n            }\n          ]\n        },\n        \"schema\": {\n          \"schema-version\": \"v1\",\n          \"info\": {\n            \"dd-service\": \"<string>\",\n            \"description\": \"<string>\",\n            \"display-name\": \"<string>\",\n            \"service-tier\": \"<string>\"\n          },\n          \"contact\": {\n            \"email\": \"<email>\",\n            \"slack\": \"<string>\"\n          },\n          \"extensions\": {\n            \"Excepteur__84\": {},\n            \"sit6cc\": {}\n          },\n          \"external-resources\": [\n            {\n              \"name\": \"<string>\",\n              \"type\": \"wiki\",\n              \"url\": \"<string>\"\n            },\n            {\n              \"name\": \"<string>\",\n              \"type\": \"dashboard\",\n              \"url\": \"<string>\"\n            }\n          ],\n          \"integrations\": {\n            \"pagerduty\": \"<string>\"\n          },\n          \"org\": {\n            \"application\": \"<string>\",\n            \"team\": \"<string>\"\n          },\n          \"tags\": [\n            \"<string>\",\n            \"<string>\"\n          ]\n        }\n      },\n      \"id\": \"<string>\",\n      \"type\": \"<string>\"\n    },\n    {\n      \"attributes\": {\n        \"meta\": {\n          \"github-html-url\": \"<string>\",\n          \"ingested-schema-version\": \"<string>\",\n          \"ingestion-source\": \"<string>\",\n          \"last-modified-time\": \"<string>\",\n          \"origin\": \"<string>\",\n          \"origin-detail\": \"<string>\",\n          \"warnings\": [\n            {\n              \"instance-location\": \"<string>\",\n              \"keyword-location\": \"<string>\",\n              \"message\": \"<string>\"\n            },\n            {\n              \"instance-location\": \"<string>\",\n              \"keyword-location\": \"<string>\",\n              \"message\": \"<string>\"\n            }\n          ]\n        },\n        \"schema\": {\n          \"schema-version\": \"v1\",\n          \"info\": {\n            \"dd-service\": \"<string>\",\n            \"description\": \"<string>\",\n            \"display-name\": \"<string>\",\n            \"service-tier\": \"<string>\"\n          },\n          \"contact\": {\n            \"email\": \"<email>\",\n            \"slack\": \"<string>\"\n          },\n          \"extensions\": {\n            \"laboris_99d\": {},\n            \"ad_7d0\": {}\n          },\n          \"external-resources\": [\n            {\n              \"name\": \"<string>\",\n              \"type\": \"repo\",\n              \"url\": \"<string>\"\n            },\n            {\n              \"name\": \"<string>\",\n              \"type\": \"url\",\n              \"url\": \"<string>\"\n            }\n          ],\n          \"integrations\": {\n            \"pagerduty\": \"<string>\"\n          },\n          \"org\": {\n            \"application\": \"<string>\",\n            \"team\": \"<string>\"\n          },\n          \"tags\": [\n            \"<string>\",\n            \"<string>\"\n          ]\n        }\n      },\n      \"id\": \"<string>\",\n      \"type\": \"<string>\"\n    }\n  ]\n}"
    },
    {
      "name": "Bad Request",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "description": "Added as a part of security scheme: apikey",
            "key": "DD-API-KEY",
            "value": "<API Key>"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"schema-version\": \"v2.1\",\n  \"dd-service\": \"<string>\",\n  \"application\": \"<string>\",\n  \"contacts\": [\n    {\n      \"type\": \"email\",\n      \"contact\": \"<email>\",\n      \"name\": \"<string>\"\n    },\n    {\n      \"type\": \"email\",\n      \"contact\": \"<email>\",\n      \"name\": \"<string>\"\n    }\n  ],\n  \"description\": \"<string>\",\n  \"extensions\": {\n    \"qui_6\": {}\n  },\n  \"integrations\": {\n    \"opsgenie\": {\n      \"service-url\": \"<string>\",\n      \"region\": \"US\"\n    },\n    \"pagerduty\": {\n      \"service-url\": \"<string>\"\n    }\n  },\n  \"lifecycle\": \"<string>\",\n  \"links\": [\n    {\n      \"name\": \"<string>\",\n      \"type\": \"repo\",\n      \"url\": \"<string>\",\n      \"provider\": \"<string>\"\n    },\n    {\n      \"name\": \"<string>\",\n      \"type\": \"runbook\",\n      \"url\": \"<string>\",\n      \"provider\": \"<string>\"\n    }\n  ],\n  \"tags\": [\n    \"<string>\",\n    \"<string>\"\n  ],\n  \"team\": \"<string>\",\n  \"tier\": \"<string>\"\n}",
          "options": {
            "raw": {
              "headerFamily": "json",
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseUrl}}/api/v2/services/definitions",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v2",
            "services",
            "definitions"
          ]
        }
      },
      "status": "Bad Request",
      "code": 400,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"errors\": [\n    \"<string>\",\n    \"<string>\"\n  ]\n}"
    },
    {
      "name": "Forbidden",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "description": "Added as a part of security scheme: apikey",
            "key": "DD-API-KEY",
            "value": "<API Key>"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"schema-version\": \"v2.1\",\n  \"dd-service\": \"<string>\",\n  \"application\": \"<string>\",\n  \"contacts\": [\n    {\n      \"type\": \"email\",\n      \"contact\": \"<email>\",\n      \"name\": \"<string>\"\n    },\n    {\n      \"type\": \"email\",\n      \"contact\": \"<email>\",\n      \"name\": \"<string>\"\n    }\n  ],\n  \"description\": \"<string>\",\n  \"extensions\": {\n    \"qui_6\": {}\n  },\n  \"integrations\": {\n    \"opsgenie\": {\n      \"service-url\": \"<string>\",\n      \"region\": \"US\"\n    },\n    \"pagerduty\": {\n      \"service-url\": \"<string>\"\n    }\n  },\n  \"lifecycle\": \"<string>\",\n  \"links\": [\n    {\n      \"name\": \"<string>\",\n      \"type\": \"repo\",\n      \"url\": \"<string>\",\n      \"provider\": \"<string>\"\n    },\n    {\n      \"name\": \"<string>\",\n      \"type\": \"runbook\",\n      \"url\": \"<string>\",\n      \"provider\": \"<string>\"\n    }\n  ],\n  \"tags\": [\n    \"<string>\",\n    \"<string>\"\n  ],\n  \"team\": \"<string>\",\n  \"tier\": \"<string>\"\n}",
          "options": {
            "raw": {
              "headerFamily": "json",
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseUrl}}/api/v2/services/definitions",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v2",
            "services",
            "definitions"
          ]
        }
      },
      "status": "Forbidden",
      "code": 403,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"errors\": [\n    \"<string>\",\n    \"<string>\"\n  ]\n}"
    },
    {
      "name": "Conflict",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "description": "Added as a part of security scheme: apikey",
            "key": "DD-API-KEY",
            "value": "<API Key>"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"schema-version\": \"v2.1\",\n  \"dd-service\": \"<string>\",\n  \"application\": \"<string>\",\n  \"contacts\": [\n    {\n      \"type\": \"email\",\n      \"contact\": \"<email>\",\n      \"name\": \"<string>\"\n    },\n    {\n      \"type\": \"email\",\n      \"contact\": \"<email>\",\n      \"name\": \"<string>\"\n    }\n  ],\n  \"description\": \"<string>\",\n  \"extensions\": {\n    \"qui_6\": {}\n  },\n  \"integrations\": {\n    \"opsgenie\": {\n      \"service-url\": \"<string>\",\n      \"region\": \"US\"\n    },\n    \"pagerduty\": {\n      \"service-url\": \"<string>\"\n    }\n  },\n  \"lifecycle\": \"<string>\",\n  \"links\": [\n    {\n      \"name\": \"<string>\",\n      \"type\": \"repo\",\n      \"url\": \"<string>\",\n      \"provider\": \"<string>\"\n    },\n    {\n      \"name\": \"<string>\",\n      \"type\": \"runbook\",\n      \"url\": \"<string>\",\n      \"provider\": \"<string>\"\n    }\n  ],\n  \"tags\": [\n    \"<string>\",\n    \"<string>\"\n  ],\n  \"team\": \"<string>\",\n  \"tier\": \"<string>\"\n}",
          "options": {
            "raw": {
              "headerFamily": "json",
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseUrl}}/api/v2/services/definitions",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v2",
            "services",
            "definitions"
          ]
        }
      },
      "status": "Conflict",
      "code": 409,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"errors\": [\n    \"<string>\",\n    \"<string>\"\n  ]\n}"
    },
    {
      "name": "Too many requests",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "description": "Added as a part of security scheme: apikey",
            "key": "DD-API-KEY",
            "value": "<API Key>"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"schema-version\": \"v2.1\",\n  \"dd-service\": \"<string>\",\n  \"application\": \"<string>\",\n  \"contacts\": [\n    {\n      \"type\": \"email\",\n      \"contact\": \"<email>\",\n      \"name\": \"<string>\"\n    },\n    {\n      \"type\": \"email\",\n      \"contact\": \"<email>\",\n      \"name\": \"<string>\"\n    }\n  ],\n  \"description\": \"<string>\",\n  \"extensions\": {\n    \"qui_6\": {}\n  },\n  \"integrations\": {\n    \"opsgenie\": {\n      \"service-url\": \"<string>\",\n      \"region\": \"US\"\n    },\n    \"pagerduty\": {\n      \"service-url\": \"<string>\"\n    }\n  },\n  \"lifecycle\": \"<string>\",\n  \"links\": [\n    {\n      \"name\": \"<string>\",\n      \"type\": \"repo\",\n      \"url\": \"<string>\",\n      \"provider\": \"<string>\"\n    },\n    {\n      \"name\": \"<string>\",\n      \"type\": \"runbook\",\n      \"url\": \"<string>\",\n      \"provider\": \"<string>\"\n    }\n  ],\n  \"tags\": [\n    \"<string>\",\n    \"<string>\"\n  ],\n  \"team\": \"<string>\",\n  \"tier\": \"<string>\"\n}",
          "options": {
            "raw": {
              "headerFamily": "json",
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseUrl}}/api/v2/services/definitions",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v2",
            "services",
            "definitions"
          ]
        }
      },
      "status": "Too Many Requests",
      "code": 429,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"errors\": [\n    \"<string>\",\n    \"<string>\"\n  ]\n}"
    }
  ]
}