323b13adb25ae2e164ba654ba89ed4abbb6eafd9
[ccsdk/apps.git] / sdnr / wireless-transport / code-Carbon-SR1 / ux / mwtnTopology / mwtnTopology-module / src / main / resources / mwtnTopology / mwtnTopology.rest
1 ###\r
2 # get outer bounding box for all sites.\r
3 POST http://03-wtp-poc:9200/mwtn/site/_search HTTP/1.1\r
4 content-type: application/json\r
5 \r
6 {\r
7   "aggregations": {\r
8     "top": {\r
9       "max": {\r
10         "field": "location.lat"\r
11       }\r
12     },\r
13     "right": {\r
14       "max": {\r
15         "field": "location.lon"\r
16       }\r
17     },\r
18     "bottom": {\r
19       "min": {\r
20         "field": "location.lat"\r
21       }\r
22     },\r
23     "left": {\r
24       "min": {\r
25         "field": "location.lon"\r
26       }\r
27     }\r
28   },\r
29   "size": 0\r
30 }\r
31 \r
32 ###\r
33 # get sites in bounding box\r
34 POST http://03-wtp-poc:9200/mwtn/site/_search HTTP/1.1\r
35 content-type: application/json\r
36 \r
37 {\r
38   "query": {\r
39     "geo_bounding_box": {\r
40       "location": {\r
41         "top": -10.681254175812176,\r
42         "right": -48.3738302863769,\r
43         "bottom": -10.736012963621369,\r
44         "left": -48.433356043212834\r
45       }\r
46     }\r
47   },\r
48   "size": 100\r
49 }\r
50 \r
51 ###\r
52 # get single site by id\r
53 POST http://03-wtp-poc:9200/mwtn/site/_search HTTP/1.1\r
54 content-type: application/json\r
55 \r
56 {\r
57   "query": {\r
58     "bool": {\r
59       "must": [\r
60         {\r
61           "term": {\r
62             "id": "vivsp"\r
63           }\r
64         }\r
65       ]\r
66     }\r
67   }\r
68 }\r
69 \r
70 ###\r
71 # get sites with site links\r
72 POST http://03-wtp-poc:9200/mwtn/site/_search HTTP/1.1\r
73 content-type: application/json\r
74 \r
75 {\r
76   "query": {\r
77     "bool": {\r
78       "must": {\r
79         "exists": {\r
80           "field": "references.site-links"\r
81         }\r
82       }\r
83     }\r
84   },\r
85   "size": 100\r
86 }\r
87 \r
88 ###\r
89 # get the first 3 site links\r
90 POST http://03-wtp-poc:9200/mwtn/site-link/_search HTTP/1.1\r
91 content-type: application/json\r
92 \r
93 {\r
94   "query": {\r
95     "match_all": {}\r
96   },\r
97   "size": 3\r
98 }\r
99 \r
100 ###\r
101 # get site links where siteA or siteZ refers to a list ob site ids.\r
102 POST http://03-wtp-poc:9200/mwtn/site-link/_search HTTP/1.1\r
103 content-type: application/json\r
104 \r
105 {\r
106   "query": {\r
107     "bool": {\r
108       "filter": {\r
109         "term": {\r
110           "siteA": "atdrj"\r
111         }\r
112       }\r
113     }\r
114   }\r
115 }\r
116 \r
117 ###\r
118 # get site links where siteLinkId is one of the ids in given List.\r
119 POST http://03-wtp-poc:9200/mwtn/site-link/_search\r
120 content-type: application/json\r
121 \r
122 {\r
123   "query": {\r
124     "bool": {\r
125       "should": [\r
126         {"term": {"id" : "aaapb:aacal"}},\r
127         {"term": {"id" : "site-6:site-7"}},\r
128         {"term": {"id" : "site-7:site-8"}}\r
129       ]\r
130     }\r
131   }\r
132 }\r
133 \r
134 ###\r
135 # get the first 3 site links\r
136 POST http://03-wtp-poc:9200/mwtn/site/_search HTTP/1.1\r
137 content-type: application/json\r
138 \r
139 {\r
140   "query": {\r
141     "match_all": {}\r
142   },\r
143   "sort" : {\r
144     "name": {\r
145       "order": "asc"\r
146     }\r
147   },\r
148   "size": 30\r
149 }\r
150 \r
151 ###\r
152 # get the first 3 site links\r
153 POST http://03-wtp-poc:9200/mwtn/site/_search HTTP/1.1\r
154 content-type: application/json\r
155 \r
156 {\r
157   "query": {\r
158     "match_all": {}\r
159   },\r
160   "sort" : {\r
161     "_script" : {  \r
162       "script" : {\r
163         "lang": "expression",\r
164         "inline" : "doc['references'].value['site-links'].length"\r
165       } ,  \r
166       "type" : "number",  \r
167       "order" : "desc"  \r
168     }  \r
169   },\r
170   "size": 30\r
171 }\r
172 \r
173 \r
174 ###\r
175 # get the first 3 site links\r
176 POST http://03-wtp-poc:9200/mwtn/site/_search HTTP/1.1\r
177 content-type: application/json\r
178 \r
179 {\r
180   "from":0,\r
181   "size":10,\r
182   "sort": {\r
183      "id":{\r
184         "order":"asc"\r
185     }\r
186   },\r
187   "query":{\r
188     "regexp":{\r
189       "name":".*00.*"\r
190     }\r
191   }\r
192 }\r
193 \r
194 \r
195 ###\r
196 # get the first 3 site links\r
197 GET http://03-wtp-poc:9200/mwtn/site/_search HTTP/1.1\r
198 content-type: application/json\r
199 \r
200 {\r
201   "query": {\r
202     "function_score": {\r
203       "script_score": {\r
204         "script": "Math.pow(2, 2)",\r
205         "lang": "groovy"\r
206       }\r
207     }\r
208   }\r
209 }