Search Knowledge Base by Keyword

Assets

< Back

Endpoints for getting, creating and modifying Assets. Endpoints include:

assets/{atype_label} Get all assets for a specific asset type.
assets/{atype_label} Create a new asset of a specific asset type.
assets/{atype_label}/{asset_id} Get a specific asset.
assets/{atype_label}/{atype_id} Update a specific asset.
assets/{atype_label}/{atype_id} Delete a specific asset.
assets/{atype_label}/search/
{field}/{needle}
Search assets of type atype_label by the given field using the needle.
assets/{atype_label}/search_exact/
{field}/{needle}
Search assets of type atype_label by the given field using the exact needle.
assets/{atype_label}/{asset_id}/links Get all linked assets for a specific asset.
assets/{atype_label}/{asset_id}/links Link assets to a specific target asset.
assets/{atype_label}/{asset_id}/links/
{del_atype_label}/{del_asset_id}
Delete (unlink) a single asset from a target asset.
assets/{atype_label}/{asset_id}/links/
{del_atype_label}
Delete (unlinks) all assets of a specific asset type from a target asset.
assets/{atype_label}/{asset_id}/history Get all history items for a specific asset.
assets/{atype_label}/{asset_id}/notes Get all notes for a specific asset.
assets/{atype_label}/{asset_id}/notes Add a note to a specific asset.

assets/{atype_label} Get all assets for a specific asset type. The endpoint requires an atype_label variable.

  • atype_label = String

URL: https://webroot/api/v1/assets/{atype_label}

Example: https://webroot/api/v1/assets/operating_system

You can find the atype_label for any asset type through the assetTypes{assetTypeId} endpoint:

{
    "id": 12,
    "name": "Operating System",
    "function": "List",
    "icon_color": null,
    "parent_id": "0",
    "group_id": "5",
    "label": "operating_system"
}

Parameters

Name Description
Authorization string (header)
Default value: Bearer {token}

Responses

Code Description
200
Example Value
application/json
[
    {
        "id": 4,
        "name": "macOS 11"
    },
    {
        "id": 5,
        "name": "macOS 12"
    },
    {
        "id": 6,
        "name": "macOS 13"
    },
    {
        "id": 1,
        "name": "Windows 10"
    },
    {
        "id": 3,
        "name": "Windows 11"
    },
    {
        "id": 2,
        "name": "Windows 7"
    }
]
Model

Headers

Name Type
Date string
Server string
X-Powered-By string
Content-Length string
Keep-Alive string
Connection string

assets/{atype_label} Create a new asset of a specific asset_type. It requires an atype_label variable.

It also requires a JSON Body Payload with the new asset data. The payload must match the asset type format to successfully create the new asset.

Payload Example:

[
   {
    "name":"Red Hat Linux"
    }
]

In this example, the operating_system only requires a name. You can find the formatting for a specific asset type by using the assetTypes{assetTypeId} endpoint.

Example discovery result for assetTypes/operating_system:

{
    "id": 12,
    "name": "Operating System",
    "function": "List",
    "icon_color": null,
    "parent_id": "0",
    "group_id": "5",
    "label": "operating_system"
}

The discovery pull will provide all required fields and their data types.

URL: https://webroot/api/v1/assets/assets/assets/{atype_label}

  • atype_label = String

Example: http://webroot/api/v1/assets/computer/operating_system

You can find the atype_label for any asset type through the assetTypes{assetTypeId} endpoint:

{
    "id": 12,
    "name": "Operating System",
    "function": "List",
    "icon_color": null,
    "parent_id": "0",
    "group_id": "5",
    "label": "operating_system"
}

Parameters

Name Description
Authorization string (header)
Default value: Bearer {token}
Body (body)
* required
Example Value
application/json
PLACEHOLDER
Model
PLACEHOLDER

Responses

Code Description
201
Example Value
application/json
{
  "id": 9
}
Model

Headers

Name Type
Date string
Server string
X-Powered-By string
Location string
Content-Length string
Keep-Alive string
Connection string

assets/{atype_label}/{asset_id} Get a specific asset. The endpoint requires an atype_label and an asset_id variable.

URL: https://webroot/v1/assets/{atype_label}/{asset_id}

  • atype_label = String
  • atype_id = Integer

Example: https://webroot/api/v1/assets/operating_system/1

You can find the atype_label for any asset type through the assetTypes{assetTypeId} endpoint:

