Description
...
Description
This method is used to create devices for a given project. And it returns the created The device details that were created are returned as the output.
Notes:
- Multiple devices can be added at the same time.
- Any company who are that is connected to a given project can add devices for to that project.
- The functionality for the DeviceCode has not been implemented yet been implemented.
Request
Parameter | Type | Mandatory/OptionalComments | Maximum character length/limit | Description |
---|---|---|---|---|
input | AddDevicesForProjectInput | Mandatory | Not relevant | AddDevicesForProjectInput model |
applicationName | String | Mandatory | Third party application identifier, identifying the client consuming the web service – (Length of the applicationName should Should be less than or equal to 10 ) characters | The name of the integration partner |
AddDevicesForProjectInput
Parameter | Type | Mandatory/Optional | CommentsDescription |
---|---|---|---|
ProjectId | long | Mandatory/Optional* | The Id of the project. |
ProjectCode | string | Mandatory/Optional* | Project code of the project E.g. ABC0001-A1 |
DeviceCode | string | Optional | The device code DeviceCode that can be is given as input to retrieve data from NRF/NOBB/EFO repositories to create the device. |
Devices | List<ProjectDeviceInput> | Mandatory | List of project devices to be added. DeviceName and DeviceTypeId are mandatory for this method |
...
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
<AddDevicesForProject>
<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" />
<DeviceCode isNull="false" />
<Devices attr0="ProjectDeviceInputArray" isNull="false">
<ProjectDeviceInputArray0>
<DeviceName>Whirlpool washing machine</DeviceName>
<DeviceDescription isNull="false" />
<DeviceTypeId>1</DeviceTypeId>
<ManufactureName isNull="false" />
<ProductCodeType>0</ProductCodeType>
<ProductCode isNull="false" />
<GtinNumber isNull="false" />
<LifeExpectancy>0</LifeExpectancy>
<WarrantyDuration>0</WarrantyDuration>
<BuildingElementId>0</BuildingElementId>
<InstallationYear>0</InstallationYear>
<RoomId>0</RoomId>
<UserManual>
<Url>https://www.manualslib.com/manual/776758/Whirlpool-Washing-Machine.html</Url>
<Data isNull="false" />
</UserManual>
</ProjectDeviceInputArray0>
</Devices>
</input>
<applicationName>test</applicationName>
</MethodParameters>
</AddDevicesForProject>
Response
Type | Description |
---|---|
AddDevicesForProjectOutput | AddDevicesForProjectOutput model |
...
AddDevicesForProjectOutput
Parameter | Type | CommentsDescription |
---|---|---|
Statuses | List<AddDeviceForProjectStatus> | Project device creation statuses list |
Response - sample output
<AddDevicesForProject>
<MethodParameters>
<AddDevicesForProjectOutput>
<Statuses attr0="AddDeviceForProjectStatusArray" isNull="false">
<AddDeviceForProjectStatusArray0>
<Status>0</Status>
<Device>
<Id>0</Id>
<ProjectId>1211</ProjectId>
<DeviceName>Whirlpool washing machine</DeviceName>
<DeviceDescription isNull="false" />
<ManufactureName isNull="false" />
<ProductCodeType>0</ProductCodeType>
<ProductCode isNull="false" />
<GtinNumber isNull="false" />
<LifeExpectancy>0</LifeExpectancy>
<WarrantyDuration>0</WarrantyDuration>
<BuildingElementId>0</BuildingElementId>
<DeviceTypeId>1</DeviceTypeId>
<InstallationYear>0</InstallationYear>
<RoomId>0</RoomId>
<UserManual>https://www.manualslib.com/manual/776758/Whirlpool-Washing-Machine.html</UserManual>
</Device>
<ErrorCode>320</ErrorCode>
</AddDeviceForProjectStatusArray0>
</Statuses>
</AddDevicesForProjectOutput>
</MethodParameters>
</AddDevicesForProject>
Exceptions
Error Code | Description |
---|---|
110 | Input parameters contain null or invalid data |
123 | An exception occured while processing your request |
136 | Provided Url is invalid |
138 | ApplicationName applicationName length is has exceeded the maximum allowed character limit allowed (10) |
144 | One or more of the input document models does not contain adequate information (EfoIds, url or Url or Base64 encoded data) |
146 | The application name applicationName is not set set |
167 | You are not authorized to use this web method |
191 | No devices are providedhave been provided |
196 | Url or Data data must be provided to create a device manual manual |
206 | Invalid building element |
210 | The Device Type Id DeviceTypeId provided is not valid |
227 | The project does not exist or the company is not connected to the given project |
252 | No input is provided to project Id or project code. Need atleast one of them for projectId or projectCode. Provide the input for at least one of these fields |
253 | Ambiguous inputs. Make sure projet code and project id referred the projectCode and projectId refer to the same project |
273 | Project does not exist |
299 | The given project is closed. |
302 | Given room id RoomId is not attached with to the project |
303 | Device name DeviceName is not provided |
304 | Device description DeviceDescription length has exceeded the maximum length character limit allowed (250) |
305 | Device Name DeviceName length has exceeded the maximum length character limit allowed (25) |
306 | Manufacture Name ManufactureName length has exceeded the maximum length character limit allowed (25) |
307 | Product code ProductCode length has exceeded the maximum length character limit allowed (25) |
308 | Gtin number GtinNumber length has exceeded the maximum length character limit allowed (25) |
312 | Invalid warrenty duration WarrentyDuration range or the number of digits exceed 3 |
313 | Invalid life expectancy LifeExpectancy range or the number of digits exceed 3 |
314 | Invalid installation yearInstallationYear |
315 | Warrenty duration can't WarrentyDuration cannot be greater than life expectancyLifeExpectancy |
319 | Invalid product code type IDProductCodeType Id |
320 | Project device ProjectDevice already exists |