| GET | /allocations/{Id} |
|---|
export class AlarmCode
{
public eventNumber: number;
public parameter1?: number;
public vendorEventType: string;
public constructor(init?: Partial<AlarmCode>) { (Object as any).assign(this, init); }
}
export class Alarm
{
public id: number;
public code: number;
public alarmCode: AlarmCode;
public name: string;
public brakePrg: number;
public canTriggerAllocation: boolean;
public description: string;
public remarks: string;
public resetPrg: string;
public isOkAlarm: boolean;
public meta: { [index:string]: string; };
public alarmType: number;
public type: string;
public constructor(init?: Partial<Alarm>) { (Object as any).assign(this, init); }
}
export class TriggerAlarm
{
public alarm: Alarm;
public start: string;
public end?: string;
public logId: number;
public sfId: string;
public constructor(init?: Partial<TriggerAlarm>) { (Object as any).assign(this, init); }
}
export class AllocationCategory
{
public id: number;
public name: string;
public acronym: string;
public color: string;
public uncategorized: boolean;
public available: boolean;
public typeId: number;
public group: string;
public sortIndex: number;
public priority: number;
public enabled: boolean;
public performance: number;
public excluded: number;
public parentCategoryId?: number;
public parentCategoryName: string;
public code: string;
public variantAlias: string;
public attributes: { [index:string]: string; };
public constructor(init?: Partial<AllocationCategory>) { (Object as any).assign(this, init); }
}
export class AllocationType
{
public id: number;
public name: string;
public acronym: string;
public version: string;
public description: string;
public sortOrder: number;
public linkedTypeId?: number;
public subType?: boolean;
public groupName: string;
public defaultVisible: boolean;
public domainId?: number;
public disabled: boolean;
public matrix: string;
public certified?: boolean;
public allocationTypeClassId: number;
public variantOfAbstractTypeId?: number;
public constructor(init?: Partial<AllocationType>) { (Object as any).assign(this, init); }
}
export class AllocationCategoryWithType extends AllocationCategory
{
public allocationType: AllocationType;
public constructor(init?: Partial<AllocationCategoryWithType>) { super(init); (Object as any).assign(this, init); }
}
export class AllocationPropertyValue
{
public name: string;
public displayName: string;
public value: number;
public limitedValue?: number;
public unit: string;
public isOverride: boolean;
public description: string;
public constructor(init?: Partial<AllocationPropertyValue>) { (Object as any).assign(this, init); }
}
export enum CommentType
{
Turbine = 'Turbine',
Allocation = 'Allocation',
Alarm = 'Alarm',
}
export enum LabelType
{
Allocation = 1,
Other = 2,
Alarm = 3,
Case = 4,
}
export class Label
{
public id: number;
public name: string;
public color: string;
public type?: LabelType;
public constructor(init?: Partial<Label>) { (Object as any).assign(this, init); }
}
export class Comment
{
public id: number;
public turbineId?: number;
public turbineName: string;
public timeStamp: string;
public text: string;
public createdBy: string;
public createdById?: number;
public lastModified: string;
public type: CommentType;
public external?: boolean;
public sticky?: boolean;
public allocationId?: number;
public alarmLogId?: number;
public alarmId?: number;
public commandId?: number;
public relatedInfo: string;
public cleared: boolean;
public labels: Label[];
public objectId: string;
public relatedStart?: string;
public relatedEnd?: string;
public constructor(init?: Partial<Comment>) { (Object as any).assign(this, init); }
}
export class Allocation
{
public id: number;
public turbineId: number;
public objectId: string;
public turbineName: string;
public turbineTitle: string;
public sourceId: number;
public sourceName: string;
public rootCause: string;
public triggeredByAlarm: TriggerAlarm;
public category: AllocationCategoryWithType;
public categories: AllocationCategoryWithType[];
public start: string;
public end: string;
public start_Local: string;
public end_Local: string;
public duration: string;
public lastModified: string;
public isUnclassified: boolean;
public manualOverrideLoss?: boolean;
public responseTime?: string;
public lostProduction?: number;
public lostProdutionFiltered?: number;
public lostMoney?: number;
public lostMoneyFiltered?: number;
public properties: AllocationPropertyValue[];
public finished: boolean;
public manual: boolean;
public overridden: boolean;
public reallocated: boolean;
public pending: boolean;
public changeLog: string;
public lastComment: Comment;
public exported: string;
public labels: Label[];
public suspect?: boolean;
public uncertain: boolean;
public eventId?: number;
public hasEvent: boolean;
public holdCategory: boolean;
public approved: boolean;
public sfId: string;
public firstAlarmSfId: string;
public rootCauseAlarmId?: number;
public constructor(init?: Partial<Allocation>) { (Object as any).assign(this, init); }
}
export class GetAllocation
{
public id: number;
public constructor(init?: Partial<GetAllocation>) { (Object as any).assign(this, init); }
}
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: P739710DT15H27M23.5444336S,
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
}