---
title: Bulk add / update network source(s)
slug: bulk-add-update-network-sources
docTags: 
createdAt: 2024-04-26T20:42:16.944Z
---

{
  "id": "fRJjNvnz_NGu9Cz1mEhEM",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://data.onxecta.com/api/production/network/source",
    "servers": [
      {
        "url": "https://data.onxecta.com/api/production/network/source",
        "description": "AWS Cloud API Endpoint"
      },
      {
        "url": "http://localhost/api/production/network/source",
        "description": "Local Testing API Endpoint"
      }
    ],
    "name": "Bulk add / update network source(s)",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "array",
          "description": "",
          "customType": "NetworkSourceInput[]",
          "schema": [
            {
              "name": "sourceNetworkId",
              "kind": "required",
              "type": "string",
              "description": "SourceNetworkId the network source belongs",
              "maxLength": 100
            },
            {
              "name": "sourceId",
              "kind": "required",
              "type": "string",
              "description": "Source ID for the network source definition. This sourceID enables upsert functionality from client source systems of record",
              "maxLength": 100
            },
            {
              "name": "date",
              "kind": "required",
              "type": "string<date-time>",
              "description": "<p>Date at which the network source becomes part of the network. Datetime offset (with timezone) in ISO 8601 format. Example: 2022-09-27T16:28</p><div></div>+0000<p></p>",
              "format": "date-time"
            },
            {
              "name": "downstreamSourceId",
              "kind": "required",
              "type": "string",
              "description": "Network element downstream of the network source",
              "maxLength": 100
            },
            {
              "name": "enabled",
              "kind": "required",
              "type": "boolean",
              "description": "<p>Whether the network source should participate in the network (false would be the equivalent of a mask in GAP)</p>"
            },
            {
              "name": "fluidGravityApi",
              "kind": "required",
              "type": "number<double>",
              "description": "<p>Oil API gravity, degAPI</p>",
              "format": "double"
            },
            {
              "name": "fluidGravityGas",
              "kind": "required",
              "type": "number<double>",
              "description": "<p>Gas specific gravity, specific gravity</p>",
              "format": "double"
            },
            {
              "name": "fluidSalinityWater",
              "kind": "required",
              "type": "number<double>",
              "description": "<p>Water salinity, ppm</p>",
              "format": "double"
            },
            {
              "name": "rsi",
              "kind": "required",
              "type": "number<double>",
              "description": "<p>Initial solution gas oil ratio, scf/STB</p>",
              "format": "double"
            },
            {
              "name": "fluidMolarFracN2",
              "kind": "required",
              "type": "number<double>",
              "description": "Molar fraction N2",
              "format": "double"
            },
            {
              "name": "fluidMolarFracCO2",
              "kind": "required",
              "type": "number<double>",
              "description": "Molar fraction CO2",
              "format": "double"
            },
            {
              "name": "fluidMolarFracH2S",
              "kind": "required",
              "type": "number<double>",
              "description": "Molar fraction H2S",
              "format": "double"
            },
            {
              "name": "condensateGasRatio",
              "kind": "required",
              "type": "number<double>",
              "description": "<p>Condensate gas ratio, STB/scf</p>",
              "format": "double"
            },
            {
              "name": "waterGasRatio",
              "kind": "required",
              "type": "number<double>",
              "description": "<p>Water gas ratio, STB/scf</p>",
              "format": "double"
            }
          ],
          "modelRef": "#/components/schemas/NetworkSourceInput",
          "isExpanded": true
        }
      ],
      "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": "NetworkSource[]",
            "schema": [
              {
                "name": "xid",
                "kind": "required",
                "type": "string<uuid>",
                "description": "xecta unique identifier",
                "format": "uuid"
              },
              {
                "name": "networkXid",
                "kind": "required",
                "type": "string<uuid>",
                "description": "xecta unique network identifier",
                "format": "uuid"
              },
              {
                "name": "sourceNetworkId",
                "kind": "required",
                "type": "string",
                "description": "SourceNetworkId the network source belongs"
              },
              {
                "name": "sourceId",
                "kind": "required",
                "type": "string",
                "description": "Source ID for the network source definition. This sourceID enables upsert functionality from client source systems of record"
              },
              {
                "name": "date",
                "kind": "required",
                "type": "string<date-time>",
                "description": "<p>Date at which the network source becomes part of the network. Datetime offset (with timezone) in ISO 8601 format. Example: 2022-09-27T16:28</p><div></div>+0000<p></p>",
                "format": "date-time"
              },
              {
                "name": "downstreamSourceId",
                "kind": "required",
                "type": "string",
                "description": "Network element downstream of the network source"
              },
              {
                "name": "enabled",
                "kind": "required",
                "type": "boolean",
                "description": "<p>Whether the network source should participate in the network (false would be the equivalent of a mask in GAP)</p>"
              },
              {
                "name": "fluidGravityApi",
                "kind": "required",
                "type": "number<double>",
                "description": "<p>Oil API gravity, deg API</p>",
                "format": "double"
              },
              {
                "name": "fluidGravityGas",
                "kind": "required",
                "type": "number<double>",
                "description": "<p>Gas specific gravity, specific gravity</p>",
                "format": "double"
              },
              {
                "name": "fluidSalinityWater",
                "kind": "required",
                "type": "number<double>",
                "description": "<p>Water salinity, ppm</p>",
                "format": "double"
              },
              {
                "name": "rsi",
                "kind": "required",
                "type": "number<double>",
                "description": "<p>Initial solution gas oil ratio, scf/STB</p>",
                "format": "double"
              },
              {
                "name": "fluidMolarFracN2",
                "kind": "required",
                "type": "number<double>",
                "description": "Molar fraction N2",
                "format": "double"
              },
              {
                "name": "fluidMolarFracCO2",
                "kind": "required",
                "type": "number<double>",
                "description": "Molar fraction CO2",
                "format": "double"
              },
              {
                "name": "fluidMolarFracH2S",
                "kind": "required",
                "type": "number<double>",
                "description": "Molar fraction H2S",
                "format": "double"
              },
              {
                "name": "condensateGasRatio",
                "kind": "required",
                "type": "number<double>",
                "description": "<p>Condensate gas ratio, STB/scf</p>",
                "format": "double"
              },
              {
                "name": "waterGasRatio",
                "kind": "required",
                "type": "number<double>",
                "description": "<p>Water gas ratio, STB/scf</p>",
                "format": "double"
              }
            ],
            "modelRef": "#/components/schemas/NetworkSource",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "pLj3xxcki-6q_H8UpWaTN",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://data.onxecta.com/api/production/network/source \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '[\n     {\n     \"sourceNetworkId\": \"\",\n     \"sourceId\": \"\",\n     \"date\": \"\",\n     \"downstreamSourceId\": \"\",\n     \"enabled\": \"\",\n     \"fluidGravityApi\": \"\",\n     \"fluidGravityGas\": \"\",\n     \"fluidSalinityWater\": \"\",\n     \"rsi\": \"\",\n     \"fluidMolarFracN2\": \"\",\n     \"fluidMolarFracCO2\": \"\",\n     \"fluidMolarFracH2S\": \"\",\n     \"condensateGasRatio\": \"\",\n     \"waterGasRatio\": \"\"\n     }\n     ]'"
        },
        {
          "id": "lha72LattGG_K-1_hbfMX",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify([\n   {\n      \"sourceNetworkId\": \"\",\n      \"sourceId\": \"\",\n      \"date\": \"\",\n      \"downstreamSourceId\": \"\",\n      \"enabled\": \"\",\n      \"fluidGravityApi\": \"\",\n      \"fluidGravityGas\": \"\",\n      \"fluidSalinityWater\": \"\",\n      \"rsi\": \"\",\n      \"fluidMolarFracN2\": \"\",\n      \"fluidMolarFracCO2\": \"\",\n      \"fluidMolarFracH2S\": \"\",\n      \"condensateGasRatio\": \"\",\n      \"waterGasRatio\": \"\"\n   }\n]);\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://data.onxecta.com/api/production/network/source\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "ulhcGcJn-k-bmqVh4vCQM",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://data.onxecta.com/api/production/network/source\"\n\npayload = json.dumps([\n   {\n      \"sourceNetworkId\": \"\",\n      \"sourceId\": \"\",\n      \"date\": \"\",\n      \"downstreamSourceId\": \"\",\n      \"enabled\": \"\",\n      \"fluidGravityApi\": \"\",\n      \"fluidGravityGas\": \"\",\n      \"fluidSalinityWater\": \"\",\n      \"rsi\": \"\",\n      \"fluidMolarFracN2\": \"\",\n      \"fluidMolarFracCO2\": \"\",\n      \"fluidMolarFracH2S\": \"\",\n      \"condensateGasRatio\": \"\",\n      \"waterGasRatio\": \"\"\n   }\n])\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        },
        {
          "id": "8VWd01ZkRIjbxInjGv0x_",
          "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/source\", Method.Post);\nrequest.AddHeader(\"accept\", \"application/json\");\nrequest.AddHeader(\"content-type\", \"application/json\");\nvar body = @\"[\" + \"\\n\" +\n@\"  {\" + \"\\n\" +\n@\"    \"\"sourceNetworkId\"\": \"\"\"\",\" + \"\\n\" +\n@\"    \"\"sourceId\"\": \"\"\"\",\" + \"\\n\" +\n@\"    \"\"date\"\": \"\"\"\",\" + \"\\n\" +\n@\"    \"\"downstreamSourceId\"\": \"\"\"\",\" + \"\\n\" +\n@\"    \"\"enabled\"\": \"\"\"\",\" + \"\\n\" +\n@\"    \"\"fluidGravityApi\"\": \"\"\"\",\" + \"\\n\" +\n@\"    \"\"fluidGravityGas\"\": \"\"\"\",\" + \"\\n\" +\n@\"    \"\"fluidSalinityWater\"\": \"\"\"\",\" + \"\\n\" +\n@\"    \"\"rsi\"\": \"\"\"\",\" + \"\\n\" +\n@\"    \"\"fluidMolarFracN2\"\": \"\"\"\",\" + \"\\n\" +\n@\"    \"\"fluidMolarFracCO2\"\": \"\"\"\",\" + \"\\n\" +\n@\"    \"\"fluidMolarFracH2S\"\": \"\"\"\",\" + \"\\n\" +\n@\"    \"\"condensateGasRatio\"\": \"\"\"\",\" + \"\\n\" +\n@\"    \"\"waterGasRatio\"\": \"\"\"\"\" + \"\\n\" +\n@\"  }\" + \"\\n\" +\n@\"]\";\nrequest.AddStringBody(body, DataFormat.Json);\nRestResponse response = await client.ExecuteAsync(request);\nConsole.WriteLine(response.Content);"
        },
        {
          "id": "EMFdZ-hu9v4uHiITUIZE_",
          "language": "java",
          "label": "Java",
          "code": "OkHttpClient client = new OkHttpClient().newBuilder()\n   .build();\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"[\\n  {\\n    \\\"sourceNetworkId\\\": \\\"\\\",\\n    \\\"sourceId\\\": \\\"\\\",\\n    \\\"date\\\": \\\"\\\",\\n    \\\"downstreamSourceId\\\": \\\"\\\",\\n    \\\"enabled\\\": \\\"\\\",\\n    \\\"fluidGravityApi\\\": \\\"\\\",\\n    \\\"fluidGravityGas\\\": \\\"\\\",\\n    \\\"fluidSalinityWater\\\": \\\"\\\",\\n    \\\"rsi\\\": \\\"\\\",\\n    \\\"fluidMolarFracN2\\\": \\\"\\\",\\n    \\\"fluidMolarFracCO2\\\": \\\"\\\",\\n    \\\"fluidMolarFracH2S\\\": \\\"\\\",\\n    \\\"condensateGasRatio\\\": \\\"\\\",\\n    \\\"waterGasRatio\\\": \\\"\\\"\\n  }\\n]\");\nRequest request = new Request.Builder()\n   .url(\"https://data.onxecta.com/api/production/network/source\")\n   .method(\"POST\", body)\n   .addHeader(\"accept\", \"application/json\")\n   .addHeader(\"content-type\", \"application/json\")\n   .build();\nResponse response = client.newCall(request).execute();"
        }
      ],
      "selectedLanguageId": "pLj3xxcki-6q_H8UpWaTN"
    },
    "results": {
      "languages": [
        {
          "id": "nxL8FRSqGGZuRe-gh-fLf",
          "language": "200",
          "code": "// OK\n[\n  {\n    \"xid\": \"\",\n    \"networkXid\": \"\",\n    \"sourceNetworkId\": \"\",\n    \"sourceId\": \"\",\n    \"date\": \"\",\n    \"downstreamSourceId\": \"\",\n    \"enabled\": false,\n    \"fluidGravityApi\": \"\",\n    \"fluidGravityGas\": \"\",\n    \"fluidSalinityWater\": \"\",\n    \"rsi\": \"\",\n    \"fluidMolarFracN2\": \"\",\n    \"fluidMolarFracCO2\": \"\",\n    \"fluidMolarFracH2S\": \"\",\n    \"condensateGasRatio\": \"\",\n    \"waterGasRatio\": \"\"\n  }\n]"
        }
      ],
      "selectedLanguageId": "nxL8FRSqGGZuRe-gh-fLf"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}