Skip to content

Community Builder Module API

This module is only available with the Premium Subscription.

This module is intended for B2B integration. It exposes data that should not be made available on a public endpoint, so it must be used only on a private endpoint and somehow protected (e.g. through an API key).

The Community Builder Module is implemented with the plg_jbackend_comprofiler plugin. It provides functions related to Community Builder extension. Here is the list of supported methods.

List users

Request parameters

text
action=get
module=comprofiler
resource=users
limit=<L> (optional)
offset=<O> (optional)

Example

text
<end-point>?action=get&module=comprofiler&resource=users

Example (REST format)

text
<end-point>/get/comprofiler/users?limit=10&offset=2

Response

json
{
    "status": "ok",
    "total": <total>,
    "limit": <limit>,
    "offset": <offset>,
    "users": [
        {
            "id": "<userid>",
            ...
        },
        ...
        {
            "id": "<userid>",
            ...
        }
    ]
}

Notes

limit is the number of entries to return.

offset is the cursor starting point (0 based, start on record 16 means offset = 15).

If limit is not specified, offset is ignored.

Properties limit and offset in the response are present only when specified in the request.

Get user profile

Request parameters

text
action=get
module=comprofiler
resource=profile
id=<id>

Example

text
<end-point>?action=get&module=comprofiler&resource=profile&id=482

Example (REST format)

text
<end-point>/get/comprofiler/profile/482

Response

json
{
    "status": "ok",
    ...
}

Update user profile

Request parameters

text
action=put
module=comprofiler
resource=profile

JSON payload data

json
{
    "id": "<userid>",
    "name": "<name>",
    "username": "<username>",
    "email": "<email>",
    "password": "<password>",
    ...
}

Example

text
<end-point>?action=put&module=comprofiler&resource=profile

Example (REST format)

text
<end-point>/put/comprofiler/profile

Response

json
{
    "status": "ok"
}

Notes

The id parameter in the request payload is mandatory to identify the user profile to update.

Other mandatory fields are username, email, and name.

It is possible to specify any supported field in the payload.