zitadel-node icon indicating copy to clipboard operation
zitadel-node copied to clipboard

Add support for API V2 or at least make it explicit which API version is being used

Open wlinna opened this issue 1 year ago • 3 comments

It is difficult to say what API version zitadel-node uses. It seems that the API is not versioned or anything. This also makes it difficult to ensure the correct behavior, because some endpoints work differently.

I tried to find V2 version of add human user from zitadel-node, but I couldn't. Perhaps V2 is not supported at all (?)

Could you please add support for V2 API (in addition to V1)? Or at least make it clear which API version is used.

wlinna avatar Aug 06 '24 12:08 wlinna

@wlinna From what I've seen, the current version 2.0.35 is using the Zitadel API v2. Here is the trace:

  1. Types are generated from protobuf via npm run build:grpc
  2. The npm script in 1. clones the path proto/zitadel from the Zitadel repository on main branch.
  3. The proto/zitadel path contains the v2 and v2beta. Here is an example for the user resource. Here is an example for your inquiry (add human user).

However, it is unclear to me if "v2beta === v3 (preview)". Maybe @eliobischof can give an informed answer here?

tafaust avatar Sep 29 '24 05:09 tafaust

Hello, thanks for answering. We / I switched to the JSON-based API though (because of this issue and maybe others. I don't remember anymore).

Regardless, I think the information should be made explicit in the API and in the README, because the API versions sometimes behave differently.

wlinna avatar Sep 29 '24 09:09 wlinna

@wlinna I think you can create something like this for yourself or PR to this repository.

tafaust avatar Sep 30 '24 23:09 tafaust