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 .jsv suffix or ?format=jsv

HTTP + JSV

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: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	pkId: 0,
	typeId: 0,
	categoryId: 0,
	name: String,
	classId: 0,
	attributes: 
	[
		{
			value: {},
			key: String,
			name: String,
			displayId: 0,
			isMandatory: False,
			valueType: 0
		}
	]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	name: String,
	attributes: 
	[
		{
			value: {},
			key: String,
			name: String,
			displayId: 0,
			isMandatory: False,
			valueType: 0
		}
	],
	isSubAsset: False
}