Get Integration Availability
curl --request GET \
--url https://api.getswitch.io/integrations/availability \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.getswitch.io/integrations/availability"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.getswitch.io/integrations/availability', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.getswitch.io/integrations/availability"
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))
}{
"connector_slug": "wunder_v1",
"entities": [
{
"entity_type": "vehicles",
"manage_scope": "integrations:vehicles:manage",
"read_scope": "integrations:vehicles:read",
"supported": true
},
{
"entity_type": "stations",
"read_scope": "integrations:stations:read",
"supported": false
},
{
"entity_type": "tasks",
"read_scope": "integrations:tasks:read",
"supported": false
},
{
"entity_type": "statuses",
"manage_scope": "integrations:statuses:manage",
"read_scope": "integrations:statuses:read",
"supported": true
},
{
"entity_type": "actions",
"manage_scope": "integrations:actions:manage",
"read_scope": "integrations:actions:read",
"supported": true
},
{
"entity_type": "remote_operations",
"manage_scope": "integrations:remote-ops:manage",
"read_scope": "integrations:remote-ops:read",
"supported": true
}
]
}Integrations
Get Integration Availability
Which kinds of fleet data and operations (vehicles, stations, tasks, statuses, actions, remote operations) the connector of your fleet platform supports, and the scope each one needs to read or change it. Call it first to know which /integrations routes your company can use; an unsupported kind answers 422.
Failure Modes:
- 401: Token is missing or invalid
- 403:
access_deniedwhen your role or API key lacks the permission below - 404:
no_data_binding(kind: fleet) when no fleet integration is configured for your company - 422: Invalid parameters, or your fleet platform does not support this (
Unknown provider: ...) - 502: The fleet platform returned an error (
Upstream provider error: ...)
Required Auth Scopes:
integrations:vehicles:read
GET
/
integrations
/
availability
Get Integration Availability
curl --request GET \
--url https://api.getswitch.io/integrations/availability \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.getswitch.io/integrations/availability"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.getswitch.io/integrations/availability', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.getswitch.io/integrations/availability"
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))
}{
"connector_slug": "wunder_v1",
"entities": [
{
"entity_type": "vehicles",
"manage_scope": "integrations:vehicles:manage",
"read_scope": "integrations:vehicles:read",
"supported": true
},
{
"entity_type": "stations",
"read_scope": "integrations:stations:read",
"supported": false
},
{
"entity_type": "tasks",
"read_scope": "integrations:tasks:read",
"supported": false
},
{
"entity_type": "statuses",
"manage_scope": "integrations:statuses:manage",
"read_scope": "integrations:statuses:read",
"supported": true
},
{
"entity_type": "actions",
"manage_scope": "integrations:actions:manage",
"read_scope": "integrations:actions:read",
"supported": true
},
{
"entity_type": "remote_operations",
"manage_scope": "integrations:remote-ops:manage",
"read_scope": "integrations:remote-ops:read",
"supported": true
}
]
}Authorizations
HTTPBearerHTTPBearer
Query Parameters
Response
Availability retrieved. One entry per kind of data or operation.
