Retrieve Rooftops
Lists the active teams (rooftops) belonging to an enterprise.
An enterprise with no matching teams returns 200 with an empty teams array, not a 404.
GET
AuthBearer token
Prefer ReadMe's own explorer? Open it here.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
enterprise_id | string | Required | The enterprise whose teams should be listed. "Note": this value is not checked against the authenticated credential's enterprise. |
Sample request
curl --request GET \
--url 'https://api.spyne.ai/api/pv1/enterprise/get-teams?enterprise_id=<enterprise_id>' \
--header 'Authorization: Bearer YOUR_API_KEY'import requests
url = "https://api.spyne.ai/api/pv1/enterprise/get-teams"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
params = {
"enterprise_id": "<enterprise_id>"
}
response = requests.get(url, headers=headers, params=params)
print(response.status_code, response.json())const url = new URL("https://api.spyne.ai/api/pv1/enterprise/get-teams");
url.searchParams.set("enterprise_id", "<enterprise_id>");
const response = await fetch(url, {
method: "GET",
headers: {
Authorization: "Bearer YOUR_API_KEY",
},
});
console.log(response.status, await response.json());Sample response
{
"enterprise_id": "9aeac0639e",
"teams": [
{
"team_id": "86fc402add",
"team_name": "Downtown Honda"
},
{
"team_id": "1b7c9de220",
"team_name": "Northside Toyota"
}
]
}{
"enterprise_id": "9aeac0639e",
"teams": []
}{
"message": "The server could not fulfill this request due to 1 missing or invalid parameters."
}{
"status": "401",
"message": "Invalid Auth key"
}{
"message": "Internal server error"
}Response parameters (200)
| Field | Type | Description |
|---|---|---|
enterprise_id | string | Example: 9aeac0639e. |
teams | object[] | |
teams[].team_id | string | Example: 86fc402add. |
teams[].team_name | string | Example: Downtown Honda. |
Errors
| Status | Meaning | When it happens |
|---|---|---|
400 | Bad Request | enterprise_id was not supplied. |
401 | Unauthorized | Missing or invalid credential. Emitted by the auth layer, and shaped differently to the other errors. |
500 | Internal Server Error | Unexpected error while reading teams. |
Updated 2 days ago
Did this page help you?
