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
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;

public class dtos
{

    /**
    * Returns a single patching window by its id
    */
    @Api(Description="Returns a single patching window by its id")
    @ApiResponse(Description="Success", IsDefaultResponse=true, ResponseType=PatchingWindowDto.class, StatusCode=200)
    public static class GetPatchingWindow implements IBaseRequest, IHasId, IHasTenantName, IGet
    {
        /**
        * The primary key of every config item
        */
        @ApiMember(DataType="string", Description="The primary key of every config item", Format="guid", IsRequired=true, ParameterType="path")
        public UUID id = null;

        @ApiMember(DataType="string", IsRequired=true, ParameterType="header")
        @Validate(Validator="NotEmpty")
        public String tenantName = null;
        
        public UUID getId() { return id; }
        public GetPatchingWindow setId(UUID value) { this.id = value; return this; }
        public String getTenantName() { return tenantName; }
        public GetPatchingWindow setTenantName(String value) { this.tenantName = value; return this; }
    }

    public static class PatchingWindowDto
    {
        public UUID id = null;
        public String name = null;
        public DayOfWeek dayOfWeek = null;
        public MonthlyDayOccurence monthlyOccurence = null;
        public TimeSpan timeOfDay = null;
        public TimeSpan duration = null;
        public Boolean isDefault = null;
        
        public UUID getId() { return id; }
        public PatchingWindowDto setId(UUID value) { this.id = value; return this; }
        public String getName() { return name; }
        public PatchingWindowDto setName(String value) { this.name = value; return this; }
        public DayOfWeek getDayOfWeek() { return dayOfWeek; }
        public PatchingWindowDto setDayOfWeek(DayOfWeek value) { this.dayOfWeek = value; return this; }
        public MonthlyDayOccurence getMonthlyOccurence() { return monthlyOccurence; }
        public PatchingWindowDto setMonthlyOccurence(MonthlyDayOccurence value) { this.monthlyOccurence = value; return this; }
        public TimeSpan getTimeOfDay() { return timeOfDay; }
        public PatchingWindowDto setTimeOfDay(TimeSpan value) { this.timeOfDay = value; return this; }
        public TimeSpan getDuration() { return duration; }
        public PatchingWindowDto setDuration(TimeSpan value) { this.duration = value; return this; }
        public Boolean getIsDefault() { return isDefault; }
        public PatchingWindowDto setIsDefault(Boolean value) { this.isDefault = value; return this; }
    }

    public static enum MonthlyDayOccurence
    {
        First(1),
        Second(2),
        Third(3),
        Fourth(4);

        private final int value;
        MonthlyDayOccurence(final int intValue) { value = intValue; }
        public int getValue() { return value; }
    }

}

Java 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}