| Required role: | TenantReader |
| GET | /api/jobevents/{Id} | Returns the jobevent | |
|---|---|---|---|
| GET | /jobevents/{Id} | Returns the jobevent |
import Foundation
import ServiceStack
/**
* Get jobevent
*/
// @Api(Description="Get jobevent")
// @ApiResponse(Description="The request endend successful", IsDefaultResponse=true, ResponseType=typeof(JobEventDto), StatusCode=200)
public class GetJobEvent : IGetSingleRequest, IHasTenantName, IGet, Codable
{
// @ApiMember(DataType="string", Format="guid", IsRequired=true, ParameterType="path")
// @Validate(Validator="NotEmpty")
public var id:String
// @ApiMember(DataType="string", IsRequired=true, ParameterType="header")
// @Validate(Validator="NotEmpty")
public var tenantName:String
/**
* If true, also soft deleted items will be returned
*/
// @ApiMember(Description="If true, also soft deleted items will be returned", ParameterType="query")
public var includeDeleted:Bool?
/**
* Returns all referenced object
*/
// @ApiMember(Description="Returns all referenced object", ParameterType="query")
public var includeReferencedObjects:Bool?
required public init(){}
}
public class JobEventDto : IHasIdName, IHasTenantId, IHasObjectType, Codable
{
/**
* The id of the job
*/
public var id:String
/**
* The id of the the tenant
*/
public var tenantId:String
/**
* The id of the parent job
*/
public var jobId:String
/**
* The name of the event. Events will be grouped on the name
*/
public var name:String
public var objectType:ObjectTypes
/**
* The current state of the event
*/
public var state:JobEventStates
/**
* Start time of the event
*/
public var startTime:Date
/**
* End time of the event (optional)
*/
public var endTime:Date?
/**
* A message with details to the current state
*/
public var message:String
/**
* Api link pointing to this object
*/
public var selfLink:String
/**
* The duration (in seconds) of the job event
*/
public var duration:Int
required public init(){}
}
public enum ObjectTypes : String, Codable
{
case None
case ConfigItem
case Tenant
case Collection
case Resource
case ComputeNode
case VirtualMachine
case PhysicalMachine
case Disk
case Subnet
case IPAddress
case Job
case JobEvent
case FreezePeriod
case ResourceGroup
case Deployment
case ResourceGroupTemplate
case DeploymentTemplate
case ResourceProvider
case GenericResource
case Role
case Permission
case User
case PatchingWindow
case Update
case ReportDefinition
case TimeSeries
case DataPoint
case Action
case ActionAssignment
case UserNote
}
public enum JobEventStates : String, Codable
{
case Started
case Skipped
case Completed
case Failed
}
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}