| POST,OPTIONS | /v1/import/{Type}/preview |
|---|
export class ImportRowResult
{
public Line: number;
public Action: string;
public Field: string;
public Message: string;
public Summary: string;
public constructor(init?: Partial<ImportRowResult>) { (Object as any).assign(this, init); }
}
export class ImportResult
{
public ImportType: string;
public FileName: string;
public DryRun: boolean;
public ImportBatchId: number;
public TotalRows: number;
public NewRows: number;
public UpdatedRows: number;
public SkippedRows: number;
public ErrorRows: number;
public Rows: ImportRowResult[] = [];
public ResponseStatus: ResponseStatus;
public constructor(init?: Partial<ImportResult>) { (Object as any).assign(this, init); }
}
export class ImportPreviewRequest
{
public Type: string;
public constructor(init?: Partial<ImportPreviewRequest>) { (Object as any).assign(this, init); }
}
TypeScript ImportPreviewRequest 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.
POST /v1/import/{Type}/preview HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
Type: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
ImportType: String,
FileName: String,
DryRun: False,
ImportBatchId: 0,
TotalRows: 0,
NewRows: 0,
UpdatedRows: 0,
SkippedRows: 0,
ErrorRows: 0,
Rows:
[
{
Line: 0,
Action: String,
Field: String,
Message: String,
Summary: String
}
],
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}