I.3 Assets API - GruMP-y/FASTWS GitHub Wiki
Get Asset By Fix Asset ID
This retrieves the asset based on the provided fix asset ID.
Call Type:
GET
Sample Call:
http://[webaddress]/api/Asset/FixAssetID/{fixAssetID}
e.g. http://[webaddress]/api/Asset/FixAssetID/111234
Return:
{
"FixAssetID": 111234,
"Model": "sample string 2",
"SerialNumber": "sample string 3",
"AssetTag": "sample string 4",
"Brand": "sample string 5",
"Remarks": "sample string 6",
"AcquisitionDate": "2016-01-05T06:29:17.1632341-08:00",
"ExpiryDate": "2016-01-05T06:29:17.1632341-08:00",
"IssuerID": 1,
"LocationID": 1,
"AssetTypeID": 7,
"AssetStatusID": 8,
"AssetClassID": 9
}
Get Asset By Asset Tag
This retrieves the asset based on the provided asset tag number..
Call Type:
GET
Sample Call:
http://[webaddress]/api/Asset/FixAssetID/{assetTag}
e.g. http://[webaddress]/api/Asset/assetTag/111111222223333
Return:
{
"FixAssetID": 1,
"Model": "sample string 2",
"SerialNumber": "sample string 3",
"AssetTag": "111111222223333",
"Brand": "sample string 5",
"Remarks": "sample string 6",
"AcquisitionDate": "2016-01-05T06:29:17.1632341-08:00",
"ExpiryDate": "2016-01-05T06:29:17.1632341-08:00",
"IssuerID": 1,
"LocationID": 1,
"AssetTypeID": 7,
"AssetStatusID": 8,
"AssetClassID": 9
}
Get Asset By Serial Number
This retrieves the asset based on the provided serial number.
Call Type:
GET
Sample Call:
http://[webaddress]/api/Asset/FixAssetID/{serialNumber}
e.g. http://[webaddress]/api/Asset/serialNumber/222333334444444
Return:
{
"FixAssetID": 1,
"Model": "sample string 2",
"SerialNumber": "222333334444444",
"AssetTag": "sample string 4",
"Brand": "sample string 5",
"Remarks": "sample string 6",
"AcquisitionDate": "2016-01-05T06:29:17.1632341-08:00",
"ExpiryDate": "2016-01-05T06:29:17.1632341-08:00",
"IssuerID": 1,
"LocationID": 1,
"AssetTypeID": 7,
"AssetStatusID": 8,
"AssetClassID": 9
}
Get Asset By Issuer ID
This retrieves the asset based on the provided issuer ID.
Call Type:
GET
Sample Call:
http://[webaddress]/api/Asset/IssuerID/{issuerID}
e.g. http://[webaddress]/api/Asset/IssuerID/12
Return:
{
"FixAssetID": 1,
"Model": "sample string 2",
"SerialNumber": "sample string 3",
"AssetTag": "sample string 4",
"Brand": "sample string 5",
"Remarks": "sample string 6",
"AcquisitionDate": "2016-01-05T06:29:17.1632341-08:00",
"ExpiryDate": "2016-01-05T06:29:17.1632341-08:00",
"IssuerID": 12,
"LocationID": 1,
"AssetTypeID": 7,
"AssetStatusID": 8,
"AssetClassID": 9
}
Add A New Asset
This call will add a new asset in the database.
Call Type:
POST
Sample Call:
http://[webaddress]/api/Asset/AddAsset
Body:
{
"Model": "sample string 1",
"SerialNumber": "sample string 2",
"AssetTag": "sample string 3",
"Brand": "sample string 4",
"Remarks": "sample string 5",
"AcquisitionDate": "2016-01-05T07:23:04.3096562-08:00",
"ExpiryDate": "2016-01-05T07:23:04.3096562-08:00",
"IssuerID": 8,
"LocationID": 9,
"AssetTypeID": 10,
"EmployeeID": 11
}
Return:
- Successful Creation
STATUS : 200 OK ; BODY : "SUCCESSFUL"
- Unsuccessful Operation
STATUS : 200 OK ; BODY : "NOT SUCCESSFUL"