How to set a batch registration parameter via Web Services API

Question

Is it possible to add a batch registration parameter while a batch is created via Web Services API?

Answer

In order to set a batch registration parameter using Web Services API, specify the registration property before creating a new batch.

The sample code is below:

FlexiCapture.RegistrationProperty prop = new FlexiCapture.RegistrationProperty
{
Name = "TestParameter",
Value = "ValueOfParameter"
};

FlexiCapture.Batch.PropertiesType registrationProperties = new FlexiCapture.Batch.PropertiesType();
registrationProperties.Add(prop);

var newBatch = new FlexiCapture.Batch { Name = "Sample API Batch" };
newBatch.Properties = new FlexiCapture.Batch.PropertiesType();
newBatch.Properties = registrationProperties;

service.AddNewBatch(sessionId, projectId, newBatch, userId);

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.