Configuring the REST Service to Retrieve the Current Technical Attributes
You can configure the REST service to retrieve the current technical attributes for an asset.
The following use cases are supported:
• An external system wants to retrieve all technical attributes being monitored for specific assets in the field service execution workflow.
• An external system needs to retrieve the asset's technical attributes and its latest value from the Asset 360 system.
• An external system needs to retrieve all the attributes specific to the technical attribute template so that they can send the latest attribute values.
• An external system wants to retrieve all the technical attributes that are being monitored as part of our maintenance plan criteria so that they can send the latest value for those attributes at regular schedules.
The following are the API details to retrieve technical attributes for an asset:
• Request Type: GET
• Request URL: Example:
|
• The Salesforce instance URL or the custom URL must be the prefix in the request URL.
• /query?q=' is used followed by the query where space is replaced by '+'.
• The response will be in JSON format.
|
The following is a sample screenshot of the request executed.
The following is an example of a response in JSON format.
{
"totalSize": 2,
"done": true,
"records": [
{
"attributes": {
"type": "SVMXA360__SM_TA_AssetTechnicalAttribute__c",
"url": "/services/data/v55.0/sobjects/SVMXA360__SM_TA_AssetTechnicalAttribute__c/a111g000002UZDfAAO"
},
"Id": "a111g000002UZDfAAO",
"SVMXA360__AttributeId__r": {
"attributes": {
"type": "SVMXA360__SM_TA_TechnicalAttribute__c",
"url": "/services/data/v55.0/sobjects/SVMXA360__SM_TA_TechnicalAttribute__c/a131g000000zDyoAAE"
},
"Name": "Steam_Wand"
},
"SVMXA360__Value__c": "101"
},
{
"attributes": {
"type": "SVMXA360__SM_TA_AssetTechnicalAttribute__c",
"url": "/services/data/v55.0/sobjects/SVMXA360__SM_TA_AssetTechnicalAttribute__c/a111g000002UZDgAAO"
},
"Id": "a111g000002UZDgAAO",
"SVMXA360__AttributeId__r": {
"attributes": {
"type": "SVMXA360__SM_TA_TechnicalAttribute__c",
"url": "/services/data/v55.0/sobjects/SVMXA360__SM_TA_TechnicalAttribute__c/a131g000000zA5SAAU"
},
"Name": "Filter_condition"
},
"SVMXA360__Value__c": "Working"
}
]
}
| • Similarly, you can also retrieve all the attributes specific to a template. The following is a sample query: /services/data/v55.0/queryq=SELECT++SVMXA360__AttributeId__r.Name+FROM+SVMXA360__SM_TA_TemplateItem__c+WHERE+SVMXA360__Template Id__r.Name='Nameofthetemplate' • You can retrieve all technical tributes that are checked by the A360 maintenance plan engine for a specific asset: /services/data/v58.0/query?q=SELECT+Id,+SVMXA360__TechnicalAttribute__r.SVMXA360__DeveloperName__c,+SVMXA360__TechnicalAttribute __r.Name,+SVMXA360__MaintenanceWorkRule__c,+SVMXA360__MaintenanceWorkRuleTemplate__c+FROM+SVMXA360__SM_Condition__c+WHERE+SVMXA3 60__MaintenanceWorkRule__r.SVMXA360__MaintenancePlanAsset__r.SVMXA360__Asset__r.Name+=+'' |