For the complete documentation index, see llms.txt. This page is also available as Markdown.

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

Asset group object entry

Asset entry

API actions

API base path: /asset_group.

Operations that list no errors of their own return only the general error codes.


Create asset group

post
/asset_group/create

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.

Authorizations
AuthorizationstringRequired

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.

Body
namestringOptional

Optional. Name of the group. Defaults to the new entry's own ID.

force_reassignbooleanOptional

Optional. Default false. When true, assets already in another group are moved, and their previous assignments removed.

Responses
200

The created group

application/json
successbooleanRead-onlyOptional

true if request finished successfully.

Example: true
idintegerOptional

ID of the group.

post/asset_group/create
POST /v2/asset_group/create HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 75

{
  "name": "text",
  "assets": [
    {
      "id": 1,
      "type": "employee"
    }
  ],
  "force_reassign": true
}
{
  "success": true,
  "id": 1,
  "reassigned_assets": [
    {
      "asset": {
        "id": 1,
        "type": "employee"
      },
      "group_id": 1
    }
  ]
}

Errors

These errors come in addition to the general 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 already assigned.

  • 291 - All assets in the request must be accessible, when the request names an asset the user cannot reach.


List asset groups

post
/asset_group/list

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.

Authorizations
AuthorizationstringRequired

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.

Body
group_idsinteger[]Optional

Groups to return. Use this or asset, not both.

Responses
200

Matching asset groups

application/json
successbooleanRead-onlyOptional

true if request finished successfully.

Example: true
post/asset_group/list
POST /v2/asset_group/list HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 52

{
  "group_ids": [
    1
  ],
  "asset": {
    "id": 1,
    "type": "employee"
  }
}
{
  "success": true,
  "list": [
    {
      "id": 1,
      "name": "text",
      "assets": [
        {
          "id": 1,
          "type": "employee"
        }
      ]
    }
  ]
}

Set assets in group

post
/asset_group/set

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.

Authorizations
AuthorizationstringRequired

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.

Body
idinteger · min: 1Required

ID of the group.

force_reassignbooleanOptional

Optional. Default false. When true, assets already in another group are moved, and their previous assignments removed.

Responses
200

Assets set

application/json
successbooleanRead-onlyOptional

true if request finished successfully.

Example: true
post/asset_group/set
POST /v2/asset_group/set HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 68

{
  "id": 1,
  "assets": [
    {
      "id": 1,
      "type": "employee"
    }
  ],
  "force_reassign": true
}
{
  "success": true,
  "reassigned_assets": [
    {
      "asset": {
        "id": 1,
        "type": "employee"
      },
      "group_id": 1
    }
  ]
}

Errors

These errors come in addition to the general 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 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

post
/asset_group/remove

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.

Authorizations
AuthorizationstringRequired

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.

Body
idinteger · min: 1Required

ID of the group.

Responses
200

Assets removed

application/json
successbooleanRead-onlyOptional

true if request finished successfully.

Example: true
post/asset_group/remove
POST /v2/asset_group/remove HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 46

{
  "id": 1,
  "assets": [
    {
      "id": 1,
      "type": "employee"
    }
  ]
}
{
  "success": true
}

Errors

These errors come in addition to the general 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

post
/asset_group/update

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.

Authorizations
AuthorizationstringRequired

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.

Body
idinteger · min: 1Required

ID of the group.

namestring · min: 1Required

New name for the group. Must not be empty.

Responses
200

Group renamed

application/json
successbooleanRead-onlyOptional

true if request finished successfully.

Example: true
post/asset_group/update
POST /v2/asset_group/update HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 22

{
  "id": 1,
  "name": "text"
}
{
  "success": true
}

Errors

These errors come in addition to the general 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

post
/asset_group/delete

Delete an asset group.

The group is marked deleted rather than erased, so its history stays intact.

Authorizations
AuthorizationstringRequired

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.

Body
idinteger · min: 1Required

ID of the group.

Responses
200

Group deleted

application/json
successbooleanRead-onlyOptional

true if request finished successfully.

Example: true
post/asset_group/delete
POST /v2/asset_group/delete HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 8

{
  "id": 1
}
{
  "success": true
}

Errors

These errors come in addition to the general 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.

Last updated

Was this helpful?