Bulk Add / Update Esp Data
POST
https://data.onxecta.com/api/production/esp
Body Parameters
- bodyESPInput[]required
- objectTubingChildInput
- sourceWellIdstringDescriptionMax Length100
- object
- sourceWellIdstringDescriptionMax Length100
- sourceWellboreIdstringDescriptionMax Length100
- sourceTubingIdstringDescriptionMax Length100
- sourceIdstringDescriptionMax Length100
- namestringDescriptionMax Length100
- installOrderinteger<int32>DescriptionDefault0Formatint32
- stagesinteger<int32>DescriptionFormatint32
- headDegradationnumber<double>DescriptionFormatdouble
- hasGasHandlerbooleanDescription
- hasSeparatorbooleanDescription
- viscosityCorrectionbooleanDescription
- separationEfficiencynumber<double>DescriptionFormatdouble
- runDatestring<date-time>DescriptionFormatdate-time
- pullDatestring<date-time>DescriptionFormatdate-time
Responses
200
- Esp[]
- xidstring<uuid>requiredFormatuuid
- tubingXidstring<uuid>requiredFormatuuid
- sourceIdstringrequired
- namestringrequired
- installOrderinteger<int32>requiredFormatint32
- stagesinteger<int32>requiredFormatint32
- headDegradationnumber<double>Formatdouble
- hasGasHandlerbooleanrequired
- hasSeparatorbooleanrequired
- viscosityCorrectionboolean
- separationEfficiencynumber<double>Formatdouble
- runDatestring<date-time>requiredFormatdate-time
- pullDatestring<date-time>Formatdate-time
curl
curl --request POST \
--url https://data.onxecta.com/api/production/esp \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '[
{}
]'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var raw = JSON.stringify([
{}
]);
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://data.onxecta.com/api/production/esp", 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/esp"
payload = json.dumps([
{}
])
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/esp", Method.Post);
request.AddHeader("accept", "application/json");
request.AddHeader("content-type", "application/json");
var body = @"[" + "\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]");
Request request = new Request.Builder()
.url("https://data.onxecta.com/api/production/esp")
.method("POST", body)
.addHeader("accept", "application/json")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();200
// OK
[
{
"xid": "",
"tubingXid": "",
"sourceId": "",
"name": "",
"installOrder": "",
"stages": "",
"headDegradation": "",
"hasGasHandler": false,
"hasSeparator": false,
"viscosityCorrection": false,
"separationEfficiency": "",
"runDate": "",
"pullDate": ""
}
]