BazeField Services

<back to all web services

CreateComment

Comment API

Create one comment for an asset or an alarm/allocation for an asset.

Requires Authentication
The following routes are available for this service:
POST/api/turbines/comments
Comment Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
TurbineIdformintNo
TurbineNameformstringNo
TimeStampformDateTimeNo
TextformstringNo
CreatedByformstringNo
CreatedByIdformdecimal?No
LastModifiedformDateTimeNo
TypeformCommentTypeNo
Externalformbool?No
Stickyformbool?No
AllocationIdformint?No
AlarmLogIdformint?No
AlarmIdformint?No
CommandIdformint?No
RelatedInfoformstringNo
ClearedformboolNo
LabelsformList<Label>No
ObjectIdformstringNo
RelatedStartformDateTime?No
RelatedEndformDateTime?No
CommentType Enum:
Turbine
Allocation
Alarm
Label Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
NameformstringNo
ColorformstringNo
TypeformLabelType?No
LabelType Enum:
NameValue
Allocation1
Other2
Comment Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
TurbineIdformintNo
TurbineNameformstringNo
TimeStampformDateTimeNo
TextformstringNo
CreatedByformstringNo
CreatedByIdformdecimal?No
LastModifiedformDateTimeNo
TypeformCommentTypeNo
Externalformbool?No
Stickyformbool?No
AllocationIdformint?No
AlarmLogIdformint?No
AlarmIdformint?No
CommandIdformint?No
RelatedInfoformstringNo
ClearedformboolNo
LabelsformList<Label>No
ObjectIdformstringNo
RelatedStartformDateTime?No
RelatedEndformDateTime?No

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

POST /api/turbines/comments HTTP/1.1 
Host: mdn.bazefield.com 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"id":0,"turbineId":0,"turbineName":"String","timeStamp":"0001-01-01T00:00:00.0000000","text":"String","createdBy":"String","createdById":0,"lastModified":"0001-01-01T00:00:00.0000000","type":"Turbine","external":false,"sticky":false,"allocationId":0,"alarmLogId":0,"alarmId":0,"commandId":0,"relatedInfo":"String","cleared":false,"labels":[{"id":0,"name":"String","color":"String","type":"0"}],"objectId":"String","relatedStart":"0001-01-01T00:00:00.0000000","relatedEnd":"0001-01-01T00:00:00.0000000"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"id":0,"turbineId":0,"turbineName":"String","timeStamp":"0001-01-01T00:00:00.0000000","text":"String","createdBy":"String","createdById":0,"lastModified":"0001-01-01T00:00:00.0000000","type":"Turbine","external":false,"sticky":false,"allocationId":0,"alarmLogId":0,"alarmId":0,"commandId":0,"relatedInfo":"String","cleared":false,"labels":[{"id":0,"name":"String","color":"String","type":"0"}],"objectId":"String","relatedStart":"0001-01-01T00:00:00.0000000","relatedEnd":"0001-01-01T00:00:00.0000000"}