Update

Update User Group

POST https://api.explo.co/api/update_user_group/

This endpoint updates an existing user group. Currently, the only fields you can update is the name and data_source field.

Headers

Name
Type
Description

Explo-Authorization

string

API authorization token which is unique to your team. You can access this in the Developers tab in your account.

Request Body

Name
Type
Description

name

string

This is the new name for the user group.

user_group_id

string

This is the ID you use to identify this user group in your database.

mapping

JSON

This is a JSON mapping of schema id to either the data source that this user group should be associated with or id of the datasource you provided when creating it.

properties

JSON

This is a JSON object for properties assigned to this user group. These will be accessible through variables in the dashboards and SQL editor

{
    "success": 1,
    "user_group": {
        "team_id": 113,
        "token": "<user_group_token_to_auth_dashboard>",
        "name": "ok",
        "provided_id": "6",
    }
}

Response field descriptions

Field Name

Type

Description

success

number

Indicates whether the call was successful. 1 if successful, 0 if not.

user_group.team_id

boolean

Indicates whether a new user group was created.

user_group.token

string

This is the user group token (userGroupToken or USER_GROUP_TOKEN) that will be used to identify which user group is viewing the dashboard. You should save this on your end to use when rendering an embedded dashboard.

user_group.name

string

This is the new name of the user group provided in the request body.

user_group.provided_id

string

This is the user_group_id provided in the request body.

user_group.properties

JSON | Null

This is the properties object if it was provided in the request body

user_group.api_environment_tag

string

This is the environment tag of the user group. Possible values are 'Customer' and 'Testing'

Example Request

curl --location --request POST 'https://api.explo.co/api/update_user_group/' \
--header 'Content-Type: application/json' \
--header 'Explo-Authorization: Token <token>' \
--data-raw '{
    "user_group_id": "example_1",
    "name": "Example 1",
    "mapping": {"40": "213", "134": "386"},
    "properties": {"filterValue": "value"}
}'

Last updated

Was this helpful?