{
    "id": 12,
    "name": "Operating System",
    "function": "List",
    "icon_color": null,
    "parent_id": "0",
    "group_id": "5",
    "label": "operating_system"
}

Parameters

Name Description
Authorization string (header)
Default value: Bearer {token}

Responses

Code Description
200
Example Value
application/json
{
  "id": 1,
  "name": "Windows 10"
}
Model

Headers

Name Type
Date string
Server string
X-Powered-By string
Content-Length string
Keep-Alive string
Connection string

assets/{atype_label}/{atype_id} Update a specific asset. It requires an atype_label and an atype_id variable.

It also requires a JSON Body Payload with the updated asset data. The payload must match the asset type format to successfully update the asset.

Payload Example:

[
   {
    "name":"Red Hat Linux Updated"
    }
]

In this example, the operating_system only requires a name. You can find the formatting for a specific asset type by using the assetTypes{assetTypeId} endpoint.

Example discovery result for assetTypes/operating_system:

{
    "id": 12,
    "name": "Operating System",
    "function": "List",
    "icon_color": null,
    "parent_id": "0",
    "group_id": "5",
    "label": "operating_system"
}

The discovery pull will provide all required fields and their data types.

URL: https://webroot/api/v1/assets/assets/assets/{atype_label}/{atype_id}

  • atype_label = String

Example: http://webroot/api/v1/assets/computer/operating_system/9

You can find the atype_label for any asset type through the assetTypes{assetTypeId} endpoint:

{
    "id": 12,
    "name": "Operating System",
    "function": "List",
    "icon_color": null,
    "parent_id": "0",
    "group_id": "5",
    "label": "operating_system"
}

Parameters

Name Description
Authorization string (header)
Default value: Bearer {token}
Body (body)
* required
Example Value
application/json
PLACEHOLDER
Model
PLACEHOLDER

Responses

Code Description
201
Example Value
application/json
{
  "id": 9
}
Model

Headers

Name Type
Date string
Server string
X-Powered-By string
Location string
Content-Length string
Keep-Alive string
Keep-Alive string

assets/{atype_label}/{atype_id} Delete a specific asset. It requires an atype_label and an atype_id variable.

URL: https://webroot/api/v1/assets/{atype_label}/{atype_id}

  • atype_label = String

Example: https://webroot/api/v1/assets/computer/operating_system/9

You can find the atype_label for any asset type through the assetTypes{assetTypeId} endpoint:

{
    "id": 12,
    "name": "Operating System",
    "function": "List",
    "icon_color": null,
    "parent_id": "0",
    "group_id": "5",
    "label": "operating_system"
}

Parameters

Name Description
Authorization string (header)
Default value: Bearer {token}

Responses

Code Description
200
Example Value
application/json
{
  "type": "success",
  "message": "Asset [Asset Name] deleted successfully."
}
Model
PLACEHOLDER

Headers

Name Type
Date string
Server string
X-Powered-By string
Content-Length string
Keep-Alive string
Connection string

assets/{atype_label}/search/{field}/{needle} Search assets of type atype_label by the given field using the needle. The endpoint requires an atype_label variable.

URL: https://webroot/api/v1/assets/{atype_label}/search/{field}/{needle}

  • atype_label = String
  • field = String
  • needle = String

Example: http://webroot/api/v1/assets/computer/search/name/jupiter

You can find the atype_label for any asset type through the assetTypes{assetTypeId} endpoint:

{
    "id": 12,
    "name": "Operating System",
    "function": "List",
    "icon_color": null,
    "parent_id": "0",
    "group_id": "5",
    "label": "operating_system"
}

Parameters

Name Description
Authorization string (header)
Default value: Bearer {token}

Responses

Code Description
200
Example Value
application/json
[
  {
    "id": "360",
    "name": "Windows 7"
  },
  {
    "id": "375",
    "name": "Windows 10"
  }
]
Model
PLACEHOLDER

Headers

Name Type
Date string
Server string
X-Powered-By string
Content-Length string
Keep-Alive string
Connection string

assets/{atype_label}/search_exact/{field}/{needle} Search assets of type atype_label by the given field using the needle. The endpoint requires an atype_label variable.

URL: https://webroot/api/v1/assets/{atype_label}/search_exact/{field}/{needle}

  • atype_label = String
  • field = String
  • needle = String

Example: http://webroot/api/v1/assets/computer/search_exact/name/jupiter

