| 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 'package:servicestack/servicestack.dart';
class UpdateDto implements IConvertible
{
String id = "";
String name = "";
/**
* The severity of the vulnerability this update fixes (e.g. Critical, Important, Moderate, etc.)
*/
String? severity;
/**
* The time the update was first published
*/
DateTime published = DateTime(0);
/**
* Update classification/type (e.g. Critical Update, Definition Update, Security Update, etc.)
*/
List<String>? classifications;
/**
* Whether the update needs a reboot or not
*/
bool isRebootRequired;
/**
* In case of windows this is the KB id
*/
String? extId;
/**
* In case of linux this is the update package version
*/
String? version;
UpdateDto({this.id,this.name,this.severity,this.published,this.classifications,this.isRebootRequired,this.extId,this.version});
UpdateDto.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
name = json['name'];
severity = json['severity'];
published = JsonConverters.fromJson(json['published'],'DateTime',context!);
classifications = JsonConverters.fromJson(json['classifications'],'List<String>',context!);
isRebootRequired = json['isRebootRequired'];
extId = json['extId'];
version = json['version'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'name': name,
'severity': severity,
'published': JsonConverters.toJson(published,'DateTime',context!),
'classifications': JsonConverters.toJson(classifications,'List<String>',context!),
'isRebootRequired': isRebootRequired,
'extId': extId,
'version': version
};
getTypeName() => "UpdateDto";
TypeContext? context = _ctx;
}
/**
* Returns a single update by its id
*/
// @Api(Description="Returns a single update by its id")
// @ApiResponse(Description="Success", IsDefaultResponse=true, ResponseType=typeof(UpdateDto), StatusCode=200)
class GetUpdate implements IBaseRequest, IHasId, IHasTenantName, IGet, IConvertible
{
/**
* The primary key of every config item
*/
// @ApiMember(DataType="string", Description="The primary key of every config item", Format="guid", IsRequired=true, ParameterType="path")
String id = "";
// @ApiMember(DataType="string", IsRequired=true, ParameterType="header")
// @Validate(Validator="NotEmpty")
String tenantName = "";
GetUpdate({this.id,this.tenantName});
GetUpdate.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
tenantName = json['tenantName'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'tenantName': tenantName
};
getTypeName() => "GetUpdate";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'duneframework.com', types: <String, TypeInfo> {
'UpdateDto': TypeInfo(TypeOf.Class, create:() => UpdateDto()),
'GetUpdate': TypeInfo(TypeOf.Class, create:() => GetUpdate()),
});
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"}