Get a hotspot
curl --request GET \
--url https://linkrmap.com/api/v1/hotspots/{id} \
--header 'x-api-key: <api-key>'import requests
url = "https://linkrmap.com/api/v1/hotspots/{id}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://linkrmap.com/api/v1/hotspots/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://linkrmap.com/api/v1/hotspots/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://linkrmap.com/api/v1/hotspots/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://linkrmap.com/api/v1/hotspots/{id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://linkrmap.com/api/v1/hotspots/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": 1,
"name": "Tony's Deli & Grocery",
"lat": 40.7189,
"lng": -73.9847,
"mbps": 85,
"risk": "Low",
"owner": "@tony_deli",
"note": "Password on the counter next to the register.",
"signal": "Good",
"network": "WiFi 5",
"security": "WPA2",
"uptime": "96.8%",
"rating": "4.3/5",
"avatar": "#FF6B6B",
"lastUsed": "12 minutes ago",
"locationImage": "https://images.unsplash.com/photo-1555396273-367ea4eb4db5?w=800&q=80"
}
}{
"error": "Unauthorized",
"message": "Invalid or missing API key. Include x-api-key header with a valid key (linkr_test_* or linkr_live_*)."
}{
"error": "Unauthorized",
"message": "Invalid or missing API key. Include x-api-key header with a valid key (linkr_test_* or linkr_live_*)."
}API REFERENCE
Get a hotspot
Fetch a single hotspot by id.
GET
/
api
/
v1
/
hotspots
/
{id}
Get a hotspot
curl --request GET \
--url https://linkrmap.com/api/v1/hotspots/{id} \
--header 'x-api-key: <api-key>'import requests
url = "https://linkrmap.com/api/v1/hotspots/{id}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://linkrmap.com/api/v1/hotspots/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://linkrmap.com/api/v1/hotspots/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://linkrmap.com/api/v1/hotspots/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://linkrmap.com/api/v1/hotspots/{id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://linkrmap.com/api/v1/hotspots/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": 1,
"name": "Tony's Deli & Grocery",
"lat": 40.7189,
"lng": -73.9847,
"mbps": 85,
"risk": "Low",
"owner": "@tony_deli",
"note": "Password on the counter next to the register.",
"signal": "Good",
"network": "WiFi 5",
"security": "WPA2",
"uptime": "96.8%",
"rating": "4.3/5",
"avatar": "#FF6B6B",
"lastUsed": "12 minutes ago",
"locationImage": "https://images.unsplash.com/photo-1555396273-367ea4eb4db5?w=800&q=80"
}
}{
"error": "Unauthorized",
"message": "Invalid or missing API key. Include x-api-key header with a valid key (linkr_test_* or linkr_live_*)."
}{
"error": "Unauthorized",
"message": "Invalid or missing API key. Include x-api-key header with a valid key (linkr_test_* or linkr_live_*)."
}Returns a single hotspot by its numeric
See the hotspot schema for every
field. Note that
id.
curl -H "x-api-key: linkr_test_demo01" \
"https://linkrmap.com/api/v1/hotspots/1"
Path parameter
| Parameter | Type | Notes |
|---|---|---|
id | integer | Hotspot id. The current dataset uses ids 1–78. |
Response
{
"data": {
"id": 1,
"name": "Tony's Deli & Grocery",
"lat": 40.7189,
"lng": -73.9847,
"mbps": 85,
"risk": "Low",
"owner": "@tony_deli",
"note": "Password on the counter next to the register.",
"signal": "Good",
"network": "WiFi 5",
"security": "WPA2",
"uptime": "96.8%",
"rating": "4.3/5",
"avatar": "#FF6B6B",
"lastUsed": "12 minutes ago",
"locationImage": "https://images.unsplash.com/photo-1555396273-367ea4eb4db5?w=800&q=80"
}
}
uptime and rating are strings.
Not found
An id that is not in the dataset returns404:
{
"error": "Not found",
"message": "Hotspot with id 999 not found."
}
⌘I