Global Search

GET /v1/search

Find resources of your active account by name: endpoints, applications, domains and databases, in one call. This is the search behind the dashboard's command palette (⌘K). Each group returns at most 5 matches.

Matching is a case-insensitive substring match; matches that start with q come first (for an endpoint: its subdomain), each part in alphabetical order. % and _ in q are matched literally, not as wildcards. What each group searches:

  • endpoints — the subdomain, the domain, or the whole hostname. Deleted endpoints are left out.
  • applications — the application name. Deleted applications are left out.
  • domains — the name of the account's own custom domains (the platform's shared domains are not included).
  • databases — the database name, or the schema name of a database that has no name. Databases being deleted are left out.

Permissions: a group is searched only when your role may read it: endpoints need endpoints:read; applications need endpoints:read and the application_hosting entitlement; domains need domains:read; databases need databases:read and the managed_database entitlement. A group you can't read comes back as an empty array, never as an error.

Rate limit: 120 requests per minute per user. The search has a 3-second time budget; a search that runs out of time answers 500.

Query parameters

q string Req
The text to look for. Surrounding spaces are trimmed; the rest must be 2 to 64 characters long.

Response (200 OK)

query string
The trimmed q that was searched.
endpoints array
Up to 5 endpoints: uuid, hostname (the full hostname), status and serving_mode (agent for a tunnel endpoint; agentless for a static application, managed for a managed backend, WordPress or full-stack application). The uuid addresses the endpoint in GET /v1/endpoints/{uuid}.
applications array
Up to 5 applications: uuid, name and type. See Applications.
domains array
Up to 5 custom domains: uuid, name and status. The uuid is the one the per-domain operations take, e.g. ACME status.
databases array
Up to 5 databases: uuid, name, engine and status. See Databases.

All four arrays are always present; a group with no match (or one you can't read) is [].

Errors

400 Bad Request
q must be 2 to 64 characters — q is missing, too short or too long.
401 Unauthorized
Missing or invalid auth.
403 Forbidden
No active account for this request, or Not a member of the active account.
429 Too Many Requests
More than 120 searches in a minute. Body {"error": "Rate limit exceeded. Please try again later."}, header Retry-After: 60.
500 Internal Server Error
Search failed (including a search that ran out of time), or Failed to resolve permissions.
Request
curl "https://api.ngris.com/v1/search?q=acme" \ -H "X-API-KEY: <your_api_key>"
Response — 200 OK
{ "query": "acme", "endpoints": [ { "uuid": "019bbbdb-1d70-74b1-b033-611e20303ba3", "hostname": "api.acme.example.com", "status": "active", "serving_mode": "agent" } ], "applications": [ { "uuid": "019b74f9-3577-7e88-80a8-bcb8b625aa0c", "name": "acme-docs", "type": "static" } ], "domains": [ { "uuid": "019bfaa7-8f0e-7623-b58a-449da57e5213", "name": "acme.example.com", "status": "active" } ], "databases": [] }
On this page
Global Search