View All Users

In Admin Center

To see all the users registered in your SwaggerHub On-Premise instance, use the License page of the Admin Center:

Admin Center: List of users

The user list has the following columns:

Column

Description

User

The user name.

Organization

A list of organizations the user is a member of (in any role).

Email Address

The user’s email address.

Created On

The date when the user was registered in SwaggerHub.

Last Login (added in v. 1.24)

The date when the user last logged in to SwaggerHub. Note that this is not the same as the last access date. That is, this value is only updated when the user actually logs in, but not when a user session is extended or when the SwaggerHub Registry API is called with the user’s API key.

Note for upgraded instances: Logins performed before v. 1.24 are not counted.

You can sort and filter the user list by any column.

You can also download the list as a CSV file.

List users via API (v. 1.26 and later)

Administrators can use the User Management API to get a list of existing users in the system.

Notes:

  • The requests below must be authenticated using the SwaggerHub API key of the admin user. The API key can be found on the API Key page in the account settings in the main SwaggerHub application.

  • By default, the responses are capped at 25 items per page. You can use the pageSize (0..100) and page query parameters to iterate through all items.

1. Get organizations

Start by getting a list of organizations in the system:

curl http(s)://SERVER/api/user-management/v1/orgs -H "Authorization: ADMIN_API_KEY"

The response looks like this:

{
  "totalCount": 4,
  "pageSize": 25,
  "page": 0,
  "items": [
    {
      "name": "acme",
      "description": "Acme Inc.",
      "email": "[email protected]",
      "id": "744fad2b-7fb4-4304-8e3e-e8947fc2e31b",
      "memberCount": 75
    },
    {
      "name": "core-services",
      "description": "Core Services",
      "email": "[email protected]",
      "id": "df084048-103a-4537-a5ef-d2d4d40d4f64",
      "memberCount": 24
    },
    ...
  ]
}

2. Get organization members

Next, you can get the user list for each organization:

curl http(s)://SERVER/api/user-management/v1/orgs/ORG_NAME/members -H "Authorization: ADMIN_API_KEY"

The response includes usernames, email addresses, roles, the account creation date, and the date and time of the last activity:

{
  "totalCount": 75,
  "pageSize": 25,
  "page": 0,
  "items": [
    {
      "email": "[email protected]",
      "role": "CONSUMER",
      "inviteTime": "2021-10-06T11:37:28.287Z"
    },
    {
      "userId": "e78215fc-4522-4f68-8f1a-a18c63d9e843",
      "username": "amy",
      "email": "[email protected]",
      "role": "DESIGNER",
      "inviteTime": "2018-10-31T12:34:17.904Z",
      "startTime": "2018-12-20T16:22:16.162Z",
      "lastActive": "2020-11-08T09:42:00.416Z"
    },
    ...
  ]
}

See Also

Publication date: