Print this page

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

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

Example

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

Example (REST format)

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

Response

{
    "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

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

Example

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

Example (REST format)

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

Response

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

 

Update user profile

Request parameters

action=put
module=comprofiler
resource=profile

 

JSON payload data

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

Example

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

Example (REST format)

<end-point>/put/comprofiler/profile

Response

{
    "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.