HumHub - User API (1.0.0)

Download OpenAPI specification:Download

E-mail: info@humhub.com License: AGPLv2

Welcome to the HumHub user module API reference.

Authentication

Bearer

Security Scheme Type JWT

BasicAuth

Security Scheme Type HTTP
HTTP Authorization Scheme basic

User

API to access and manage user information.

Find all users

query Parameters
page
string >= 0

The number of page of the result set.

limit
string [ 1 .. 50 ]
Default: 20

The numbers of items to return per page.

Responses

Response samples

Content type
{
  • "total": 76,
  • "page": 1,
  • "results": [
    ]
}

Add a new user to the installation

Request Body schema: application/json

User object to be added to the installation

required
object (Account)
required
object (Profile)
required
object (Password)

Responses

Request samples

Content type
application/json
{
  • "account": {
    },
  • "profile": {
    },
  • "password": {
    }
}

Get user by username

query Parameters
username
required
string

The username of user

Responses

Response samples

Content type
application/json
{
  • "id": 14,
  • "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
  • "display_name": "John Doe",
  • "account": {
    },
  • "profile": {
    }
}

Get user by email

query Parameters
email
required
string

The email of user

Responses

Response samples

Content type
application/json
{
  • "id": 14,
  • "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
  • "display_name": "John Doe",
  • "account": {
    },
  • "profile": {
    }
}

Get user by user id

path Parameters
id
required
integer

The id of user

Responses

Response samples

Content type
application/json
{
  • "id": 14,
  • "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
  • "display_name": "John Doe",
  • "account": {
    },
  • "profile": {
    }
}

Update an existing user

path Parameters
id
required
integer

The id of user

Request Body schema: application/json

Updated user object

object (Account)
object (Profile)
object (Password)

Responses

Request samples

Content type
application/json
{
  • "account": {
    },
  • "profile": {
    },
  • "password": {
    }
}

Response samples

Content type
application/json
{
  • "id": 14,
  • "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
  • "display_name": "John Doe",
  • "account": {
    },
  • "profile": {
    }
}

Soft deletes an user by id

path Parameters
id
required
integer

The id of user

Responses

Hard deletes an user by id

path Parameters
id
required
integer

The id of user

Responses

Group

Group API

Find all Groups

query Parameters
page
string >= 0

The number of page of the result set.

limit
string [ 1 .. 50 ]
Default: 20

The numbers of items to return per page.

Responses

Response samples

Content type
{
  • "total": 76,
  • "page": 1,
  • "results": [
    ]
}

Adds a new group

Request Body schema: application/json

The added Group object

name
string
description
string
show_at_directory
boolean
show_at_registration
boolean
sort_order
int

Responses

Request samples

Content type
application/json
{
  • "name": "Example group",
  • "description": "Users of Example",
  • "show_at_directory": false,
  • "show_at_registration": false,
  • "sort_order": 100
}

Get group by id

path Parameters
id
required
integer

The id of group

Responses

Response samples

Content type
application/json
{
  • "id": 1,
  • "name": "Example group",
  • "description": "Users of Example",
  • "show_at_directory": false,
  • "show_at_registration": false,
  • "sort_order": 100
}

List members

Lists all members of the given group id.

path Parameters
id
required
integer

The id of the group

Responses

Response samples

Content type
{}

Add a new member

Adds new member to the given group

path Parameters
id
required
integer

The id of group

query Parameters
userId
required
integer

The id of user

isManager
boolean
Default: false

Is group manager

Responses

Removes a member

Removes a member from given group id.

path Parameters
id
required
integer

The id of group

query Parameters
userId
required
integer

The id of user

Responses

Invite

Invite new users to the HumHub installation

Session

User sessions

Deletes all sessions for a particular user

path Parameters
id
required
integer

The id of user

Responses