Hardware product data can be retrieved using the hardware resource. It allows you to:
- retrieve all hardware product data (full hardware product catalog)
- retrieve hardware product data for all products of a particular vendor
- retrieve hardware product data for all product versions of a particular model
- retrieve hardware product data for a specific version of a hardware product
- use filters to narrow down the output in respect to hardware type and product lifecycle stage.
The GET method is used for all operations mentioned above. The resulting content conforms to the Portable Inventory Data format.
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.
Wildcard search is supported by using the special character "%" in the vendor name. For example, the follwing 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 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.