End User Group API

post
Get or Create User Group

https://embeddo.herokuapp.com/embed/create_user_group/
This endpoint gets or creates a new user group. If the user_group_id does not exist, a new user group will be created and information about the group will be sent back. If the user_group_id exists, no action will be taken but the same information about the group will be sent back. There will be a flag in the response indicating if a new user group was created.
Request
Response
Request
Headers
Explo-Authorization
required
string
API authorization token which is unique to your team. You can access this in the Developers tab in your account.
Body Parameters
data_source_provided_id
optional
string
The data source ID provided in the data tab may be used to identify the data source for the user group
data_source_id
optional
number
This is the ID of the data source that this user group should be associated with
name
required
string
This is the name of the user group.
user_group_id
required
string
This is the ID you use to identify this user group in your database.
Response
200: OK
Cake successfully retrieved.
{
"success": 1,
"new_user_group": true,
"user_group": {
"team_id": 3,
"token": "<user_group_token_to_auth_dashboard>",
"name": "Example 1",
"provided_id": "example_1",
"data_source_id": 233
}
}

Response field descriptions

Field Name

Type

Description

success

number

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

new_user_group

boolean

Indicates whether a new user group was created.

user_group.team_id

number

This is Explo's internal ID for this user group. You don't need to record this information, since you will not need to use it.

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 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.data_source_id

number

This is the data source id that the user group is associated with.

Example Request

curl --location --request POST 'https://embeddo.herokuapp.com/embed/create_user_group/' \
--header 'Content-Type: application/json' \
--header 'Explo-Authorization: Token <token>' \
--data-raw '{
"user_group_id": "example_1",
"name": "Example 1"
}'

post
Update User Group

https://embeddo.herokuapp.com/embed/update_user_group/
This endpoint updates an existing user group. Currently, the only fields you can update is the name and data_source field.
Request
Response
Request
Headers
Explo-Authorization
required
string
API authorization token which is unique to your team. You can access this in the Developers tab in your account.
Body Parameters
new_data_source_id
optional
number
This is the ID of the new data source that this user group should be associated with (note that this is not the data source's provided id)
data_source_provided_id
optional
string
The data source ID provided in the data tab may be used to identify the data source for the user group
data_source_id
optional
number
This is the ID of the data source that this user group should be associated with
name
optional
string
This is the new name for the user group.
user_group_id
required
string
This is the ID you use to identify this user group in your database.
Response
200: OK
{
"success": 1,
"user_group": {
"team_id": 113,
"token": "<user_group_token_to_auth_dashboard>",
"name": "ok",
"provided_id": "6",
"data_source_id": 129
}
}

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.data_source_id

number

This is the data source id that the user group is associated with.

Example Request

curl --location --request POST 'https://embeddo.herokuapp.com/embed/update_user_group/' \
--header 'Content-Type: application/json' \
--header 'Explo-Authorization: Token <token>' \
--data-raw '{
"user_group_id": "example_1",
"name": "Example 1"
}'

post
Refresh User Group Token

https://embeddo.herokuapp.com/embed/refresh_user_group_token/
This endpoint refreshes a user group token. This is useful when you want to force a user group token to rotate because an existing one may be compromised.
Request
Response
Request
Path Parameters
Explo-Authorization
required
string
API authorization token which is unique to your team. You can access this in the Developers tab in your account.
Body Parameters
data_source_provided_id
optional
string
The data source ID provided in the data tab may be used to identify the data source for the user group
data_source_id
optional
string
This is the ID of the data source that this user group should be associated with
current_token
required
string
This is the current user group token you have for the user group that you want to rotate.
user_group_id
required
string
This is the ID you use to identify this user group in your database.
Response
200: OK
{
"success": 1,
"user_group": {
"team_id": 3,
"token": "<user_group_token_to_auth_dashboard>",
"name": "Example 1",
"provided_id": "example_1",
"data_source_id": 129
}

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

number

This is Explo's internal ID for this user group. You don't need to record this information, since you will not need to use it.

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 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.data_source_id

number

This is the data source id that the user group is associated with.

Example Request

curl --location --request POST 'https://embeddo.herokuapp.com/embed/refresh_user_group_token/' \
--header 'Content-Type: application/json' \
--header 'Explo-Authorization: Token <token>' \
--data-raw '{
"user_group_id": "example_1",
"current_token": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}'

delete
Delete User Group

https://embeddo.herokuapp.com/embed/delete_user_group/
This endpoint deletes an existing user group.
Request
Response
Request
Path Parameters
Explo-Authorization
required
string
API authorization token which is unique to your team. You can access this in the Developers tab in your account.
Body Parameters
data_source_provided_id
optional
string
The data source ID provided in the data tab may be used to identify the data source for the user group
data_source_id
optional
string
This is the ID of the data source that this user group should be associated with.
user_group_id
required
string
This is the ID you use to identify the user group in your database.
Response
200: OK
{
"success": 1
}

Response field descriptions

Field Name

Type

Description

success

number

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

Example Request

curl --location --request DELETE 'https://embeddo.herokuapp.com/embed/delete_user_group/' \
--header 'Content-Type: application/json' \
--header 'Explo-Authorization: Token <token>' \
--data-raw '{
"user_group_id": "example_1"
}'