data
raw DB 읽기전용 introspection (테이블 목록·행 브라우즈)
5 operations — raw DB 읽기전용 introspection (테이블 목록·행 브라우즈)
GET /api/v1/apps/{appID}/db/tables
schemaGetApiV1AppsByAppIDDbTables
앱 전용 데이터베이스(app-data 인스턴스의 database-per-app)에 실제 존재하는 모든 물리 테이블을 information_schema 로 조회한다 (spec 040 raw DB 격리).
- 호출 권한: 앱 owner 또는 tenant_admin/platform_admin (
RequireAppOwnerOrAdmin— 그 외 403). - 앱 자격증명으로 앱 자기 database 의 public schema 를 조회하므로, 그 앱이 만든 모든 테이블이 보인다.
- managed 필드는 항상 false (앱 자기 DB 에는
/datadynamic_tables 메타가 없음 — 응답 shape 호환용으로 유지). - 부수 효과 없음 (read-only).
| 언어 | 호출 |
|---|---|
| node | sdk.apps.rawDb.tables(…) — 리소스 모델 — 인자·반환 타입은 패키지의 TypeScript 정의 참조 |
| go | client.Data().SchemaGetApiV1AppsByAppIDDbTables(ctx, axhub.OperationParams{PathParams: …, Query: …, Body: …}) |
| java | client.data().schemaGetApiV1AppsByAppIDDbTables(pathParams, query, body) — 비동기: schemaGetApiV1AppsByAppIDDbTablesAsync(…) → CompletableFuture |
| kotlin | client.data.schemaGetApiV1AppsByAppIDDbTables(pathParams, query, body) — suspend |
| python | client.data.schema_get_api_v1_apps_by_app_id_db_tables(path_params=…, query=…, body=…) — AsyncAxHubClient 는 동일명 await |
| ruby | client.data.schema_get_api_v1_apps_by_app_id_db_tables(path_params: …, query: …, body: …) |
| 공통 | request("schemaGetApiV1AppsByAppIDDbTables", pathParams, query, body) |
Path 파라미터 — pathParams 로 전달
| 이름 | 타입 | 설명 |
|---|---|---|
appID 필수 | string | 앱 UUID |
Query 파라미터 — query 로 전달 (문자열 값)
| 이름 | 타입 | 설명 |
|---|---|---|
environment | string | 조회 대상 배포 환경 (production/staging; 기본 production) — 환경별 전용 데이터베이스 (spec 053) |
응답 — 200 · 물리 테이블 목록 (managed/raw + 컬럼)
| 이름 | 타입 | 설명 |
|---|---|---|
tables | array<object> | Tables 는 물리 테이블 목록 (managed + raw 합쳐서). |
에러 status: 400 401 403 404 412 500 — 에러 처리
GET /api/v1/apps/{appID}/db/tables/{table}/rows
schemaGetApiV1AppsByAppIDDbTablesByTableRows
앱 전용 데이터베이스(app-data 인스턴스)의 임의 물리 테이블 한 페이지의 행을 반환한다 (spec 040 raw DB 격리).
- 호출 권한: 앱 owner 또는 tenant_admin/platform_admin (
RequireAppOwnerOrAdmin— 그 외 403). - owner_column 무시하고 전체 행 반환 (콘솔 관리 뷰).
- 존재 여부는 앱 자기 database 의 information_schema 기준 — 없으면 404.
page(1-base, 기본 1) /per_page(기본 50, 최대 200). exact total 대신 has_more(per_page+1 프로브) 반환.- 부수 효과 없음 (read-only).
| 언어 | 호출 |
|---|---|
| node | sdk.apps.rawDb.tableRows(…) — 리소스 모델 — 인자·반환 타입은 패키지의 TypeScript 정의 참조 |
| go | client.Data().SchemaGetApiV1AppsByAppIDDbTablesByTableRows(ctx, axhub.OperationParams{PathParams: …, Query: …, Body: …}) |
| java | client.data().schemaGetApiV1AppsByAppIDDbTablesByTableRows(pathParams, query, body) — 비동기: schemaGetApiV1AppsByAppIDDbTablesByTableRowsAsync(…) → CompletableFuture |
| kotlin | client.data.schemaGetApiV1AppsByAppIDDbTablesByTableRows(pathParams, query, body) — suspend |
| python | client.data.schema_get_api_v1_apps_by_app_id_db_tables_by_table_rows(path_params=…, query=…, body=…) — AsyncAxHubClient 는 동일명 await |
| ruby | client.data.schema_get_api_v1_apps_by_app_id_db_tables_by_table_rows(path_params: …, query: …, body: …) |
| 공통 | request("schemaGetApiV1AppsByAppIDDbTablesByTableRows", pathParams, query, body) |
Path 파라미터 — pathParams 로 전달
| 이름 | 타입 | 설명 |
|---|---|---|
appID 필수 | string | 앱 UUID |
table 필수 | string | 테이블 이름 |
Query 파라미터 — query 로 전달 (문자열 값)
| 이름 | 타입 | 설명 |
|---|---|---|
page | integer | 페이지 (1-base, 기본 1) |
per_page | integer | 페이지당 행 수 (기본 50, 최대 200) |
environment | string | 조회 대상 배포 환경 (production/staging; 기본 production) — 환경별 전용 데이터베이스 (spec 053) |
응답 — 200 · 행 페이지 (rows + has_more)
| 이름 | 타입 | 설명 |
|---|---|---|
hasMore (wire: has_more) | boolean | HasMore 는 다음 페이지 존재 여부 (per_page+1 프로브 결과). |
page | integer | Page 는 현재 페이지 (1-base). |
perPage (wire: per_page) | integer | PerPage 는 페이지당 행 수. |
rows | array<object> | Rows 는 컬럼명→값 맵의 배열. owner_column 무시한 전체 행 (owner/admin 뷰). |
에러 status: 400 401 403 404 412 500 — 에러 처리
GET /api/v1/me/personal-access-tokens
schemaGetApiV1MePersonalAccessTokens
자기 계정에 발급된 PAT 목록을 반환한다. raw token 은 노출하지 않음 (hash 만 저장).
- 호출 권한: 인증된 사용자. 본인 PAT 만 조회됨.
- revoked 된 PAT 도 revoked_at 와 함께 포함.
- 부수 효과 없음 (read-only).
| 언어 | 호출 |
|---|---|
| node | sdk.identity.pat(…) — 리소스 모델 — 인자·반환 타입은 패키지의 TypeScript 정의 참조 |
| go | client.Data().SchemaGetApiV1MePersonalAccessTokens(ctx, axhub.OperationParams{PathParams: …, Query: …, Body: …}) |
| java | client.data().schemaGetApiV1MePersonalAccessTokens(pathParams, query, body) — 비동기: schemaGetApiV1MePersonalAccessTokensAsync(…) → CompletableFuture |
| kotlin | client.data.schemaGetApiV1MePersonalAccessTokens(pathParams, query, body) — suspend |
| python | client.data.schema_get_api_v1_me_personal_access_tokens(path_params=…, query=…, body=…) — AsyncAxHubClient 는 동일명 await |
| ruby | client.data.schema_get_api_v1_me_personal_access_tokens(path_params: …, query: …, body: …) |
| 공통 | request("schemaGetApiV1MePersonalAccessTokens", pathParams, query, body) |
응답 — 200 · PAT 목록
| 이름 | 타입 | 설명 |
|---|---|---|
items | array<object> | |
nextCursor (wire: next_cursor) | string | |
total | integer |
에러 status: 401 500 — 에러 처리
POST /api/v1/me/personal-access-tokens
schemaPostApiV1MePersonalAccessTokens
자기 계정의 새 PAT 를 발급한다. raw token 은 발급 응답에서 단 한 번만 노출.
- 호출 권한: 인증된 사용자. 발급된 PAT 는 issuer 본인 권한으로 동작.
- name 은 1자 이상. expires_in_days 가 nil 이면 무기한.
- 부수 효과: personal_access_tokens row 삽입. 응답에는 1회성 raw_token (이후 hash 만 저장).
| 언어 | 호출 |
|---|---|
| node | sdk.identity.pat(…) — 리소스 모델 — 인자·반환 타입은 패키지의 TypeScript 정의 참조 |
| go | client.Data().SchemaPostApiV1MePersonalAccessTokens(ctx, axhub.OperationParams{PathParams: …, Query: …, Body: …}) |
| java | client.data().schemaPostApiV1MePersonalAccessTokens(pathParams, query, body) — 비동기: schemaPostApiV1MePersonalAccessTokensAsync(…) → CompletableFuture |
| kotlin | client.data.schemaPostApiV1MePersonalAccessTokens(pathParams, query, body) — suspend |
| python | client.data.schema_post_api_v1_me_personal_access_tokens(path_params=…, query=…, body=…) — AsyncAxHubClient 는 동일명 await |
| ruby | client.data.schema_post_api_v1_me_personal_access_tokens(path_params: …, query: …, body: …) |
| 공통 | request("schemaPostApiV1MePersonalAccessTokens", pathParams, query, body) |
Request Body — body 로 전달, wire 키(snake_case) 그대로
| 이름 | 타입 | 설명 |
|---|---|---|
expires_in_days | integer | ExpiresInDays 는 발급 후 만료까지의 일수 (선택). 미지정 시 무기한. |
name | string | Name 은 PAT 식별용 사람 친화 이름. 1자 이상. |
응답 — 201 · 발급된 PAT + raw_token (단 1회 노출)
| 이름 | 타입 | 설명 |
|---|---|---|
createdAt (wire: created_at) | string | CreatedAt 은 발급 시각. |
expiresAt (wire: expires_at) | string | ExpiresAt 은 만료 시각 (선택, 없으면 무기한). |
id | string | ID 는 PAT UUID. |
lastUsedAt (wire: last_used_at) | string | LastUsedAt 은 마지막 사용 시각 (선택). |
name | string | Name 은 PAT 이름. |
rawToken (wire: raw_token) | string | RawToken 은 발급 직후 한 번만 노출되는 raw token 값. 이후로는 hash 만 저장. |
revokedAt (wire: revoked_at) | string | RevokedAt 은 회수 시각 (선택). 회수되지 않으면 omit. |
userId (wire: user_id) | string | UserID 는 PAT 소유자 UUID. |
에러 status: 400 401 500 — 에러 처리
DELETE /api/v1/me/personal-access-tokens/{patID}
schemaDeleteApiV1MePersonalAccessTokensByPatID
자기 계정의 PAT 를 회수한다 (revoked_at 기록). 회수 즉시 해당 token 의 모든 호출 거부.
- 호출 권한: 인증된 사용자. 본인 소유 PAT 만 회수 가능. 다른 사용자 PAT 는 404 로 위장 (ErrNotOwner → 404).
- 이미 revoked 된 PAT 는 409.
- 부수 효과: PAT row 의 revoked_at 업데이트 (soft delete).
| 언어 | 호출 |
|---|---|
| node | sdk.identity.pat(…) — 리소스 모델 — 인자·반환 타입은 패키지의 TypeScript 정의 참조 |
| go | client.Data().SchemaDeleteApiV1MePersonalAccessTokensByPatID(ctx, axhub.OperationParams{PathParams: …, Query: …, Body: …}) |
| java | client.data().schemaDeleteApiV1MePersonalAccessTokensByPatID(pathParams, query, body) — 비동기: schemaDeleteApiV1MePersonalAccessTokensByPatIDAsync(…) → CompletableFuture |
| kotlin | client.data.schemaDeleteApiV1MePersonalAccessTokensByPatID(pathParams, query, body) — suspend |
| python | client.data.schema_delete_api_v1_me_personal_access_tokens_by_pat_id(path_params=…, query=…, body=…) — AsyncAxHubClient 는 동일명 await |
| ruby | client.data.schema_delete_api_v1_me_personal_access_tokens_by_pat_id(path_params: …, query: …, body: …) |
| 공통 | request("schemaDeleteApiV1MePersonalAccessTokensByPatID", pathParams, query, body) |
Path 파라미터 — pathParams 로 전달
| 이름 | 타입 | 설명 |
|---|---|---|
patID 필수 | string | PAT UUID |
응답 — 204 · 회수 완료 (응답 본문 없음)
본문 없음 → SDK 는 빈 map {} 반환
에러 status: 400 401 404 409 500 — 에러 처리