UpdateExtendedDbEntity
Update Extended DB Entity.Input Properties
UpdateEntityRequest
PropertyDataRequest
PropertyDataUpdateRequest
Output Properties
UpdateEntityResponse
EntityDataResponse
PropertyDataResponse
MaskTypeDataResponse
Http Request
PATCH https://yourcompany-api.exigo.com/3.0/extendeddb HTTP/1.1 Content-Type: application/json Authorization: Basic base64Encoded(yourlogin@yourcompany:yourpassword){ "entityNameToUpdate": "1", "schemaName": "1", "newEntityName": "1", "newEntitySetName": "1", "newIsLog": true, "newMaxLogDays": 1, "newLogDateField": "", "newNavigations": null, "newProperties": null, "propertiesToUpdate": null, "propertiesToDelete": null }
Http Response
HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 Content-Length: length{ "entity": null, "result": null }
Soap Request
The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.
POST /3.0/ExigoApi.asmx HTTP/1.1 Host: totallife-api.exigo.com Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: "https://api.exigo.com/UpdateExtendedDbEntity" <?xml version="1.0" encoding="utf-8"?> <soap:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Header> <ApiAuthentication xmlns="http://api.exigo.com/"> <LoginName>string</LoginName> <Password>string</Password> <Company>string</Company> <Identity>string</Identity> <RequestTimeUtc>dateTime</RequestTimeUtc> <Signature>string</Signature> </ApiAuthentication> </soap:Header> <soap:Body> <UpdateEntityRequest xmlns="http://api.exigo.com/"> <EntityNameToUpdate>string</EntityNameToUpdate> <SchemaName>string</SchemaName> <NewEntityName>string</NewEntityName> <NewEntitySetName>string</NewEntitySetName> <NewIsLog>boolean</NewIsLog> <NewMaxLogDays>int</NewMaxLogDays> <NewLogDateField>string</NewLogDateField> <NewNavigations> <string>string</string> </NewNavigations> <NewProperties> <PropertyDataRequest> <PropertyName>string</PropertyName> <IsKey>boolean</IsKey> <IsNew>boolean</IsNew> <IsAutoNumber>boolean</IsAutoNumber> <AllowDbNull>boolean</AllowDbNull> <Type>Integer or DateTime2 or DateTime or Decimal or Boolean or String or StringMax or Binary or Guid</Type> <DefaultValue>string</DefaultValue> <Size>int</Size> <MaskTypeId>int</MaskTypeId> </PropertyDataRequest> </NewProperties> <PropertiesToUpdate> <PropertyDataUpdateRequest> <PropertyName>string</PropertyName> <AllowDbNull>boolean</AllowDbNull> <Size>int</Size> <MaskTypeId>int</MaskTypeId> </PropertyDataUpdateRequest> </PropertiesToUpdate> <PropertiesToDelete> <string>string</string> </PropertiesToDelete> </UpdateEntityRequest> </soap:Body> </soap:Envelope>
Soap Response
HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <UpdateExtendedDbEntityResult xmlns="http://api.exigo.com/"> <Entity> <EntityName>string</EntityName> <EntitySetName>string</EntitySetName> <SchemaName>string</SchemaName> <IsLog>boolean</IsLog> <MaxLogDays>int</MaxLogDays> <LogDateField>string</LogDateField> <Navigations> <string>string</string> </Navigations> <Properties> <PropertyDataResponse> <PropertyName>string</PropertyName> <IsKey>boolean</IsKey> <IsNew>boolean</IsNew> <IsAutoNumber>boolean</IsAutoNumber> <AllowDbNull>boolean</AllowDbNull> <Type>Integer or DateTime2 or DateTime or Decimal or Boolean or String or StringMax or Binary or Guid</Type> <DefaultValue>string</DefaultValue> <Size>int</Size> <MaskType> <MaskTypeId>int</MaskTypeId> <Name>string</Name> <Description>string</Description> </MaskType> </PropertyDataResponse> </Properties> </Entity> </UpdateExtendedDbEntityResult> </soap:Body> </soap:Envelope>
C# Rest Client
Install Nuget package Exigo.Api.Client
try
{
//Create Api Client
var api = new ExigoApiClient("yourcmpany", "yourlogin", "yourpassword");
//Create Request
var req = new UpdateEntityRequest();
req.EntityNameToUpdate = "1"; //Name of record to update.
req.SchemaName = "1"; //Schema Name of the Entity that will be updated.
req.NewEntityName = "1"; //An entity is a representational object of something in your database. Think of these as rows in a table in a SQL database. When naming your entities, we recommend you name your set as the singluar form of the name that best describes this object.
For example, if you are creating an entity that will represent a blog post in a blog, a good entity name would be BlogPost.
req.NewEntitySetName = "1"; //An entity set is a collection of entities found in a schema. Think of them as tables in a SQL database. When naming your entity sets, we recommend you name your set as the plural form representing a collection of it's entities.
For example, if you are creating an entity set that will hold a collection of BlogPost entities, a good entity set name would be BlogPosts.
req.NewIsLog = true;
req.NewMaxLogDays = 1;
req.NewLogDateField = "1";
//Add NewNavigations
var newnavigations = new List<String>();
newnavigations.Add("1");
newnavigations.Add("2");
//Now attach the list to the request
req.NewNavigations = newnavigations.ToArray();
//Add NewProperties
var newproperties = new List<PropertyDataRequest>();
var newPropertie1 = new PropertyDataRequest();
newPropertie1.PropertyName = "1";
newPropertie1.IsKey = true;
newPropertie1.IsNew = true;
newPropertie1.IsAutoNumber = true;
newPropertie1.AllowDbNull = true;
newPropertie1.Type = PropertyType.Guid;
newPropertie1.DefaultValue = "1";
newPropertie1.Size = 1;
newPropertie1.MaskTypeId = 1;
newproperties.Add(newPropertie1);
var newPropertie2 = new PropertyDataRequest();
newPropertie2.PropertyName = "2";
newPropertie2.IsKey = true;
newPropertie2.IsNew = true;
newPropertie2.IsAutoNumber = true;
newPropertie2.AllowDbNull = true;
newPropertie2.Type = PropertyType.Guid;
newPropertie2.DefaultValue = "2";
newPropertie2.Size = 2;
newPropertie2.MaskTypeId = 2;
newproperties.Add(newPropertie2);
//Now attach the list to the request
req.NewProperties = newproperties.ToArray();
//Add PropertiesToUpdate
var propertiestoupdate = new List<PropertyDataUpdateRequest>();
var propertiesToUpdat1 = new PropertyDataUpdateRequest();
propertiesToUpdat1.PropertyName = "1";
propertiesToUpdat1.AllowDbNull = true;
propertiesToUpdat1.Size = 1;
propertiesToUpdat1.MaskTypeId = 1;
propertiestoupdate.Add(propertiesToUpdat1);
var propertiesToUpdat2 = new PropertyDataUpdateRequest();
propertiesToUpdat2.PropertyName = "2";
propertiesToUpdat2.AllowDbNull = true;
propertiesToUpdat2.Size = 2;
propertiesToUpdat2.MaskTypeId = 2;
propertiestoupdate.Add(propertiesToUpdat2);
//Now attach the list to the request
req.PropertiesToUpdate = propertiestoupdate.ToArray();
//Add PropertiesToDelete
var propertiestodelete = new List<String>();
propertiestodelete.Add("1");
propertiestodelete.Add("2");
//Now attach the list to the request
req.PropertiesToDelete = propertiestodelete.ToArray();
//Send Request to Server and Get Response
var res = await api.UpdateExtendedDbEntityAsync(req);
//Now examine the results:
Console.WriteLine("Entity: {0}", res.Entity);
}
catch (Exception ex)
{
Console.WriteLine("Error: " + ex.Message);
}
C# Soap Client
try
{
//Create Main API Context Object
ExigoApi api = new ExigoApi();
//Create Authentication Header
ApiAuthentication auth = new ApiAuthentication();
auth.LoginName = "yourLoginName";
auth.Password = "yourPassword";
auth.Company = "yourCompany";
api.ApiAuthenticationValue = auth;
//Create Request
UpdateEntityRequest req = new UpdateEntityRequest();
req.EntityNameToUpdate = "1"; //Name of record to update.
req.SchemaName = "1"; //Schema Name of the Entity that will be updated.
req.NewEntityName = "1"; //An entity is a representational object of something in your database. Think of these as rows in a table in a SQL database. When naming your entities, we recommend you name your set as the singluar form of the name that best describes this object.
For example, if you are creating an entity that will represent a blog post in a blog, a good entity name would be BlogPost.
req.NewEntitySetName = "1"; //An entity set is a collection of entities found in a schema. Think of them as tables in a SQL database. When naming your entity sets, we recommend you name your set as the plural form representing a collection of it's entities.
For example, if you are creating an entity set that will hold a collection of BlogPost entities, a good entity set name would be BlogPosts.
req.NewIsLog = true;
req.NewMaxLogDays = 1;
req.NewLogDateField = "1";
//Add NewNavigations
List<String> newnavigations = new List<String>();
newnavigations.Add("1");
newnavigations.Add("2");
//Now attach the list to the request
req.NewNavigations = newnavigations.ToArray();
//Add NewProperties
List<PropertyDataRequest> newproperties = new List<PropertyDataRequest>();
PropertyDataRequest newPropertie1 = new PropertyDataRequest();
newPropertie1.PropertyName = "1";
newPropertie1.IsKey = true;
newPropertie1.IsNew = true;
newPropertie1.IsAutoNumber = true;
newPropertie1.AllowDbNull = true;
newPropertie1.Type = PropertyType.Guid;
newPropertie1.DefaultValue = "1";
newPropertie1.Size = 1;
newPropertie1.MaskTypeId = 1;
newproperties.Add(newPropertie1);
PropertyDataRequest newPropertie2 = new PropertyDataRequest();
newPropertie2.PropertyName = "2";
newPropertie2.IsKey = true;
newPropertie2.IsNew = true;
newPropertie2.IsAutoNumber = true;
newPropertie2.AllowDbNull = true;
newPropertie2.Type = PropertyType.Guid;
newPropertie2.DefaultValue = "2";
newPropertie2.Size = 2;
newPropertie2.MaskTypeId = 2;
newproperties.Add(newPropertie2);
//Now attach the list to the request
req.NewProperties = newproperties.ToArray();
//Add PropertiesToUpdate
List<PropertyDataUpdateRequest> propertiestoupdate = new List<PropertyDataUpdateRequest>();
PropertyDataUpdateRequest propertiesToUpdat1 = new PropertyDataUpdateRequest();
propertiesToUpdat1.PropertyName = "1";
propertiesToUpdat1.AllowDbNull = true;
propertiesToUpdat1.Size = 1;
propertiesToUpdat1.MaskTypeId = 1;
propertiestoupdate.Add(propertiesToUpdat1);
PropertyDataUpdateRequest propertiesToUpdat2 = new PropertyDataUpdateRequest();
propertiesToUpdat2.PropertyName = "2";
propertiesToUpdat2.AllowDbNull = true;
propertiesToUpdat2.Size = 2;
propertiesToUpdat2.MaskTypeId = 2;
propertiestoupdate.Add(propertiesToUpdat2);
//Now attach the list to the request
req.PropertiesToUpdate = propertiestoupdate.ToArray();
//Add PropertiesToDelete
List<String> propertiestodelete = new List<String>();
propertiestodelete.Add("1");
propertiestodelete.Add("2");
//Now attach the list to the request
req.PropertiesToDelete = propertiestodelete.ToArray();
//Send Request to Server and Get Response
UpdateEntityResponse res = api.UpdateExtendedDbEntity(req);
//Now examine the results:
Console.WriteLine("Entity: {0}", res.Entity);
}
catch (Exception ex)
{
Console.WriteLine("Error: " + ex.Message);
}
VB.Net
Try
'Create Main API Context Object
Dim api as new ExigoApi()
'Create Authentication Header
Dim auth as new ApiAuthentication()
auth.LoginName = "yourLoginName"
auth.Password = "yourPassword"
auth.Company = "yourCompany"
api.ApiAuthenticationValue = auth
'Create Request
Dim req as new UpdateEntityRequest()
req.EntityNameToUpdate = "1"
req.SchemaName = "1"
req.NewEntityName = "1"
req.NewEntitySetName = "1"
req.NewIsLog = true
req.NewMaxLogDays = 1
req.NewLogDateField = "1"
'Add NewNavigations
Dim newnavigations As New List(Of String)()
newnavigations.Add("1")
newnavigations.Add("2")
'Now attach the list to the request
req.NewNavigations = newnavigations.ToArray()
'Add NewProperties
Dim newproperties As New List(Of PropertyDataRequest)()
Dim newPropertie1 as new PropertyDataRequest()
newPropertie1.PropertyName = "1"
newPropertie1.IsKey = true
newPropertie1.IsNew = true
newPropertie1.IsAutoNumber = true
newPropertie1.AllowDbNull = true
newPropertie1.Type = PropertyType.Guid
newPropertie1.DefaultValue = "1"
newPropertie1.Size = 1
newPropertie1.MaskTypeId = 1
newproperties.Add(newPropertie1)
Dim newPropertie2 as new PropertyDataRequest()
newPropertie2.PropertyName = "2"
newPropertie2.IsKey = true
newPropertie2.IsNew = true
newPropertie2.IsAutoNumber = true
newPropertie2.AllowDbNull = true
newPropertie2.Type = PropertyType.Guid
newPropertie2.DefaultValue = "2"
newPropertie2.Size = 2
newPropertie2.MaskTypeId = 2
newproperties.Add(newPropertie2)
'Now attach the list to the request
req.NewProperties = newproperties.ToArray()
'Add PropertiesToUpdate
Dim propertiestoupdate As New List(Of PropertyDataUpdateRequest)()
Dim propertiesToUpdat1 as new PropertyDataUpdateRequest()
propertiesToUpdat1.PropertyName = "1"
propertiesToUpdat1.AllowDbNull = true
propertiesToUpdat1.Size = 1
propertiesToUpdat1.MaskTypeId = 1
propertiestoupdate.Add(propertiesToUpdat1)
Dim propertiesToUpdat2 as new PropertyDataUpdateRequest()
propertiesToUpdat2.PropertyName = "2"
propertiesToUpdat2.AllowDbNull = true
propertiesToUpdat2.Size = 2
propertiesToUpdat2.MaskTypeId = 2
propertiestoupdate.Add(propertiesToUpdat2)
'Now attach the list to the request
req.PropertiesToUpdate = propertiestoupdate.ToArray()
'Add PropertiesToDelete
Dim propertiestodelete As New List(Of String)()
propertiestodelete.Add("1")
propertiestodelete.Add("2")
'Now attach the list to the request
req.PropertiesToDelete = propertiestodelete.ToArray()
'Send Request to Server and Get Response
Dim res As UpdateEntityResponse = api.UpdateExtendedDbEntity(req)
'Now examine the results:
Console.WriteLine("Entity: {0}", res.Entity)
Catch ex As Exception
Console.WriteLine("Error: " & ex.Message)
End Try
PHP
Note: PHP is not officially supported.<?php
try
{
//Setup the SoapClient and Authentication
$api = new SoapClient("http://api.exigo.com/3.0/ExigoApi.asmx?WSDL");
$ns = "http://api.exigo.com/";
$auth = array()
$auth["LoginName"] = new SoapVar("yourLoginName",XSD_STRING,null,null,null,$ns);
$auth["Password"] = new SoapVar("yourPassword",XSD_STRING,null,null,null,$ns);
$auth["Company"] = new SoapVar("yourCompany",XSD_STRING,null,null,null,$ns);
$headerBody = new SoapVar($auth, SOAP_ENC_OBJECT);
$header = new SoapHeader($ns, 'ApiAuthentication', $headerBody);
$api->__setSoapHeaders(array($header));
//Create Request
$req->EntityNameToUpdate = "1";
$req->SchemaName = "1";
$req->NewEntityName = "1";
$req->NewEntitySetName = "1";
$req->NewIsLog = 1;
$req->NewMaxLogDays = 1;
$req->NewLogDateField = "1";
//Add NewNavigations
$newNavigation1->Length = 1;
$newNavigation1->Chars = 1;
$newNavigation2->Length = 2;
$newNavigation2->Chars = 2;
//Now attach the list to the request
req.NewNavigations = array(newNavigation1,newNavigation2);
//Add NewProperties
$newPropertie1->PropertyName = "1";
$newPropertie1->IsKey = 1;
$newPropertie1->IsNew = 1;
$newPropertie1->IsAutoNumber = 1;
$newPropertie1->AllowDbNull = 1;
$newPropertie1->Type = 1;
$newPropertie1->DefaultValue = "1";
$newPropertie1->Size = 1;
$newPropertie1->MaskTypeId = 1;
$newPropertie2->PropertyName = "2";
$newPropertie2->IsKey = 2;
$newPropertie2->IsNew = 2;
$newPropertie2->IsAutoNumber = 2;
$newPropertie2->AllowDbNull = 2;
$newPropertie2->Type = 2;
$newPropertie2->DefaultValue = "2";
$newPropertie2->Size = 2;
$newPropertie2->MaskTypeId = 2;
//Now attach the list to the request
req.NewProperties = array(newPropertie1,newPropertie2);
//Add PropertiesToUpdate
$propertiesToUpdat1->PropertyName = "1";
$propertiesToUpdat1->AllowDbNull = 1;
$propertiesToUpdat1->Size = 1;
$propertiesToUpdat1->MaskTypeId = 1;
$propertiesToUpdat2->PropertyName = "2";
$propertiesToUpdat2->AllowDbNull = 2;
$propertiesToUpdat2->Size = 2;
$propertiesToUpdat2->MaskTypeId = 2;
//Now attach the list to the request
req.PropertiesToUpdate = array(propertiesToUpdat1,propertiesToUpdat2);
//Add PropertiesToDelete
$propertiesToDelet1->Length = 1;
$propertiesToDelet1->Chars = 1;
$propertiesToDelet2->Length = 2;
$propertiesToDelet2->Chars = 2;
//Now attach the list to the request
req.PropertiesToDelete = array(propertiesToDelet1,propertiesToDelet2);
//Send Request to Server and Get Response
$res = $api.UpdateExtendedDbEntity($req);
//Now examine the results:
}
catch (SoapFault $ex)
{
echo "Error: ", $ex->getMessage();
}
?>
Java
Note: Java is not officially supported.try
{
//Create Main API Context Object
ExigoApi api = new ExigoApi();
//Create Authentication Header
ApiAuthentication auth = new ApiAuthentication();
auth.setLoginName("yourLoginName");
auth.setPassword("yourPassword");
auth.setCompany("yourCompany");
api.setApiAuthenticationValue(auth);
//Create Request
UpdateEntityRequest req = new UpdateEntityRequest();
req.setEntityNameToUpdate("1");
req.setSchemaName("1");
req.setNewEntityName("1");
req.setNewEntitySetName("1");
req.setNewIsLog(1);
req.setNewMaxLogDays(1);
req.setNewLogDateField("1");
//Add NewNavigations
ArrayOfSystem.String newnavigations = new ArrayOfSystem.String();
String newNavigation1 = new String();
newNavigation1.setLength(1);
newNavigation1.setChars(1);
newnavigations.Add(newNavigation1);
String newNavigation2 = new String();
newNavigation2.setLength(2);
newNavigation2.setChars(2);
newnavigations.Add(newNavigation2);
//Now attach the list to the request
req.setNewNavigations(newnavigations);
//Add NewProperties
ArrayOfPropertyDataRequest newproperties = new ArrayOfPropertyDataRequest();
PropertyDataRequest newPropertie1 = new PropertyDataRequest();
newPropertie1.setPropertyName("1");
newPropertie1.setIsKey(1);
newPropertie1.setIsNew(1);
newPropertie1.setIsAutoNumber(1);
newPropertie1.setAllowDbNull(1);
newPropertie1.setType(1);
newPropertie1.setDefaultValue("1");
newPropertie1.setSize(1);
newPropertie1.setMaskTypeId(1);
newproperties.Add(newPropertie1);
PropertyDataRequest newPropertie2 = new PropertyDataRequest();
newPropertie2.setPropertyName("2");
newPropertie2.setIsKey(2);
newPropertie2.setIsNew(2);
newPropertie2.setIsAutoNumber(2);
newPropertie2.setAllowDbNull(2);
newPropertie2.setType(2);
newPropertie2.setDefaultValue("2");
newPropertie2.setSize(2);
newPropertie2.setMaskTypeId(2);
newproperties.Add(newPropertie2);
//Now attach the list to the request
req.setNewProperties(newproperties);
//Add PropertiesToUpdate
ArrayOfPropertyDataUpdateRequest propertiestoupdate = new ArrayOfPropertyDataUpdateRequest();
PropertyDataUpdateRequest propertiesToUpdat1 = new PropertyDataUpdateRequest();
propertiesToUpdat1.setPropertyName("1");
propertiesToUpdat1.setAllowDbNull(1);
propertiesToUpdat1.setSize(1);
propertiesToUpdat1.setMaskTypeId(1);
propertiestoupdate.Add(propertiesToUpdat1);
PropertyDataUpdateRequest propertiesToUpdat2 = new PropertyDataUpdateRequest();
propertiesToUpdat2.setPropertyName("2");
propertiesToUpdat2.setAllowDbNull(2);
propertiesToUpdat2.setSize(2);
propertiesToUpdat2.setMaskTypeId(2);
propertiestoupdate.Add(propertiesToUpdat2);
//Now attach the list to the request
req.setPropertiesToUpdate(propertiestoupdate);
//Add PropertiesToDelete
ArrayOfSystem.String propertiestodelete = new ArrayOfSystem.String();
String propertiesToDelet1 = new String();
propertiesToDelet1.setLength(1);
propertiesToDelet1.setChars(1);
propertiestodelete.Add(propertiesToDelet1);
String propertiesToDelet2 = new String();
propertiesToDelet2.setLength(2);
propertiesToDelet2.setChars(2);
propertiestodelete.Add(propertiesToDelet2);
//Now attach the list to the request
req.setPropertiesToDelete(propertiestodelete);
//Send Request to Server and Get Response
UpdateEntityResponse res = api.getExigoApiSoap().updateExtendedDbEntity(req, auth);
//Now examine the results:
}
catch (Exception ex)
{
System.out.println("Error: " + ex.getMessage());
}