Operator — Sites & Devices
List sites
Retrieves a list of sites accessible to the authenticated client.
GET
/
operator
/
sites
List sites
curl --request GET \
--url https://api.telluspower.example.com/v1/operator/sites \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.telluspower.example.com/v1/operator/sites"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.telluspower.example.com/v1/operator/sites', 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://api.telluspower.example.com/v1/operator/sites",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.telluspower.example.com/v1/operator/sites"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.telluspower.example.com/v1/operator/sites")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telluspower.example.com/v1/operator/sites")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"code": 0,
"message": "success",
"data": {
"total": 50,
"page": 1,
"size": 20,
"items": [
{
"site_id": "site_001",
"name": "Sunshine Charging Station",
"address": "1 Sunshine Road, Beijing",
"location": {
"lat": 39.9042,
"lng": 116.4074
},
"total_connectors": 10,
"status_summary": {
"idle": 5,
"charging": 3,
"fault": 2
},
"power_capacity": 100,
"created_at": "2024-01-01T00:00:00Z"
}
]
}
}Authorizations
OAuth2 client-credentials grant for operator-side integrations.
Obtain an access token by POSTing client_id and client_secret
to /v1/operator/oauth/token. Tokens are valid for 24 hours
(86,400 seconds).
Query Parameters
Page number (1-indexed).
Required range:
x >= 1Results per page (max 100).
Required range:
1 <= x <= 100Optional filter by site status.
Available options:
active, inactive Response
200 - application/json
Sites returned.
Standard response envelope. code is 0 on success and a non-zero
application code on error (see Error Codes — §14).
⌘I
List sites
curl --request GET \
--url https://api.telluspower.example.com/v1/operator/sites \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.telluspower.example.com/v1/operator/sites"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.telluspower.example.com/v1/operator/sites', 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://api.telluspower.example.com/v1/operator/sites",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.telluspower.example.com/v1/operator/sites"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.telluspower.example.com/v1/operator/sites")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telluspower.example.com/v1/operator/sites")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"code": 0,
"message": "success",
"data": {
"total": 50,
"page": 1,
"size": 20,
"items": [
{
"site_id": "site_001",
"name": "Sunshine Charging Station",
"address": "1 Sunshine Road, Beijing",
"location": {
"lat": 39.9042,
"lng": 116.4074
},
"total_connectors": 10,
"status_summary": {
"idle": 5,
"charging": 3,
"fault": 2
},
"power_capacity": 100,
"created_at": "2024-01-01T00:00:00Z"
}
]
}
}