| POST,OPTIONS | /v1/import/{Type}/commit |
|---|
"use strict";
export class ImportRowResult {
/** @param {{Line?:number,Action?:string,Field?:string,Message?:string,Summary?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
Line;
/** @type {string} */
Action;
/** @type {string} */
Field;
/** @type {string} */
Message;
/** @type {string} */
Summary;
}
export class ImportResult {
/** @param {{ImportType?:string,FileName?:string,DryRun?:boolean,ImportBatchId?:number,TotalRows?:number,NewRows?:number,UpdatedRows?:number,SkippedRows?:number,ErrorRows?:number,Rows?:ImportRowResult[],ResponseStatus?:ResponseStatus}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
ImportType;
/** @type {string} */
FileName;
/** @type {boolean} */
DryRun;
/** @type {number} */
ImportBatchId;
/** @type {number} */
TotalRows;
/** @type {number} */
NewRows;
/** @type {number} */
UpdatedRows;
/** @type {number} */
SkippedRows;
/** @type {number} */
ErrorRows;
/** @type {ImportRowResult[]} */
Rows = [];
/** @type {ResponseStatus} */
ResponseStatus;
}
export class ImportCommitRequest {
/** @param {{Type?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Type;
}
JavaScript ImportCommitRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/import/{Type}/commit HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"Type":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
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"}}}