Forum Discussion

jdediego's avatar
jdediego
New Contributor
2 years ago

Delete SwaggerHub 2.x users using the user-management API

 Hi all,

We need to remove SwaggerHub users using the user management API, using SwaggerHub v2.x. (2.4.1+118)

The API documentation (https://app.swaggerhub.com/apis-docs/swagger-hub/user-management-api/v1) does not seem to allow the removal of users from the system, only from a given organization (https://app.swaggerhub.com/apis-docs/swagger-hub/user-management-api/v1#/Organization%20Members/removeMembers).

Do you know any way to remove users from SwaggerHub 2.x (using the user management API) so that they cannot count as seats in the license?

 

Much appreciated in advance

  • In the on-premise User Management API there is a path “/users” that supports a DELETE method.

     

    “Deletes the specified users from the On-Premise system by email address. The authenticating user must be the On-Premise admin. Deleting the last owner of an organization will result in the organization also being deleted.”

     

    This call removes a User from all on-premise organizations and returns the license seat to the available pool.

     

    Removing a User with /orgs/{orgId}/members does not remove the user from the on-premise instance.

    • jdediego's avatar
      jdediego
      New Contributor
      Hi, im sorry but you are not answering my question. We are already using the on premise user management API, which allows (we already use the last option):

      [https://support.smartbear.com/swaggerhub/docs/_assets/commonImages/go.gif]Get organization members<>

      [https://support.smartbear.com/swaggerhub/docs/_assets/commonImages/go.gif]Add users to the organization<>

      [https://support.smartbear.com/swaggerhub/docs/_assets/commonImages/go.gif]Change member roles<>

      [https://support.smartbear.com/swaggerhub/docs/_assets/commonImages/go.gif]Remove members from an organization<>

      I'll reformulate the question. Please, Assume we delete a user from an organization and this user does not belong to any other organization. When this user is deleted from the only organization it belongs to, does it remain in the list of users, with no associated organization, or it is definitely removed for all purposes? And therefore, it does not count as an occupied seat for license terms.

      Thanks

      This e-mail and any attachments contain privileged and confidential information intended only for the use of the addressee(s). If you are not an intended recipient of this e-mail, you are hereby notified that any dissemination, copying or use of information within it is strictly prohibited. If you received this e-mail in error or without authorization, please notify us immediately by reply e-mail and delete the e-mail from your system. Thank you in advance.

      Este correo electr?nico y, en su caso, cualquier fichero anexo al mismo, contiene informaci?n de car?cter confidencial exclusivamente dirigida a su(s) destinatario(s). En el caso de haber recibido este correo electr?nico por error, se ruega notificar inmediatamente esta circunstancia mediante reenv?o a la direcci?n electr?nica del remitente y el borrado del mismo, y se informa que cualquier transmisi?n, copia o uso de esta informaci?n est? estrictamente prohibida. Muchas gracias

      Este e-mail e quaisquer anexos seus podem conter informa??o confidencial para uso exclusivo do destinat?rio. Se n?o for o destinat?rio, n?o dever? usar, distribuir ou copiar este e-mail, devendo proceder ? sua elimina??o e informar o emissor. Obrigado
      • mhiggins's avatar
        mhiggins
        Staff

        In the on-premise User Management API there is a path “/users” that supports a DELETE method.

         

        “Deletes the specified users from the On-Premise system by email address. The authenticating user must be the On-Premise admin. Deleting the last owner of an organization will result in the organization also being deleted.”

         

        This call removes a User from all on-premise organizations and returns the license seat to the available pool.

         

        Removing a User with /orgs/{orgId}/members does not remove the user from the on-premise instance.

  • Also, remember to URL encode mail addresses. That always catches me out. 

  • jdediego's avatar
    jdediego
    New Contributor

    Hey mhiggins  (Micheal)

    Many thanks for the information! 

     

    Removing a User with /orgs/{orgId}/members does not remove the user from the on-premise instance.

    It is what we figured out.

     

    In the on-premise User Management API there is a path “/users” that supports a DELETE method.

    Could you please provide the URL for the documentation, including the path "/users"?

     

    We won't forget to encode email addresses 😉

    We really appreciate your quick response and help.

    Cheers!

     

     

    • jdediego's avatar
      jdediego
      New Contributor

      We got from http(s)://SERVER/api/user-management/v1/swagger.yaml

      I think this  thread can be considered as solved.

      Much appreciated!