| Requires the role: | TenantReader |
| 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 |
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using CoreService.ServiceModel.Dtos.Patching.Crud;
using CoreService.ServiceModel.Dtos.Patching.Responses;
using CoreService.ServiceModel.Enums;
namespace CoreService.ServiceModel.Dtos.Patching.Crud
{
///<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(CoreService.ServiceModel.Dtos.Patching.Responses.PatchingWindowDto), StatusCode=200)]
public partial class GetPatchingWindow
: IBaseRequest, IHasId, IHasTenantName, 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")]
public virtual Guid Id { get; set; }
[ApiMember(DataType="string", IsRequired=true, ParameterType="header")]
[Validate("NotEmpty")]
public virtual string TenantName { get; set; }
}
}
namespace CoreService.ServiceModel.Dtos.Patching.Responses
{
public partial class PatchingWindowDto
{
public virtual Guid Id { get; set; }
public virtual string Name { get; set; }
public virtual DayOfWeek DayOfWeek { get; set; }
public virtual MonthlyDayOccurence MonthlyOccurence { get; set; }
public virtual TimeOnly TimeOfDay { get; set; }
public virtual TimeSpan Duration { get; set; }
public virtual bool IsDefault { get; set; }
}
}
namespace CoreService.ServiceModel.Enums
{
public enum MonthlyDayOccurence
{
First = 1,
Second = 2,
Third = 3,
Fourth = 4,
}
}
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/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}