Datastore Grouping API
You can manage datastore groups programmatically using the Qualytics API.
Tip
For complete API documentation, including request/response schemas, visit the API docs.
All endpoints use the base URL of your Qualytics deployment (e.g., https://your-instance.qualytics.io/api).
List All Groups
Retrieves all datastore groups, ordered by name.
Endpoint: GET /api/datastore-groups
Permission: Member
Example request and response
Request:
curl -X GET "https://your-instance.qualytics.io/api/datastore-groups" \
-H "Authorization: Bearer YOUR_TOKEN"
Response:
Create a Group
Creates a new datastore group.
Endpoint: POST /api/datastore-groups
Permission: Manager
Example request and response
Request:
curl -X POST "https://your-instance.qualytics.io/api/datastore-groups" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Production",
"icon": "mdi-podium-gold"
}'
Response (200):
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
name |
string | Yes | Group name (1–100 characters, must be unique, case-insensitive). |
icon |
string | No | Icon identifier. See Valid Icon Values below. Defaults to mdi-bookmark-box-outline. |
For the UI equivalent, see Create a Group.
Update a Group
Updates an existing datastore group's name and/or icon.
Endpoint: PUT /api/datastore-groups/{id}
Permission: Manager
Example request and response
Request:
curl -X PUT "https://your-instance.qualytics.io/api/datastore-groups/3" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Prod Critical",
"icon": "mdi-star-outline"
}'
Response (200):
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
name |
string | No | New group name (1–100 characters, must be unique, case-insensitive). |
icon |
string | No | New icon identifier. See Valid Icon Values below. |
For the UI equivalent, see Edit a Group.
Delete a Group
Deletes a datastore group. All datastores in the group become ungrouped.
Endpoint: DELETE /api/datastore-groups/{id}
Permission: Manager
Example request and response
Request:
curl -X DELETE "https://your-instance.qualytics.io/api/datastore-groups/3" \
-H "Authorization: Bearer YOUR_TOKEN"
Response (200): Returns the deleted group object.
Note
Deleting a group does not delete the datastores within it — they simply become ungrouped.
For the UI equivalent, see Delete a Group.
Assign a Datastore to a Group
Assigns a datastore to a group, or removes it from its current group. If the datastore already belongs to a different group, it is automatically moved to the new group.
Endpoint: PATCH /api/datastores/{id}/assign-group
Permission: Member user role + Editor team permission on the datastore. Admin users bypass team-level checks.
Assign to a group
Request:
curl -X PATCH "https://your-instance.qualytics.io/api/datastores/42/assign-group" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"group_id": 1
}'
Response (200): Returns the updated datastore object (abbreviated).
Remove from a group (unassign)
Request:
curl -X PATCH "https://your-instance.qualytics.io/api/datastores/42/assign-group" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"group_id": null
}'
Response (200): Returns the updated datastore object with "group": null.
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
group_id |
integer or null | Yes | The group ID to assign, or null to remove from the current group. |
For the UI equivalents, see Assign a Datastore to a Group and Unassign a Datastore from a Group.
Valid Icon Values
The icon field accepts the following MDI (Material Design Icons) identifiers:
| No. | Value | Label |
|---|---|---|
| 1. | mdi-bookmark-box-outline |
Bookmark (default) |
| 2. | mdi-folder-outline |
Folder |
| 3. | mdi-shape-outline |
Shape |
| 4. | mdi-chart-box-outline |
Chart |
| 5. | mdi-flask-outline |
Flask |
| 6. | mdi-star-outline |
Star |
| 7. | mdi-texture-box |
Texture |
| 8. | mdi-podium-bronze |
Bronze |
| 9. | mdi-podium-silver |
Silver |
| 10. | mdi-podium-gold |
Gold |
Error Responses
| Status Code | Description |
|---|---|
401 Unauthorized |
Missing or invalid API token. |
403 Forbidden |
User does not have the required role or team permission. |
404 Not Found |
Group or datastore with the specified ID does not exist. |
409 Conflict |
Group name already exists (case-insensitive). |
422 Unprocessable Entity |
Invalid request body (e.g., name exceeds 100 characters). |
Error response examples
403 Forbidden:
404 Not Found:
409 Conflict:
Permission Summary
| Operation | Minimum Permission |
|---|---|
| List all groups | Member |
| Create a group | Manager |
| Update a group | Manager |
| Delete a group | Manager |
| Assign a datastore to a group | Member user role + Editor team permission |
| Remove a datastore from a group | Member user role + Editor team permission |