GetDevicesForProject
Description
This method is used to return details of all devices for the given project.
Request
Parameter | Type | Mandatory/Optional | Maximum character length/limit | Description |
---|---|---|---|---|
input | GetDevicesForProjectInput | Mandatory | Not relevant | The project identification |
applicationName | String | Mandatory | Should be less than or equal to 10 characters | The name of the integration partner |
GetDevicesForProjectInput
Parameter | Type | Mandatory/optional | Description |
---|---|---|---|
ProjectId | long | mandatory*/optional | Project ID |
ProjectCode | string | optional/mandatory* | Project Code e.g. ABC0001-A1 |
Note
It is mandatory to provide either the projectCode or the projectId. Preference is given to the projectId, if both the projectCode and the projectId are provided.
Request - sample input
<GetDevicesForProject>
<MethodParameters>
<UserAuthentication>
<UserName>username</UserName>
<Password>password</Password>
<AnyAttr attr0="XmlAttributeArray" isNull="false">
<XmlAttributeArray0>System.Xml.XmlAttribute</XmlAttributeArray0>
</AnyAttr>
</UserAuthentication>
<input>
<ProjectId>1211</ProjectId>
<ProjectCode isNull="false" />
</input>
<applicationName>test</applicationName>
</MethodParameters>
</GetDevicesForProject>
Response: GetDevicesForProjectOutput
Property | Type | Description |
---|---|---|
ProjectID | long | ID of the project requested (for verification) |
Devices | List<Device> | List of the devices in the project * |
Note
* The Devices list will be empty if there are no devices in the project; no exception or error will be returned: just an empty list.
Request - sample output
<GetDevicesForProject>
<MethodParameters>
<GetDevicesForProjectOutput>
<ProjectId>1211</ProjectId>
<ProjectCode>WAA0002-R9</ProjectCode>
<Devices attr0="DeviceArray" isNull="false">
<DeviceArray0>
<Id>243</Id>
<ProductName>adasd</ProductName>
<DeviceDescription isNull="true" />
<ManufactureName isNull="true" />
<ProductCodeType>-1</ProductCodeType>
<ProductCode isNull="true" />
<ProductCodeTypeName>Unspecified</ProductCodeTypeName>
<GtinNumber isNull="true" />
<LifeExpectancy>10</LifeExpectancy>
<WarrantyDuration>10</WarrantyDuration>
<BuildingElementId>0</BuildingElementId>
<BuildingElementDescription isNull="true" />
<DeviceTypeId>34</DeviceTypeId>
<DeviceType>Antenneanlegg</DeviceType>
<InstallationYear>2017</InstallationYear>
<RoomId>0</RoomId>
<RoomName isNull="true" />
<UserManual isNull="true" />
<CreatorCompanyId>197</CreatorCompanyId>
<CreatorCompany>VEGA 1 AS</CreatorCompany>
<CreatedDate>09.10.2017 12:55:24</CreatedDate>
<CreateByUser>Peter balck</CreateByUser>
</DeviceArray0>
<DeviceArray1>
<Id>241</Id>
<ProductName>asdsad</ProductName>
<DeviceDescription isNull="true" />
<ManufactureName isNull="true" />
<ProductCodeType>-1</ProductCodeType>
<ProductCode isNull="true" />
<ProductCodeTypeName>Unspecified</ProductCodeTypeName>
<GtinNumber isNull="true" />
<LifeExpectancy>2</LifeExpectancy>
<WarrantyDuration>2</WarrantyDuration>
<BuildingElementId>0</BuildingElementId>
<BuildingElementDescription isNull="true" />
<DeviceTypeId>34</DeviceTypeId>
<DeviceType>Antenneanlegg</DeviceType>
<InstallationYear>2017</InstallationYear>
<RoomId>0</RoomId>
<RoomName isNull="true" />
<UserManual isNull="true" />
<CreatorCompanyId>197</CreatorCompanyId>
<CreatorCompany>VEGA 1 AS</CreatorCompany>
<CreatedDate>09.10.2017 12:53:32</CreatedDate>
<CreateByUser>Peter balck</CreateByUser>
</DeviceArray1>
<DeviceArray2>
<Id>242</Id>
<ProductName>Device123</ProductName>
<DeviceDescription isNull="true" />
<ManufactureName isNull="true" />
<ProductCodeType>0</ProductCodeType>
<ProductCode isNull="true" />
<ProductCodeTypeName>Nobb</ProductCodeTypeName>
<GtinNumber isNull="true" />
<LifeExpectancy>0</LifeExpectancy>
<WarrantyDuration>0</WarrantyDuration>
<BuildingElementId>40</BuildingElementId>
<BuildingElementDescription>Elkraft generelt</BuildingElementDescription>
<DeviceTypeId>34</DeviceTypeId>
<DeviceType>Antenneanlegg</DeviceType>
<InstallationYear>2017</InstallationYear>
<RoomId>0</RoomId>
<RoomName isNull="true" />
<UserManual isNull="true" />
<CreatorCompanyId>197</CreatorCompanyId>
<CreatorCompany>VEGA 1 AS</CreatorCompany>
<CreatedDate>09.10.2017 12:54:39</CreatedDate>
<CreateByUser>Peter balck</CreateByUser>
</DeviceArray2>
<DeviceArray3>
<Id>244</Id>
<ProductName>Dividsdd34</ProductName>
<DeviceDescription isNull="true" />
<ManufactureName isNull="true" />
<ProductCodeType>-1</ProductCodeType>
<ProductCode isNull="true" />
<ProductCodeTypeName>Unspecified</ProductCodeTypeName>
<GtinNumber isNull="true" />
<LifeExpectancy>0</LifeExpectancy>
<WarrantyDuration>0</WarrantyDuration>
<BuildingElementId>0</BuildingElementId>
<BuildingElementDescription isNull="true" />
<DeviceTypeId>9</DeviceTypeId>
<DeviceType>Armatur: kjøkken, bad, WC, vaskerom</DeviceType>
<InstallationYear>2017</InstallationYear>
<RoomId>0</RoomId>
<RoomName isNull="true" />
<UserManual isNull="true" />
<CreatorCompanyId>197</CreatorCompanyId>
<CreatorCompany>VEGA 1 AS</CreatorCompany>
<CreatedDate>09.10.2017 12:55:24</CreatedDate>
<CreateByUser>Peter balck</CreateByUser>
</DeviceArray3>
<DeviceArray4>
<Id>245</Id>
<ProductName>sdfsdfdsf</ProductName>
<DeviceDescription isNull="true" />
<ManufactureName isNull="true" />
<ProductCodeType>-1</ProductCodeType>
<ProductCode isNull="true" />
<ProductCodeTypeName>Unspecified</ProductCodeTypeName>
<GtinNumber isNull="true" />
<LifeExpectancy>0</LifeExpectancy>
<WarrantyDuration>0</WarrantyDuration>
<BuildingElementId>0</BuildingElementId>
<BuildingElementDescription isNull="true" />
<DeviceTypeId>9</DeviceTypeId>
<DeviceType>Armatur: kjøkken, bad, WC, vaskerom</DeviceType>
<InstallationYear>2017</InstallationYear>
<RoomId>0</RoomId>
<RoomName isNull="true" />
<UserManual isNull="true" />
<CreatorCompanyId>197</CreatorCompanyId>
<CreatorCompany>VEGA 1 AS</CreatorCompany>
<CreatedDate>09.10.2017 12:55:46</CreatedDate>
<CreateByUser>Peter balck</CreateByUser>
</DeviceArray4>
<DeviceArray5>
<Id>276</Id>
<ProductName>Washing machine</ProductName>
<DeviceDescription isNull="true" />
<ManufactureName isNull="true" />
<ProductCodeType>0</ProductCodeType>
<ProductCode isNull="true" />
<ProductCodeTypeName>Nobb</ProductCodeTypeName>
<GtinNumber isNull="true" />
<LifeExpectancy>0</LifeExpectancy>
<WarrantyDuration>0</WarrantyDuration>
<BuildingElementId>0</BuildingElementId>
<BuildingElementDescription isNull="true" />
<DeviceTypeId>1</DeviceTypeId>
<DeviceType>Ytterdører</DeviceType>
<InstallationYear>0</InstallationYear>
<RoomId>0</RoomId>
<RoomName isNull="true" />
<UserManual>http://172.20.1.183:8080/Device/DownloadDeviceManualWebService?sessionKey=opI9tNrKuo2wAnkLb7D1I08SqLzZoEBBFBxs2EDMheS%2flrylefYlfz7nWZE5crvvmuPpz91pPgAS8nWOy8bqkQ%3d%3d</UserManual>
<CreatorCompanyId>197</CreatorCompanyId>
<CreatorCompany>VEGA 1 AS</CreatorCompany>
<CreatedDate>04.12.2017 14:02:52</CreatedDate>
<CreateByUser>Peter balck</CreateByUser>
</DeviceArray5>
<DeviceArray6>
<Id>277</Id>
<ProductName>Whirlpool washing machine</ProductName>
<DeviceDescription isNull="true" />
<ManufactureName isNull="true" />
<ProductCodeType>0</ProductCodeType>
<ProductCode isNull="true" />
<ProductCodeTypeName>Nobb</ProductCodeTypeName>
<GtinNumber isNull="true" />
<LifeExpectancy>0</LifeExpectancy>
<WarrantyDuration>0</WarrantyDuration>
<BuildingElementId>0</BuildingElementId>
<BuildingElementDescription isNull="true" />
<DeviceTypeId>1</DeviceTypeId>
<DeviceType>Ytterdører</DeviceType>
<InstallationYear>0</InstallationYear>
<RoomId>0</RoomId>
<RoomName isNull="true" />
<UserManual>http://172.20.1.183:8080/Device/DownloadDeviceManualWebService?sessionKey=ot0NsN5n9RA2G3Aai0taMUVPbA%2bnmCoyi%2bjepvXfvYgkC7LqG5drbHeHDaYZNaud6jSRqEkdsf%2bUVEW8ofBd1w%3d%3d</UserManual>
<CreatorCompanyId>197</CreatorCompanyId>
<CreatorCompany>VEGA 1 AS</CreatorCompany>
<CreatedDate>04.12.2017 14:08:50</CreatedDate>
<CreateByUser>Peter balck</CreateByUser>
</DeviceArray6>
</Devices>
</GetDevicesForProjectOutput>
</MethodParameters>
</GetDevicesForProject>
Exceptions
Error Code | Description |
---|---|
123 | An exception occured while processing your request |
138 | applicationName length has exceeded the maximum character limit allowed (10) |
146 | The applicationName is not set |
167 | You are not authorized to use this method |
227 | The project does not exist or the company is not connected to the given project |
252 | No input is provided for projectId or projectCode. Provide the input for at least one of these fields |
254 | Invalid projectCode |
273 | Project does not exist |