POST api/Asset
Posts an asset
Request Information
URI Parameters
None.
Body Parameters
AssetName | Description | Type | Additional information |
---|---|---|---|
id |
Index of the asset. |
string |
None. |
name |
Name of the asset. |
string |
None. |
type |
Type of asset. |
string |
None. |
routeID |
ID of the route that the asset is assigned. |
string |
None. |
group |
Group that the asset belongs to. |
string |
None. |
zones |
Zone that the asset is within. |
Collection of string |
None. |
location |
Location of the asset. |
Location |
None. |
alert |
Whether the asset threw an alert or not. |
boolean |
None. |
Request Formats
application/json, text/json
Sample:
{ "id": "sample string 1", "name": "sample string 2", "type": "sample string 3", "routeID": "sample string 4", "group": "sample string 5", "zones": [ "sample string 1", "sample string 2" ], "location": { "currentLat": 1.1, "currentLon": 1.1, "lastLat": 1.1, "lastLon": 1.1, "finalLat": 1.1, "finalLon": 1.1, "time": "2025-01-18T04:54:14.2644806+00:00", "altitude": 1.1 }, "alert": true }
application/xml, text/xml
Sample:
<Asset xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AAVRADServer.Models"> <ID>sample string 1</ID> <alert>true</alert> <group>sample string 5</group> <location> <altitude>1.1</altitude> <currentLat>1.1</currentLat> <currentLon>1.1</currentLon> <finalLat>1.1</finalLat> <finalLon>1.1</finalLon> <lastLat>1.1</lastLat> <lastLon>1.1</lastLon> <time>2025-01-18T04:54:14.2644806+00:00</time> </location> <name>sample string 2</name> <routeID>sample string 4</routeID> <type>sample string 3</type> <zones xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d2p1:string>sample string 1</d2p1:string> <d2p1:string>sample string 2</d2p1:string> </zones> </Asset>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
Http Status Codes
ActionResultNone.
Response Formats
application/json, text/json, application/xml, text/xml
Sample:
Sample not available.