List Parking Spots
curl --request GET \
--url https://harbor-parking.vercel.app/api/parking-spotsimport requests
url = "https://harbor-parking.vercel.app/api/parking-spots"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://harbor-parking.vercel.app/api/parking-spots', 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://harbor-parking.vercel.app/api/parking-spots",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://harbor-parking.vercel.app/api/parking-spots"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://harbor-parking.vercel.app/api/parking-spots")
.asString();require 'uri'
require 'net/http'
url = URI("https://harbor-parking.vercel.app/api/parking-spots")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"spots": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"spot_number": "A-15",
"owner_id": "456e7890-e89b-12d3-a456-426614174001",
"building_section": "Level 2 Parking Garage",
"is_verified": true,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
],
"total": 1
}
Parking Spots
List Parking Spots
Get parking spots with filtering options
GET
/
api
/
parking-spots
List Parking Spots
curl --request GET \
--url https://harbor-parking.vercel.app/api/parking-spotsimport requests
url = "https://harbor-parking.vercel.app/api/parking-spots"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://harbor-parking.vercel.app/api/parking-spots', 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://harbor-parking.vercel.app/api/parking-spots",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://harbor-parking.vercel.app/api/parking-spots"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://harbor-parking.vercel.app/api/parking-spots")
.asString();require 'uri'
require 'net/http'
url = URI("https://harbor-parking.vercel.app/api/parking-spots")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"spots": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"spot_number": "A-15",
"owner_id": "456e7890-e89b-12d3-a456-426614174001",
"building_section": "Level 2 Parking Garage",
"is_verified": true,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
],
"total": 1
}
Overview
This endpoint retrieves a list of parking spots with optional filtering capabilities.Authentication
Query Parameters
string
Filter spots by owner ID
string
Filter spots by building section
boolean
Filter by verification status
number
default:"50"
Maximum number of spots to return
number
default:"0"
Number of spots to skip for pagination
Response
array
required
Array of parking spot objects
Show Spot Object
Show Spot Object
string
required
Unique spot identifier (UUID)
string
required
Spot number or identifier
string
required
ID of the spot owner
string
required
Building section or location
boolean
required
Whether the spot has been verified by admin
string
required
Spot creation timestamp (ISO 8601)
string
required
Spot last update timestamp (ISO 8601)
number
required
Total number of spots matching the filters
Example Request
curl -X GET "https://harbor-parking.vercel.app/api/parking-spots?limit=10&is_verified=true" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json"
const response = await fetch('https://harbor-parking.vercel.app/api/parking-spots?limit=10&is_verified=true', {
method: 'GET',
headers: {
'Authorization': `Bearer ${yourJwtToken}`,
'Content-Type': 'application/json'
}
});
const spotsData = await response.json();
Example Response
{
"spots": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"spot_number": "A-15",
"owner_id": "456e7890-e89b-12d3-a456-426614174001",
"building_section": "Level 2 Parking Garage",
"is_verified": true,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
],
"total": 1
}