| Required role: | TenantReader |
| GET | /api/jobevents/{Id} | Returns the jobevent | |
|---|---|---|---|
| GET | /jobevents/{Id} | Returns the jobevent |
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports CoreService.ServiceModel.Dtos.JobEvents.Crud
Imports CoreService.ServiceModel.Dtos.JobEvents.Responses
Imports YCO.Dune.Models.Enums
Imports CoreService.ServiceModel.Enums
Namespace Global
Namespace CoreService.ServiceModel.Dtos.JobEvents.Crud
'''<Summary>
'''Get jobevent
'''</Summary>
<Api(Description:="Get jobevent")>
<ApiResponse(Description:="The request endend successful", IsDefaultResponse:=true, ResponseType:=GetType(JobEventDto), StatusCode:=200)>
Public Partial Class GetJobEvent
Implements IGetSingleRequest
Implements IHasTenantName
Implements IGet
<ApiMember(DataType:="string", Format:="guid", IsRequired:=true, ParameterType:="path")>
<Validate(Validator:="NotEmpty")>
Public Overridable Property Id As Guid
<ApiMember(DataType:="string", IsRequired:=true, ParameterType:="header")>
<Validate(Validator:="NotEmpty")>
Public Overridable Property TenantName As String Implements IHasTenantName.TenantName
'''<Summary>
'''If true, also soft deleted items will be returned
'''</Summary>
<ApiMember(Description:="If true, also soft deleted items will be returned", ParameterType:="query")>
Public Overridable Property IncludeDeleted As Boolean? Implements IGetSingleRequest.IncludeDeleted
'''<Summary>
'''Returns all referenced object
'''</Summary>
<ApiMember(Description:="Returns all referenced object", ParameterType:="query")>
Public Overridable Property IncludeReferencedObjects As Boolean? Implements IGetSingleRequest.IncludeReferencedObjects
End Class
End Namespace
Namespace CoreService.ServiceModel.Dtos.JobEvents.Responses
Public Partial Class JobEventDto
Implements IHasIdName
Implements IHasTenantId
Implements IHasObjectType
'''<Summary>
'''The id of the job
'''</Summary>
Public Overridable Property Id As Guid
'''<Summary>
'''The id of the the tenant
'''</Summary>
Public Overridable Property TenantId As Guid Implements IHasTenantId.TenantId
'''<Summary>
'''The id of the parent job
'''</Summary>
Public Overridable Property JobId As Guid
'''<Summary>
'''The name of the event. Events will be grouped on the name
'''</Summary>
Public Overridable Property Name As String Implements IHasIdName.Name
Public Overridable Property ObjectType As ObjectTypes Implements IHasObjectType.ObjectType
'''<Summary>
'''The current state of the event
'''</Summary>
Public Overridable Property State As JobEventStates
'''<Summary>
'''Start time of the event
'''</Summary>
Public Overridable Property StartTime As Date
'''<Summary>
'''End time of the event (optional)
'''</Summary>
Public Overridable Property EndTime As Date?
'''<Summary>
'''A message with details to the current state
'''</Summary>
Public Overridable Property Message As String
'''<Summary>
'''Api link pointing to this object
'''</Summary>
Public Overridable Property SelfLink As String
'''<Summary>
'''The duration (in seconds) of the job event
'''</Summary>
Public Overridable Property Duration As Integer
End Class
End Namespace
Namespace CoreService.ServiceModel.Enums
Public Enum JobEventStates
Started
Skipped
Completed
Failed
End Enum
End Namespace
Namespace YCO.Dune.Models.Enums
Public 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
End Enum
End Namespace
End Namespace
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}