I developing a custom module in Drupal and I have to manage multiple GitLab acconts (add, delete, etc.) which will be used to fetch different kind of information from the accounts (eg. projects, branches inside projects, etc.).
Now the point is that I have to support multiple GitLab API endpoints (to be able to connect to different domains not just to https://gitlab.com/ for example) and I have to be able to make distinction between all of the accounts with some kind of “unique key” which will be unique across all possible endpoints I will manage and identifie exactly one account. As I saw the account identifiers (fetched by eg. GET /user) are start from 1 under the different endpoints (domains). So there should be for example a user account with the “15” identifier under https://gitlab.com/ and similarly under a different domain (if there are at least 15 registered users under that other domain). Based on these the account id “15” won’t be unique “globally” (across domains/endpoints) just under one domain.
My first question is that am I right in connection with the previously mentioned things or the situation is different? My second question is that if I use the endpoint URL and an account id in pair that would be appropriate?
Thank you in advance for your help.