---
title: Bulk Add / Update Micro String Data
slug: bulk-add-update-micro-string-data
docTags: 
createdAt: 2023-11-07T22:48:37.773Z
---

{
  "id": "j6kiYlj9I8Q28CmlTYZIX",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://data.onxecta.com/api/production/micro_string",
    "servers": [
      {
        "url": "https://data.onxecta.com/api/production/micro_string",
        "description": "AWS Cloud API Endpoint"
      },
      {
        "url": "http://localhost/api/production/micro_string",
        "description": "Local Testing API Endpoint"
      }
    ],
    "name": "Bulk Add / Update Micro String 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": "MicroStringInput[]",
          "schema": [
            {
              "name": "sourceId",
              "kind": "required",
              "type": "string",
              "description": "SourceId of the micro string to enable upsert",
              "maxLength": 100
            },
            {
              "name": "sourceWellboreId",
              "kind": "required",
              "type": "string",
              "description": "SourceWellboreId of the wellbore which owns the micro string",
              "maxLength": 100
            },
            {
              "name": "sourceWellId",
              "kind": "required",
              "type": "string",
              "description": "SourceWellId of the well which owns the micro string",
              "maxLength": 100
            },
            {
              "name": "topMd",
              "kind": "optional",
              "type": "number<double>",
              "nullable": true,
              "description": "<p>Top measured depth of the micro string, ft</p>",
              "default": 0,
              "format": "double"
            },
            {
              "name": "bottomMd",
              "kind": "required",
              "type": "number<double>",
              "description": "<p>Bottom measured depth of the micro string, ft</p>",
              "format": "double"
            },
            {
              "name": "id",
              "kind": "required",
              "type": "number<double>",
              "description": "<p>Inner diameter, in</p>",
              "format": "double"
            },
            {
              "name": "od",
              "kind": "required",
              "type": "number<double>",
              "description": "<p>Outer diameter, in</p>",
              "format": "double"
            },
            {
              "name": "roughness",
              "kind": "optional",
              "type": "number<double>",
              "nullable": true,
              "description": "<p>Absolute roughness, in</p>",
              "format": "double"
            },
            {
              "name": "runDate",
              "kind": "optional",
              "type": "string<date-time>",
              "nullable": true,
              "description": "<p>Run date. 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. 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/MicroStringInput",
          "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": "MicroString[]",
            "schema": [
              {
                "name": "xid",
                "kind": "required",
                "type": "string<uuid>",
                "description": "",
                "format": "uuid"
              },
              {
                "name": "sourceId",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "topMd",
                "kind": "required",
                "type": "number<double>",
                "nullable": true,
                "description": "",
                "format": "double"
              },
              {
                "name": "bottomMd",
                "kind": "required",
                "type": "number<double>",
                "description": "",
                "format": "double"
              },
              {
                "name": "id",
                "kind": "required",
                "type": "number<double>",
                "description": "",
                "format": "double"
              },
              {
                "name": "od",
                "kind": "required",
                "type": "number<double>",
                "description": "",
                "format": "double"
              },
              {
                "name": "roughness",
                "kind": "optional",
                "type": "number<double>",
                "nullable": true,
                "description": "",
                "format": "double"
              },
              {
                "name": "runDate",
                "kind": "optional",
                "type": "string<date-time>",
                "nullable": true,
                "description": "",
                "format": "date-time"
              },
              {
                "name": "pullDate",
                "kind": "optional",
                "type": "string<date-time>",
                "nullable": true,
                "description": "",
                "format": "date-time"
              }
            ],
            "modelRef": "#/components/schemas/MicroString",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "wzgodG4kkQCp3nCfdGSc3",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://data.onxecta.com/api/production/micro_string \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '[\n     {\n     \"sourceId\": \"\",\n     \"sourceWellboreId\": \"\",\n     \"sourceWellId\": \"\",\n     \"bottomMd\": \"\",\n     \"id\": \"\",\n     \"od\": \"\"\n     }\n     ]'"
        },
        {
          "id": "o9_152wMYNIawAO1LSRSR",
          "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      \"sourceId\": \"\",\n      \"sourceWellboreId\": \"\",\n      \"sourceWellId\": \"\",\n      \"bottomMd\": \"\",\n      \"id\": \"\",\n      \"od\": \"\"\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/micro_string\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "8D2esZWyo7fFkbk73zlbD",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://data.onxecta.com/api/production/micro_string\"\n\npayload = json.dumps([\n   {\n      \"sourceId\": \"\",\n      \"sourceWellboreId\": \"\",\n      \"sourceWellId\": \"\",\n      \"bottomMd\": \"\",\n      \"id\": \"\",\n      \"od\": \"\"\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": "B6-4oSFn7PCuGRWVDmcio",
          "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/micro_string\", Method.Post);\nrequest.AddHeader(\"accept\", \"application/json\");\nrequest.AddHeader(\"content-type\", \"application/json\");\nvar body = @\"[\" + \"\\n\" +\n@\"  {\" + \"\\n\" +\n@\"    \"\"sourceId\"\": \"\"\"\",\" + \"\\n\" +\n@\"    \"\"sourceWellboreId\"\": \"\"\"\",\" + \"\\n\" +\n@\"    \"\"sourceWellId\"\": \"\"\"\",\" + \"\\n\" +\n@\"    \"\"bottomMd\"\": \"\"\"\",\" + \"\\n\" +\n@\"    \"\"id\"\": \"\"\"\",\" + \"\\n\" +\n@\"    \"\"od\"\": \"\"\"\"\" + \"\\n\" +\n@\"  }\" + \"\\n\" +\n@\"]\";\nrequest.AddStringBody(body, DataFormat.Json);\nRestResponse response = await client.ExecuteAsync(request);\nConsole.WriteLine(response.Content);"
        },
        {
          "id": "p57DPe4JvBd44s7vEPvRF",
          "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    \\\"sourceId\\\": \\\"\\\",\\n    \\\"sourceWellboreId\\\": \\\"\\\",\\n    \\\"sourceWellId\\\": \\\"\\\",\\n    \\\"bottomMd\\\": \\\"\\\",\\n    \\\"id\\\": \\\"\\\",\\n    \\\"od\\\": \\\"\\\"\\n  }\\n]\");\nRequest request = new Request.Builder()\n   .url(\"https://data.onxecta.com/api/production/micro_string\")\n   .method(\"POST\", body)\n   .addHeader(\"accept\", \"application/json\")\n   .addHeader(\"content-type\", \"application/json\")\n   .build();\nResponse response = client.newCall(request).execute();"
        }
      ],
      "selectedLanguageId": "wzgodG4kkQCp3nCfdGSc3"
    },
    "results": {
      "languages": [
        {
          "id": "r0yejqEyk16EUfxc7kmW_",
          "language": "200",
          "code": "// OK\n[\n  {\n    \"xid\": \"\",\n    \"sourceId\": \"\",\n    \"topMd\": \"\",\n    \"bottomMd\": \"\",\n    \"id\": \"\",\n    \"od\": \"\",\n    \"roughness\": \"\",\n    \"runDate\": \"\",\n    \"pullDate\": \"\"\n  }\n]"
        }
      ],
      "selectedLanguageId": "r0yejqEyk16EUfxc7kmW_"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}