| GET | /v1/import/history |
|---|
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 ImportBatchLog:
import_batch_id: int = 0
batch_u_i_d: Optional[str] = None
import_type: Optional[str] = None
file_name: Optional[str] = None
status: Optional[str] = None
total_rows: int = 0
inserted_rows: int = 0
updated_rows: int = 0
skipped_rows: int = 0
error_rows: int = 0
created_by: Optional[str] = None
created_at: datetime.datetime = datetime.datetime(1, 1, 1)
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ImportHistoryResponse:
batches: List[ImportBatchLog] = field(default_factory=list)
response_status: Optional[ResponseStatus] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ImportHistoryRequest:
pass
Python ImportHistoryRequest 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/import/history HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Batches:
[
{
ImportBatchId: 0,
BatchUID: 00000000000000000000000000000000,
ImportType: String,
FileName: String,
Status: String,
TotalRows: 0,
InsertedRows: 0,
UpdatedRows: 0,
SkippedRows: 0,
ErrorRows: 0,
CreatedBy: String,
CreatedAt: 0001-01-01
}
],
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}