| PUT | /api/importdata |
|---|
namespace IDB.API.General
open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
[<AllowNullLiteral>]
type ImportResult() =
member val TotalRows:Int32 = new Int32() with get,set
member val TotalAdded:Int32 = new Int32() with get,set
member val TotalUpdated:Int32 = new Int32() with get,set
member val SuccesfullRows:Int32 = new Int32() with get,set
member val ErrorRows:Int32 = new Int32() with get,set
member val Errors:ResizeArray<String> = null with get,set
[<AllowNullLiteral>]
type ImportField() =
member val Name:String = null with get,set
member val Value:String = null with get,set
[<AllowNullLiteral>]
type Row() =
member val Fields:ResizeArray<ImportField> = null with get,set
[<AllowNullLiteral>]
type FixedValue() =
member val Name:String = null with get,set
member val Value:String = null with get,set
///<summary>
///Import entity data into DigiOffice (v1)
///</summary>
[<Api(Description="Import entity data into DigiOffice (v1)")>]
[<AllowNullLiteral>]
type ImportData() =
///<summary>
///Entityname in which the data will be imported
///</summary>
[<ApiMember(Description="Entityname in which the data will be imported", IsRequired=true)>]
member val EntityType:String = null with get,set
///<summary>
///Reports errors with a reference to this field (for example ID)
///</summary>
[<ApiMember(Description="Reports errors with a reference to this field (for example ID)")>]
member val ErrorField:String = null with get,set
///<summary>
///Should import continue on errors? (Default true)
///</summary>
[<ApiMember(Description="Should import continue on errors? (Default true)")>]
member val ContinueOnError:Boolean = new Boolean() with get,set
///<summary>
///Rows to be imported
///</summary>
[<ApiMember(Description="Rows to be imported", IsRequired=true)>]
member val Rows:ResizeArray<Row> = null with get,set
///<summary>
///Additional values to be imported on every row
///</summary>
[<ApiMember(Description="Additional values to be imported on every row")>]
member val FixedValues:ResizeArray<FixedValue> = null with get,set
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PUT /api/importdata HTTP/1.1
Host: test-do-services.klokgroep.nl
Accept: application/json
Content-Type: application/json
Content-Length: length
{"EntityType":"String","ErrorField":"String","ContinueOnError":false,"Rows":[{"Fields":[{"Name":"String","Value":"String"}]}],"FixedValues":[{"Name":"String","Value":"String"}]}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"TotalRows":0,"TotalAdded":0,"TotalUpdated":0,"SuccesfullRows":0,"ErrorRows":0,"Errors":["String"]}