Mercedes.VehicleManagement.API

<back to all web services

GetDataProcessRequest

Requires Authentication
The following routes are available for this service:
GET/v1/GetDataProcess/{ProcessId}
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 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:
    id: int = 0
    type: int = 0
    status: int = 0
    status_name: Optional[str] = None
    total_records: int = 0
    processed_records: int = 0
    file_name: Optional[str] = None
    original_file_name: Optional[str] = None
    date_created: Optional[str] = None
    date_started: Optional[str] = None
    date_finished: Optional[str] = None
    gas_id: 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 GetDataProcessRequest(IGet):
    process_id: int = 0

Python GetDataProcessRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /v1/GetDataProcess/{ProcessId} 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

{
	id: 0,
	type: 0,
	status: 0,
	statusName: String,
	totalRecords: 0,
	processedRecords: 0,
	fileName: String,
	originalFileName: String,
	dateCreated: String,
	dateStarted: String,
	dateFinished: String,
	gasId: String,
	dataProcessResultLogs: 
	[
		{
			id: 0,
			dataProcess_Id: 0,
			rowNumber: 0,
			failureReasonId: 0,
			failureReason: String,
			metaData: String,
			metaData2: String,
			hasFailed: False
		}
	],
	failedCount: 0,
	successCount: 0
}