본문으로 건너뛰기
아우라베이스 로고
아우라베이스

행 읽기

GET/v1/db/{project_id}/{table}

필터, 순서, 페이지 매김 및 조인을 사용하여 테이블을 쿼리합니다. 후드 아래의 PostgREST, RLS가 자동으로 적용됩니다.

이 번역 이후 영어 소스가 변경되었습니다. 일부 정보는 최신 정보가 아닐 수 있습니다.
이 페이지는 자동으로 번역되었습니다. 영어 버전은 권위가 있습니다.

Headers#

HeaderRequiredValue
apikeyyesProject API key (anon or service_role). X-API-Key is accepted too.
AuthorizationnoBearer <JWT>. Without it, the request runs as anon

Query parameters#

ParameterTypeRequiredDescription
selectstringnoColumns to return. * by default. Relationship embed (FK): posts(*), author:authors(name).
orderstringnocaptured_at.desc · name.asc. NULL placement (.nullsfirst/.nullslast) is only honored on MongoDB in its native form (asc.nullsfirst, desc.nullslast); the other two combinations are refused in 400 rather than issuing an order different from that requested.
limitintegernoMax number of lines. Default 1000, max 1000 — beyond that, the response is capped and meta.per_page indicates the limit actually applied.
offsetintegernoPaging offset. Only pagination available on PostgREST, the nominal engine of a Postgres project.
cursorstringnoaura-db only (MongoDB, or Postgres with PostgREST disabled) — not available on PostgREST, which responds 400 by naming offset. Pagination keyset: return the opaque meta.next_cursor of the previous page as is. Stable, without dup/skip (int/uuid/text). Aligns with sort_by.
countenumnoexact, planned, or estimated. No counting is done by default. This is the portable form: on the aura-db path, only this query parameter is read — a Prefer: count=exact header there would be ignored (it is only honored by PostgREST).
<column>.<op>filternoFilters: value.gt.24, status.eq.active, name.like.%alice%, tags.cs.{urgent}.

To know#

팁

Relationship embed (FK) via select: author:authors(name) (LEFT JOIN — rows without relationships return null). Inner-join filtering is supported with !inner: e.g. author:authors!inner(name)&author.country=eq.FR.

주의

The Range header is not a universal alternative paging: the aura-db path (MongoDB project, or Postgres with PostgREST disabled) only reads the query parameters and ignores it. It only has effect if the request reaches PostgREST. Use limit/offset.

주의

The answer is wrapped : { data, meta }, never a bare array. On the PostgREST path, meta only contains total (and only if a count has been requested); on the aura-db path it also carries per_page and next_cursor.

정보

numeric/decimal columns are serialized as JSON number by default in PostgREST and typed as number by @aurabase/gen. When exact arbitrary precision (> 15 significant digits) is required, cast the expression (amount::text in SQL / view) or pass --numeric-as-string (numericAsString: true) to @aurabase/gen.

마지막 업데이트 · @aurabase/aurabase-js@0.7.5 · aura@0.3.4↗ 문제 신고