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.

GEThttps://api.spyne.ai/api/pv1/enterprise/get-teams
AuthBearer token

Prefer ReadMe's own explorer? Open it here.

Query parameters

ParameterTypeRequiredDescription
enterprise_idstringRequiredThe 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)

FieldTypeDescription
enterprise_idstringExample: 9aeac0639e.
teamsobject[]
teams[].team_idstringExample: 86fc402add.
teams[].team_namestringExample: Downtown Honda.

Errors

StatusMeaningWhen it happens
400Bad Requestenterprise_id was not supplied.
401UnauthorizedMissing or invalid credential. Emitted by the auth layer, and shaped differently to the other errors.
500Internal Server ErrorUnexpected error while reading teams.

Did this page help you?