Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

ParameterTypeMandatory/OptionalCommentsMaximum character length/limitDescription
inputAddDevicesForProjectInputMandatoryNot relevantAddDevicesForProjectInput model
applicationNameStringMandatoryThird party application identifier, identifying the client consuming the web service – (Length of the applicationName should Should be less than or equal to 10 charactersThe name of the integration partner

 

AddDevicesForProjectInput

ParameterTypeMandatory/OptionalCommentsDescription 
ProjectIdlongMandatory/Optional*The Id of the project.
ProjectCodestringMandatory/Optional*Project code of the project E.g. ABC0001-A1 
DeviceCodestringOptional

The device code DeviceCode that can be is given as input to retrieve data from NRF/NOBB/EFO repositories to create the device.

DevicesList<ProjectDeviceInput>MandatoryList 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

TypeDescription
AddDevicesForProjectOutputAddDevicesForProjectOutput model

...

AddDevicesForProjectOutput 

ParameterTypeCommentsDescription
StatusesList<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 CodeDescription
110Input parameters contain null or invalid data
123 

An exception occured while processing your request  

136Provided Url is invalid
138 

ApplicationName applicationName length is has exceeded the maximum allowed character limit allowed (10)  

144One 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

167You 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  

210The Device Type Id DeviceTypeId provided is not valid
227The project does not exist or the company   is not connected to the given project
252No 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
253Ambiguous inputs. Make sure projet code and project id referred the projectCode and projectId refer to the same project 
273Project does not exist
299The given project is closed.
302Given room id RoomId is not attached with to the project
303Device name DeviceName is not provided
304Device description DeviceDescription length has exceeded the maximum length character limit allowed (250)
305Device Name DeviceName length has exceeded the maximum length character limit allowed (25)
306Manufacture Name ManufactureName length has exceeded the maximum length character limit allowed (25)
307Product code ProductCode length has exceeded the maximum length character limit allowed (25)
308Gtin number GtinNumber length has exceeded the maximum length character limit allowed (25)
312Invalid warrenty duration WarrentyDuration range or the number of digits exceed 3
313Invalid life expectancy LifeExpectancy range or the number of digits exceed 3
314Invalid installation yearInstallationYear
315Warrenty duration can't WarrentyDuration cannot be greater than life expectancyLifeExpectancy
319Invalid product code type IDProductCodeType Id
320Project device ProjectDevice already exists