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

{
  "id": "YZ32mEEAwcB8dA-VVyc76",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://data.onxecta.com/api/production/srp",
    "servers": [
      {
        "url": "https://data.onxecta.com/api/production/srp",
        "description": "AWS Cloud API Endpoint"
      },
      {
        "url": "http://localhost/api/production/srp",
        "description": "Local Testing API Endpoint"
      }
    ],
    "name": "Bulk Add / Update SuckerRodPump 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": "SuckerRodPumpInput[]",
          "schema": [
            {
              "name": "sourceWellId",
              "kind": "required",
              "type": "string",
              "description": "SourceWellId which owns the rod pump",
              "maxLength": 100
            },
            {
              "name": "sourceWellboreId",
              "kind": "required",
              "type": "string",
              "description": "SourceWellboreId which owns the rod pump",
              "maxLength": 100
            },
            {
              "name": "sourceId",
              "kind": "required",
              "type": "string",
              "description": "<p>sourceId of the rod pump to enable upsert. From WellView wvRod, use idrec column</p>",
              "maxLength": 100
            },
            {
              "name": "installDate",
              "kind": "optional",
              "type": "string<date-time>",
              "nullable": true,
              "description": "<p>Install date of the rod pump. Datetime offset (with timezone) in ISO 8601 format. Example: 2022-09-27T16:28</p><div></div>+0000<p></p>",
              "format": "date-time"
            },
            {
              "name": "surfaceStrokeLength",
              "kind": "required",
              "type": "number<double>",
              "description": "<p>Surface stroke length, in</p>",
              "format": "double"
            },
            {
              "name": "installMd",
              "kind": "required",
              "type": "number<double>",
              "description": "<p>Install depth, ft</p>",
              "format": "double"
            },
            {
              "name": "plungerDIA",
              "kind": "required",
              "type": "number<double>",
              "description": "<p>Plunger diameter, in</p>",
              "format": "double"
            },
            {
              "name": "plungerLength",
              "kind": "required",
              "type": "number<double>",
              "description": "<p>Plunger length, in</p>",
              "format": "double"
            },
            {
              "name": "plungerClearance",
              "kind": "optional",
              "type": "number<double>",
              "nullable": true,
              "description": "<p>Plunger clearance, in</p>",
              "format": "double"
            },
            {
              "name": "rodNumber",
              "kind": "required",
              "type": "integer<int32>",
              "description": "<p>API rod number, unitless</p>",
              "format": "int32"
            }
          ],
          "modelRef": "#/components/schemas/SuckerRodPumpInput",
          "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": "SuckerRodPump[]",
            "schema": [
              {
                "name": "xid",
                "kind": "required",
                "type": "string<uuid>",
                "description": "",
                "format": "uuid"
              },
              {
                "name": "wellboreXid",
                "kind": "required",
                "type": "string<uuid>",
                "description": "",
                "format": "uuid"
              },
              {
                "name": "sourceId",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "installDate",
                "kind": "optional",
                "type": "string<date-time>",
                "nullable": true,
                "description": "",
                "format": "date-time"
              },
              {
                "name": "surfaceStrokeLength",
                "kind": "required",
                "type": "number<double>",
                "description": "",
                "format": "double"
              },
              {
                "name": "installMd",
                "kind": "required",
                "type": "number<double>",
                "description": "",
                "format": "double"
              },
              {
                "name": "plungerDIA",
                "kind": "required",
                "type": "number<double>",
                "description": "",
                "format": "double"
              },
              {
                "name": "plungerLength",
                "kind": "optional",
                "type": "number<double>",
                "description": "",
                "format": "double"
              },
              {
                "name": "plungerClearance",
                "kind": "optional",
                "type": "number<double>",
                "nullable": true,
                "description": "",
                "format": "double"
              },
              {
                "name": "rodNumber",
                "kind": "required",
                "type": "integer<int32>",
                "description": "",
                "format": "int32"
              }
            ],
            "modelRef": "#/components/schemas/SuckerRodPump",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "6NW-f06r3XHLVVCq26gWG",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://data.onxecta.com/api/production/srp \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '[\n     {\n     \"sourceWellId\": \"\",\n     \"sourceWellboreId\": \"\",\n     \"sourceId\": \"\",\n     \"surfaceStrokeLength\": \"\",\n     \"installMd\": \"\",\n     \"plungerDIA\": \"\",\n     \"plungerLength\": \"\",\n     \"rodNumber\": \"\"\n     }\n     ]'"
        },
        {
          "id": "MpTJJBWA14_zP0CplygPt",
          "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      \"sourceWellId\": \"\",\n      \"sourceWellboreId\": \"\",\n      \"sourceId\": \"\",\n      \"surfaceStrokeLength\": \"\",\n      \"installMd\": \"\",\n      \"plungerDIA\": \"\",\n      \"plungerLength\": \"\",\n      \"rodNumber\": \"\"\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/srp\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "B57b9LJRCreRVSHW5ce-5",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://data.onxecta.com/api/production/srp\"\n\npayload = json.dumps([\n   {\n      \"sourceWellId\": \"\",\n      \"sourceWellboreId\": \"\",\n      \"sourceId\": \"\",\n      \"surfaceStrokeLength\": \"\",\n      \"installMd\": \"\",\n      \"plungerDIA\": \"\",\n      \"plungerLength\": \"\",\n      \"rodNumber\": \"\"\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": "9VcT_9znFR1a4OflwL3Rp",
          "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/srp\", Method.Post);\nrequest.AddHeader(\"accept\", \"application/json\");\nrequest.AddHeader(\"content-type\", \"application/json\");\nvar body = @\"[\" + \"\\n\" +\n@\"  {\" + \"\\n\" +\n@\"    \"\"sourceWellId\"\": \"\"\"\",\" + \"\\n\" +\n@\"    \"\"sourceWellboreId\"\": \"\"\"\",\" + \"\\n\" +\n@\"    \"\"sourceId\"\": \"\"\"\",\" + \"\\n\" +\n@\"    \"\"surfaceStrokeLength\"\": \"\"\"\",\" + \"\\n\" +\n@\"    \"\"installMd\"\": \"\"\"\",\" + \"\\n\" +\n@\"    \"\"plungerDIA\"\": \"\"\"\",\" + \"\\n\" +\n@\"    \"\"plungerLength\"\": \"\"\"\",\" + \"\\n\" +\n@\"    \"\"rodNumber\"\": \"\"\"\"\" + \"\\n\" +\n@\"  }\" + \"\\n\" +\n@\"]\";\nrequest.AddStringBody(body, DataFormat.Json);\nRestResponse response = await client.ExecuteAsync(request);\nConsole.WriteLine(response.Content);"
        },
        {
          "id": "DZyRTnMBs7HJq_0HwDrKq",
          "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    \\\"sourceWellId\\\": \\\"\\\",\\n    \\\"sourceWellboreId\\\": \\\"\\\",\\n    \\\"sourceId\\\": \\\"\\\",\\n    \\\"surfaceStrokeLength\\\": \\\"\\\",\\n    \\\"installMd\\\": \\\"\\\",\\n    \\\"plungerDIA\\\": \\\"\\\",\\n    \\\"plungerLength\\\": \\\"\\\",\\n    \\\"rodNumber\\\": \\\"\\\"\\n  }\\n]\");\nRequest request = new Request.Builder()\n   .url(\"https://data.onxecta.com/api/production/srp\")\n   .method(\"POST\", body)\n   .addHeader(\"accept\", \"application/json\")\n   .addHeader(\"content-type\", \"application/json\")\n   .build();\nResponse response = client.newCall(request).execute();"
        }
      ],
      "selectedLanguageId": "6NW-f06r3XHLVVCq26gWG"
    },
    "results": {
      "languages": [
        {
          "id": "gbj9sOVhjGNDqQXKAssCs",
          "language": "200",
          "code": "// OK\n[\n  {\n    \"xid\": \"\",\n    \"wellboreXid\": \"\",\n    \"sourceId\": \"\",\n    \"installDate\": \"\",\n    \"surfaceStrokeLength\": \"\",\n    \"installMd\": \"\",\n    \"plungerDIA\": \"\",\n    \"plungerLength\": \"\",\n    \"plungerClearance\": \"\",\n    \"rodNumber\": \"\"\n  }\n]"
        }
      ],
      "selectedLanguageId": "gbj9sOVhjGNDqQXKAssCs"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}