Skip to content

[Multi-tenancy] refacto the endpoint build_url to accept tenant-id #205

@Kakudou

Description

@Kakudou

Use case

In a multi-tenant deployment, the Python client must propagate tenant_id on every API call so the backend can resolve the correct tenant context consistently.

Right now, the client does not propagate tenant_id across all endpoints, which makes tenant-scoped usage incomplete and error-prone.

This is needed so that:

  • all requests made through client-python are properly tenant-scoped
  • users do not have to manually patch or wrap requests
  • the client remains usable in multi-tenant environments without custom hacks

Proposed Solution

Add tenant_id support and propagation to all relevant API endpoints in client-python.

Expected behavior:

  • the client should accept a tenant_id value
  • tenant_id should be forwarded on every endpoint that requires tenant context
  • propagation should be implemented consistently across the whole client surface
  • existing endpoints should not require ad hoc/manual request modification anymore

Implementation ideas:

  • add tenant_id as a client-level default configuration and/or per-request parameter
  • ensure every endpoint method forwards it to the underlying API request
  • align the propagation mechanism with the server contract

Additional Information

Scope:

  • audit all client-python API endpoints
  • identify endpoints where tenant_id is missing
  • add consistent propagation
  • update documentation/examples to show tenant-aware usage

Important points:

  • keep backward compatibility as much as possible

Metadata

Metadata

Assignees

Labels

architecture improvementArchitecture refactor or improvement is neededmultirepositoryThere is more repositories related to this prtechnical improvementTechnical refactor or improvement is needed

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions