lablup / lablup/backend.ai

[Domain] Expose `id` in APIs and migrate identifier from `name` to `id`

Open
#11,616 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
670
Forks
183
Avg merge
17h 7m
Merged PRs (30d)
358

Description

## Goal

Expose the new `id` field on Domain APIs and switch user-facing identifier from `name` to `id` across REST, GraphQL, SDK, and CLI.

## Scope

- REST v2: Add `id` to response DTOs. Change path parameter on get/update/delete/purge to `domain_id`. Search filters accept `id`.
- GraphQL: Add `id` field on Domain node/type, update resolvers, filters, and mutation inputs.
- Adapter: `api/adapters/domain` accept `domain_id` lookup path.
- Client SDK v2: `client/v2/domains_v2/domain.py` switch identifier argument to `id`.
- CLI v2: `client/cli/v2/admin/domain.py` switch identifier argument to `id` (resolve human name via lookup if needed).
- Backward compatibility decision documented in PR description.

## Depends on

D-1 (id column must exist).

JIRA Issue: BA-6045

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.