CoreService

<back to all web services

GetJobEvent

JobEvent - CRUD

Get jobevent

Requires Authentication
Required role:TenantReader
The following routes are available for this service:
GET/api/jobevents/{Id}Returns the jobevent
GET/jobevents/{Id}Returns the jobevent
namespace CoreService.ServiceModel.Dtos.JobEvents.Crud

open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    type ObjectTypes =
        | None = 0
        | ConfigItem = 1
        | Tenant = 2
        | Collection = 3
        | Resource = 4
        | ComputeNode = 5
        | VirtualMachine = 6
        | PhysicalMachine = 7
        | Disk = 8
        | Subnet = 9
        | IPAddress = 10
        | Job = 11
        | JobEvent = 12
        | FreezePeriod = 13
        | ResourceGroup = 14
        | Deployment = 15
        | ResourceGroupTemplate = 16
        | DeploymentTemplate = 17
        | ResourceProvider = 18
        | GenericResource = 19
        | Role = 20
        | Permission = 21
        | User = 22
        | PatchingWindow = 23
        | Update = 24
        | ReportDefinition = 25
        | TimeSeries = 26
        | DataPoint = 27
        | Action = 28
        | ActionAssignment = 29
        | UserNote = 30

    type JobEventStates =
        | Started = 0
        | Skipped = 1
        | Completed = 2
        | Failed = 3

    [<AllowNullLiteral>]
    type JobEventDto() = 
        ///<summary>
        ///The id of the job
        ///</summary>
        member val Id:Guid = new Guid() with get,set

        ///<summary>
        ///The id of the the tenant
        ///</summary>
        member val TenantId:Guid = new Guid() with get,set

        ///<summary>
        ///The id of the parent job
        ///</summary>
        member val JobId:Guid = new Guid() with get,set

        ///<summary>
        ///The name of the event. Events will be grouped on the name
        ///</summary>
        member val Name:String = null with get,set

        member val ObjectType:ObjectTypes = new ObjectTypes() with get,set
        ///<summary>
        ///The current state of the event
        ///</summary>
        member val State:JobEventStates = new JobEventStates() with get,set

        ///<summary>
        ///Start time of the event
        ///</summary>
        member val StartTime:DateTime = new DateTime() with get,set

        ///<summary>
        ///End time of the event (optional)
        ///</summary>
        member val EndTime:Nullable<DateTime> = new Nullable<DateTime>() with get,set

        ///<summary>
        ///A message with details to the current state
        ///</summary>
        member val Message:String = null with get,set

        ///<summary>
        ///Api link pointing to this object
        ///</summary>
        member val SelfLink:String = null with get,set

        ///<summary>
        ///The duration (in seconds) of the job event
        ///</summary>
        member val Duration:Int32 = new Int32() with get,set

    ///<summary>
    ///Get jobevent
    ///</summary>
    [<Api(Description="Get jobevent")>]
    [<ApiResponse(Description="The request endend successful", IsDefaultResponse=true, ResponseType=typeof<JobEventDto>, StatusCode=200)>]
    [<AllowNullLiteral>]
    type GetJobEvent() = 
        interface IGet
        [<ApiMember(DataType="string", Format="guid", IsRequired=true, ParameterType="path")>]
        [<Validate(Validator="NotEmpty")>]
        member val Id:Guid = new Guid() with get,set

        [<ApiMember(DataType="string", IsRequired=true, ParameterType="header")>]
        [<Validate(Validator="NotEmpty")>]
        member val TenantName:String = null with get,set

        ///<summary>
        ///If true, also soft deleted items will be returned
        ///</summary>
        [<ApiMember(Description="If true, also soft deleted items will be returned", ParameterType="query")>]
        member val IncludeDeleted:Nullable<Boolean> = new Nullable<Boolean>() with get,set

        ///<summary>
        ///Returns all referenced object
        ///</summary>
        [<ApiMember(Description="Returns all referenced object", ParameterType="query")>]
        member val IncludeReferencedObjects:Nullable<Boolean> = new Nullable<Boolean>() with get,set

F# GetJobEvent 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

HTTP + JSON

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}