Api session event editor netload import net

From Tygron Support wiki
Jump to navigation Jump to search

API Event to Import Net

Name Importance Type Description Values
0 REQUIRED (GeometryCollection with crs: EPSG:3857) GeometryCollection
1 REQUIRED (String or multiple values in array ["a", "b", "c"]) String[]
2 REQUIRED (NetType or multiple values in array [a, b, c]) NetType[]
3 REQUIRED (String or multiple values in array ["a", "b", "c"]) String[]
4 REQUIRED (Floating point number or multiple values in array [1.0, 2.0, 3.0] or matrix [[1.0, 2.0], [3.0, 4.0], [5.0, 6.0]]) double[][]
5 REQUIRED (GeometryCollection with crs: EPSG:3857) GeometryCollection
6 REQUIRED (String or multiple values in array ["a", "b", "c"]) String[]
7 REQUIRED (NetType or multiple values in array [a, b, c]) NetType[]
8 REQUIRED (String or multiple values in array ["a", "b", "c"]) String[]
9 REQUIRED (Floating point number or multiple values in array [1.0, 2.0, 3.0] or matrix [[1.0, 2.0], [3.0, 4.0], [5.0, 6.0]]) double[][]
10 REQUIRED (GeometryCollection with crs: EPSG:3857) GeometryCollection
11 REQUIRED (String or multiple values in array ["a", "b", "c"]) String[]
12 REQUIRED (NetType or multiple values in array [a, b, c]) NetType[]
13 REQUIRED (TimeState or multiple values in array [a, b, c]) TimeState[]
14 REQUIRED (Boolean or multiple values in array [true, false, true]) Boolean[]
15 REQUIRED (String or multiple values in array ["a", "b", "c"]) String[]
16 REQUIRED (Integer number or multiple values in array [1, 2, 3]) Integer[]
17 REQUIRED (String or multiple values in array ["a", "b", "c"]) String[]
18 REQUIRED (Floating point number or multiple values in array [1.0, 2.0, 3.0] or matrix [[1.0, 2.0], [3.0, 4.0], [5.0, 6.0]]) double[][]
19 REQUIRED (Floating point number) Double
20 REQUIRED (Floating point number) Double

Response Codes

Response Code: Description
204 No Content
300-600 Codes Overview

Example POST

Example POST: https://engine.tygron.com/api/session/event/editornetload/import_net/?crs=3857&f=JSON&token=API_TOKEN

with content:

[ {
 "type" : "GeometryCollection",
 "geometries" : [ {
 "type" : "MultiPolygon",
 "coordinates" : [ [ [ [ 658636.7618515313, 6799461.8964563515 ], [ 658636.7618515313, 6799375.403550789 ], [ 658777.4282786194, 6799375.403550789 ], [ 658777.4282786194, 6799461.8964563515 ], [ 658636.7618515313, 6799461.8964563515 ] ] ] ]
 }, {
 "type" : "MultiPolygon",
 "coordinates" : [ [ [ [ 658636.7618515313, 6799461.8964563515 ], [ 658636.7618515313, 6799340.182988436 ], [ 658699.4859874757, 6799340.182988436 ], [ 658699.4859874757, 6799461.8964563515 ], [ 658636.7618515313, 6799461.8964563515 ] ] ] ]
 }, {
 "type" : "MultiPolygon",
 "coordinates" : [ [ [ [ 658636.7618515313, 6799461.8964563515 ], [ 658636.7618515313, 6799335.825497992 ], [ 658663.70139692, 6799335.825497992 ], [ 658663.70139692, 6799461.8964563515 ], [ 658636.7618515313, 6799461.8964563515 ] ] ] ]
 } ]
}, [ "Text 1", "Text 2", "Text 3" ], [ "HEAT", "GAS", "INTERNET" ], [ "Text 1", "Text 2", "Text 3" ], [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ], {
 "type" : "GeometryCollection",
 "geometries" : [ {
 "type" : "MultiPolygon",
 "coordinates" : [ [ [ [ 658636.7618515313, 6799461.8964563515 ], [ 658636.7618515313, 6799414.957435203 ], [ 658742.9251314418, 6799414.957435203 ], [ 658742.9251314418, 6799461.8964563515 ], [ 658636.7618515313, 6799461.8964563515 ] ] ] ]
 }, {
 "type" : "MultiPolygon",
 "coordinates" : [ [ [ [ 658636.7618515313, 6799461.8964563515 ], [ 658636.7618515313, 6799316.630155227 ], [ 658770.046580073, 6799316.630155227 ], [ 658770.046580073, 6799461.8964563515 ], [ 658636.7618515313, 6799461.8964563515 ] ] ] ]
 }, {
 "type" : "MultiPolygon",
 "coordinates" : [ [ [ [ 658636.7618515313, 6799461.8964563515 ], [ 658636.7618515313, 6799301.353819702 ], [ 658716.1025238519, 6799301.353819702 ], [ 658716.1025238519, 6799461.8964563515 ], [ 658636.7618515313, 6799461.8964563515 ] ] ] ]
 } ]
}, [ "Text 1", "Text 2", "Text 3" ], [ "SEWER", "ELECTRICITY", "HEAT" ], [ "Text 1", "Text 2", "Text 3" ], [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ], {
 "type" : "GeometryCollection",
 "geometries" : [ {
 "type" : "MultiPolygon",
 "coordinates" : [ [ [ [ 658636.7618515313, 6799461.8964563515 ], [ 658636.7618515313, 6799312.605619214 ], [ 658759.7170745161, 6799312.605619214 ], [ 658759.7170745161, 6799461.8964563515 ], [ 658636.7618515313, 6799461.8964563515 ] ] ] ]
 }, {
 "type" : "MultiPolygon",
 "coordinates" : [ [ [ [ 658636.7618515313, 6799461.8964563515 ], [ 658636.7618515313, 6799416.537710611 ], [ 658780.1487065767, 6799416.537710611 ], [ 658780.1487065767, 6799461.8964563515 ], [ 658636.7618515313, 6799461.8964563515 ] ] ] ]
 }, {
 "type" : "MultiPolygon",
 "coordinates" : [ [ [ [ 658636.7618515313, 6799461.8964563515 ], [ 658636.7618515313, 6799308.92864375 ], [ 658740.1234966799, 6799308.92864375 ], [ 658740.1234966799, 6799461.8964563515 ], [ 658636.7618515313, 6799461.8964563515 ] ] ] ]
 } ]
}, [ "Text 1", "Text 2", "Text 3" ], [ "HEAT", "HEAT", "SEWER" ], [ "DEMOLISHING", "PENDING_CONSTRUCTION", "READY" ], [ true, false, true ], [ "Text 1", "Text 2", "Text 3" ], [ 1, 2, 3 ], [ "Text 1", "Text 2", "Text 3" ], [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ], 76, 52 ]