---
title: List Datasources
slug: single-connect-api-3-2-0/list-datasources
description: Learn how to make a POST request using cURL with this code example. It includes headers for accepting and sending JSON data, along with a specified request body as a string. Enhance your programming skills and effectively interact with a specific URL.
docTags: 
createdAt: 2022-11-10T14:24:52.000Z
---

{
  "id": "WXuJvpyFBrZ6BmvFtyOeR",
  "data": {
    "url": "{{url}}/aioc-rest-web/rest/sc/sqlproxy/listDatasource",
    "method": "POST",
    "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    \"name\": \"new datasource\",\r\n    \"description\": \"new datasource\",\r\n    \"url\": \"jdbc:oracle:thin:@10.10.10.10:1521:TESTDB\",\r\n    \"maxThreadCount\": null,\r\n    \"databaseDriver\": \"Oracle\"\r\n}",
          "description": ""
        }
      ],
      "formDataParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "",
        "jsonExample": ""
      }
    ],
    "contentType": "application/json",
    "description": "<p>This method lists datasources. To get entire records, no property should be posted. To filter any property, related property and the value can be entered in the body of the request.\r\nIf no data is found, the method returns empty brackets.</p>",
    "examples": {
      "languages": [
        {
          "id": "YZTeG4QOxydxxYEfxxUuR",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url {{url}}/aioc-rest-web/rest/sc/sqlproxy/listDatasource \\\n     --header 'accept: application/json'"
        },
        {
          "id": "2L86P826GgVQljAIT8kDk",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"{{url}}/aioc-rest-web/rest/sc/sqlproxy/listDatasource\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "FUQFfwKjq3GhCw8MB8eji",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/sc/sqlproxy/listDatasource\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "5j5uDfRzI0YcRtiOqXbUl",
          "language": "python",
          "label": "Python",
          "code": "import requests\n\nurl = \"{{url}}/aioc-rest-web/rest/sc/sqlproxy/listDatasource\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "YZTeG4QOxydxxYEfxxUuR"
    },
    "results": {
      "languages": [
        {
          "id": "v5BYWWgB6b_qymKLDe2nM",
          "language": "200",
          "code": ""
        }
      ],
      "selectedLanguageId": "v5BYWWgB6b_qymKLDe2nM"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}