You can find the atype_label for any asset type through the assetTypes{assetTypeId} endpoint:

{
    "id": 12,
    "name": "Operating System",
    "function": "List",
    "icon_color": null,
    "parent_id": "0",
    "group_id": "5",
    "label": "operating_system"
}

Parameters

Name Description
Authorization string (header)
Default value: Bearer {token}

Responses

Code Description
200
Example Value
application/json
[
  {
    "id": "360",
    "name": "Windows 7"
  },
  {
    "id": "375",
    "name": "Windows 10"
  }
]
Model
PLACEHOLDER

Headers

Name Type
Date string
Server string
X-Powered-By string
Content-Length string
Keep-Alive string
Connection string

assets/{atype_label}/{asset_id}/links Get all linked assets for a specific asset. The endpoint requires an atype_label and an asset_id variable.

URL: https://webroot/api/v1/assets/{atype_label}/{asset_id}/links

  • atype_label = String
  • atype_id = Integer

Example: https://webroot/api/v1/assets/computer/12/links

You can find the atype_label for any asset type through the assetTypes{assetTypeId} endpoint:

{
    "id": 12,
    "name": "Operating System",
    "function": "List",
    "icon_color": null,
    "parent_id": "0",
    "group_id": "5",
    "label": "operating_system"
}

Parameters

Name Description
Authorization string (header)
Default value: Bearer {token}

Responses

Code Description
200
Example Value
application/json
[
  {
    "label": "user",
    "id": "360",
    "name": "Dangelo Fowler"
  }
]
Model
PLACEHOLDER

Headers

Name Type
Date string
Server string
X-Powered-By string
Content-Length string
Keep-Alive string
Connection string

assets/{atype_label}/{asset_id}/links Link assets to a specific target asset. The endpoint requires an atype_label and an asset_id variable.

It also requires a JSON Body Payload containing the atype_label and the asset_id of the asset you want to link to the target.

Payload Example:

[
    {
        "label":"operating_system",
        "id": 6
    }
]

You can also chain assets to link multiple assets to the target in a single call.

Payload Chained Example:

[
    {
        "label":"operating_system",
        "id": 6
    },
    {
        "label":"operating_system",
        "id": 2
    },
    {
        "label":"user",
        "id": 222
    }
]

URL: https://webroot/api/v1/assets/assets/{atype_label}/{asset_id}/links

  • atype_label = String
  • atype_id = Integer

Example: https://webroot/api/v1/assets/computer/12/links

You can find the atype_label for any asset type through the assetTypes{assetTypeId} endpoint:

{
    "id": 12,
    "name": "Operating System",
    "function": "List",
    "icon_color": null,
    "parent_id": "0",
    "group_id": "5",
    "label": "operating_system"
}

Parameters

Name Description
Authorization string (header)
Default value: Bearer {token}
Body (body)
* required
Example Value
application/json
[
  {
    "label": "operating_system",
    "id": 6
  }
]
Model
PLACEHOLDER

Responses

Code Description
200

assets/{atype_label}/{asset_id}/links/{del_atype_label}/{del_asset_id} Delete (unlink) a single asset from a target asset. The endpoint requires an atype_label and an asset_id variable for the target asset and a del_atype_label and a del_asset_id for the asset you want to unlink.

URL: https://webroot/api/v1/assets/{atype_label}/{asset_id}/links/{del_atype_label}/{del_asset_id}

  • atype_label = String
  • atype_id = Integer
  • del_atype_label = String
  • del_asset_id = Integer

Example: https://webroot/api/v1/assets/computer/12/links/user/360

You can find the atype_label for any asset type through the assetTypes{assetTypeId} endpoint:

{
    "id": 12,
    "name": "Operating System",
    "function": "List",
    "icon_color": null,
    "parent_id": "0",
    "group_id": "5",
    "label": "operating_system"
}

Parameters

Name Description
Authorization string (header)
Default value: Bearer {token}

Responses

Code Description
200
Example Value
application/json
{
  "message": " Asset [Dangelo Fowler] unlinked from [AR001-L-DFOWL] successfully."
}
Model
PLACEHOLDER

Headers

Name Type
Date string
Server string
X-Powered-By string
Content-Length string
Keep-Alive string
Connection string

assets/{atype_label}/{asset_id}/links/{del_atype_label} Delete (unlink) all assets of a specific asset type from a target asset. The endpoint requires an atype_label and an asset_id variable for the target asset and a del_atype_label for the assets you want to unlink

