| GET | /allocations/{Id} |
|---|
"use strict";
export class AlarmCode {
/** @param {{eventNumber?:number,parameter1?:number,vendorEventType?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
eventNumber;
/** @type {?number} */
parameter1;
/** @type {string} */
vendorEventType;
}
export class Alarm {
/** @param {{id?:number,code?:number,alarmCode?:AlarmCode,name?:string,brakePrg?:number,canTriggerAllocation?:boolean,description?:string,remarks?:string,resetPrg?:string,isOkAlarm?:boolean,meta?:{ [index:string]: string; },alarmType?:number,type?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
id;
/** @type {number} */
code;
/** @type {AlarmCode} */
alarmCode;
/** @type {string} */
name;
/** @type {number} */
brakePrg;
/** @type {boolean} */
canTriggerAllocation;
/** @type {string} */
description;
/** @type {string} */
remarks;
/** @type {string} */
resetPrg;
/** @type {boolean} */
isOkAlarm;
/** @type {{ [index:string]: string; }} */
meta;
/** @type {number} */
alarmType;
/** @type {string} */
type;
}
export class TriggerAlarm {
/** @param {{alarm?:Alarm,start?:string,end?:string,logId?:number,sfId?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {Alarm} */
alarm;
/** @type {string} */
start;
/** @type {?string} */
end;
/** @type {number} */
logId;
/** @type {string} */
sfId;
}
export class AllocationCategory {
/** @param {{id?:number,name?:string,acronym?:string,color?:string,uncategorized?:boolean,available?:boolean,typeId?:number,group?:string,sortIndex?:number,priority?:number,enabled?:boolean,performance?:number,excluded?:number,parentCategoryId?:number,parentCategoryName?:string,code?:string,variantAlias?:string,attributes?:{ [index:string]: string; }}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
id;
/** @type {string} */
name;
/** @type {string} */
acronym;
/** @type {string} */
color;
/** @type {boolean} */
uncategorized;
/** @type {boolean} */
available;
/** @type {number} */
typeId;
/** @type {string} */
group;
/** @type {number} */
sortIndex;
/** @type {number} */
priority;
/** @type {boolean} */
enabled;
/** @type {number} */
performance;
/** @type {number} */
excluded;
/** @type {?number} */
parentCategoryId;
/** @type {string} */
parentCategoryName;
/** @type {string} */
code;
/** @type {string} */
variantAlias;
/** @type {{ [index:string]: string; }} */
attributes;
}
export class AllocationType {
/** @param {{id?:number,name?:string,acronym?:string,version?:string,description?:string,sortOrder?:number,linkedTypeId?:number,subType?:boolean,groupName?:string,defaultVisible?:boolean,domainId?:number,disabled?:boolean,matrix?:string,certified?:boolean,allocationTypeClassId?:number,variantOfAbstractTypeId?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
id;
/** @type {string} */
name;
/** @type {string} */
acronym;
/** @type {string} */
version;
/** @type {string} */
description;
/** @type {number} */
sortOrder;
/** @type {?number} */
linkedTypeId;
/** @type {?boolean} */
subType;
/** @type {string} */
groupName;
/** @type {boolean} */
defaultVisible;
/** @type {?number} */
domainId;
/** @type {boolean} */
disabled;
/** @type {string} */
matrix;
/** @type {?boolean} */
certified;
/** @type {number} */
allocationTypeClassId;
/** @type {?number} */
variantOfAbstractTypeId;
}
export class AllocationCategoryWithType extends AllocationCategory {
/** @param {{allocationType?:AllocationType,id?:number,name?:string,acronym?:string,color?:string,uncategorized?:boolean,available?:boolean,typeId?:number,group?:string,sortIndex?:number,priority?:number,enabled?:boolean,performance?:number,excluded?:number,parentCategoryId?:number,parentCategoryName?:string,code?:string,variantAlias?:string,attributes?:{ [index:string]: string; }}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {AllocationType} */
allocationType;
}
export class AllocationPropertyValue {
/** @param {{name?:string,displayName?:string,value?:number,limitedValue?:number,unit?:string,isOverride?:boolean,description?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
name;
/** @type {string} */
displayName;
/** @type {number} */
value;
/** @type {?number} */
limitedValue;
/** @type {string} */
unit;
/** @type {boolean} */
isOverride;
/** @type {string} */
description;
}
/** @typedef {'Turbine'|'Allocation'|'Alarm'} */
export var CommentType;
(function (CommentType) {
CommentType["Turbine"] = "Turbine"
CommentType["Allocation"] = "Allocation"
CommentType["Alarm"] = "Alarm"
})(CommentType || (CommentType = {}));
/** @typedef {number} */
export var LabelType;
(function (LabelType) {
LabelType[LabelType["Allocation"] = 1] = "Allocation"
LabelType[LabelType["Other"] = 2] = "Other"
LabelType[LabelType["Alarm"] = 3] = "Alarm"
LabelType[LabelType["Case"] = 4] = "Case"
})(LabelType || (LabelType = {}));
export class Label {
/** @param {{id?:number,name?:string,color?:string,type?:LabelType}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
id;
/** @type {string} */
name;
/** @type {string} */
color;
/** @type {?LabelType} */
type;
}
export class Comment {
/** @param {{id?:number,turbineId?:number,turbineName?:string,timeStamp?:string,text?:string,createdBy?:string,createdById?:number,lastModified?:string,type?:CommentType,external?:boolean,sticky?:boolean,allocationId?:number,alarmLogId?:number,alarmId?:number,commandId?:number,relatedInfo?:string,cleared?:boolean,labels?:Label[],objectId?:string,relatedStart?:string,relatedEnd?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
id;
/** @type {?number} */
turbineId;
/** @type {string} */
turbineName;
/** @type {string} */
timeStamp;
/** @type {string} */
text;
/** @type {string} */
createdBy;
/** @type {?number} */
createdById;
/** @type {string} */
lastModified;
/** @type {CommentType} */
type;
/** @type {?boolean} */
external;
/** @type {?boolean} */
sticky;
/** @type {?number} */
allocationId;
/** @type {?number} */
alarmLogId;
/** @type {?number} */
alarmId;
/** @type {?number} */
commandId;
/** @type {string} */
relatedInfo;
/** @type {boolean} */
cleared;
/** @type {Label[]} */
labels;
/** @type {string} */
objectId;
/** @type {?string} */
relatedStart;
/** @type {?string} */
relatedEnd;
}
export class Allocation {
/** @param {{id?:number,turbineId?:number,objectId?:string,turbineName?:string,turbineTitle?:string,sourceId?:number,sourceName?:string,rootCause?:string,triggeredByAlarm?:TriggerAlarm,category?:AllocationCategoryWithType,categories?:AllocationCategoryWithType[],start?:string,end?:string,start_Local?:string,end_Local?:string,duration?:string,lastModified?:string,isUnclassified?:boolean,manualOverrideLoss?:boolean,responseTime?:string,lostProduction?:number,lostProdutionFiltered?:number,lostMoney?:number,lostMoneyFiltered?:number,properties?:AllocationPropertyValue[],finished?:boolean,manual?:boolean,overridden?:boolean,reallocated?:boolean,pending?:boolean,changeLog?:string,lastComment?:Comment,exported?:string,labels?:Label[],suspect?:boolean,uncertain?:boolean,eventId?:number,hasEvent?:boolean,holdCategory?:boolean,approved?:boolean,sfId?:string,firstAlarmSfId?:string,rootCauseAlarmId?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
id;
/** @type {number} */
turbineId;
/** @type {string} */
objectId;
/** @type {string} */
turbineName;
/** @type {string} */
turbineTitle;
/** @type {number} */
sourceId;
/** @type {string} */
sourceName;
/** @type {string} */
rootCause;
/** @type {TriggerAlarm} */
triggeredByAlarm;
/** @type {AllocationCategoryWithType} */
category;
/** @type {AllocationCategoryWithType[]} */
categories;
/** @type {string} */
start;
/** @type {string} */
end;
/** @type {string} */
start_Local;
/** @type {string} */
end_Local;
/** @type {string} */
duration;
/** @type {string} */
lastModified;
/** @type {boolean} */
isUnclassified;
/** @type {?boolean} */
manualOverrideLoss;
/** @type {?string} */
responseTime;
/** @type {?number} */
lostProduction;
/** @type {?number} */
lostProdutionFiltered;
/** @type {?number} */
lostMoney;
/** @type {?number} */
lostMoneyFiltered;
/** @type {AllocationPropertyValue[]} */
properties;
/** @type {boolean} */
finished;
/** @type {boolean} */
manual;
/** @type {boolean} */
overridden;
/** @type {boolean} */
reallocated;
/** @type {boolean} */
pending;
/** @type {string} */
changeLog;
/** @type {Comment} */
lastComment;
/** @type {string} */
exported;
/** @type {Label[]} */
labels;
/** @type {?boolean} */
suspect;
/** @type {boolean} */
uncertain;
/** @type {?number} */
eventId;
/** @type {boolean} */
hasEvent;
/** @type {boolean} */
holdCategory;
/** @type {boolean} */
approved;
/** @type {string} */
sfId;
/** @type {string} */
firstAlarmSfId;
/** @type {?number} */
rootCauseAlarmId;
}
export class GetAllocation {
/** @param {{id?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
id;
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /allocations/{Id} HTTP/1.1
Host: monitoring.ox2.com
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
id: 0,
turbineId: 0,
objectId: String,
turbineName: String,
turbineTitle: String,
sourceId: 0,
sourceName: String,
rootCause: String,
triggeredByAlarm:
{
alarm:
{
id: 0,
code: 0,
name: String,
brakePrg: 0,
canTriggerAllocation: False,
description: String,
remarks: String,
resetPrg: ,
isOkAlarm: False,
meta:
{
String: String
},
alarmType: 0,
type: Warning
},
start: 0001-01-01,
end: 0001-01-01,
logId: 0,
sfId: String
},
category:
{
allocationType:
{
id: 0,
name: String,
acronym: String,
version: String,
description: String,
sortOrder: 0,
linkedTypeId: 0,
subType: False,
groupName: String,
defaultVisible: False,
domainId: 0,
disabled: False,
matrix: String,
certified: False,
allocationTypeClassId: 0,
variantOfAbstractTypeId: 0
},
id: 0,
name: String,
acronym: String,
color: String,
uncategorized: False,
available: False,
typeId: 0,
group: String,
sortIndex: 0,
priority: 0,
enabled: False,
performance: 0,
excluded: 0,
parentCategoryId: 0,
parentCategoryName: String,
code: String,
variantAlias: String,
attributes:
{
String: String
}
},
categories:
[
{
allocationType:
{
id: 0,
name: String,
acronym: String,
version: String,
description: String,
sortOrder: 0,
linkedTypeId: 0,
subType: False,
groupName: String,
defaultVisible: False,
domainId: 0,
disabled: False,
matrix: String,
certified: False,
allocationTypeClassId: 0,
variantOfAbstractTypeId: 0
},
id: 0,
name: String,
acronym: String,
color: String,
uncategorized: False,
available: False,
typeId: 0,
group: String,
sortIndex: 0,
priority: 0,
enabled: False,
performance: 0,
excluded: 0,
parentCategoryId: 0,
parentCategoryName: String,
code: String,
variantAlias: String,
attributes:
{
String: String
}
}
],
start: 0001-01-01,
end: 0001-01-01,
start_Local: 0001-01-01T00:00:00.0000000+00:00,
end_Local: 0001-01-01T00:00:00.0000000+00:00,
duration: P739710DT15H28M49.6839828S,
lastModified: 0001-01-01,
isUnclassified: False,
manualOverrideLoss: False,
responseTime: 0001-01-01,
lostProduction: 0,
lostProdutionFiltered: 0,
lostMoney: 0,
lostMoneyFiltered: 0,
properties:
[
{
}
],
finished: False,
manual: False,
overridden: False,
reallocated: False,
pending: False,
changeLog: String,
lastComment:
{
id: 0,
turbineId: 0,
turbineName: String,
timeStamp: 0001-01-01,
text: String,
createdBy: String,
createdById: 0,
lastModified: 0001-01-01,
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-01,
relatedEnd: 0001-01-01
},
exported: String,
labels:
[
{
id: 0,
name: String,
color: String,
type: 0
}
],
suspect: False,
uncertain: False,
eventId: 0,
hasEvent: False,
holdCategory: False,
approved: False,
sfId: String,
firstAlarmSfId: String,
rootCauseAlarmId: 0
}