{{sidenavigation.sidenavigationExpandLabel}}
{{getMsg('Help_YouAreHere')}}: {{page.title}} {{page.title}}
{{$root.getMsg("downLoadHelpAsPdf")}} {{helpModel.downloadHelpPdfDataStatus}}

Types

The Types handler can be used to load the configuration of asset types on the server. The response can be used for, e.g. custom selection implementation when creating or updating assets.

GET /api/inventory/types

Returns a list of asset types from the configuration, including the keys of the fields available for this type.

RESPONSE Fields Value Type Description
id Number The ID of the asset type required, e.g. for updating
name String The display name of the asset type
fields List<String> A list of strings, denoting the key of a field that is available for this type.

Example Request

# Request
GET /api/inventory/0000000014dda45eb9fe2ecb0 HTTP/1.1
Authorization: Bearer VGhpcyBpcyBqdXN0IGEgZGVtbyBhY2Nlc3MgdG9rZW4u
 
# Response
HTTP/1.1 200 OK
Content-Type: application/json
 
[
  {
    "id": 11,
    "name": "Computer",
    "fields": [
      "name",
      "parent",
      "owner",
      "type",
      ...
    ]
  },
  ...
}

Application Example

# Browser access
http://127.0.0.1:9000/api/inventory/types
 
# Shell access using curl
curl -LsH "Authorization: Bearer <access_token>" "http://127.0.0.1:9000/api/inventory/types"
 
# Shell access using curl using username and password
curl -Lsu username:password "http://127.0.0.1:9000/api/inventory/types"
i-net HelpDesk
This application uses cookies to allow login. By continuing to use this application, you agree to the use of cookies.


Help - /types