| GET | /v1/GetUserCurrentDataProcess |
|---|
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class DataProcessJob:
id: int = 0
gas_id: Optional[str] = None
date_created: Optional[str] = None
processed_records: int = 0
status: int = 0
status_name: Optional[str] = None
file_name: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class DataProcessLog:
id: int = 0
data_process__id: int = 0
row_number: int = 0
failure_reason_id: int = 0
failure_reason: Optional[str] = None
meta_data: Optional[str] = None
meta_data2: Optional[str] = None
has_failed: bool = False
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CurrentDataProcessResponse(DataProcessJob):
type: int = 0
total_records: int = 0
original_file_name: Optional[str] = None
date_started: Optional[str] = None
date_finished: Optional[str] = None
data_process_result_logs: List[DataProcessLog] = field(default_factory=list)
failed_count: int = 0
success_count: int = 0
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CurrentDataProcessRequest(IGet):
pass
Python CurrentDataProcessRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/GetUserCurrentDataProcess HTTP/1.1 Host: uat-api-vehicle-mgt-mb-dhc.rapp-customers.co.uk Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
type: 0,
totalRecords: 0,
originalFileName: String,
dateStarted: String,
dateFinished: String,
dataProcessResultLogs:
[
{
id: 0,
dataProcess_Id: 0,
rowNumber: 0,
failureReasonId: 0,
failureReason: String,
metaData: String,
metaData2: String,
hasFailed: False
}
],
failedCount: 0,
successCount: 0,
id: 0,
gasId: String,
dateCreated: String,
processedRecords: 0,
status: 0,
statusName: String,
fileName: String
}