Asset groups

All asset types are associated with an asset group. An asset group connects asset types that have similar characteristics. Use the API to retrieve a list of all asset groups, add or update, or delete an asset group.

Learn more about asset groups in the OnLocation Help Center.

List asset groups

Returns a list of asset groups.

Request
query Parameters
q
string <string>

Filter by any asset group value.

Example: q=name:desks,class:fixed,description:anydescriptions
limit
integer <int32>

Limits the amount of records to return (maxiumum 5000).

Example: limit=10
Responses
200

List of asset groups

403

Access denied to this resource

404

Resource not found

get/assetgroup
Request samples
curl -i -X GET \
  'https://api.whosonlocation.com/v1/assetgroup?q=string&limit=0'
Response samples
[
  • {
    }
]

Create an asset group

Creates a new asset group that can be assigned to an asset.

Request
Request Body schema: application/json

Information to use when creating a new asset group record.

name
string <string>

Name of asset group

class
string
Enum: "transfer" "fixed"
description
string <string>

Description of asset group

Responses
201

Asset Group created

403

Access denied to this resource

500

Internal server error

post/assetgroup
Request samples
application/json
{
  • "name": "Laptops Group",
  • "class": "fixed",
  • "description": "This group includes the assets that belong to this location"
}
Response samples
application/json
{
  • "id": 90008,
  • "name": "Laptops Group",
  • "class": "fixed",
  • "description": "This group includes the assets that belong to this location"
}

Retrieve an asset group

Retrieves a single asset group, filtering with the provided ID.

Request
path Parameters
id
required
integer <int32>

ID of the asset group to retrieve

Responses
200
403

Access denied to resource

404

Resource not found

500

Internal server error

get/assetgroup/{id}
Request samples
curl -i -X GET \
  https://api.whosonlocation.com/v1/assetgroup/:id
Response samples
{
  • "id": 90008,
  • "name": "Laptops Group",
  • "class": "fixed",
  • "description": "This group includes the assets that belong to this location"
}

Update an asset group

Updates the details of an asset group.

Request
path Parameters
id
required
integer <int32>

ID of the asset group to update

Request Body schema: application/json

Information used to update the asset group record

name
string <string>

Name of asset group

class
string
Enum: "transfer" "fixed"
description
string <string>

Description of asset group

Responses
200

Updated resource

403

Access denied to this resource

500

Internal server error

put/assetgroup/{id}
Request samples
application/json
{
  • "name": "Laptops Group",
  • "class": "fixed",
  • "description": "This group includes the assets that belong to this location"
}
Response samples
{
  • "id": 90008,
  • "name": "Laptops Group",
  • "class": "fixed",
  • "description": "This group includes the assets that belong to this location"
}

Delete an asset group

Deletes an asset group using the provided ID.

Request
path Parameters
id
required
integer <int32>

ID of the asset group to delete

Responses
204

Asset Group deleted

403

Access denied to resource

404

Resource not found

500

Internal server error

delete/assetgroup/{id}
Request samples
curl -i -X DELETE \
  https://api.whosonlocation.com/v1/assetgroup/:id