Click or drag to resize
dyostem api documentation

ThirdPartySystemPutBlockData Method

[This is preliminary documentation and is subject to change.]

Add (or update) block informations.

Namespace:  Dyostem.Services
Assembly:  Dyostem (in Dyostem.dll) Version: 5.3
Syntax
public BlockDataPutResult PutBlockData(
	string sessionId,
	List<NewBlockData> blockData
)

Parameters

sessionId
Type: SystemString
The SessionId returned by the OpenSession(String, String) command.
blockData
Type: System.Collections.GenericListNewBlockData
a list of block informations to create or update

Return Value

Type: BlockDataPutResult
An instance of BlockDataPutResult compound with a Message indicating that the command succeeded or not, and a list of BlockDataCreationResult indicating for each block the result of its block data creation command.
Examples
Request
1POST http://www.dyostem.com/Services/ThirdPartySystem.svc/PutBlockData HTTP/1.1
2Content-Type: application/json
3Host: www.dyostem.com
4Content-Length: 212
5Expect: 100-continue
6
7{"sessionId":"8a6e5fe0-6e98-42c8-ac0b-7b07d2dfb56e","blockData":[{"BlockId":"4d9b4cf3-3f23-40d3-9494-ddd0f64dd9c2","BlockDataTypeName":"Rendement","Value":4.5,"VintageId":"0442d9ee-491f-441b-b877-de210d9a0b10"}]}
Response
 1HTTP/1.1 200 OK
 2Cache-Control: private
 3Transfer-Encoding: chunked
 4Content-Type: application/json; charset=utf-8
 5Server: Microsoft-IIS/7.5
 6Set-Cookie: ASP.NET_SessionId=wsddu4phijcxjldntkifhtfx; path=/; HttpOnly
 7X-AspNet-Version: 4.0.30319
 8X-Powered-By: ASP.NET
 9Date: Thu, 16 Jun 2016 12:10:51 GMT
10
111a7
12{"d":{"__type":"BlockDataPutResult:#Dyostem.Services.Data","BlockDataCreationResults":[{"__type":"BlockDataCreationResult:#Dyostem.Services.Data","BlockDataTypeId":"b6df4e72-c70e-4826-b620-aa4748a68020","BlockDataTypeName":"Rendement","BlockId":"4d9b4cf3-3f23-40d3-9494-ddd0f64dd9c2","BlockName":null,"CreationResult":"OK: 4.5 has been added\/updated for Rendement (b6df4e72-c70e-4826-b620-aa4748a68020)"}],"Message":"OK"}}
130
Formated Json Response
 1{
 2  "d" : {
 3    "__type" : "BlockDataPutResult:#Dyostem.Services.Data",
 4    "BlockDataCreationResults" : [{
 5        "__type" : "BlockDataCreationResult:#Dyostem.Services.Data",
 6        "BlockDataTypeId" : "b6df4e72-c70e-4826-b620-aa4748a68020",
 7        "BlockDataTypeName" : "Rendement",
 8        "BlockId" : "4d9b4cf3-3f23-40d3-9494-ddd0f64dd9c2",
 9        "BlockName" : null,
10        "CreationResult" : "OK: 4.5 has been added\/updated for Rendement (b6df4e72-c70e-4826-b620-aa4748a68020)" 
11        }
12    ],
13    "Message" : "OK"
14  }
15}
See Also