|
1
|
{
|
|
2
|
"openapi": "3.0.0",
|
|
3
|
"info": {
|
|
4
|
"title": "Zone preselection API",
|
|
5
|
"description": "Redirects the user to the homepage or to the page with the list of network plans to order with a predefined perimeter (polygon).\n\nIf the perimeter is too large (exceeds 0.2 km2), the user is only redirected to the homepage. The perimeter is filled with red on the map with a message saying it's too large. The user must resize before ordering.\n",
|
|
6
|
"termsOfService": "https://plans-reseaux.ch/conditions-generales",
|
|
7
|
"contact": {
|
|
8
|
"name": "ASIT Support",
|
|
9
|
"url": "https://viageo.ch/support",
|
|
10
|
"email": "support@viageo.ch"
|
|
11
|
},
|
|
12
|
"version": "1.0.0"
|
|
13
|
},
|
|
14
|
"paths": {
|
|
15
|
"/api/websearch": {
|
|
16
|
"get": {
|
|
17
|
"summary": "Redirects to the portal with a predefined perimeter",
|
|
18
|
"description": "You can redirect the user to the homepage (the map) or to the list of network plans to order (see `showList` parameter)",
|
|
19
|
"parameters": [
|
|
20
|
{
|
|
21
|
"name": "perimeter",
|
|
22
|
"in": "query",
|
|
23
|
"description": "The predefined order area. Given in X,Y coordinate pairs in MN95 (floats). If the last pair does not match the first one, the polygon is automatically closed.",
|
|
24
|
"required": true,
|
|
25
|
"schema": {
|
|
26
|
"type": "string",
|
|
27
|
"example": "2537629.1,1151976.2,2537633.5,1151974.7,2537641.3,1151988.4,2537656.8,1151983,2537629.1,1151976.2"
|
|
28
|
}
|
|
29
|
},
|
|
30
|
{
|
|
31
|
"name": "bgLayer",
|
|
32
|
"in": "query",
|
|
33
|
"description": "The predefined background layer to be used in the map. Default: addresses\n",
|
|
34
|
"required": false,
|
|
35
|
"schema": {
|
|
36
|
"type": "string",
|
|
37
|
"enum": [
|
|
38
|
"addresses",
|
|
39
|
"parcels"
|
|
40
|
],
|
|
41
|
"default": "addresses"
|
|
42
|
}
|
|
43
|
},
|
|
44
|
{
|
|
45
|
"name": "showList",
|
|
46
|
"in": "query",
|
|
47
|
"description": "If false, the user is redirected to the homepage (the map). If true, the user is redirected to the list of network plans to order. Omitted if the perimeter is too large (exceeds 0.2 km2).\n",
|
|
48
|
"required": false,
|
|
49
|
"schema": {
|
|
50
|
"type": "boolean",
|
|
51
|
"default": false
|
|
52
|
}
|
|
53
|
}
|
|
54
|
],
|
|
55
|
"responses": {
|
|
56
|
"302": {
|
|
57
|
"description": "Redirects to the given page"
|
|
58
|
},
|
|
59
|
"404": {
|
|
60
|
"description": "Page not found. Causes may be : wrong perimeter (only 2 vertices, wrong coordinates, etc.)"
|
|
61
|
}
|
|
62
|
}
|
|
63
|
}
|
|
64
|
}
|
|
65
|
}
|
|
66
|
}
|