URL: https://webroot/api/v1/assets/{atype_label}/{asset_id}/links/{del_atype_label}

  • atype_label = String
  • atype_id = Integer
  • del_atype_label = String

Example: https:/swebroot/api/v1/assets/location/12/links/server/

The above example would delete all servers from a specific location.

You can find the atype_label for any asset type through the assetTypes{assetTypeId} endpoint:

{
    "id": 12,
    "name": "Operating System",
    "function": "List",
    "icon_color": null,
    "parent_id": "0",
    "group_id": "5",
    "label": "operating_system"
}

Parameters

Name Description
Authorization string (header)
Default value: Bearer {token}

Responses

Code Description
200

assets/{atype_label}/{asset_id}/history Get all history items for a specific asset. The endpoint requires an atype_label and an asset_id variable.

URL: https://webroot/api/v1/assets/{atype_label}/{asset_id}/history

  • atype_label = String
  • atype_id = Integer

Example: https://webroot/api/v1/assets/computer/12/history

You can find the atype_label for any asset type through the assetTypes{assetTypeId} endpoint:

{
    "id": 12,
    "name": "Operating System",
    "function": "List",
    "icon_color": null,
    "parent_id": "0",
    "group_id": "5",
    "label": "operating_system"
}

Parameters

Name Description
Authorization string (header)
Default value: Bearer {token}

Responses

Code Description
200
Example Value
application/json
[
  {
    "action": "LINK",
    "timestamp": "2020-01-27 14:47:43",
    "user_name": "System User",
    "ip_address": "127.0.0.1",
    "title": "Linked [Server] named [Dell : Server : Optiplex 750 ( SN122456789 ) : hostname] to [Ticket] named [Install Ticket]",
    "details": null,
    "item_name": "Dell : Server : Optiplex 750 ( SN122456789 ) : hostname",
    "item_label": "server",
    "item_id": "189",
    "link_label": "ticket",
    "link_id": "238"
  }
]
Model
PLACEHOLDER

Headers

Name Type
Date string
Server string
X-Powered-By string
Content-Length string
Keep-Alive string
Connection string

assets/{atype_label}/{asset_id}/notes Get all notes for a specic asset. The endpoint requires an atype_label and an asset_id variable.

URL: https://webroot/api/v1/assets/{atype_label}/{asset_id}/notes

  • atype_label = String
  • atype_id = Integer

Example: https://webroot/api/v1/assets/computer/12/notes

You can find the atype_label for any asset type through the assetTypes{assetTypeId} endpoint:

{
    "id": 12,
    "name": "Operating System",
    "function": "List",
    "icon_color": null,
    "parent_id": "0",
    "group_id": "5",
    "label": "operating_system"
}

Parameters

Name Description
Authorization string (header)
Default value: Bearer {token}

Responses

Code Description
200
Example Value
application/json
[
  {
    "date_created": "2020-01-27 14:47:43",
    "author": "Jim Smith",
    "note": "System is going to be deprecated."
  },
  {
    "date_created": "2020-01-30 10:17:43",
    "author": "Jim Smith",
    "note": "System is deprecated."
  }
]
Model
PLACEHOLDER

Headers

Name Type
Date string
Server string
X-Powered-By string
Content-Length string
Keep-Alive string
Connection string

assets/{atype_label}/{asset_id}/notes Add a note to an asset. The endpoint requires an atype_label and an asset_id variable.

It also requires a JSON Body Payload containing an array of notes to be added to the asset.

Payload Example:

[
    {
        "note":"This is a note."
    },
    {
        "note":"This is also a note."
    }
]

URL: https://webroot/api/v1/assets/assets/{atype_label}/{asset_id}/notes

  • atype_label = String
  • atype_id = Integer

Example: https://webroot/api/v1/assets/computer/12/notes

You can find the atype_label for any asset type through the assetTypes{assetTypeId} endpoint:

{
    "id": 12,
    "name": "Operating System",
    "function": "List",
    "icon_color": null,
    "parent_id": "0",
    "group_id": "5",
    "label": "operating_system"
}

Parameters

Name Description
Authorization string (header)
Default value: Bearer {token}
Body (body)
* required
Example Value
application/json
[
  {
    "note": "This is a note."
  }
]
Model
PLACEHOLDER

Responses

Code Description
200
Tags: