Name | Type | Read-only | Mandatory | Comment |
|---|---|---|---|---|
| id | integer | yes | no | Automatically assigned when creating Assets |
| assetNumber | string | no | yes | User supplied value uniquely identifying Asset |
| name | string | no | yes | |
| description | string | |||
| accountingInfo | AccountingInfo | no | yes | |
| notes | string | |||
| acquisitionDate | date | |||
| assetLocation | string | |||
| active | boolean | |||
| manufacturer | string | |||
| modelNumber | string | |||
| serialNumber | string | |||
| statusId | integer | yes | AssetStatus.id | |
| customFieldValues | array | array of AssetCustomFieldValue | ||
| owner | string | |||
| locationId | integer | Location.id | ||
| groupId | integer | Group.id | ||
| categoryId | integer | Category.id | ||
| categoryOptionId | integer | CategoryOption.id | ||
| hostname | string | |||
| vncPort | integer | |||
| macAddress | string | |||
| osName | string | |||
| osVersion | string | |||
| netbiosName | string | |||
| ipAddress | string | |||
| osSerialNumber | string | |||
| networkConnectionLocation | string | |||
| networkConnectionDescription | string | |||
| vlan | string |
Uri | Method | Request Data | Success Response Code | Description |
|---|---|---|---|---|
| /api/assets | GET | 200 | Returns an Array of all Assets | |
| /api/assets/{id} | GET | 200 | Returns one Asset | |
| /api/assets | POST | Asset | 201 | Create new Asset |
| /api/assets/{id} | PUT | Asset | 204 | Update an existing Asset |
| /api/assets/{id} | DELETE | 200 | Delete an Asset | |
| /api/assets/{assetId}/custom-field-values | GET | 200 | Returns an array of all AssetCustomFieldValues for the Asset | |
| /api/assets/{assetId}/custom-field-values/{cfValueId} | GET | 200 | Returns one AssetCustomFieldValue | |
| /api/assets/{assetId}/custom-field-values | POST | AssetCustomFieldValue | 201 | Create a new AssetCustomFieldValue for an Asset |
| /api/assets/{assetId}/custom-field-values/{cfValueId} | PUT | AssetCustomFieldValue | 200 | Update an exising AssetCustomFieldValue |
| /api/assets/{assetId}/custom-field-values/{cfValueId} | DELETE | 200 | Delete an AssetCustomFieldValue |
Get a list of all Assets:
curl http://localhost:8080/ehelpdesk/api/assets -u admin:admin -H "Accept: */*" | json_reformat
Produces the result:
{
"content": [
{
"id": 2,
"assetNumber": "asdfa111",
"name": "asdfa111",
"notes": null,
"acquisitionDate": null,
"assetLocation": null,
"active": true,
"accountingInfo": {
"id": 2,
"poNumber": "po111",
"accountNumber": null,
"accumulatedNumber": null,
"expenseNumber": null,
"acquisitionValue": null,
"leaseNumber": null,
"leaseExpirationDate": null,
"leaseDuration": null,
"leaseFrequency": null,
"leaseFrequencyPrice": null,
"warrantyDate": null,
"disposalDate": null,
"disposalMethod": null,
"insuranceCategory": null,
"replacementValueCategory": null,
"replacementValue": null,
"maintenanceCost": null,
"depreciationMethod": null
},
"macAddress": null,
"osNameType": null,
"osVersion": null,
"netbios": null,
"ip": null,
"osSerial": null,
"netConnectionLoc": null,
"netConnectionDesc": null,
"vlan": null,
"manufacturer": null,
"modelNumber": null,
"serialNumber": null,
"description": null,
"hostname": null,
"vncPort": null,
"assetTypeId": 1,
"vendorId": null,
"ticketIds": [
],
"softwareLicenseIds": [
],
"statusId": 1,
"ownerId": null,
"locationId": null,
"groupId": null,
"categoryId": null,
"categoryOptionId": null
},
{
"id": 3,
"assetNumber": "asdfa1111",
"name": "asdfa111",
"notes": null,
"acquisitionDate": null,
"assetLocation": null,
"active": true,
"accountingInfo": {
"id": 3,
"poNumber": "po111",
"accountNumber": null,
"accumulatedNumber": null,
"expenseNumber": null,
"acquisitionValue": null,
"leaseNumber": null,
"leaseExpirationDate": null,
"leaseDuration": null,
"leaseFrequency": null,
"leaseFrequencyPrice": null,
"warrantyDate": null,
"disposalDate": null,
"disposalMethod": null,
"insuranceCategory": null,
"replacementValueCategory": null,
"replacementValue": null,
"maintenanceCost": null,
"depreciationMethod": null
},
"macAddress": null,
"osNameType": null,
"osVersion": null,
"netbios": null,
"ip": null,
"osSerial": null,
"netConnectionLoc": null,
"netConnectionDesc": null,
"vlan": null,
"manufacturer": null,
"modelNumber": null,
"serialNumber": null,
"description": null,
"hostname": null,
"vncPort": null,
"assetTypeId": 1,
"vendorId": null,
"ticketIds": [
],
"softwareLicenseIds": [
1,
2
],
"statusId": 1,
"ownerId": null,
"locationId": null,
"groupId": null,
"categoryId": null,
"categoryOptionId": null
}
],
"links": [
{
"rel": "self",
"href": "http://localhost:8080/ehelpdesk/api/assets"
}
]
}