Is there a possibility to create an agent object through the API?

Discussion created by Malik_Abdul_8942 on Dec 12, 2017


To create an object through the API it's necessary to pass a template as parameter: CreateObject(UC4ObjectName name, Template template, IFolder folder) 

Referring to the documentation for the "Class Template" there is no valid template for an agent object (HOST). 

Is there another possibility to create an agent object through the API? 



Yes it is possible to create an agent object through the API. You can utilize create object

public CreateObject(UC4ObjectName name,

                    Template template,

                    IFolder folder)

Creates an UC4 Object.

If a client (type CLNT) should be created, the name of the new object should not be client number. For example C0123 for client 123. After the CLNT object has been created it can be renamed to the client number using the RenameObject class.


name - Name of the new Object

template - Template If the required Template constant is not defined in the com.uc4.api.Template class the request TemplateList can be used to get a Template object.

folder - Folder where the object should be stored