---
title: Bulk Add / Update Time Series Configuration Data
slug: bulk-add-update-time-series-configuration-data
docTags: 
createdAt: 2023-05-03T20:15:30.000Z
---

{
  "id": "PRkbzt5OJi2oWrEzeqQMG",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://data.onxecta.com/api/production/tsconfig",
    "servers": [
      {
        "url": "https://data.onxecta.com/api/production/tsconfig",
        "description": "AWS Cloud API Endpoint"
      },
      {
        "url": "http://localhost/api/production/tsconfig",
        "description": "Local Testing API Endpoint"
      }
    ],
    "name": "Bulk Add / Update Time Series Configuration Data",
    "description": "This operation will add or update multiple time series configuration entities using batching for efficiency",
    "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": "TimeSeriesInput[]",
          "schema": [
            {
              "name": "sourceWellId",
              "kind": "required",
              "type": "string",
              "description": "<p>SourceWellId of the time series tag/configuration</p>",
              "maxLength": 100
            },
            {
              "name": "sourceId",
              "kind": "required",
              "type": "string",
              "description": "<p>Tag identifier. Example: OSI PI AF '\\server\\element\\attributeID'</p>",
              "maxLength": 255
            },
            {
              "name": "measurement",
              "kind": "required",
              "type": "string",
              "description": "<p>Time Series Measurement Values\nTime series measurements must be provided from the following list of possible values. ProdX forces standardization to enable high frequency data to be used in modeling and comparative visualization.</p>\n<p>Rates</p>\n<p>OILRATE - STB/d\nGASRATE - Mscf/d\nGASLIFTINJECTIONRATE - Mscf/d (actual gas lift injection rate)\nGASLIFTINJECTIONRATESETPOINT - Mscf/d (control system gas lift injection rate setpoint)\nWATERRATE - STB/d\nSANDRATE - g/s</p>\n<p>Pressures</p>\n<p>WHP - psig (wellhead/tubing pressure)\nCHP - psig (casing pressure)\nDHGP - psig (downhole gauge pressure)\nDHGP_DISCHARGE - psig (downhole gauge pressure at pump discharge)\nPRESSUREUPSTREAM - psig (upstream choke pressure / flowline pressure)\nPRESSUREDOWNSTREAM - psig (downstream choke pressure tubing side)\nPRESSURE_DOWNSTREAM_ANNULUS - psig (downstream choke pressure annulus side)\nHPSEPARATORPRESSURE - psig\nLPSEPARATORPRESSURE - psig</p>\n<p>Temperatures</p>\n<p>WHT - degF (wellhead/tubing temp)\nCHT - degF (casing temp)\nDHGT - degF (downhole gauge temp)\nFLOWLINETEMPERATURE - degF</p>\n<p>Other</p>\n<p>CHOKE - %\nWELLCYCLINGFLAG - unitless (flag indicating the cycling status of the well)</p>\n<p>ESP Drive</p>\n<p>ESP_VSD_HEAT_SINK_TEMP - degF\nESP_VSD_BUS_VOLTAGE - volts\nESP_VSD_CURRENT - amps\nESP_VSD_VOLTAGE - volts</p>\n<p>ESP Motor</p>\n<p>ESP_MOTOR_CURRENT - amps\nESP_MOTOR_FREQUENCY - hz\nESP_MOTOR_TEMPERATURE - degF\nESP_MOTOR_VOLTAGE - volts</p>\n<p>ESP General\nESP_INTAKE_PRESSURE - psig\nESP_DISCHARGE_PRESSURE - psig\nESP_FLUID_TEMPERATURE - degF\nESP_RUNTIME - hours (hours of cumulative runtime today)\nESP_VIBRATION_X - g\nESP_VIBRATION_Y - g\nESP_HIGH_SPEED_CLAMP - hz\nESP_LOW_SPEED_CLAMP - hz\nESP_CURRENT_LIMIT - amp\nESP_CURRENT_SETPOINT - amps\nESP_CONTROL_MODE - unitless</p>\n<p>Sucker Rod Pump</p>\n<p>SRP_POLISHED_ROD_LOAD - lb\nSRP_POLISHED_ROD_POSITION - in\nSRP_PUMP_FILLAGE - %\nSRP_PUMP_INTAKE_PRESSURE - psig\nSRP_STROKE_RATE - strokes/min\nSRP_RUNTIME - minutes (minutes of cumulative runtime today)\nPLUNGER_EVENT - (0, 1, or 2 for the three possible plunger states; valve open, valve closed, or plunger arrived)</p>",
              "modelRef": "#/components/schemas/TimeSeriesMeasurement",
              "customType": "TimeSeriesMeasurement",
              "schema": []
            },
            {
              "name": "unit",
              "kind": "required",
              "type": "string",
              "description": "",
              "modelRef": "#/components/schemas/UoM",
              "customType": "UoM",
              "schema": []
            }
          ],
          "modelRef": "#/components/schemas/TimeSeriesInput",
          "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": "TimeSeries[]",
            "schema": [
              {
                "name": "xid",
                "kind": "required",
                "type": "string<uuid>",
                "description": "",
                "format": "uuid"
              },
              {
                "name": "wellXid",
                "kind": "required",
                "type": "string<uuid>",
                "description": "",
                "format": "uuid"
              },
              {
                "name": "sourceId",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "measurement",
                "kind": "required",
                "type": "string",
                "description": "<p>Time Series Measurement Values\nTime series measurements must be provided from the following list of possible values. ProdX forces standardization to enable high frequency data to be used in modeling and comparative visualization.</p>\n<p>Rates</p>\n<p>OILRATE - STB/d\nGASRATE - Mscf/d\nGASLIFTINJECTIONRATE - Mscf/d (actual gas lift injection rate)\nGASLIFTINJECTIONRATESETPOINT - Mscf/d (control system gas lift injection rate setpoint)\nWATERRATE - STB/d\nSANDRATE - g/s</p>\n<p>Pressures</p>\n<p>WHP - psig (wellhead/tubing pressure)\nCHP - psig (casing pressure)\nDHGP - psig (downhole gauge pressure)\nDHGP_DISCHARGE - psig (downhole gauge pressure at pump discharge)\nPRESSUREUPSTREAM - psig (upstream choke pressure / flowline pressure)\nPRESSUREDOWNSTREAM - psig (downstream choke pressure tubing side)\nPRESSURE_DOWNSTREAM_ANNULUS - psig (downstream choke pressure annulus side)\nHPSEPARATORPRESSURE - psig\nLPSEPARATORPRESSURE - psig</p>\n<p>Temperatures</p>\n<p>WHT - degF (wellhead/tubing temp)\nCHT - degF (casing temp)\nDHGT - degF (downhole gauge temp)\nFLOWLINETEMPERATURE - degF</p>\n<p>Other</p>\n<p>CHOKE - %\nWELLCYCLINGFLAG - unitless (flag indicating the cycling status of the well)</p>\n<p>ESP Drive</p>\n<p>ESP_VSD_HEAT_SINK_TEMP - degF\nESP_VSD_BUS_VOLTAGE - volts\nESP_VSD_CURRENT - amps\nESP_VSD_VOLTAGE - volts</p>\n<p>ESP Motor</p>\n<p>ESP_MOTOR_CURRENT - amps\nESP_MOTOR_FREQUENCY - hz\nESP_MOTOR_TEMPERATURE - degF\nESP_MOTOR_VOLTAGE - volts</p>\n<p>ESP General\nESP_INTAKE_PRESSURE - psig\nESP_DISCHARGE_PRESSURE - psig\nESP_FLUID_TEMPERATURE - degF\nESP_RUNTIME - hours (hours of cumulative runtime today)\nESP_VIBRATION_X - g\nESP_VIBRATION_Y - g\nESP_HIGH_SPEED_CLAMP - hz\nESP_LOW_SPEED_CLAMP - hz\nESP_CURRENT_LIMIT - amp\nESP_CURRENT_SETPOINT - amps\nESP_CONTROL_MODE - unitless</p>\n<p>Sucker Rod Pump</p>\n<p>SRP_POLISHED_ROD_LOAD - lb\nSRP_POLISHED_ROD_POSITION - in\nSRP_PUMP_FILLAGE - %\nSRP_PUMP_INTAKE_PRESSURE - psig\nSRP_STROKE_RATE - strokes/min\nSRP_RUNTIME - minutes (minutes of cumulative runtime today)\nPLUNGER_EVENT - (0, 1, or 2 for the three possible plunger states; valve open, valve closed, or plunger arrived)</p>",
                "modelRef": "#/components/schemas/TimeSeriesMeasurement",
                "customType": "TimeSeriesMeasurement",
                "schema": []
              },
              {
                "name": "unit",
                "kind": "required",
                "type": "string",
                "description": "",
                "modelRef": "#/components/schemas/UoM",
                "customType": "UoM",
                "schema": []
              },
              {
                "name": "firstDate",
                "kind": "optional",
                "type": "string<date-time>",
                "nullable": true,
                "description": "",
                "format": "date-time"
              },
              {
                "name": "firstValue",
                "kind": "optional",
                "type": "number<double>",
                "nullable": true,
                "description": "",
                "format": "double"
              },
              {
                "name": "lastDate",
                "kind": "optional",
                "type": "string<date-time>",
                "nullable": true,
                "description": "",
                "format": "date-time"
              },
              {
                "name": "lastValue",
                "kind": "optional",
                "type": "number<double>",
                "nullable": true,
                "description": "",
                "format": "double"
              }
            ],
            "modelRef": "#/components/schemas/TimeSeries",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "qEWERnVyMvg-IxL993Fvx",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://data.onxecta.com/api/production/tsconfig \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '[\n     {\n     \"sourceWellId\": \"\",\n     \"sourceId\": \"\",\n     \"measurement\": \"\",\n     \"unit\": \"\"\n     }\n     ]'"
        },
        {
          "id": "hkuFlUvjHOMj4CUtpNW3f",
          "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      \"sourceId\": \"\",\n      \"measurement\": \"\",\n      \"unit\": \"\"\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/tsconfig\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "PNuxoS8VV_-uuOVKTgzv9",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://data.onxecta.com/api/production/tsconfig\"\n\npayload = json.dumps([\n   {\n      \"sourceWellId\": \"\",\n      \"sourceId\": \"\",\n      \"measurement\": \"\",\n      \"unit\": \"\"\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": "RbTZJlqUwq3MofPCUCX17",
          "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/tsconfig\", Method.Post);\nrequest.AddHeader(\"accept\", \"application/json\");\nrequest.AddHeader(\"content-type\", \"application/json\");\nvar body = @\"[\" + \"\\n\" +\n@\"  {\" + \"\\n\" +\n@\"    \"\"sourceWellId\"\": \"\"\"\",\" + \"\\n\" +\n@\"    \"\"sourceId\"\": \"\"\"\",\" + \"\\n\" +\n@\"    \"\"measurement\"\": \"\"\"\",\" + \"\\n\" +\n@\"    \"\"unit\"\": \"\"\"\"\" + \"\\n\" +\n@\"  }\" + \"\\n\" +\n@\"]\";\nrequest.AddStringBody(body, DataFormat.Json);\nRestResponse response = await client.ExecuteAsync(request);\nConsole.WriteLine(response.Content);"
        },
        {
          "id": "RwmTEFNLWfUJehDzRknih",
          "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    \\\"sourceId\\\": \\\"\\\",\\n    \\\"measurement\\\": \\\"\\\",\\n    \\\"unit\\\": \\\"\\\"\\n  }\\n]\");\nRequest request = new Request.Builder()\n   .url(\"https://data.onxecta.com/api/production/tsconfig\")\n   .method(\"POST\", body)\n   .addHeader(\"accept\", \"application/json\")\n   .addHeader(\"content-type\", \"application/json\")\n   .build();\nResponse response = client.newCall(request).execute();"
        }
      ],
      "selectedLanguageId": "qEWERnVyMvg-IxL993Fvx"
    },
    "results": {
      "languages": [
        {
          "id": "I148YsIY3KC8KA8KStwFs",
          "language": "200",
          "code": "// OK\n[\n  {\n    \"xid\": \"\",\n    \"wellXid\": \"\",\n    \"sourceId\": \"\",\n    \"measurement\": \"\",\n    \"unit\": \"\",\n    \"firstDate\": \"\",\n    \"firstValue\": \"\",\n    \"lastDate\": \"\",\n    \"lastValue\": \"\"\n  }\n]"
        }
      ],
      "selectedLanguageId": "I148YsIY3KC8KA8KStwFs"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}