CoreService

<back to all web services

GetPatchingWindow

Patching - CRUD

Returns a single patching window by its id

Requires Authentication
Requires the role:TenantReader
The following routes are available for this service:
GET/api/patching/windows/{Id}Returns a single patching window by its id
GET/patching/windows/{Id}Returns a single patching window by its id
namespace CoreService.ServiceModel.Dtos.Patching.Crud

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

    type MonthlyDayOccurence =
        | First = 1
        | Second = 2
        | Third = 3
        | Fourth = 4

    [<AllowNullLiteral>]
    type PatchingWindowDto() = 
        member val Id:Guid = new Guid() with get,set
        member val Name:String = null with get,set
        member val DayOfWeek:DayOfWeek = new DayOfWeek() with get,set
        member val MonthlyOccurence:MonthlyDayOccurence = new MonthlyDayOccurence() with get,set
        member val TimeOfDay:TimeOnly = new TimeOnly() with get,set
        member val Duration:TimeSpan = new TimeSpan() with get,set
        member val IsDefault:Boolean = new Boolean() with get,set

    ///<summary>
    ///Returns a single patching window by its id
    ///</summary>
    [<Api(Description="Returns a single patching window by its id")>]
    [<ApiResponse(Description="Success", IsDefaultResponse=true, ResponseType=typeof<PatchingWindowDto>, StatusCode=200)>]
    [<AllowNullLiteral>]
    type GetPatchingWindow() = 
        interface IGet
        ///<summary>
        ///The primary key of every config item
        ///</summary>
        [<ApiMember(DataType="string", Description="The primary key of every config item", Format="guid", IsRequired=true, ParameterType="path")>]
        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

F# GetPatchingWindow 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/patching/windows/{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","name":"String","dayOfWeek":"Sunday","monthlyOccurence":"First","timeOfDay":"00:00:00","duration":"00:00:00","isDefault":false}