| Required role: | TenantReader |
| GET | /api/jobevents/ | Returns job events | |
|---|---|---|---|
| GET | /jobevents/ | Returns job events |
"use strict";
export class QueryBase {
/** @param {{skip?:number,take?:number,orderBy?:string,orderByDesc?:string,include?:string,fields?:string,meta?:{ [index:string]: string; }}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {?number} */
skip;
/** @type {?number} */
take;
/** @type {?string} */
orderBy;
/** @type {?string} */
orderByDesc;
/** @type {?string} */
include;
/** @type {?string} */
fields;
/** @type {?{ [index:string]: string; }} */
meta;
}
/** @typedef T {any} */
export class QueryDb extends QueryBase {
/** @param {{skip?:number,take?:number,orderBy?:string,orderByDesc?:string,include?:string,fields?:string,meta?:{ [index:string]: string; }}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
}
/** @typedef {'Started'|'Skipped'|'Completed'|'Failed'} */
export var JobEventStates;
(function (JobEventStates) {
JobEventStates["Started"] = "Started"
JobEventStates["Skipped"] = "Skipped"
JobEventStates["Completed"] = "Completed"
JobEventStates["Failed"] = "Failed"
})(JobEventStates || (JobEventStates = {}));
/** @typedef {'None'|'ConfigItem'|'Tenant'|'Collection'|'Resource'|'ComputeNode'|'VirtualMachine'|'PhysicalMachine'|'Disk'|'Subnet'|'IPAddress'|'Job'|'JobEvent'|'FreezePeriod'|'ResourceGroup'|'Deployment'|'ResourceGroupTemplate'|'DeploymentTemplate'|'ResourceProvider'|'GenericResource'|'Role'|'Permission'|'User'|'PatchingWindow'|'Update'|'ReportDefinition'|'TimeSeries'|'DataPoint'|'Action'|'ActionAssignment'|'UserNote'} */
export var ObjectTypes;
(function (ObjectTypes) {
ObjectTypes["None"] = "None"
ObjectTypes["ConfigItem"] = "ConfigItem"
ObjectTypes["Tenant"] = "Tenant"
ObjectTypes["Collection"] = "Collection"
ObjectTypes["Resource"] = "Resource"
ObjectTypes["ComputeNode"] = "ComputeNode"
ObjectTypes["VirtualMachine"] = "VirtualMachine"
ObjectTypes["PhysicalMachine"] = "PhysicalMachine"
ObjectTypes["Disk"] = "Disk"
ObjectTypes["Subnet"] = "Subnet"
ObjectTypes["IPAddress"] = "IPAddress"
ObjectTypes["Job"] = "Job"
ObjectTypes["JobEvent"] = "JobEvent"
ObjectTypes["FreezePeriod"] = "FreezePeriod"
ObjectTypes["ResourceGroup"] = "ResourceGroup"
ObjectTypes["Deployment"] = "Deployment"
ObjectTypes["ResourceGroupTemplate"] = "ResourceGroupTemplate"
ObjectTypes["DeploymentTemplate"] = "DeploymentTemplate"
ObjectTypes["ResourceProvider"] = "ResourceProvider"
ObjectTypes["GenericResource"] = "GenericResource"
ObjectTypes["Role"] = "Role"
ObjectTypes["Permission"] = "Permission"
ObjectTypes["User"] = "User"
ObjectTypes["PatchingWindow"] = "PatchingWindow"
ObjectTypes["Update"] = "Update"
ObjectTypes["ReportDefinition"] = "ReportDefinition"
ObjectTypes["TimeSeries"] = "TimeSeries"
ObjectTypes["DataPoint"] = "DataPoint"
ObjectTypes["Action"] = "Action"
ObjectTypes["ActionAssignment"] = "ActionAssignment"
ObjectTypes["UserNote"] = "UserNote"
})(ObjectTypes || (ObjectTypes = {}));
export class JobEvent {
/** @param {{id?:string,tenantId?:string,jobId?:string,name?:string,state?:JobEventStates,startTime?:string,endTime?:string,message?:string,objectType?:ObjectTypes,selfLink?:string,duration?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
id;
/** @type {string} */
tenantId;
/** @type {string} */
jobId;
/** @type {string} */
name;
/** @type {JobEventStates} */
state;
/** @type {string} */
startTime;
/** @type {?string} */
endTime;
/** @type {?string} */
message;
/** @type {ObjectTypes} */
objectType;
/** @type {string} */
selfLink;
/** @type {number} */
duration;
}
/** @typedef {'None'|'Count'|'DistinctCount'|'Sum'|'Min'|'Max'|'Avg'|'First'} */
export var Aggregations;
(function (Aggregations) {
Aggregations["None"] = "None"
Aggregations["Count"] = "Count"
Aggregations["DistinctCount"] = "DistinctCount"
Aggregations["Sum"] = "Sum"
Aggregations["Min"] = "Min"
Aggregations["Max"] = "Max"
Aggregations["Avg"] = "Avg"
Aggregations["First"] = "First"
})(Aggregations || (Aggregations = {}));
export class QueryJobEvents extends QueryDb {
/** @param {{tenantName?:string,includeDeleted?:boolean,groupBy?:string,aggregateOn?:string,aggregation?:Aggregations,includeReferencedObjects?:boolean,skip?:number,take?:number,orderBy?:string,orderByDesc?:string,include?:string,fields?:string,meta?:{ [index:string]: string; }}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {string} */
tenantName;
/**
* @type {?boolean}
* @description If true, also soft deleted items will be returned */
includeDeleted;
/**
* @type {?string}
* @description The property, the data will be grouped on */
groupBy;
/**
* @type {?string}
* @description The property, used for aggregation */
aggregateOn;
/**
* @type {?Aggregations}
* @description The aggregation function to use */
aggregation;
/**
* @type {?boolean}
* @description Returns all referenced object */
includeReferencedObjects;
}
export class Auditable {
/** @param {{created?:string,createUser?:string,createUserId?:string,modified?:string,modifyUser?:string,modifyUserId?:string,isDeleted?:boolean,deleted?:string,deleteUser?:string,deleteUserId?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
created;
/** @type {string} */
createUser;
/** @type {string} */
createUserId;
/** @type {string} */
modified;
/** @type {string} */
modifyUser;
/** @type {string} */
modifyUserId;
/** @type {boolean} */
isDeleted;
/** @type {?string} */
deleted;
/** @type {?string} */
deleteUser;
/** @type {?string} */
deleteUserId;
}
export class Tag {
/** @param {{name?:string,value?:string,isProtected?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
name;
/** @type {?string} */
value;
/** @type {boolean} */
isProtected;
}
export class PathItem {
/** @param {{label?:string,link?:string,objectType?:ObjectTypes,objectId?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
label;
/** @type {string} */
link;
/** @type {ObjectTypes} */
objectType;
/** @type {string} */
objectId;
}
export class ConfigItem extends Auditable {
/** @param {{id?:string,name?:string,displayName?:string,description?:string,objectType?:ObjectTypes,selfLink?:string,tags?:IList<Tag>,path?:IList<PathItem>,created?:string,createUser?:string,createUserId?:string,modified?:string,modifyUser?:string,modifyUserId?:string,isDeleted?:boolean,deleted?:string,deleteUser?:string,deleteUserId?:string}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {string} */
id;
/** @type {string} */
name;
/** @type {string} */
displayName;
/** @type {?string} */
description;
/** @type {ObjectTypes} */
objectType;
/** @type {string} */
selfLink;
/** @type {IList<Tag>} */
tags;
/** @type {IList<PathItem>} */
path;
}
/** @typedef {'String'|'Number'|'Boolean'|'List'} */
export var ValueDataType;
(function (ValueDataType) {
ValueDataType["String"] = "String"
ValueDataType["Number"] = "Number"
ValueDataType["Boolean"] = "Boolean"
ValueDataType["List"] = "List"
})(ValueDataType || (ValueDataType = {}));
/** @typedef {'Lab'|'Poc'|'Dev'|'Test'|'Int'|'Uat'|'Prod'} */
export var Environments;
(function (Environments) {
Environments["Lab"] = "Lab"
Environments["Poc"] = "Poc"
Environments["Dev"] = "Dev"
Environments["Test"] = "Test"
Environments["Int"] = "Int"
Environments["Uat"] = "Uat"
Environments["Prod"] = "Prod"
})(Environments || (Environments = {}));
export class Variable {
/** @param {{name?:string,value?:string,type?:ValueDataType,description?:string,isInherited?:boolean,environment?:Environments}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
name;
/** @type {string} */
value;
/** @type {ValueDataType} */
type;
/** @type {?string} */
description;
/** @type {boolean} */
isInherited;
/** @type {?Environments} */
environment;
}
export class Tenant extends ConfigItem {
/** @param {{name?:string,objectType?:ObjectTypes,selfLink?:string,variables?:IList<Variable>,allowedMailDomains?:IList<string>,licensedModules?:IList<string>,defaultDeploymentLifetimeDays?:number,maxDeploymentLifetimeDays?:number,systemUnpatchedWarningDays?:number,systemBackupMissingWarningHours?:number,stopVulnerableResourceAfterDays?:number,deploymentExpirationWarningDays?:number,patchNotificationDays?:number,useCustomHostnames?:boolean,removeInactiveVulnerabilitiesAfterDays?:number,id?:string,name?:string,displayName?:string,description?:string,objectType?:ObjectTypes,selfLink?:string,tags?:IList<Tag>,path?:IList<PathItem>,created?:string,createUser?:string,createUserId?:string,modified?:string,modifyUser?:string,modifyUserId?:string,isDeleted?:boolean,deleted?:string,deleteUser?:string,deleteUserId?:string}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {string} */
name;
/** @type {ObjectTypes} */
objectType;
/** @type {string} */
selfLink;
/** @type {IList<Variable>} */
variables;
/** @type {IList<string>} */
allowedMailDomains;
/** @type {IList<string>} */
licensedModules;
/** @type {number} */
defaultDeploymentLifetimeDays;
/** @type {number} */
maxDeploymentLifetimeDays;
/** @type {number} */
systemUnpatchedWarningDays;
/** @type {number} */
systemBackupMissingWarningHours;
/** @type {number} */
stopVulnerableResourceAfterDays;
/** @type {number} */
deploymentExpirationWarningDays;
/** @type {number} */
patchNotificationDays;
/** @type {boolean} */
useCustomHostnames;
/** @type {number} */
removeInactiveVulnerabilitiesAfterDays;
}
/** @typedef {'Second'|'Minute'|'Hour'|'Day'|'Week'|'Month'|'Year'} */
export var IntervalUnits;
(function (IntervalUnits) {
IntervalUnits["Second"] = "Second"
IntervalUnits["Minute"] = "Minute"
IntervalUnits["Hour"] = "Hour"
IntervalUnits["Day"] = "Day"
IntervalUnits["Week"] = "Week"
IntervalUnits["Month"] = "Month"
IntervalUnits["Year"] = "Year"
})(IntervalUnits || (IntervalUnits = {}));
export class TimeSeriesDefinition extends Auditable {
/** @param {{id?:string,tenantId?:string,tenant?:Tenant,name?:string,displayName?:string,selfLink?:string,objectType?:ObjectTypes,description?:string,sourceType?:ObjectTypes,autoCollection?:boolean,autoCollectionQuery?:string,autoCollectionInterval?:number,autoCollectionIntervalUnit?:IntervalUnits,autoCollectionTime?:string,lastAutoCollected?:string,retentionTimeMonths?:number,created?:string,createUser?:string,createUserId?:string,modified?:string,modifyUser?:string,modifyUserId?:string,isDeleted?:boolean,deleted?:string,deleteUser?:string,deleteUserId?:string}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {string} */
id;
/** @type {string} */
tenantId;
/** @type {?Tenant} */
tenant;
/** @type {string} */
name;
/** @type {?string} */
displayName;
/** @type {string} */
selfLink;
/** @type {ObjectTypes} */
objectType;
/** @type {?string} */
description;
/** @type {ObjectTypes} */
sourceType;
/** @type {boolean} */
autoCollection;
/** @type {?string} */
autoCollectionQuery;
/** @type {?number} */
autoCollectionInterval;
/** @type {?IntervalUnits} */
autoCollectionIntervalUnit;
/** @type {?string} */
autoCollectionTime;
/** @type {?string} */
lastAutoCollected;
/** @type {number} */
retentionTimeMonths;
}
/** @typedef T {any} */
export class QueryResponse {
/** @param {{offset?:number,total?:number,results?:T[],meta?:{ [index:string]: string; },responseStatus?:ResponseStatus}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
offset;
/** @type {number} */
total;
/** @type {T[]} */
results = [];
/** @type {?{ [index:string]: string; }} */
meta;
/** @type {?ResponseStatus} */
responseStatus;
}
JavaScript QueryJobEvents DTOs
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
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /api/jobevents/ HTTP/1.1 Host: core.starburst.svc Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"offset":0,"total":0,"results":[{"id":"00000000-0000-0000-0000-000000000000","tenantId":"00000000-0000-0000-0000-000000000000","jobId":"00000000-0000-0000-0000-000000000000","name":"String","state":"Started","startTime":"0001-01-01T00:00:00.0000000Z","endTime":"0001-01-01T00:00:00.0000000Z","message":"String","objectType":"JobEvent","selfLink":"/jobevents/00000000-0000-0000-0000-000000000000","duration":0}],"meta":{"String":"String"},"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}