Bulk add / update network pipe(s)
POST
https://data.onxecta.com/api/production/network/pipe
Body Parameters
- bodyNetworkPipeInput[]required
- sourceNetworkIdstringrequiredDescriptionMax Length100
- sourceIdstringrequiredDescriptionMax Length100
- datestring<date-time>requiredDescriptionFormatdate-time
- upstreamSourceIdstringrequiredDescriptionMax Length255
- downstreamSourceIdstringrequiredDescriptionMax Length255
- enabledbooleanrequiredDescription
- lengthnumber[]requiredDescription
- trueVerticalDepthnumber[]requiredDescription
- innerDiameternumber[]requiredDescription
- roughnessnumber[]requiredDescription
Responses
200
- NetworkPipe[]
- xidstring<uuid>requiredDescriptionFormatuuid
- sourceNetworkIdstringrequiredDescription
- sourceIdstringrequiredDescription
- datestring<date-time>requiredDescriptionFormatdate-time
- upstreamSourceIdstringrequiredDescription
- downstreamSourceIdstringrequiredDescription
- enabledbooleanrequiredDescription
- lengthnumber[]requiredDescription
- trueVerticalDepthnumber[]requiredDescription
- innerDiameternumber[]requiredDescription
- roughnessnumber[]requiredDescription
curl
curl --request POST \
--url https://data.onxecta.com/api/production/network/pipe \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '[
{
"sourceNetworkId": "",
"sourceId": "",
"date": "",
"upstreamSourceId": "",
"downstreamSourceId": "",
"enabled": "",
"length": [],
"trueVerticalDepth": [],
"innerDiameter": [],
"roughness": []
}
]'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var raw = JSON.stringify([
{
"sourceNetworkId": "",
"sourceId": "",
"date": "",
"upstreamSourceId": "",
"downstreamSourceId": "",
"enabled": "",
"length": [],
"trueVerticalDepth": [],
"innerDiameter": [],
"roughness": []
}
]);
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://data.onxecta.com/api/production/network/pipe", 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/network/pipe"
payload = json.dumps([
{
"sourceNetworkId": "",
"sourceId": "",
"date": "",
"upstreamSourceId": "",
"downstreamSourceId": "",
"enabled": "",
"length": [],
"trueVerticalDepth": [],
"innerDiameter": [],
"roughness": []
}
])
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/network/pipe", Method.Post);
request.AddHeader("accept", "application/json");
request.AddHeader("content-type", "application/json");
var body = @"[" + "\n" +
@" {" + "\n" +
@" ""sourceNetworkId"": """"," + "\n" +
@" ""sourceId"": """"," + "\n" +
@" ""date"": """"," + "\n" +
@" ""upstreamSourceId"": """"," + "\n" +
@" ""downstreamSourceId"": """"," + "\n" +
@" ""enabled"": """"," + "\n" +
@" ""length"": []," + "\n" +
@" ""trueVerticalDepth"": []," + "\n" +
@" ""innerDiameter"": []," + "\n" +
@" ""roughness"": []" + "\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 \"sourceNetworkId\": \"\",\n \"sourceId\": \"\",\n \"date\": \"\",\n \"upstreamSourceId\": \"\",\n \"downstreamSourceId\": \"\",\n \"enabled\": \"\",\n \"length\": [],\n \"trueVerticalDepth\": [],\n \"innerDiameter\": [],\n \"roughness\": []\n }\n]");
Request request = new Request.Builder()
.url("https://data.onxecta.com/api/production/network/pipe")
.method("POST", body)
.addHeader("accept", "application/json")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();200
// OK
[
{
"xid": "",
"sourceNetworkId": "",
"sourceId": "",
"date": "",
"upstreamSourceId": "",
"downstreamSourceId": "",
"enabled": false,
"length": [
0
],
"trueVerticalDepth": [
0
],
"innerDiameter": [
0
],
"roughness": [
0
]
}
]