| Required role: | TenantReader |
| GET | /api/jobevents/{Id} | Returns the jobevent | |
|---|---|---|---|
| GET | /jobevents/{Id} | Returns the jobevent |
import 'package:servicestack/servicestack.dart';
enum ObjectTypes
{
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,
}
enum JobEventStates
{
Started,
Skipped,
Completed,
Failed,
}
class JobEventDto implements IHasIdName, IHasTenantId, IHasObjectType, IConvertible
{
/**
* The id of the job
*/
String id = "";
/**
* The id of the the tenant
*/
String tenantId = "";
/**
* The id of the parent job
*/
String jobId = "";
/**
* The name of the event. Events will be grouped on the name
*/
String name = "";
ObjectTypes objectType;
/**
* The current state of the event
*/
JobEventStates state;
/**
* Start time of the event
*/
DateTime startTime = DateTime(0);
/**
* End time of the event (optional)
*/
DateTime? endTime;
/**
* A message with details to the current state
*/
String message = "";
/**
* Api link pointing to this object
*/
String selfLink = "";
/**
* The duration (in seconds) of the job event
*/
int duration = 0;
JobEventDto({this.id,this.tenantId,this.jobId,this.name,this.objectType,this.state,this.startTime,this.endTime,this.message,this.selfLink,this.duration});
JobEventDto.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
tenantId = json['tenantId'];
jobId = json['jobId'];
name = json['name'];
objectType = JsonConverters.fromJson(json['objectType'],'ObjectTypes',context!);
state = JsonConverters.fromJson(json['state'],'JobEventStates',context!);
startTime = JsonConverters.fromJson(json['startTime'],'DateTime',context!);
endTime = JsonConverters.fromJson(json['endTime'],'DateTime',context!);
message = json['message'];
selfLink = json['selfLink'];
duration = json['duration'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'tenantId': tenantId,
'jobId': jobId,
'name': name,
'objectType': JsonConverters.toJson(objectType,'ObjectTypes',context!),
'state': JsonConverters.toJson(state,'JobEventStates',context!),
'startTime': JsonConverters.toJson(startTime,'DateTime',context!),
'endTime': JsonConverters.toJson(endTime,'DateTime',context!),
'message': message,
'selfLink': selfLink,
'duration': duration
};
getTypeName() => "JobEventDto";
TypeContext? context = _ctx;
}
/**
* Get jobevent
*/
// @Api(Description="Get jobevent")
// @ApiResponse(Description="The request endend successful", IsDefaultResponse=true, ResponseType=typeof(JobEventDto), StatusCode=200)
class GetJobEvent implements IGetSingleRequest, IHasTenantName, IGet, IConvertible
{
// @ApiMember(DataType="string", Format="guid", IsRequired=true, ParameterType="path")
// @Validate(Validator="NotEmpty")
String id = "";
// @ApiMember(DataType="string", IsRequired=true, ParameterType="header")
// @Validate(Validator="NotEmpty")
String tenantName = "";
/**
* If true, also soft deleted items will be returned
*/
// @ApiMember(Description="If true, also soft deleted items will be returned", ParameterType="query")
bool? includeDeleted;
/**
* Returns all referenced object
*/
// @ApiMember(Description="Returns all referenced object", ParameterType="query")
bool? includeReferencedObjects;
GetJobEvent({this.id,this.tenantName,this.includeDeleted,this.includeReferencedObjects});
GetJobEvent.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
tenantName = json['tenantName'];
includeDeleted = json['includeDeleted'];
includeReferencedObjects = json['includeReferencedObjects'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'tenantName': tenantName,
'includeDeleted': includeDeleted,
'includeReferencedObjects': includeReferencedObjects
};
getTypeName() => "GetJobEvent";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'duneframework.com', types: <String, TypeInfo> {
'ObjectTypes': TypeInfo(TypeOf.Enum, enumValues:ObjectTypes.values),
'JobEventStates': TypeInfo(TypeOf.Enum, enumValues:JobEventStates.values),
'JobEventDto': TypeInfo(TypeOf.Class, create:() => JobEventDto()),
'GetJobEvent': TypeInfo(TypeOf.Class, create:() => GetJobEvent()),
});
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/{Id} HTTP/1.1
Host: core.starburst.svc
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"id":"00000000-0000-0000-0000-000000000000","tenantId":"00000000-0000-0000-0000-000000000000","jobId":"00000000-0000-0000-0000-000000000000","name":"String","objectType":"JobEvent","state":"Started","startTime":"0001-01-01T00:00:00.0000000Z","endTime":"0001-01-01T00:00:00.0000000Z","message":"String","selfLink":"String","duration":0}