Bulk Add / Update Tubing Data
POST
https://data.onxecta.com/api/production/tubing
Body Parameters
- bodyTubingInput[]required
- sourceIdstringrequiredDescriptionMax Length100
- sourceWellboreIdstringrequiredDescriptionMax Length100
- sourceWellIdstringrequiredDescriptionMax Length100
- topMdnumber<double>DescriptionDefault0Formatdouble
- bottomMdnumber<double>requiredDescriptionFormatdouble
- idnumber<double>requiredDescriptionFormatdouble
- odnumber<double>requiredDescriptionFormatdouble
- roughnessnumber<double>DescriptionFormatdouble
- runDatestring<date-time>DescriptionFormatdate-time
- pullDatestring<date-time>DescriptionFormatdate-time
Responses
200
- Tubing[]
- xidstring<uuid>requiredFormatuuid
- sourceIdstringrequired
- topMdnumber<double>Formatdouble
- bottomMdnumber<double>requiredFormatdouble
- idnumber<double>requiredFormatdouble
- odnumber<double>requiredFormatdouble
- roughnessnumber<double>Formatdouble
- runDatestring<date-time>Formatdate-time
- pullDatestring<date-time>Formatdate-time
curl
curl --request POST \
--url https://data.onxecta.com/api/production/tubing \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '[
{
"sourceId": "",
"sourceWellboreId": "",
"sourceWellId": "",
"bottomMd": "",
"id": "",
"od": ""
}
]'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var raw = JSON.stringify([
{
"sourceId": "",
"sourceWellboreId": "",
"sourceWellId": "",
"bottomMd": "",
"id": "",
"od": ""
}
]);
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://data.onxecta.com/api/production/tubing", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));python
import requests
import json
url = "https://data.onxecta.com/api/production/tubing"
payload = json.dumps([
{
"sourceId": "",
"sourceWellboreId": "",
"sourceWellId": "",
"bottomMd": "",
"id": "",
"od": ""
}
])
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
csharp
var options = new RestClientOptions("https://data.onxecta.com")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/api/production/tubing", Method.Post);
request.AddHeader("accept", "application/json");
request.AddHeader("content-type", "application/json");
var body = @"[" + "\n" +
@" {" + "\n" +
@" ""sourceId"": """"," + "\n" +
@" ""sourceWellboreId"": """"," + "\n" +
@" ""sourceWellId"": """"," + "\n" +
@" ""bottomMd"": """"," + "\n" +
@" ""id"": """"," + "\n" +
@" ""od"": """"" + "\n" +
@" }" + "\n" +
@"]";
request.AddStringBody(body, DataFormat.Json);
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);java
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "[\n {\n \"sourceId\": \"\",\n \"sourceWellboreId\": \"\",\n \"sourceWellId\": \"\",\n \"bottomMd\": \"\",\n \"id\": \"\",\n \"od\": \"\"\n }\n]");
Request request = new Request.Builder()
.url("https://data.onxecta.com/api/production/tubing")
.method("POST", body)
.addHeader("accept", "application/json")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();200
// OK
[
{
"xid": "",
"sourceId": "",
"topMd": "",
"bottomMd": "",
"id": "",
"od": "",
"roughness": "",
"runDate": "",
"pullDate": ""
}
]