---
title: Delete Datasource
slug: single-connect-api-3-2-0/delete-datasource
description: Learn how to send a DELETE request with curl command to a designated endpoint using this code example. Accompanied by JSON data acceptance and transmission headers, the specific request body is outlined in the provided code snippet.
docTags: 
createdAt: 2022-11-10T14:24:52.000Z
---

{
  "id": "Jgn1QvjScUZ-8NnmAw51n",
  "data": {
    "url": "{{url}}/aioc-rest-web/rest/sc/sqlproxy/deleteDatasource",
    "method": "DELETE",
    "request": {
      "pathParameters": [],
      "queryParameters": [],
      "headerParameters": [
        {
          "name": "Content-Type",
          "type": "string",
          "example": "application/json",
          "description": ""
        },
        {
          "name": "X-XSRF-TOKEN",
          "type": "string",
          "example": "{{csrftoken}}",
          "description": ""
        }
      ],
      "bodyDataParameters": [
        {
          "name": "body",
          "type": "string",
          "example": "{\r\n\"dbId\": 566190\r\n}",
          "description": ""
        }
      ],
      "formDataParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "",
        "jsonExample": ""
      }
    ],
    "contentType": "application/json",
    "description": "This method deletes existing masking methods.\r\ndbId of the method should be posted.",
    "examples": {
      "languages": [
        {
          "id": "wZokBj5ZS5IToZhHUMpL6",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request DELETE \\\n     --url {{url}}/aioc-rest-web/rest/sc/sqlproxy/deleteDatasource \\\n     --header 'accept: application/json'"
        },
        {
          "id": "fwMsUCa7eHJCvpQ2hEnXj",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\n\nvar requestOptions = {\n   method: 'DELETE',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"{{url}}/aioc-rest-web/rest/sc/sqlproxy/deleteDatasource\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "Lt8H-dtIXLCb0ioHwEN5X",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/sc/sqlproxy/deleteDatasource\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"accept\"] = \"application/json\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "wfYVJ8sxuRbAqE7hTA0FV",
          "language": "python",
          "label": "Python",
          "code": "import requests\n\nurl = \"{{url}}/aioc-rest-web/rest/sc/sqlproxy/deleteDatasource\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json'\n}\n\nresponse = requests.request(\"DELETE\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "wZokBj5ZS5IToZhHUMpL6"
    },
    "results": {
      "languages": [
        {
          "id": "SYDF1LH_H5PIRdMWHNhcg",
          "language": "200",
          "code": ""
        }
      ],
      "selectedLanguageId": "SYDF1LH_H5PIRdMWHNhcg"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}