Groups
Groups are a visual feature that can be used by the ermes panel to provide a grouping of the various servers, despite that they can be viewed and configured via API.
Creating a Group.
To use groups first you need to create one, to do so the following request is available:
HTTP Request
POST /ecs/v2/groups
{
"notes": "my-faboulus-group", //l'etichetta del tuo gruppo
"password": "" //il campo password è deprecato ma è necessario nella richiesta per questioni di retrocompatibilità
}
HTTP Response
{
"status": "ok",
"group": {
"id": 1,
"name": "ei000001",
"notes": "my-faboulus-group",
"enabled": true
}
}
You may receive the following errors:
Status Code | Message | Explanation |
---|---|---|
400 | notes and password are required field | both fields are required to create a group |
Once a group is created you can add servers to it.
View Active Groups.
You can view all groups using the following request:
HTTP request
GET /ecs/v2/groups
HTTP Response
{
"status": "ok",
"groups": [
{
"id": 1,
"name": "ei000001",
"notes": "my-faboulus-group",
"enabled": true
},
{
"id": 2,
"name": "ei000002",
"notes": "my-second-faboulus-group",
"enabled": true
}
]
}
Viewing a particular Group.
To view a particular group, the following request is available:
HTTP request
GET /ecs/v2/groups/{groupid}
HTTP Response
{
"status": "ok",
"group": {
"id": 1,
"name": "ei000001",
"notes": "my-faboulus-group",
"enabled": true
}
}
Delete a Group
In case you want to delete a group you can do so using the following request:
HTTP request
DELETE /ecs/v2/groups/{groupid}
HTTP Response
{
"status": "ok"
}
You may receive the following errors:
Status Code | Message | Explanation |
---|---|---|
400 | there are servers joined in this group. Remove join first and than remove group | To remove a group you must first remove every server joined to it |