Get a list of assets
GET/Assets
Gets list of all assets to which logged-in user has access to from graph. Gets asset details of asset from graph. Authorization is checked for asset, if user has access to asset then only asset details along with the assetModel details and security group details of asset is returned else unauthorized error is thrown.
Request
Query Parameters
- Use the encodeURIComponent() method in the browser, which converts the object into a valid URL-encoded string. 2.Pass the encoded string as the query string parameter. example: encodeURIComponent('{}')
- Use the encodeURIComponent() method in the browser, which converts the object into a valid URL-encoded string. 2.Pass the encoded string as the query string parameter. example: encodeURIComponent(' { "page": 1, "perPage": 5, "serverSidePaginationEnabled": false, "totalCount": 0, }')
We can provide filter parameter like alertPriority,maintenanceStatus,lastCommunicatedFilter if nothing is provided we will fetch the assets that logged-in user has access to from graph. Note: Encoding Objects for Query String Parameters When passing an object as part of the query string parameters in a URL, you must encode the object to ensure it is correctly interpreted by the server. To encode the object:
Pagination details if have any. Note: Encoding Objects for Query String Parameters When passing an object as part of the query string parameters in a URL, you must encode the object to ensure it is correctly interpreted by the server. To encode the object:
Type of method example: GET_LIST, GET_ONE
Responses
- 200
- 400
- 401
- 502
- 504
200 response
Response Headers
Access-Control-Expose-Headers
string
manages CORS exposed headers
Access-Control-Allow-Origin
string
manages CORS
Content-Range
string
data range of result
X-Total-Count
string
length of output
Access-Control-Allow-Headers
string
manages header for CORS
Content-Type
string
data type of content
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
assetList
object[]
subscribers
object
location
object
{
"assetList": [
{
"template": "string",
"updateDate": "string",
"modelTranslateUrl": "string",
"description": "string",
"telematicsSerialNumber": 0,
"type": "string",
"distributorName": "string",
"model": "string",
"id": "string",
"make": "string",
"forgeid": "string",
"createDate": "string",
"owner": "string",
"address": "string",
"serialNumber": "string",
"customerIndustry": "string",
"lastCommunicated": 0,
"dealerId": "string",
"subscribers": {
"email": "string"
},
"label": "string",
"tags": "string",
"urn": "string",
"availableStatus": "string",
"assetImage": "string",
"customProperties": "string",
"name": "string",
"productVideo": "string",
"location": {
"lat": 0,
"long": 0
},
"translateType": "string",
"activationDate": "string",
"status": "string"
}
]
}
400 response
- application/json
- Schema
- Example (from schema)
Schema
{
"message": "string"
}
401 response
- application/json
- Schema
- Example (from schema)
Schema
{
"message": "string"
}
502 response
- application/json
- Schema
- Example (from schema)
Schema
{
"message": "string"
}
504 response
- application/json
- Schema
- Example (from schema)
Schema
{
"message": "string"
}