---
title: Bulk Add / Update Esp Data
slug: bulk-add-update-esp-data
docTags: 
createdAt: 2023-05-03T20:15:30.000Z
---

{
  "id": "LlwkOq4sRmMHzw_oW68sN",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://data.onxecta.com/api/production/esp",
    "servers": [
      {
        "url": "https://data.onxecta.com/api/production/esp",
        "description": "AWS Cloud API Endpoint"
      },
      {
        "url": "http://localhost/api/production/esp",
        "description": "Local Testing API Endpoint"
      }
    ],
    "name": "Bulk Add / Update Esp Data",
    "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": "ESPInput[]",
          "schema": [
            {
              "name": "sourceWellId",
              "kind": "optional",
              "type": "string",
              "description": "source well id",
              "maxLength": 100
            },
            {
              "name": "sourceWellId",
              "kind": "optional",
              "type": "string",
              "nullable": false,
              "description": "SourceWellId of the well which owns the ESP",
              "maxLength": 100
            },
            {
              "name": "sourceWellboreId",
              "kind": "optional",
              "type": "string",
              "nullable": false,
              "description": "SourceWellboreId of the wellbore which owns the ESP",
              "maxLength": 100
            },
            {
              "name": "sourceTubingId",
              "kind": "optional",
              "type": "string",
              "nullable": false,
              "description": "SourceTubingId of the tubing string in which the ESP is installed",
              "maxLength": 100
            },
            {
              "name": "sourceId",
              "kind": "optional",
              "type": "string",
              "nullable": false,
              "description": "SourceId of the ESP to enable upsert functionality",
              "maxLength": 100
            },
            {
              "name": "name",
              "kind": "optional",
              "type": "string",
              "nullable": false,
              "description": "<p>Pump name, must match a pump in the catalog</p>",
              "maxLength": 100
            },
            {
              "name": "installOrder",
              "kind": "optional",
              "type": "integer<int32>",
              "nullable": false,
              "description": "Install order of the pump in the assembly",
              "default": 0,
              "format": "int32"
            },
            {
              "name": "stages",
              "kind": "optional",
              "type": "integer<int32>",
              "nullable": false,
              "description": "Number of pump stages installed",
              "format": "int32"
            },
            {
              "name": "headDegradation",
              "kind": "optional",
              "type": "number<double>",
              "nullable": true,
              "description": "<p>Default head degradation when it cannot be calculated, %</p>",
              "format": "double"
            },
            {
              "name": "hasGasHandler",
              "kind": "optional",
              "type": "boolean",
              "nullable": false,
              "description": "Whether the pump assembly has a gas handler"
            },
            {
              "name": "hasSeparator",
              "kind": "optional",
              "type": "boolean",
              "nullable": false,
              "description": "Whether the pump assembly has a gas separator"
            },
            {
              "name": "viscosityCorrection",
              "kind": "optional",
              "type": "boolean",
              "nullable": true,
              "description": "Whether to apply viscosity corrections in conjunction with gas separation"
            },
            {
              "name": "separationEfficiency",
              "kind": "optional",
              "type": "number<double>",
              "nullable": true,
              "description": "<p>Default gas separation efficiency when it cannot be calculated, %</p>",
              "format": "double"
            },
            {
              "name": "runDate",
              "kind": "optional",
              "type": "string<date-time>",
              "nullable": false,
              "description": "<p>Run date of the ESP. Datetime offset (with timezone) in ISO 8601 format. Example: 2022-09-27T16:28</p><div></div>+0000<p></p>",
              "format": "date-time"
            },
            {
              "name": "pullDate",
              "kind": "optional",
              "type": "string<date-time>",
              "nullable": true,
              "description": "<p>Pull date of the ESP. Datetime offset (with timezone) in ISO 8601 format. Example: 2022-09-27T16:28</p><div></div>+0000<p></p>",
              "format": "date-time"
            }
          ],
          "modelRef": "#/components/schemas/ESPInput",
          "complexItems": [
            {
              "name": "object",
              "schema": [
                {
                  "name": "sourceWellId",
                  "kind": "optional",
                  "type": "string",
                  "description": "source well id",
                  "maxLength": 100
                }
              ],
              "modelRef": "#/components/schemas/TubingChildInput",
              "customType": "TubingChildInput"
            },
            {
              "name": "object",
              "schema": [
                {
                  "name": "sourceWellId",
                  "kind": "optional",
                  "type": "string",
                  "nullable": false,
                  "description": "SourceWellId of the well which owns the ESP",
                  "maxLength": 100
                },
                {
                  "name": "sourceWellboreId",
                  "kind": "optional",
                  "type": "string",
                  "nullable": false,
                  "description": "SourceWellboreId of the wellbore which owns the ESP",
                  "maxLength": 100
                },
                {
                  "name": "sourceTubingId",
                  "kind": "optional",
                  "type": "string",
                  "nullable": false,
                  "description": "SourceTubingId of the tubing string in which the ESP is installed",
                  "maxLength": 100
                },
                {
                  "name": "sourceId",
                  "kind": "optional",
                  "type": "string",
                  "nullable": false,
                  "description": "SourceId of the ESP to enable upsert functionality",
                  "maxLength": 100
                },
                {
                  "name": "name",
                  "kind": "optional",
                  "type": "string",
                  "nullable": false,
                  "description": "<p>Pump name, must match a pump in the catalog</p>",
                  "maxLength": 100
                },
                {
                  "name": "installOrder",
                  "kind": "optional",
                  "type": "integer<int32>",
                  "nullable": false,
                  "description": "Install order of the pump in the assembly",
                  "default": 0,
                  "format": "int32"
                },
                {
                  "name": "stages",
                  "kind": "optional",
                  "type": "integer<int32>",
                  "nullable": false,
                  "description": "Number of pump stages installed",
                  "format": "int32"
                },
                {
                  "name": "headDegradation",
                  "kind": "optional",
                  "type": "number<double>",
                  "nullable": true,
                  "description": "<p>Default head degradation when it cannot be calculated, %</p>",
                  "format": "double"
                },
                {
                  "name": "hasGasHandler",
                  "kind": "optional",
                  "type": "boolean",
                  "nullable": false,
                  "description": "Whether the pump assembly has a gas handler"
                },
                {
                  "name": "hasSeparator",
                  "kind": "optional",
                  "type": "boolean",
                  "nullable": false,
                  "description": "Whether the pump assembly has a gas separator"
                },
                {
                  "name": "viscosityCorrection",
                  "kind": "optional",
                  "type": "boolean",
                  "nullable": true,
                  "description": "Whether to apply viscosity corrections in conjunction with gas separation"
                },
                {
                  "name": "separationEfficiency",
                  "kind": "optional",
                  "type": "number<double>",
                  "nullable": true,
                  "description": "<p>Default gas separation efficiency when it cannot be calculated, %</p>",
                  "format": "double"
                },
                {
                  "name": "runDate",
                  "kind": "optional",
                  "type": "string<date-time>",
                  "nullable": false,
                  "description": "<p>Run date of the ESP. Datetime offset (with timezone) in ISO 8601 format. Example: 2022-09-27T16:28</p><div></div>+0000<p></p>",
                  "format": "date-time"
                },
                {
                  "name": "pullDate",
                  "kind": "optional",
                  "type": "string<date-time>",
                  "nullable": true,
                  "description": "<p>Pull date of the ESP. Datetime offset (with timezone) in ISO 8601 format. Example: 2022-09-27T16:28</p><div></div>+0000<p></p>",
                  "format": "date-time"
                }
              ]
            }
          ],
          "complexType": "allOf",
          "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": "Esp[]",
            "schema": [
              {
                "name": "xid",
                "kind": "required",
                "type": "string<uuid>",
                "description": "",
                "format": "uuid"
              },
              {
                "name": "tubingXid",
                "kind": "required",
                "type": "string<uuid>",
                "description": "",
                "format": "uuid"
              },
              {
                "name": "sourceId",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "installOrder",
                "kind": "required",
                "type": "integer<int32>",
                "description": "",
                "format": "int32"
              },
              {
                "name": "stages",
                "kind": "required",
                "type": "integer<int32>",
                "description": "",
                "format": "int32"
              },
              {
                "name": "headDegradation",
                "kind": "optional",
                "type": "number<double>",
                "nullable": true,
                "description": "",
                "format": "double"
              },
              {
                "name": "hasGasHandler",
                "kind": "required",
                "type": "boolean",
                "description": ""
              },
              {
                "name": "hasSeparator",
                "kind": "required",
                "type": "boolean",
                "description": ""
              },
              {
                "name": "viscosityCorrection",
                "kind": "optional",
                "type": "boolean",
                "nullable": true,
                "description": ""
              },
              {
                "name": "separationEfficiency",
                "kind": "optional",
                "type": "number<double>",
                "nullable": true,
                "description": "",
                "format": "double"
              },
              {
                "name": "runDate",
                "kind": "required",
                "type": "string<date-time>",
                "description": "",
                "format": "date-time"
              },
              {
                "name": "pullDate",
                "kind": "optional",
                "type": "string<date-time>",
                "nullable": true,
                "description": "",
                "format": "date-time"
              }
            ],
            "modelRef": "#/components/schemas/Esp",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "FQNusQTW5X5ZoHU1DLU3I",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://data.onxecta.com/api/production/esp \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '[\n     {}\n     ]'"
        },
        {
          "id": "iiIOegLZKZs7e9I_RrO6L",
          "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]);\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://data.onxecta.com/api/production/esp\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "uqj05BR1-Tf0hW8OdNJUA",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://data.onxecta.com/api/production/esp\"\n\npayload = json.dumps([\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": "Qn9hDjNMwCQWOZOzq7_1E",
          "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/esp\", Method.Post);\nrequest.AddHeader(\"accept\", \"application/json\");\nrequest.AddHeader(\"content-type\", \"application/json\");\nvar body = @\"[\" + \"\\n\" +\n@\"  {}\" + \"\\n\" +\n@\"]\";\nrequest.AddStringBody(body, DataFormat.Json);\nRestResponse response = await client.ExecuteAsync(request);\nConsole.WriteLine(response.Content);"
        },
        {
          "id": "eDk8dYlXJe9YGrBnoosHy",
          "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]\");\nRequest request = new Request.Builder()\n   .url(\"https://data.onxecta.com/api/production/esp\")\n   .method(\"POST\", body)\n   .addHeader(\"accept\", \"application/json\")\n   .addHeader(\"content-type\", \"application/json\")\n   .build();\nResponse response = client.newCall(request).execute();"
        }
      ],
      "selectedLanguageId": "FQNusQTW5X5ZoHU1DLU3I"
    },
    "results": {
      "languages": [
        {
          "id": "-nAuq-1nHh1wbglrKHdIu",
          "language": "200",
          "code": "// OK\n[\n  {\n    \"xid\": \"\",\n    \"tubingXid\": \"\",\n    \"sourceId\": \"\",\n    \"name\": \"\",\n    \"installOrder\": \"\",\n    \"stages\": \"\",\n    \"headDegradation\": \"\",\n    \"hasGasHandler\": false,\n    \"hasSeparator\": false,\n    \"viscosityCorrection\": false,\n    \"separationEfficiency\": \"\",\n    \"runDate\": \"\",\n    \"pullDate\": \"\"\n  }\n]"
        }
      ],
      "selectedLanguageId": "-nAuq-1nHh1wbglrKHdIu"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}