> For the complete documentation index, see [llms.txt](https://navixy.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://navixy.com/docs/navixy-api/user-api/resources/tracking/asset/asset-groups.md).

# Asset groups

Group assets of different types so they are tracked and reported on together.

An asset group binds assets of different types together so they can be handled as one unit. A group holds at most one asset of each type.

Membership is exclusive: an asset already in a group cannot join another unless the request sets `force_reassign`. Deleting a group marks it deleted rather than erasing it, so its history stays intact.

Every operation here works only on assets the current user can reach. A request that names an asset outside that reach returns error 291, and a group whose assets have all become unreachable returns error 287.

## Asset group entry

## The AssetGroup object

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"components":{"schemas":{"AssetGroup":{"type":"object","description":"A group of assets, holding at most one asset of each type.","properties":{"id":{"type":"integer","description":"ID of the group."},"name":{"type":"string","description":"Name of the group."},"assets":{"type":"array","description":"Assets in the group. May be empty.","items":{"$ref":"#/components/schemas/AssetId"}}}},"AssetId":{"type":"object","description":"A reference to an asset, by ID and kind.","properties":{"id":{"type":"integer","description":"ID of the asset."},"type":{"type":"string","description":"What kind of asset it is.","enum":["employee","vehicle"]}}}}}}
```

## Asset group object entry

## The AssetGroupObject object

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"components":{"schemas":{"AssetGroupObject":{"type":"object","description":"One asset and the group it belongs to. Used to report assignments that were removed or that block a reassignment.","properties":{"asset":{"$ref":"#/components/schemas/AssetId"},"group_id":{"type":"integer","description":"ID of the group."}}},"AssetId":{"type":"object","description":"A reference to an asset, by ID and kind.","properties":{"id":{"type":"integer","description":"ID of the asset."},"type":{"type":"string","description":"What kind of asset it is.","enum":["employee","vehicle"]}}}}}}
```

## Asset entry

## The AssetId object

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"components":{"schemas":{"AssetId":{"type":"object","description":"A reference to an asset, by ID and kind.","properties":{"id":{"type":"integer","description":"ID of the asset."},"type":{"type":"string","description":"What kind of asset it is.","enum":["employee","vehicle"]}}}}}}
```

## API actions

API base path: `/asset_group`.

Operations that list no errors of their own return only the [general error codes](/docs/navixy-api/general/errors.md#error-codes).

***

## Create asset group

> Create an asset group, and return its ID.\
> \
> \*\*Only one asset of each type per group.\*\*\
> \
> When an asset already belongs to another group, \`force\_reassign\` decides what happens: \`false\` refuses with error 290 and lists the conflicts, \`true\` moves the asset and reports what it removed in \`reassigned\_assets\`.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"tags":[{"name":"Assets","description":"Tracks belonging to an asset rather than to a tracker, and the groups assets are organised into. All resources under the /asset/track/ and /asset_group/ paths."}],"servers":[{"url":"https://api.eu.navixy.com/v2","description":"Navixy production server on European platform"},{"url":"https://api.us.navixy.com/v2","description":"Navixy production server on American platform"},{"url":"https://api.me.navixy.com/v2","description":"Navixy production server on Middle East platform"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","description":"Either a user session hash or an API key, with the \"NVX \" prefix, for example \"NVX 22eac1c27af4be7b9d04da2ce1af111b\". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.","name":"Authorization","in":"header"}},"schemas":{"AssetId":{"type":"object","description":"A reference to an asset, by ID and kind.","properties":{"id":{"type":"integer","description":"ID of the asset."},"type":{"type":"string","description":"What kind of asset it is.","enum":["employee","vehicle"]}}},"AssetGroupObject":{"type":"object","description":"One asset and the group it belongs to. Used to report assignments that were removed or that block a reassignment.","properties":{"asset":{"$ref":"#/components/schemas/AssetId"},"group_id":{"type":"integer","description":"ID of the group."}}}},"responses":{"ResponseError":{"description":"Error response object","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Always false."},"status":{"type":"object","description":"Error status. Present only when an error occurred.","properties":{"code":{"type":"integer","description":"An error code in this API, not an HTTP code."},"description":{"type":"string","description":"An error description."}}},"errors":{"type":"array","description":"Per-parameter detail, returned with validation failures such as error code 7. A parameter name here may be an internal field name rather than the documented parameter name.","items":{"type":"object","properties":{"parameter":{"type":"string","description":"Name of the parameter that failed validation."},"error":{"type":"string","description":"What was wrong with it."}}}}}}}}}}},"paths":{"/asset_group/create":{"post":{"tags":["Assets"],"summary":"Create asset group","description":"Create an asset group, and return its ID.\n\n**Only one asset of each type per group.**\n\nWhen an asset already belongs to another group, `force_reassign` decides what happens: `false` refuses with error 290 and lists the conflicts, `true` moves the asset and reports what it removed in `reassigned_assets`.","operationId":"assetGroupCreate","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Optional. Name of the group. Defaults to the new entry's own ID."},"assets":{"type":"array","description":"Assets to put in the group. Only one asset of each type is allowed.","items":{"$ref":"#/components/schemas/AssetId"}},"force_reassign":{"type":"boolean","description":"Optional. Default `false`. When `true`, assets already in another group are moved, and their previous assignments removed."}},"required":["assets"]}}}},"responses":{"200":{"description":"The created group","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"`true` if request finished successfully.","readOnly":true},"id":{"type":"integer","description":"ID of the group."},"reassigned_assets":{"type":"array","description":"Optional. Assignments removed while reassigning.","items":{"$ref":"#/components/schemas/AssetGroupObject"}}}}}}},"400":{"description":"Bad request. The response body carries the API-level error code in `status.code`. Validation failures also include an `errors` array naming each offending parameter.","$ref":"#/components/responses/ResponseError"},"403":{"description":"Error 291: the request contains assets not accessible to the user.","$ref":"#/components/responses/ResponseError"},"409":{"description":"Error 290: an asset is already in a group and `force_reassign` is `false`. **The response body carries `assigned_assets`**, naming the existing assignments.","$ref":"#/components/responses/ResponseError"},"default":{"$ref":"#/components/responses/ResponseError"}}}}}}
```

