palbaseDocs

Palbase Machines · API

GET/sites

List sites

Lists the project's sites, by name: a project has 10 at most.

A project's machines, databases and sites are the project's, each bound to one of its environments: from any of its environments' addresses, one who reaches the project (a developer, an organization's token, an account token) lists every environment's, each naming its environment (environment). A read that names one (GET /sites/{name}/…) is answered in the environment it is bound to, held to the caller's role there; a change is made at that environment's own address (409 bound_to_environment elsewhere), where a change to production is confirmed and audited.

Called by your server, with the project's secret key.

Query

environmentstring · optionalThe ref of one of the project's environments: what is bound to it alone. None: every environment the caller reaches — every one of the project's for a developer, an organization's token or an account token; an environment's own token or key reaches its environment alone.
curl
curl -X GET "https://<your-ref>.palbase.studio/sites" \
  -H "apikey: $PALBASE_SECRET_KEY"

Responses

200The project's sites

400Validation failed or a required field is missing

401Missing or invalid API key

403Not the project's secret key

429Over the project's request limit, or its machine time for this period is used up

503Temporarily unavailable; retrying is safe after Retry-After

defaultAn error: the envelope names it (`error`) and explains it (`error_description`).

Operation ListSites of machines's contract.