| Requires the role: | TenantReader |
| GET | /api/patching/updates/{Id} | Returns a single update by its id | |
|---|---|---|---|
| GET | /patching/updates/{Id} | Returns a single update by its id |
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
/**
* Returns a single update by its id
*/
@Api(Description="Returns a single update by its id")
@ApiResponse(Description="Success", IsDefaultResponse=true, ResponseType=UpdateDto.class, StatusCode=200)
public static class GetUpdate 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 GetUpdate setId(UUID value) { this.id = value; return this; }
public String getTenantName() { return tenantName; }
public GetUpdate setTenantName(String value) { this.tenantName = value; return this; }
}
public static class UpdateDto
{
public UUID id = null;
public String name = null;
/**
* The severity of the vulnerability this update fixes (e.g. Critical, Important, Moderate, etc.)
*/
public String severity = null;
/**
* The time the update was first published
*/
public Date published = null;
/**
* Update classification/type (e.g. Critical Update, Definition Update, Security Update, etc.)
*/
public ArrayList<String> classifications = null;
/**
* Whether the update needs a reboot or not
*/
public Boolean isRebootRequired = null;
/**
* In case of windows this is the KB id
*/
public String extId = null;
/**
* In case of linux this is the update package version
*/
public String version = null;
public UUID getId() { return id; }
public UpdateDto setId(UUID value) { this.id = value; return this; }
public String getName() { return name; }
public UpdateDto setName(String value) { this.name = value; return this; }
public String getSeverity() { return severity; }
public UpdateDto setSeverity(String value) { this.severity = value; return this; }
public Date getPublished() { return published; }
public UpdateDto setPublished(Date value) { this.published = value; return this; }
public ArrayList<String> getClassifications() { return classifications; }
public UpdateDto setClassifications(ArrayList<String> value) { this.classifications = value; return this; }
public Boolean getIsRebootRequired() { return isRebootRequired; }
public UpdateDto setIsRebootRequired(Boolean value) { this.isRebootRequired = value; return this; }
public String getExtId() { return extId; }
public UpdateDto setExtId(String value) { this.extId = value; return this; }
public String getVersion() { return version; }
public UpdateDto setVersion(String value) { this.version = value; return this; }
}
}
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/updates/{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","severity":"String","published":"0001-01-01T00:00:00.0000000Z","classifications":["String"],"isRebootRequired":false,"extId":"String","version":"String"}