---
title: Delete a single wellbore
slug: delete-a-single-wellbore
docTags: 
createdAt: 2023-05-03T20:15:30.000Z
---

{
  "id": "34k6AOuq0Kn5D9CSgEE92",
  "type": "api-oas-v2",
  "data": {
    "method": "DELETE",
    "url": "https://data.onxecta.com/api/production/well/{sourceWellId}/wellbore/{sourceWellboreId}",
    "servers": [
      {
        "url": "https://data.onxecta.com/api/production/well/{sourceWellId}/wellbore/{sourceWellboreId}",
        "description": "AWS Cloud API Endpoint"
      },
      {
        "url": "http://localhost/api/production/well/{sourceWellId}/wellbore/{sourceWellboreId}",
        "description": "Local Testing API Endpoint"
      }
    ],
    "name": "Delete a single wellbore",
    "description": "This operation will delete a single wellbore by its well source id and wellbore source id. \n            This operation will also cascade delete all dependent wellbore entities that have been added\n            to the system.\n            ",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "sourceWellId",
          "type": "string",
          "description": ""
        },
        {
          "kind": "required",
          "name": "sourceWellboreId",
          "type": "string",
          "description": ""
        }
      ],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "bearerAuth",
          "name": "bearerAuth",
          "kind": "optional",
          "type": "http",
          "scheme": "bearer"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "OK",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "integer<int32>",
            "description": "",
            "format": "int32",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "OONU8ETau9fMIFgH7Wl6V",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request DELETE \\\n     --url https://data.onxecta.com/api/production/well/{sourceWellId}/wellbore/{sourceWellboreId} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "mmzs4GLlZCd6SIkcFacYJ",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'DELETE',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://data.onxecta.com/api/production/well/{sourceWellId}/wellbore/{sourceWellboreId}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "al4KrrFO89DnT6Xwh33TY",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://data.onxecta.com/api/production/well/{sourceWellId}/wellbore/{sourceWellboreId}\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"DELETE\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        },
        {
          "id": "c0S4hGA15t-X4miKYoUNv",
          "language": "csharp",
          "label": "C#",
          "code": "var options = new RestClientOptions(\"https://data.onxecta.com\")\n{\n   MaxTimeout = -1,\n};\nvar client = new RestClient(options);\nvar request = new RestRequest(\"/api/production/well/{sourceWellId}/wellbore/{sourceWellboreId}\", Method.Delete);\nrequest.AddHeader(\"accept\", \"application/json\");\nrequest.AddHeader(\"content-type\", \"application/json\");\nRestResponse response = await client.ExecuteAsync(request);\nConsole.WriteLine(response.Content);"
        },
        {
          "id": "6cCUROLvO1JAAcwL5mAhj",
          "language": "java",
          "label": "Java",
          "code": "OkHttpClient client = new OkHttpClient().newBuilder()\n   .build();\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"\");\nRequest request = new Request.Builder()\n   .url(\"https://data.onxecta.com/api/production/well/{sourceWellId}/wellbore/{sourceWellboreId}\")\n   .method(\"DELETE\", body)\n   .addHeader(\"accept\", \"application/json\")\n   .addHeader(\"content-type\", \"application/json\")\n   .build();\nResponse response = client.newCall(request).execute();"
        }
      ],
      "selectedLanguageId": "OONU8ETau9fMIFgH7Wl6V"
    },
    "results": {
      "languages": [
        {
          "id": "bcMQF7_rrPnokZml6gtLw",
          "language": "200",
          "code": "// OK\n\"\""
        }
      ],
      "selectedLanguageId": "bcMQF7_rrPnokZml6gtLw"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}