| GET | /tasks/{asyncTaskId} | Get task detail of authorized user |
|---|
import 'package:servicestack/servicestack.dart';
class Task implements IConvertible
{
/**
* Async task ID
*/
// @ApiMember(Description="Async task ID", IsRequired=true)
String? asyncTaskId;
/**
* Type of requested async task, e.g 'stock', 'sellout', 'crm'
*/
// @ApiMember(Description="Type of requested async task, e.g 'stock', 'sellout', 'crm'", IsRequired=true)
String? type;
/**
* Async task creation date
*/
// @ApiMember(Description="Async task creation date", IsRequired=true)
String? requestDate;
/**
* Status of requested async task, e.g 'REQ', 'INP', 'COM', 'ERR'
*/
// @ApiMember(Description="Status of requested async task, e.g 'REQ', 'INP', 'COM', 'ERR'", IsRequired=true)
String? status;
/**
* Percentage of completion
*/
// @ApiMember(Description="Percentage of completion", IsRequired=true)
int? percentage;
/**
* Brand Trigram
*/
// @ApiMember(Description="Brand Trigram", IsRequired=true)
String? brand;
/**
* Download url of created files
*/
// @ApiMember(Description="Download url of created files")
String? downloadUrl;
/**
* Presigned expiring download url
*/
// @ApiMember(Description="Presigned expiring download url")
String? signedDownloadUrl;
/**
* Total count of operations
*/
// @ApiMember(Description="Total count of operations")
int? totalResults;
/**
* Count of successful operations
*/
// @ApiMember(Description="Count of successful operations")
int? totalSucceeded;
/**
* Count of failed operations
*/
// @ApiMember(Description="Count of failed operations")
int? totalFailed;
Task({this.asyncTaskId,this.type,this.requestDate,this.status,this.percentage,this.brand,this.downloadUrl,this.signedDownloadUrl,this.totalResults,this.totalSucceeded,this.totalFailed});
Task.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
asyncTaskId = json['asyncTaskId'];
type = json['type'];
requestDate = json['requestDate'];
status = json['status'];
percentage = json['percentage'];
brand = json['brand'];
downloadUrl = json['downloadUrl'];
signedDownloadUrl = json['signedDownloadUrl'];
totalResults = json['totalResults'];
totalSucceeded = json['totalSucceeded'];
totalFailed = json['totalFailed'];
return this;
}
Map<String, dynamic> toJson() => {
'asyncTaskId': asyncTaskId,
'type': type,
'requestDate': requestDate,
'status': status,
'percentage': percentage,
'brand': brand,
'downloadUrl': downloadUrl,
'signedDownloadUrl': signedDownloadUrl,
'totalResults': totalResults,
'totalSucceeded': totalSucceeded,
'totalFailed': totalFailed
};
getTypeName() => "Task";
TypeContext? context = _ctx;
}
class GetTaskDetailResponse extends Task implements IConvertible
{
GetTaskDetailResponse();
GetTaskDetailResponse.fromJson(Map<String, dynamic> json) : super.fromJson(json);
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
return this;
}
Map<String, dynamic> toJson() => super.toJson();
getTypeName() => "GetTaskDetailResponse";
TypeContext? context = _ctx;
}
class GetTaskDetail implements IConvertible
{
/**
* Async task ID
*/
// @ApiMember(Description="Async task ID", IsRequired=true)
String? asyncTaskId;
GetTaskDetail({this.asyncTaskId});
GetTaskDetail.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
asyncTaskId = json['asyncTaskId'];
return this;
}
Map<String, dynamic> toJson() => {
'asyncTaskId': asyncTaskId
};
getTypeName() => "GetTaskDetail";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'dev_api_booster.richemont.com', types: <String, TypeInfo> {
'Task': TypeInfo(TypeOf.Class, create:() => Task()),
'GetTaskDetailResponse': TypeInfo(TypeOf.Class, create:() => GetTaskDetailResponse()),
'GetTaskDetail': TypeInfo(TypeOf.Class, create:() => GetTaskDetail()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /tasks/{asyncTaskId} HTTP/1.1
Host: dev-api-booster.richemont.com
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"asyncTaskId":"00000000000000000000000000000000","type":"String","requestDate":"String","status":"String","percentage":0,"brand":"String","downloadUrl":"String","signedDownloadUrl":"String","totalResults":0,"totalSucceeded":0,"totalFailed":0}