BazeField Services

<back to all web services

ObjectTypeCreateOrUpdateRequest

Core API
Requires Authentication
The following routes are available for this service:
POST/api/objectTypes/createOrUpdateObjectTypeCreate or Update object type
ObjectTypeCreateOrUpdateRequest Parameters:
NameParameterData TypeRequiredDescription
PkIdbodyintNo
TypeIdbodyintNo
CategoryIdbodyintNo
NamebodystringNo
ClassIdbodyintNo
AttributesbodyList<DomainObjectTypeAttribute>No
DomainObjectTypeAttribute Parameters:
NameParameterData TypeRequiredDescription
ValueformObjectNo
DomainObjectTypeAttributeBase Parameters:
NameParameterData TypeRequiredDescription
KeyformstringNo
NameformstringNo
DisplayIdformint?No
IsMandatoryformbool?No
ValueTypeformint?No
DomainObjectType Parameters:
NameParameterData TypeRequiredDescription
TypeformBazefieldObjectTypeNo
NameformstringNo
AttributesformList<DomainObjectTypeAttribute>No
IsSubAssetformboolNo
BazefieldObjectType Parameters:
NameParameterData TypeRequiredDescription
CoreTypeformstringNo
TypeIdformintNo
CategoryIdformintNo
ClassIdformintNo
KeyformstringNo
MajorTypeformMajorTypeEnumNo
ObjectClassformObjectClassEnumNo
CategoryformCategoryEnumNo
MajorTypeEnum Enum:
NameValue
Bazefield2
System54
Partner55
Customer56
SiteGroup57
Site58
Project102
Device200
ObjectClassEnum Enum:
NameValue
Bazefield20020
Partner20550
Customer20560
SiteGroup20570
PhysicalSite20580
Windfarm211020
WindTurbine212000
MetMast212010
TurbineString212430
Custom212580
Solarfarm221020
Inverter222060
InverterStation222330
InverterWeatherStation223300
PVPlantWeatherStation223350
SubstationSite281020
PrimarySubstation282320
Meter283010
TransmissionLine283020
Circuit283030
UnitSubstation283040
Feeder283100
PowerPlantController283150
Transformer283200
Capacitor283250
HydropowerSite601020
HydroGenerator602260
NotDefined-1
CategoryEnum Enum:
NameValue
Fleet2
Wind21
Solar22
Substation28
Hydro60

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /api/objectTypes/createOrUpdateObjectType HTTP/1.1 
Host: mdn.bazefield.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<ObjectTypeCreateOrUpdateRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Bazefield.Core.WebService.Request">
  <Attributes xmlns:d2p1="http://schemas.datacontract.org/2004/07/Bazefield.Domain.DataModel.Entities">
    <d2p1:DomainObjectTypeAttribute>
      <d2p1:DisplayId>0</d2p1:DisplayId>
      <d2p1:IsMandatory>false</d2p1:IsMandatory>
      <d2p1:Key>String</d2p1:Key>
      <d2p1:Name>String</d2p1:Name>
      <d2p1:ValueType>0</d2p1:ValueType>
      <d2p1:Value />
    </d2p1:DomainObjectTypeAttribute>
  </Attributes>
  <CategoryId>0</CategoryId>
  <ClassId>0</ClassId>
  <Name>String</Name>
  <PkId>0</PkId>
  <TypeId>0</TypeId>
</ObjectTypeCreateOrUpdateRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<DomainObjectType xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Bazefield.Domain.DataModel.Entities" />