---
title: Fetch multiple well constraint(s) by the source well id
slug: fetch-multiple-well-constraints-by-the-source-well-id
docTags: 
createdAt: 2024-04-26T20:42:16.944Z
---

{
  "id": "ZAhWMiZycTrfbWZIUh4Ir",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://data.onxecta.com/api/production/network/{sourceNetworkId}/well/{sourceWellId}/constraint",
    "servers": [
      {
        "url": "https://data.onxecta.com/api/production/network/{sourceNetworkId}/well/{sourceWellId}/constraint",
        "description": "AWS Cloud API Endpoint"
      },
      {
        "url": "http://localhost/api/production/network/{sourceNetworkId}/well/{sourceWellId}/constraint",
        "description": "Local Testing API Endpoint"
      }
    ],
    "name": "Fetch multiple well constraint(s) by the source well id",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "sourceNetworkId",
          "type": "string",
          "description": ""
        },
        {
          "kind": "required",
          "name": "sourceWellId",
          "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": "array",
            "description": "",
            "customType": "NetworkWellConstraint[]",
            "schema": [
              {
                "name": "xid",
                "kind": "required",
                "type": "string<uuid>",
                "description": "xecta unique identifier",
                "format": "uuid"
              },
              {
                "name": "sourceNetworkId",
                "kind": "required",
                "type": "string",
                "description": "Source ID of the network definition"
              },
              {
                "name": "sourceWellId",
                "kind": "required",
                "type": "string",
                "description": "Source ID of the network well definition"
              },
              {
                "name": "sourceId",
                "kind": "required",
                "type": "string",
                "description": "<p>Source ID for the well/date constraint. This sourceID enables upsert functionality from client source systems of record</p>"
              },
              {
                "name": "date",
                "kind": "required",
                "type": "string<date-time>",
                "description": "<p>Date at which the constraint becomes applicable. Datetime offset (with timezone) in ISO 8601 format. Example: 2022-09-27T16:28</p><div></div>+0000<p></p>",
                "format": "date-time"
              },
              {
                "name": "maxPressure",
                "kind": "optional",
                "type": "number<double>",
                "nullable": true,
                "description": "<p>Maximum pressure constraint, psig</p>",
                "format": "double"
              },
              {
                "name": "minPressure",
                "kind": "optional",
                "type": "number<double>",
                "nullable": true,
                "description": "<p>Minimum pressure constraint, psig</p>",
                "format": "double"
              },
              {
                "name": "maxOilRate",
                "kind": "optional",
                "type": "number<double>",
                "nullable": true,
                "description": "<p>Maximum oil rate constraint, STB/d</p>",
                "format": "double"
              },
              {
                "name": "maxGasRate",
                "kind": "optional",
                "type": "number<double>",
                "nullable": true,
                "description": "<p>Maximum gas rate constraint, Mscf/d</p>",
                "format": "double"
              },
              {
                "name": "maxWaterRate",
                "kind": "optional",
                "type": "number<double>",
                "nullable": true,
                "description": "<p>Maximum water rate constraint, STB/d</p>",
                "format": "double"
              },
              {
                "name": "maxLiquidRate",
                "kind": "optional",
                "type": "number<double>",
                "nullable": true,
                "description": "<p>Maximum liquid rate constraint, STB/d</p>",
                "format": "double"
              },
              {
                "name": "maxDrawDown",
                "kind": "optional",
                "type": "number<double>",
                "nullable": true,
                "description": "<p>Maximum drawdown constraint (Reservoir pressure - bottomhole pressure), psig</p>",
                "format": "double"
              },
              {
                "name": "maxGasLiftInjectionRate",
                "kind": "optional",
                "type": "number<double>",
                "nullable": true,
                "description": "<p>Maximum gas lift injection rate, Mscf/d</p>",
                "format": "double"
              },
              {
                "name": "minGasLiftInjectionRate",
                "kind": "optional",
                "type": "number<double>",
                "nullable": true,
                "description": "<p>Minimum gas lift injection rate, Mscf/d</p>",
                "format": "double"
              },
              {
                "name": "maxGasLiftInjectionPressure",
                "kind": "optional",
                "type": "number<double>",
                "nullable": true,
                "description": "<p>Maximum gas lift injection pressure, psig</p>",
                "format": "double"
              },
              {
                "name": "minGasLiftInjectionPressure",
                "kind": "optional",
                "type": "number<double>",
                "nullable": true,
                "description": "<p>Minimum gas lift injection pressure, psig</p>",
                "format": "double"
              },
              {
                "name": "plannedDowntime",
                "kind": "optional",
                "type": "number<double>",
                "nullable": true,
                "description": "<p>Planned downtime in percent (100% == 24 hours)</p>",
                "format": "double"
              }
            ],
            "modelRef": "#/components/schemas/NetworkWellConstraint",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "bgudffyUwuGJapXGisc7l",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://data.onxecta.com/api/production/network/{sourceNetworkId}/well/{sourceWellId}/constraint \\\n     --header 'accept: application/json'"
        },
        {
          "id": "WNNeBojVQYZzFc3x-mwsW",
          "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: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://data.onxecta.com/api/production/network/{sourceNetworkId}/well/{sourceWellId}/constraint\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "QD32M-Fl9BT7rWbJlbn54",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://data.onxecta.com/api/production/network/{sourceNetworkId}/well/{sourceWellId}/constraint\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        },
        {
          "id": "jTc-9i1SZobYnyrtP_Qhh",
          "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/network/{sourceNetworkId}/well/{sourceWellId}/constraint\", Method.Get);\nrequest.AddHeader(\"accept\", \"application/json\");\nrequest.AddHeader(\"content-type\", \"application/json\");\nRestResponse response = await client.ExecuteAsync(request);\nConsole.WriteLine(response.Content);"
        },
        {
          "id": "IitwzfZWs0Aanx-J0MgXJ",
          "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/network/{sourceNetworkId}/well/{sourceWellId}/constraint\")\n   .method(\"GET\", body)\n   .addHeader(\"accept\", \"application/json\")\n   .addHeader(\"content-type\", \"application/json\")\n   .build();\nResponse response = client.newCall(request).execute();"
        }
      ],
      "selectedLanguageId": "bgudffyUwuGJapXGisc7l"
    },
    "results": {
      "languages": [
        {
          "id": "Xl04YI_bTcEPWKALB8mkw",
          "language": "200",
          "code": "// OK\n[\n  {\n    \"xid\": \"\",\n    \"sourceNetworkId\": \"\",\n    \"sourceWellId\": \"\",\n    \"sourceId\": \"\",\n    \"date\": \"\",\n    \"maxPressure\": \"\",\n    \"minPressure\": \"\",\n    \"maxOilRate\": \"\",\n    \"maxGasRate\": \"\",\n    \"maxWaterRate\": \"\",\n    \"maxLiquidRate\": \"\",\n    \"maxDrawDown\": \"\",\n    \"maxGasLiftInjectionRate\": \"\",\n    \"minGasLiftInjectionRate\": \"\",\n    \"maxGasLiftInjectionPressure\": \"\",\n    \"minGasLiftInjectionPressure\": \"\",\n    \"plannedDowntime\": \"\"\n  }\n]"
        }
      ],
      "selectedLanguageId": "Xl04YI_bTcEPWKALB8mkw"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}