Skip to content

Admin team search

GET
/api/v1/admin/teams/search
curl --request GET \
--url 'https://api.deploybase.eu/api/v1/api/v1/admin/teams/search?q=example' \
--header 'Authorization: <Authorization>'

Finds teams by anything an operator is likely to be holding: team name or slug, team UUID (prefix), owner email, project subdomain, project slug, or custom domain. Each hit says which of those matched. Cross-team by design; platform_admin only.

q
required
string

Search term, at least 2 characters

limit
integer

Maximum teams to return, 1-20 (default 8)

OK

Media type application/json
object
data
meta
object
request_id
string
timestamp
string
trace_id
string
data
object
query

Query echoes the trimmed term the search actually ran with, so a client that debounces can tell a stale response from the current one.

string
teams
Array<object>
object
matched_on

MatchedOn is a short human phrase: “team name”, “owner email”, “project subdomain blog”, “custom domain example.com”. It is built in SQL from the row that matched, so it always describes the actual hit rather than being guessed at afterwards.

string
owner_email

OwnerEmail is resolved by the same ownerPreferenceOrder as the admin team list, so the person named here is the person named there. Empty for a team with no members.

string
team_id
string
team_name
string
Example generated
{
"data": {
"query": "example",
"teams": [
{
"matched_on": "example",
"owner_email": "example",
"team_id": "example",
"team_name": "example"
}
]
},
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
}
}

The term is shorter than 2 characters, or limit is out of range

Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string
Example generated
{
"code": "example",
"details": "example",
"error": "example",
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
}
}

Unauthorized

Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string
Example generated
{
"code": "example",
"details": "example",
"error": "example",
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
}
}

Forbidden

Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string
Example generated
{
"code": "example",
"details": "example",
"error": "example",
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
}
}

Internal Server Error

Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string
Example generated
{
"code": "example",
"details": "example",
"error": "example",
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
}
}