The OT-Base Asset Center API allows you to easily access and retrieve information about all of your hardware products. You can browse through your full catalog or narrow down your search by vendor, model, version, and even hardware type and product lifecycle stage. All of this is made possible through the use of the GET method and the Portable Inventory Data format. With this resource, you'll have all the information you need to make informed decisions about your hardware choices
Retrieving the full hardware catalog
GET ot-base/api/v1/hardware
Retrieves all hardware products in the hardware product catalog.
Retrieving hardware products of a particular vendor
GET ot-base/api/v1/hardware/?vendor=vendorName
Retrieves all hardware products of a particular vendor. The vendor name might need to be quoted if it contains special characters.
A wildcard search is supported by using the special character % in the vendor name.
For example, the following search
GET ot-base/api/v1/hardware/?vendor=Rockwell%
will return results where the vendor name starts with "Rockwell". Therefore, both products with the vendor name "Rockwell Automation" and "Rockwell Automation/Allen-Bradley" will be returned in the result set.
Retrieving particular hardware models
GET ot-base/api/v1/hardware/?vendor=vendorName&model=modelName
Retrieves all versions of a hardware product of a particular vendor. The vendor and model names might need to be quoted if they contain special characters.
The model filter can only be used for queries that also specify a vendor filter.
Retrieving particular hardware model versions
GET ot-base/api/v1/hardware/?vendor=vendorName&model=modelName&version=versionNameOrNumber}
Retrieves product data for a particular hardware product version. The vendor name, model name, and version name or number might need to be quoted if they contain special characters.
The version filter can only be used for queries that also specify a vendor and model filter.
Retrieving specific types of hardware products
Filtering by hardware type can be done by using the "type" filter. For example, the following query will output only devices of the PLC type:
GET ot-base/api/v1/hardware/?type=plc
Type filters can be combined in order to search for multiple types in one query. As an example, the following query retrieves both server and desktop hardware products:
GET ot-base/api/v1/hardware/?type=desktop,server
Retrieving hardware products at a particular location
You can limit the result set to products installed at a particular location by providing the location ID of that location using the parameter locationid. Example:
GET ot-base/api/v1/hardware/?locationid=usa
Retrieving hardware products in a particular product lifecycle stage
Filtering by lifecycle stage is accomplished by using the "lifecycle" filter. It can take the values active, phaseout, end of life, and discontinued.
In the following example, we search for all Cisco products that either have reached the end of their product life (no new versions coming), or are discontinued (no spares available):
GET ot-base/api/v1/hardware/?vendor=cisco&lifecycle=end%20of%20life&lifecycle=discontinued
Comments
0 comments
Please sign in to leave a comment.