meta data for this page
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
assets [2023/04/28 19:35] – johnny | assets [2023/12/16 11:14] (current) – [Read] adjust url from 127 to demo wrongecho | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Assets ====== | ||
+ | Manage your client' | ||
+ | |||
+ | {{assets.png? | ||
+ | |||
+ | The following information can be recorded for each asset: | ||
+ | |||
+ | * Name | ||
+ | * Type (Desktop/ | ||
+ | * Make/ | ||
+ | * Model | ||
+ | * Serial Number | ||
+ | * OS | ||
+ | * IP & MAC addresses | ||
+ | * Status (Prep, deployed, etc) | ||
+ | * Vendor | ||
+ | * Purchase, install, and warranty dates | ||
+ | * Notes | ||
+ | |||
+ | Assets can also be associated with other data in ITFlow, such as: | ||
+ | |||
+ | * Clients | ||
+ | * Locations | ||
+ | * Networks | ||
+ | * Logins | ||
+ | * Tickets | ||
+ | * Services | ||
+ | |||
+ | ===== Import & Export CSV ===== | ||
+ | |||
+ | * You can easily export assets for a client using the Export button. | ||
+ | |||
+ | |||
+ | * You can import a list of assets for a client using the Import button and uploading a CSV | ||
+ | * Headings: Name, Description, | ||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | |||
+ | ===== API ===== | ||
+ | ''/ | ||
+ | |||
+ | ==== Read ==== | ||
+ | Retrieve asset information - ''/ | ||
+ | |||
+ | * Default / No params - Returns all assets | ||
+ | * asset_id - Specific asset ID from the ITFlow database | ||
+ | * asset_name - Asset Name | ||
+ | * asset_type - Type of asset (e.g. Laptop, Desktop, Server, etc) | ||
+ | * asset_serial - Asset Serial Number | ||
+ | * client_id - Returns all assets for a specific client | ||
+ | |||
+ | |||
+ | Invoke-RestMethod -Uri " | ||
+ | | ||
+ | | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | [...] | ||
+ | |||
+ | ==== Create ==== | ||
+ | Create a new asset - ''/ | ||
+ | |||
+ | Specify parameters as below. The new asset ID will be returned. | ||
+ | |||
+ | |||
+ | $uri = " | ||
+ | | ||
+ | $body = @" | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | "@ | ||
+ | | ||
+ | | ||
+ | Invoke-RestMethod -Method Post -Uri $uri -Body $body | ||
+ | | ||
+ | success count data | ||
+ | ------- ----- ---- | ||
+ | True 1 | ||
+ | |||
+ | ==== Update ==== | ||
+ | Update attributes of an existing asset - ''/ | ||
+ | |||
+ | Only parameters specified are changed, remove parameters you don't want to modify. True/False is returned. | ||
+ | |||
+ | $uri = " | ||
+ | | ||
+ | $body = @" | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | "@ | ||
+ | | ||
+ | | ||
+ | Invoke-RestMethod -Method Post -Uri $uri -Body $body | ||
+ | | ||
+ | success count | ||
+ | ------- ----- | ||
+ | True 1 | ||
+ | |||
+ | |||
+ | ==== Delete ==== | ||
+ | Delete an asset - ''/ | ||
+ | |||
+ | $uri = " | ||
+ | | ||
+ | $body = @" | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | "@ | ||
+ | | ||
+ | | ||
+ | Invoke-RestMethod -Method Post -Uri $uri -Body $body | ||
+ | | ||
+ | success count | ||
+ | ------- ----- | ||
+ | True 1 | ||