> For the complete documentation index, see [llms.txt](https://docs.hiboo.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hiboo.io/rest-api-reference/fleet-identity/equipment-groups.md).

# Equipment Groups

The following endpoints allow you to manage equipment groups, enabling you to link multiple equipments together.

## Create a new equipment group

> Create a new group by linking multiple equipments together. At least 2 equipment IDs are required.

```json
{"openapi":"3.0.3","info":{"title":"Hiboo API","version":"2.0.0"},"tags":[{"name":"Equipment Groups","description":"The following endpoints allow you to manage equipment groups, enabling you to link multiple equipments together."}],"servers":[{"url":"https://api.hiboo.io","description":"Production server"},{"url":"https://api-sandbox.hiboo.io","description":"Sandbox server"}],"security":[{"JWT":[]}],"components":{"securitySchemes":{"JWT":{"type":"apiKey","in":"header","name":"x-access-token","description":"Generate a JWT when you log in. Use it in your following requests in the header as `x-access-token: your-token-here`\n"}},"schemas":{"CreateGroupBody":{"required":["assetIds"],"type":"object","properties":{"assetIds":{"type":"array","description":"List of equipment IDs to group together. At least 2 equipment IDs are required.","minItems":2,"items":{"type":"integer"}}}},"GroupBodySerialized":{"required":["id","assetIds"],"type":"object","properties":{"id":{"type":"integer","description":"The unique identifier of the group"},"assetIds":{"type":"array","description":"List of equipment IDs in the group","items":{"type":"integer"}}}},"Error":{"required":["message","details"],"type":"object","properties":{"message":{"type":"string","description":"A human readable description of the error"},"details":{"type":"object","description":"Additional information about the Error"}}},"NoDetailError":{"required":["message"],"type":"object","properties":{"message":{"type":"string","description":"A human readable description of the error"}}}},"responses":{"201":{"description":"Group successfully created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupBodySerialized"}}}},"400":{"description":"Cannot create a group with less than two equipments","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions to create a group with these equipments","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoDetailError"}}}},"409":{"description":"One or more equipments are already part of a group","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Error":{"description":"Unable to authenticate the token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoDetailError"}}}}}},"paths":{"/v2/fleet/groups":{"post":{"summary":"Create a new equipment group","description":"Create a new group by linking multiple equipments together. At least 2 equipment IDs are required.","tags":["Equipment Groups"],"operationId":"createGroup","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGroupBody"}}}},"responses":{"201":{"$ref":"#/components/responses/201"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401Error"},"403":{"$ref":"#/components/responses/403"},"409":{"$ref":"#/components/responses/409"}}}}}}
```

## Update an equipment group

> Update an existing equipment group by replacing the list of equipments. At least 2 equipment IDs are required.

```json
{"openapi":"3.0.3","info":{"title":"Hiboo API","version":"2.0.0"},"tags":[{"name":"Equipment Groups","description":"The following endpoints allow you to manage equipment groups, enabling you to link multiple equipments together."}],"servers":[{"url":"https://api.hiboo.io","description":"Production server"},{"url":"https://api-sandbox.hiboo.io","description":"Sandbox server"}],"security":[{"JWT":[]}],"components":{"securitySchemes":{"JWT":{"type":"apiKey","in":"header","name":"x-access-token","description":"Generate a JWT when you log in. Use it in your following requests in the header as `x-access-token: your-token-here`\n"}},"schemas":{"CreateGroupBody":{"required":["assetIds"],"type":"object","properties":{"assetIds":{"type":"array","description":"List of equipment IDs to group together. At least 2 equipment IDs are required.","minItems":2,"items":{"type":"integer"}}}},"GroupBodySerialized":{"required":["id","assetIds"],"type":"object","properties":{"id":{"type":"integer","description":"The unique identifier of the group"},"assetIds":{"type":"array","description":"List of equipment IDs in the group","items":{"type":"integer"}}}},"Error":{"required":["message","details"],"type":"object","properties":{"message":{"type":"string","description":"A human readable description of the error"},"details":{"type":"object","description":"Additional information about the Error"}}},"NoDetailError":{"required":["message"],"type":"object","properties":{"message":{"type":"string","description":"A human readable description of the error"}}}},"responses":{"401Error":{"description":"Unable to authenticate the token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoDetailError"}}}}}},"paths":{"/v2/fleet/groups/{id}":{"put":{"summary":"Update an equipment group","description":"Update an existing equipment group by replacing the list of equipments. At least 2 equipment IDs are required.","tags":["Equipment Groups"],"operationId":"updateGroup","parameters":[{"name":"id","description":"The unique identifier of the group to update.","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGroupBody"}}}},"responses":{"200":{"description":"Group successfully updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupBodySerialized"}}}},"400":{"description":"Insufficient equipments to form a group (at least 2 required)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/401Error"},"403":{"description":"Insufficient permissions to edit this group","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoDetailError"}}}},"404":{"description":"Group not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoDetailError"}}}},"409":{"description":"One or more equipments are already part of another group","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Delete an equipment group

> Delete an existing equipment group. This will unlink all equipments from the group.

```json
{"openapi":"3.0.3","info":{"title":"Hiboo API","version":"2.0.0"},"tags":[{"name":"Equipment Groups","description":"The following endpoints allow you to manage equipment groups, enabling you to link multiple equipments together."}],"servers":[{"url":"https://api.hiboo.io","description":"Production server"},{"url":"https://api-sandbox.hiboo.io","description":"Sandbox server"}],"security":[{"JWT":[]}],"components":{"securitySchemes":{"JWT":{"type":"apiKey","in":"header","name":"x-access-token","description":"Generate a JWT when you log in. Use it in your following requests in the header as `x-access-token: your-token-here`\n"}},"responses":{"401Error":{"description":"Unable to authenticate the token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoDetailError"}}}}},"schemas":{"NoDetailError":{"required":["message"],"type":"object","properties":{"message":{"type":"string","description":"A human readable description of the error"}}}}},"paths":{"/v2/fleet/groups/{id}":{"delete":{"summary":"Delete an equipment group","description":"Delete an existing equipment group. This will unlink all equipments from the group.","tags":["Equipment Groups"],"operationId":"deleteGroup","parameters":[{"name":"id","description":"The unique identifier of the group to delete.","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"Group successfully deleted"},"401":{"$ref":"#/components/responses/401Error"},"403":{"description":"Insufficient permissions to delete this group","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoDetailError"}}}}}}}}}
```