#### Errors

These errors come in addition to the [general error codes](/docs/navixy-api/general/errors.md#error-codes):

* 290 - Asset already assigned to a group, when `force_reassign` is `false` and an asset in the request already belongs to one. The response carries `assigned_assets`, a list of the [asset group objects](#asset-group-object-entry) already assigned.
* 291 - All assets in the request must be accessible, when the request names an asset the user cannot reach.

***

## List asset groups

> List asset groups, by group ID or by the asset they contain.\
> \
> \*\*At most one of \`group\_ids\` and \`asset\` may be given, and neither is also fine.\*\* An empty body succeeds. Sending both is what fails, reporting the validation group \`has\_not\_both\_group\_ids\_and\_asset\_fields\` with the message "None or one of the fields must be present".\
> \
> Callable with an empty body.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"tags":[{"name":"Assets","description":"Tracks belonging to an asset rather than to a tracker, and the groups assets are organised into. All resources under the /asset/track/ and /asset_group/ paths."}],"servers":[{"url":"https://api.eu.navixy.com/v2","description":"Navixy production server on European platform"},{"url":"https://api.us.navixy.com/v2","description":"Navixy production server on American platform"},{"url":"https://api.me.navixy.com/v2","description":"Navixy production server on Middle East platform"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","description":"Either a user session hash or an API key, with the \"NVX \" prefix, for example \"NVX 22eac1c27af4be7b9d04da2ce1af111b\". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.","name":"Authorization","in":"header"}},"schemas":{"AssetId":{"type":"object","description":"A reference to an asset, by ID and kind.","properties":{"id":{"type":"integer","description":"ID of the asset."},"type":{"type":"string","description":"What kind of asset it is.","enum":["employee","vehicle"]}}},"AssetGroup":{"type":"object","description":"A group of assets, holding at most one asset of each type.","properties":{"id":{"type":"integer","description":"ID of the group."},"name":{"type":"string","description":"Name of the group."},"assets":{"type":"array","description":"Assets in the group. May be empty.","items":{"$ref":"#/components/schemas/AssetId"}}}}},"responses":{"ResponseError":{"description":"Error response object","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Always false."},"status":{"type":"object","description":"Error status. Present only when an error occurred.","properties":{"code":{"type":"integer","description":"An error code in this API, not an HTTP code."},"description":{"type":"string","description":"An error description."}}},"errors":{"type":"array","description":"Per-parameter detail, returned with validation failures such as error code 7. A parameter name here may be an internal field name rather than the documented parameter name.","items":{"type":"object","properties":{"parameter":{"type":"string","description":"Name of the parameter that failed validation."},"error":{"type":"string","description":"What was wrong with it."}}}}}}}}}}},"paths":{"/asset_group/list":{"post":{"tags":["Assets"],"summary":"List asset groups","description":"List asset groups, by group ID or by the asset they contain.\n\n**At most one of `group_ids` and `asset` may be given, and neither is also fine.** An empty body succeeds. Sending both is what fails, reporting the validation group `has_not_both_group_ids_and_asset_fields` with the message \"None or one of the fields must be present\".\n\nCallable with an empty body.","operationId":"assetGroupList","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"group_ids":{"type":"array","description":"Groups to return. Use this or `asset`, not both.","items":{"type":"integer"}},"asset":{"allOf":[{"$ref":"#/components/schemas/AssetId"}],"description":"Return the group containing this asset. Use this or `group_ids`, not both."}}}}}},"responses":{"200":{"description":"Matching asset groups","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"`true` if request finished successfully.","readOnly":true},"list":{"type":"array","items":{"$ref":"#/components/schemas/AssetGroup"}}}}}}},"400":{"description":"Bad request. The response body carries the API-level error code in `status.code`. Validation failures also include an `errors` array naming each offending parameter.","$ref":"#/components/responses/ResponseError"},"default":{"$ref":"#/components/responses/ResponseError"}}}}}}
```

***

## Set assets in group

> Put assets into an existing group.\
> \
> \*\*Only one asset of each type per group\*\*, and \`assets\` must not be empty.\
> \
> When an asset already belongs to another group, \`force\_reassign\` decides what happens: \`false\` refuses with error 290 and lists the conflicts, \`true\` moves the asset and reports what it removed in \`reassigned\_assets\`.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"tags":[{"name":"Assets","description":"Tracks belonging to an asset rather than to a tracker, and the groups assets are organised into. All resources under the /asset/track/ and /asset_group/ paths."}],"servers":[{"url":"https://api.eu.navixy.com/v2","description":"Navixy production server on European platform"},{"url":"https://api.us.navixy.com/v2","description":"Navixy production server on American platform"},{"url":"https://api.me.navixy.com/v2","description":"Navixy production server on Middle East platform"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","description":"Either a user session hash or an API key, with the \"NVX \" prefix, for example \"NVX 22eac1c27af4be7b9d04da2ce1af111b\". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.","name":"Authorization","in":"header"}},"schemas":{"AssetId":{"type":"object","description":"A reference to an asset, by ID and kind.","properties":{"id":{"type":"integer","description":"ID of the asset."},"type":{"type":"string","description":"What kind of asset it is.","enum":["employee","vehicle"]}}},"AssetGroupObject":{"type":"object","description":"One asset and the group it belongs to. Used to report assignments that were removed or that block a reassignment.","properties":{"asset":{"$ref":"#/components/schemas/AssetId"},"group_id":{"type":"integer","description":"ID of the group."}}}},"responses":{"ResponseError":{"description":"Error response object","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Always false."},"status":{"type":"object","description":"Error status. Present only when an error occurred.","properties":{"code":{"type":"integer","description":"An error code in this API, not an HTTP code."},"description":{"type":"string","description":"An error description."}}},"errors":{"type":"array","description":"Per-parameter detail, returned with validation failures such as error code 7. A parameter name here may be an internal field name rather than the documented parameter name.","items":{"type":"object","properties":{"parameter":{"type":"string","description":"Name of the parameter that failed validation."},"error":{"type":"string","description":"What was wrong with it."}}}}}}}}}}},"paths":{"/asset_group/set":{"post":{"tags":["Assets"],"summary":"Set assets in group","description":"Put assets into an existing group.\n\n**Only one asset of each type per group**, and `assets` must not be empty.\n\nWhen an asset already belongs to another group, `force_reassign` decides what happens: `false` refuses with error 290 and lists the conflicts, `true` moves the asset and reports what it removed in `reassigned_assets`.","operationId":"assetGroupSet","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","description":"ID of the group.","minimum":1},"assets":{"type":"array","description":"Assets to set in the group. Only one asset of each type is allowed, and the list must not be empty.","items":{"$ref":"#/components/schemas/AssetId"},"minItems":1},"force_reassign":{"type":"boolean","description":"Optional. Default `false`. When `true`, assets already in another group are moved, and their previous assignments removed."}},"required":["id","assets"]}}}},"responses":{"200":{"description":"Assets set","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"`true` if request finished successfully.","readOnly":true},"reassigned_assets":{"type":"array","description":"Optional. Assignments removed while reassigning.","items":{"$ref":"#/components/schemas/AssetGroupObject"}}}}}}},"400":{"description":"Bad request. The response body carries the API-level error code in `status.code`. Validation failures also include an `errors` array naming each offending parameter.","$ref":"#/components/responses/ResponseError"},"403":{"description":"Error 291: the request contains assets not accessible to the user.","$ref":"#/components/responses/ResponseError"},"409":{"description":"Error 290: an asset is already in a group and `force_reassign` is `false`. **The response body carries `assigned_assets`**, naming the existing assignments.","$ref":"#/components/responses/ResponseError"},"default":{"$ref":"#/components/responses/ResponseError"}}}}}}
```

#### Errors

These errors come in addition to the [general error codes](/docs/navixy-api/general/errors.md#error-codes):

* 201 - Not found in the database, when no such group exists.
* 290 - Asset already assigned to a group, when `force_reassign` is `false` and an asset in the request already belongs to one. The response carries `assigned_assets`, a list of the [asset group objects](#asset-group-object-entry) already assigned.
* 291 - All assets in the request must be accessible, when the request names an asset the user cannot reach.

***

## Remove assets from group

> Take assets out of a group.\
> \
> \*\*Every asset named must already be in the group\*\*, or the call fails with error 286 and removes nothing. \`assets\` must not be empty.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"tags":[{"name":"Assets","description":"Tracks belonging to an asset rather than to a tracker, and the groups assets are organised into. All resources under the /asset/track/ and /asset_group/ paths."}],"servers":[{"url":"https://api.eu.navixy.com/v2","description":"Navixy production server on European platform"},{"url":"https://api.us.navixy.com/v2","description":"Navixy production server on American platform"},{"url":"https://api.me.navixy.com/v2","description":"Navixy production server on Middle East platform"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","description":"Either a user session hash or an API key, with the \"NVX \" prefix, for example \"NVX 22eac1c27af4be7b9d04da2ce1af111b\". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.","name":"Authorization","in":"header"}},"schemas":{"AssetId":{"type":"object","description":"A reference to an asset, by ID and kind.","properties":{"id":{"type":"integer","description":"ID of the asset."},"type":{"type":"string","description":"What kind of asset it is.","enum":["employee","vehicle"]}}}},"responses":{"OK":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"`true` if request finished successfully.","readOnly":true}}}}}},"ResponseError":{"description":"Error response object","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Always false."},"status":{"type":"object","description":"Error status. Present only when an error occurred.","properties":{"code":{"type":"integer","description":"An error code in this API, not an HTTP code."},"description":{"type":"string","description":"An error description."}}},"errors":{"type":"array","description":"Per-parameter detail, returned with validation failures such as error code 7. A parameter name here may be an internal field name rather than the documented parameter name.","items":{"type":"object","properties":{"parameter":{"type":"string","description":"Name of the parameter that failed validation."},"error":{"type":"string","description":"What was wrong with it."}}}}}}}}}}},"paths":{"/asset_group/remove":{"post":{"tags":["Assets"],"summary":"Remove assets from group","description":"Take assets out of a group.\n\n**Every asset named must already be in the group**, or the call fails with error 286 and removes nothing. `assets` must not be empty.","operationId":"assetGroupRemove","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","description":"ID of the group.","minimum":1},"assets":{"type":"array","description":"Assets to remove. Only one asset of each type is allowed, and the list must not be empty.","items":{"$ref":"#/components/schemas/AssetId"},"minItems":1}},"required":["id","assets"]}}}},"responses":{"200":{"description":"Assets removed","$ref":"#/components/responses/OK"},"400":{"description":"Bad request. The response body carries the API-level error code in `status.code`. Validation failures also include an `errors` array naming each offending parameter.","$ref":"#/components/responses/ResponseError"},"403":{"description":"Error 286: not every named asset is in the group. Error 287: the group contains no assets accessible to the user.","$ref":"#/components/responses/ResponseError"},"default":{"$ref":"#/components/responses/ResponseError"}}}}}}
```

#### Errors

These errors come in addition to the [general error codes](/docs/navixy-api/general/errors.md#error-codes):

* 201 - Not found in the database, when no such group exists.
* 286 - All assets must be present in the group, when the request names an asset the group does not hold.
* 287 - At least 1 asset in the group must be accessible, when the group holds no asset the user can reach.

***

## Rename asset group

> Change the name of an asset group. This is the only field it changes: use \`asset\_group/set\` and \`asset\_group/remove\` to alter membership.\
> \
> \*\*\`name\` must not be empty\*\*.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"tags":[{"name":"Assets","description":"Tracks belonging to an asset rather than to a tracker, and the groups assets are organised into. All resources under the /asset/track/ and /asset_group/ paths."}],"servers":[{"url":"https://api.eu.navixy.com/v2","description":"Navixy production server on European platform"},{"url":"https://api.us.navixy.com/v2","description":"Navixy production server on American platform"},{"url":"https://api.me.navixy.com/v2","description":"Navixy production server on Middle East platform"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","description":"Either a user session hash or an API key, with the \"NVX \" prefix, for example \"NVX 22eac1c27af4be7b9d04da2ce1af111b\". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.","name":"Authorization","in":"header"}},"responses":{"OK":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"`true` if request finished successfully.","readOnly":true}}}}}},"ResponseError":{"description":"Error response object","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Always false."},"status":{"type":"object","description":"Error status. Present only when an error occurred.","properties":{"code":{"type":"integer","description":"An error code in this API, not an HTTP code."},"description":{"type":"string","description":"An error description."}}},"errors":{"type":"array","description":"Per-parameter detail, returned with validation failures such as error code 7. A parameter name here may be an internal field name rather than the documented parameter name.","items":{"type":"object","properties":{"parameter":{"type":"string","description":"Name of the parameter that failed validation."},"error":{"type":"string","description":"What was wrong with it."}}}}}}}}}}},"paths":{"/asset_group/update":{"post":{"tags":["Assets"],"summary":"Rename asset group","description":"Change the name of an asset group. This is the only field it changes: use `asset_group/set` and `asset_group/remove` to alter membership.\n\n**`name` must not be empty**.","operationId":"assetGroupUpdate","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","description":"ID of the group.","minimum":1},"name":{"type":"string","description":"New name for the group. Must not be empty.","minLength":1}},"required":["id","name"]}}}},"responses":{"200":{"description":"Group renamed","$ref":"#/components/responses/OK"},"400":{"description":"Bad request. The response body carries the API-level error code in `status.code`. Validation failures also include an `errors` array naming each offending parameter.","$ref":"#/components/responses/ResponseError"},"403":{"description":"Error 287: at least one asset in the group must be accessible to the user.","$ref":"#/components/responses/ResponseError"},"default":{"$ref":"#/components/responses/ResponseError"}}}}}}
```

#### Errors

These errors come in addition to the [general error codes](/docs/navixy-api/general/errors.md#error-codes):

* 201 - Not found in the database, when no such group exists.
* 287 - At least 1 asset in the group must be accessible, when the group holds no asset the user can reach.

***

The group is marked as deleted and its history stays intact.

## Delete asset group

> Delete an asset group.\
> \
> \*\*The group is marked deleted rather than erased\*\*, so its history stays intact.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"tags":[{"name":"Assets","description":"Tracks belonging to an asset rather than to a tracker, and the groups assets are organised into. All resources under the /asset/track/ and /asset_group/ paths."}],"servers":[{"url":"https://api.eu.navixy.com/v2","description":"Navixy production server on European platform"},{"url":"https://api.us.navixy.com/v2","description":"Navixy production server on American platform"},{"url":"https://api.me.navixy.com/v2","description":"Navixy production server on Middle East platform"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","description":"Either a user session hash or an API key, with the \"NVX \" prefix, for example \"NVX 22eac1c27af4be7b9d04da2ce1af111b\". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.","name":"Authorization","in":"header"}},"responses":{"OK":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"`true` if request finished successfully.","readOnly":true}}}}}},"ResponseError":{"description":"Error response object","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Always false."},"status":{"type":"object","description":"Error status. Present only when an error occurred.","properties":{"code":{"type":"integer","description":"An error code in this API, not an HTTP code."},"description":{"type":"string","description":"An error description."}}},"errors":{"type":"array","description":"Per-parameter detail, returned with validation failures such as error code 7. A parameter name here may be an internal field name rather than the documented parameter name.","items":{"type":"object","properties":{"parameter":{"type":"string","description":"Name of the parameter that failed validation."},"error":{"type":"string","description":"What was wrong with it."}}}}}}}}}}},"paths":{"/asset_group/delete":{"post":{"tags":["Assets"],"summary":"Delete asset group","description":"Delete an asset group.\n\n**The group is marked deleted rather than erased**, so its history stays intact.","operationId":"assetGroupDelete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","description":"ID of the group.","minimum":1}},"required":["id"]}}}},"responses":{"200":{"description":"Group deleted","$ref":"#/components/responses/OK"},"400":{"description":"Bad request. The response body carries the API-level error code in `status.code`. Validation failures also include an `errors` array naming each offending parameter.","$ref":"#/components/responses/ResponseError"},"403":{"description":"Error 289: the group contains assets not accessible to the user.","$ref":"#/components/responses/ResponseError"},"default":{"$ref":"#/components/responses/ResponseError"}}}}}}
```

#### Errors

These errors come in addition to the [general error codes](/docs/navixy-api/general/errors.md#error-codes):

* 201 - Not found in the database, when no such group exists.
* 289 - All assets in the group must be accessible, when the group holds an asset the user cannot reach.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://navixy.com/docs/navixy-api/user-api/resources/tracking/asset/asset-groups.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
