Enterprise Enabler AppCommTM APIs

Enterprise Enabler’s AppComm APIs allow users to connect to Enterprise Enabler and create Named Connections as well as Source Templates in a limited number of supported AppComms. Users can then utilize those templates to read from and write to data end-points with just an API call. For example, let us say you have a data source that holds Orders information from your customers, and you have a client interface designed to place and edit order information. Now all you need is a piece of software that connects your interface to your end-point and allows you to perform the read/write/edit operations coming from the interface. Enterprise Enabler’s AppComm APIs are the perfect fit in that kind of scenario. You can use virtually any programming language that supports REST services to call these APIs.

These are REST (REpresentational State Transfer) APIs that use HTTP and HTTPS communication, and they support Basic Authentication (username/password) as well as OAuth Authorization (token-based). Data sent back and forth through these APIs is sent in a JSON format, and they do not need or use any XML protocols for their messaging. Users can call these APIs programmatically using Java, C#, etc. using the REST API support libraries that correspond to each programming language.

This guide will show the basic steps required for you to get going with the Enterprise Enabler AppComm APIs.

Please note that all the API call examples in this guide are using Postman. The Postman software is free and can be downloaded from the postman page (getpostman.com), but of course these APIs can be called programmatically. From these examples you can learn how to make these same calls through code using any programming language that supports REST calls.

 

Create an Access Token for the “Administrator” User API.

In order to accept calls from the API layer, Enterprise Enabler requires for the API call to send in an access token. The “Administrator” user is the only user in Enterprise Enabler when you install it, therefore, you need to create an access token for this user before you can do anything else through the API layer. The text below details the steps needed to create an access token for the “Administrator” user.

  • Open POSTMAN and change the URL Type from GET to POST
  • Paste the API url in the url address bar (https://localhost:6445/api/token)
  • Click on the Body tab and click on the x-www-form-urlenconded option & enter the Keys and Values Below:

Key———————-Value
username—————administrator
password—————administrator
grant_type————-password
passwordencrypted—false

  • Click on Send.
  • Copy the token you receive in the response and store it, it will be needed for the API calls, especially to create new Orgs and Users.

Create_Access_Token_API

 

Create Organization(s) and User(s) API.

/security/createOrganization

This API will create an Organization and a User per call. This organization and user will be saved under the name provided in the body call. When all data are provided correctly, the API will then return a user ID and an Organization ID assigned by Enterprise Enabler Studio along with a successful message. The sample call below shows you how to send in a call to create a new Organization and User. You need to send in “organizationName”, “userID”, “password”, “firstName”, “lastName”, and “email”. Lastly, there is an example of the API response.

http://localhost:6443/api/security/createOrganization

Note that this API creates Users in addition to Organizations. Each API call can create one Organization and one User.

Body Call   Body Response
{
“organizationName”: “myorganizationO”,
“userID”: “userone”,
“password”: “passwordone”,
“firstName”: “myname”,
“lastName”: “mylastname”,
“email”: “myemail@mydomain.com”
}
{
“isSuccessful”: true,
“message”: “User saved successfully”,
“code”: 0,
“userID”: “88eb3639-b29c-4419-b7d9-90e83e250006”,
“orgID”: “84676D8BA6FA4A898058963B229444CD”
}

Crete_Orgs_Users_API

  • Open POSTMAN and change the url type from GET to POST
  • Click on the Headers tab and add another key named “Authorization”. Then in the Value for that key, enter your Administrator token preceded by the string bearer as in the example to the right ——> bearer 245907350yehgklldhjdgh-80673t54iuwghklflsbcvtqw37527407…
  • Click on the Body tab, then click on the option labeled Raw, and select JSON as your call type. Then in the text box, enter your information for USERONE, see example below —->

{
“organizationName”: “myorganizationO”,
“userID”: “userone”,
“password”: “passwordone”,
“firstName”: “myname”,
“lastName”: “mylastname”,
“email”: “myemail@mydomain.com”
}

 

  • Click on Send.
  • Copy the User ID and Organization ID received in the response for later.
  • (Optional) Repeat these steps to create more Organizations and Users.

 

Create Access Token(s) for your User(s) API.

  • Open POSTMAN and change the url type from GET to POST
  • Click on the Headers tab and add another key named “Authorization”. Then in the Value for that key, enter your Administrator token preceded by the word bearer as in the following example: bearer AQAAANCMnd8BFdERjHoAwE_Cl-sBAAAAuNk_0jZIOUahwcHO3bUADt8G0mKhx9Cy95hSbbfajW8SHUgcngrWIWbyia2Gou9gAAAAAOgAAAAAIAACAAAAChHg76SeVON2jO1A-……M5o4sTUiEUVI_MY9i0swLVxChsAel6yzt8_DkrFCyz6g
  • Click on the Body tab and click on the x-www-form-urlenconded option & enter the Keys and Values Below:

Key———————-Value
username—————USERONE
password—————USERONE
grant_type————–password
passwordencrypted—-false

  • Click on Send.
  • Copy the token you receive in the response and store it, it will be needed for the API calls, especially to create Named Connections and templates.

 

Currently, four AppComms are being supported through the API layer in Enterprise Enabler. These AppComms are: MySQL, Oracle, Salesforce, and SQL Server.

Most API calls across AppComms will look very similar to you. These calls only differ depending on the type of information required per AppComm. Additionally, these APIs are grouped into different blocks based on what those APIs do. The following pages describe the different blocks and API urls, as well as how to build a call to those APIs.

You can initially access these API urls through your web browser by going to: http://localhost:6443/api/, once there, simply click on the “Swagger UI (http)” link, and the blocks below will appear. Note that https is also supported.

Block API Names API Urls
Data /data/loadData http://localhost:6443/api/data/loadData
/data/saveData http://localhost:6443/api/data/saveData
MetaData /metadata/getNamedConnectionProperties http://localhost:6443/api/metadata/getNamedConnectionProperties
/metadata/saveNamedConnection http://localhost:6443/api/metadata/saveNamedConnection
/metadata/testNamedConnection http://localhost:6443/api/metadata/testNamedConnection
/metadata/getNamedConnections http://localhost:6443/api/metadata/getNamedConnections
/metadata/getNamedConnection http://localhost:6443/api/metadata/getNamedConnection
/metadata/deleteNamedConnection http://localhost:6443/api/metadata/deleteNamedConnection
/metadata/listSchemas http://localhost:6443/api/metadata/listSchemas
/metadata/listEntities http://localhost:6443/api/metadata/listEntities
/metadata/getEntityDetails http://localhost:6443/api/metadata/getEntityDetails
/metadata/saveTemplates http://localhost:6443/api/metadata/saveTemplates
/metadata/getTemplates http://localhost:6443/api/metadata/getTemplates
/metadata/deleteTemplates http://localhost:6443/api/metadata/deleteTemplates
Security /security/createOrganization

(Note that this API creates users in addition to organizations)

http://localhost:6443/api/security/createOrganization

Enterprise Enabler API Descriptions and Sample Calls

You can test these APIs from POSTMAN. Please use the same steps used in our previous section “Create Organization(s) and User(s)” for all the API calls shown below. The only thing that changes is the content in the body section, which is what the sample API calls mentioned below will refer to. Remember that you will need an access token.

 

Get Named Connection Properties API.
/metadata/getNamedConnectionProperties

This API will return the properties needed for a Named Connection of a given AppComm type. The sample call below shows you how to send in a call. This call is the same for all four currently supported AppComms, the only thing that changes is the “appCommType”. Finally, there is an example of the API response.

URL:  http://localhost:6443/api/metadata/getNamedConnectionProperties

Body Call   Body Response
{
“appCommType”: “mysql”
}
{
“fields”: [
{
“name”: “Server”,
“label”: “Server”,
“dataType”: “string”,
“isRequired”: true,
“defaultValue”: “”,
“isMasked”: false,
“isCredential”: false,
“description”: “Store Server Name”,
“order”: 1
},{
“name”: “Database”,
“label”: “Database”,
“dataType”: “string”,
“isRequired”: true,
“defaultValue”: “”,
“isMasked”: false,
“isCredential”: false,
“description”: “Store Database”,
“order”: 2
},{
“name”: “UserID”,
“label”: “UserID”,
“dataType”: “string”,
“isRequired”: true,
“defaultValue”: “”,
“isMasked”: false,
“isCredential”: true,
“description”: “stores user id”,
“order”: 3
},{
“name”: “Password”,
“label”: “Password”,
“dataType”: “string”,
“isRequired”: true,
“defaultValue”: “”,
“isMasked”: true,
“isCredential”: true,
“description”: “stores user password”,
“order”: 4
},{
“name”: “Port”,
“label”: “Port”,
“dataType”: “string”,
“isRequired”: true,
“defaultValue”: “3306”,
“isMasked”: false,
“isCredential”: false,
“description”: “Indicates the port number”,
“order”: 5
}
]
}

 

Save Named Connection API.
/metadata/saveNamedConnection

This API will create a Named Connection of the specified AppComm type and save it under the name provided in the body call. Provided all data are provided correctly, the API will then return the Named Connection ID assigned to that Named Connection by Enterprise Enabler along with the Named Connection name and a successful message. The sample call below shows you how to send in a call to create a MySQL Named Connection. For the other supported AppComms, just change the body call to match the names and values returned in the Named Properties call for those AppComms. Lastly, there is an example of the API response.

URL:  http://localhost:6443/api/metadata/saveNamedConnection

Body Call   Body Response
{
“name”: “MySQLconnADMIN”,
“id”: “”,
“category”: “APITEST”,
“appCommType”: “mysql”,
“fields”: [
{
“name”: “Server”,
“value”: “myservername”
},
{
“name”: “Database”,
“value”: “mydatabasename”
},
{
“name”: “UserID”,
“value”: “myuserid”
},
{
“name”: “Password”,
“value”: “mypassword”
},
{
“name”: “Port”,
“value”: “3306”
}
]
}
{
“code”: 0,
“id”: “5EB7FFDE8141476285AE39EF95F89D4A”,
“message”: “Named Connection ‘MySQLconnADMIN’ Saved or Updated Successfully.”
}

 

Test Named Connection API.
/metadata/testNamedConnection

This API will test whether a Named Connection can successfully connect to a data server. It will then return a message to let you know whether the test was successful or not. The sample below shows you how to send in a call. This call is the same for all four currently supported AppComms, the only thing that changes is the “id” and “credentials” data. Finally, there is an example of the API response.

URL:  http://localhost:6443/api/metadata/testNamedConnection

Body Call   Body Response
{
“id”: “5EB7FFDE8141476285AE39EF95F89D4A”,
“category”: “APITEST”,
“credentials”: {
“UserID”: “myuserid”,
“Password”: “mypassword”}
}
{
“code”: 0,
“message”: “Named Connection ‘MySQLconnADMIN’ Test Successful.”
}

 

Get Named Connections API.
/metadata/getNamedConnections

This API will return all Named Connections of the given AppComm type that have been saved in Enterprise Enabler Studio by the user making this call. The sample below shows you how to send in a call. This call is the same for all four currently supported AppComms, the only thing that changes is the appCommType. Finally, there is an example of the API response.

URL:  http://localhost:6443/api/metadata/getNamedConnections

Body Call   Body Response
{
“category”: “APITEST”,
“appCommType”: “mysql”
}
{
“namedConnections”: [
{
“name”: “MySQLconnADMIN”,
“appCommType”: “mysql”,
“id”: “5EB7FFDE8141476285AE39EF95F89D4A”
}
]
}

 

Get Named Connection API.
/metadata/getNamedConnection

This API will return a Named Connection that has been saved in Enterprise Enabler Studio by the user making this call based on a given id. The sample ahead shows you how to send in a call. This call is the same for all four currently supported AppComms, the only thing that changes is the id. Finally, there is an example of the API response.

URL:  http://localhost:6443/api/metadata/getNamedConnection

Body Call   Body Response
{
“id”: “5EB7FFDE8141476285AE39EF95F89D4A”
}
{
“name”: “MySQLconnADMIN”,
“id”: “5EB7FFDE8141476285AE39EF95F89D4A”,
“category”: “APITEST”,
“appCommType”: “mysql”,
“fields”: [
{
“name”: “Database”,
“value”: “mydatabasename”
},
{
“name”: “Password”,
“value”: “mypassword”
},
{
“name”: “Port”,
“value”: “3306”
},
{
“name”: “Server”,
“value”: “myservername”
},
{
“name”: “UserID”,
“value”: “myuserid”
}
],
“message”: “”
}

 

Delete Named Connection API.
/metadata/deleteNamedConnection

This API will delete a Named Connection that has been saved in Enterprise Enabler Studio by the user making this call based on a given id. The sample below shows you how to send in a call. This call is the same for all four currently supported AppComms, the only thing that changes is the id. Lastly, there is an example of the API response.

URL:  http://localhost:6443/api/metadata/deleteNamedConnection

Body Call   Body Response
{
“id”: “5EB7FFDE8141476285AE39EF95F89D4A”
}
{
“code”: -1,
“depedentObjects”: {
“D856F9D6C62D4D63BBE4E51DD7D547AC”: “srcMySQLCustomer”
},”message”: “Object has dependencies, please delete dependencies first”}

Notice that when the connection you are trying to delete is being used by a source template, dependency checks will prevent you from deleting that connection until the source template itself has been deleted.

 

List Schemas API.
/metadata/listSchemas

This API will return all schemas available in a given Named Connection id that has been saved in Enterprise Enabler Studio by the user making this call. The sample below shows you how to send in a call. This call is the same for all four currently supported AppComms, the only thing that changes is the id. Finally, there is an example of the API response.

URL:  http://localhost:6443/api/metadata/listSchemas

Body Call   Body Response
{
“namedConnectionId”: “5EB7FFDE8141476285AE39EF95F89D4A”
}
{
“schemas”: [
“information_schema”,
“mysql”,
“performance_schema”,
“sakila”,
“schema1”,
“sys”
]
}

 

List Entities API.
/metadata/listEntities

This API will return all entities available in a given schema and Named Connection id that has been saved in Enterprise Enabler Studio by the user making this call. The sample below shows you how to send in a call. This call is the same for all four currently supported AppComms, the only things that change are the values for “namedConnectionId” and “schemaName”. Lastly, there is an example of the API response.

URL:  http://localhost:6443/api/metadata/listEntities

Body Call   Body Response
{
“namedConnectionId”: “5EB7FFDE8141476285AE39EF95F89D4A”,
“schemaName”: “schema1”
}
[
{
“name”: “autoincrement”,
“label”: “autoincrement”,
“pluralLabel”: “autoincrements”,
“isReadable”: true
},
{
“name”: “autoincrement2primary”,
“label”: “autoincrement2primary”
“pluralLabel”: “autoincrement2primary”,
“isReadable”: true
},
{
“name”: “customers”,
“label”: “customers”,
“pluralLabel”: “customers”,
“isReadable”: true
},
{
“name”: “customerstimestamp”,
“label”: “customerstimestamp”,
“pluralLabel”: “customerstimestamps”,
“isReadable”: true
},
{
“name”: “largeata”,
“label”: “largeata”,
“pluralLabel”: “largeatas”,
“isReadable”: true
},
{
“name”: “test_timestamp”,
“label”: “test_timestamp”,
“pluralLabel”: “test_timestamp”,
“isReadable”: true
}
]

 

Get Entity Details API.
/metadata/getEntityDetails

This API will return all details of a given entity in a Named Nonnection that has been saved in Enterprise Enabler Studio by the user making this call. The user needs to provide “namedConnectionId”, “schemaName”, and “entityName”. The sample below shows you how to send in a call. This call is the same for all four currently supported AppComms, you just need to adjust the “namedConnectionId”, “schemaName”, and “entityName”. Finally, there is an example of the API response.

URL:  http://localhost:6443/api/metadata/getEntityDetails

Body Call   Body Response
{
“entities”: [
{
“namedConnectionId”: “5EB7FFDE8141476285AE39EF95F89D4A”,
“schemaName”: “schema1”,
“entityName”: “Customers”
}
]
}
[
{
“namedConnectionId”: “5EB7FFDE8141476285AE39EF95F89D4A”,
“name”: “Customers”,
“label”: “Customers”,
“pluralLabel”: “Customers”,
“isCustom”: false,
“isReadable”: true,
“isCreateable”: true,
“isUpdatable”: true,
“isDeleteable”: true,
“relatedEntities”: [],
“fields”: [
{
“name”: “CustomerID”,
“label”: “CustomerID”,
“dataType”: “string”,
“sourceDataType”: “varchar”,
“maxLength”: 5,
“isHTML”: false,
“choices”: [],
“isPrimaryKey”: true,
“isIdentity”: false,
“isSortable”: true,
“isFilterable”: true,
“isGroupable”: true,
“isReadable”: true,
“isNullable”: true,
“isCreatable”: true,
“isUpdatable”: true
},
{
“name”: “CompanyName”,
“label”: “CompanyName”,
“dataType”: “string”,
.
.
.
},]
}
]

 

Save Templates API.
/metadata/saveTemplates

This API will create a Source Template of the specified AppComm type and save it under the name provided in the body call. You need to provide a Named Connection id of the same AppComm type. When all data are provided correctly, the API will then return the Source Template ID assigned to that template by Enterprise Enabler, along with the Source Template name and a successful message. The sample call below shows you how to send in a call to create a MySQL Source Template. For the other supported AppComms, just change the body call to match “schemaName”, “entityName”, and assign a “templateName” in your body call. Lastly, there is an example of the API response.

URL:  http://localhost:6443/api/metadata/saveTemplates

Body Call   Body Response
{
“category”: “APITEST”,
“entities”: [
{
“namedConnectionId”: “5EB7FFDE8141476285AE39EF95F89D4A”,
“schemaName”: “schema1”,
“entityName”: “Customers”,
“templateName”: “srcMySQLCustomer”,
“templateId”: “”,
“allFields”: true,
“fields”: [
{
“name”: “”
}
]
}
]
}
[
{
“templateId”: “D856F9D6C62D4D63BBE4E51DD7D547AC”,
“templateName”: “srcMySQLCustomer”,
“code”: 0,
“message”: “Template ‘srcMySQLCustomer’ Saved or Updated Successfully.”
}
]

 

Get Templates API.
/metadata/getTemplates

This API will return a Named Connection that has been saved in Enterprise Enabler Studio by the user making this call based on a given id. The sample below shows you how to send in a call. This call is the same for all four currently supported AppComms, the only thing that changes is the id. Finally, there is an example of the API response.

URL:  http://localhost:6443/api/metadata/getTemplates

Body Call   Body Response
{
“category”: “APITEST”,
“appCommType”: “mysql”,
“id”: “D856F9D6C62D4D63BBE4E51DD7D547AC”,
“name”: “srcMySQLCustomer”,
“includeBlocksAndColumns”: true
}
{
“templates”: [
{
“templateName”: “srcMySQLCustomer”,
“templateId”: “D856F9D6C62D4D63BBE4E51DD7D547AC”,
“namedConnectionId”: “5EB7FFDE8141476285AE39EF95F89D4A”,
“namedConnectionName”: “MySQLconnADMIN”,
“appCommType”: “MySQL”,
“blocks”: [
{
“id”: “9CDA4D36509542DEA911402BCDABA792”,
“name”: “Customers”,
“columns”: [
{
“id”: “96C2A08FDCB7471785050A4A6E163FFB”,
“name”: “CustomerID”
},
{
“id”: “406A75931A834A5DB91CA0132187BD6C”,
“name”: “CompanyName”
},
{
“id”: “91A5E48275D9437CA8B98123B265C471”,
“name”: “Country”
},
.
.
.
{
“id”: “26F33E71558340B4BDB52BE8B0476A6E”,
“name”: “Id”
}
]
}
]
}
]
}

 

Delete Templates API.
/metadata/deleteTemplates

This API will delete a Source Template that has been saved in Enterprise Enabler Studio by the user making this call based on a given id. The sample below shows you how to send in a call. This call is the same for all four currently supported AppComms, the only thing that changes is the id. Finally, there is an example of the API response.

URL:  http://localhost:6443/api/metadata/deleteTemplates

Body Call   Body Response
{
“id”: “D856F9D6C62D4D63BBE4E51DD7D547AC”
}
{
“code”: 0,
“message”: “Object Deleted Successfully”
}

 

Load Data API.
/data/loadData

This API will read data from a previously saved Source Template based on a given SQL query. The sample below shows you how to send in a call, you need to send in “namedConnectionId”, “templateId”, “query”, as well as credentials depending on the AppComm type of your API call. This call is the same for all four currently supported AppComms, the only things that change are the credentials in the “credentials” section, the query will always be SQL. Finally, there is an example of the API response.

URL:  http://localhost:6443/api/data/loadData

Body Call   Body Response
[
{
“namedConnectionId”: “5EB7FFDE8141476285AE39EF95F89D4A”,
“templateId”: “D856F9D6C62D4D63BBE4E51DD7D547AC”,
“query”: “SELECT * FROM Customers”,
“credentials”: {
“Server”: “sbtdevsql”,
“Database”: “schema1”,
“UserID”: “root”,
“Password”: “Universal1”,
“Port”: “3306”
},
“page”: {
“offset”: 0,
“limit”: 0
}
}
]
[
{
“isSuccessful”: true,
“templateName”: “srcMySQLCustomer”,
“entityName”: “”,
“namedConnectionId”: “5EB7FFDE8141476285AE39EF95F89D4A”,
“templateId”: “D856F9D6C62D4D63BBE4E51DD7D547AC”,
“data”: [
{
“CustomerID”: “111”,
“CompanyName”: “Updated”,
“ContactName”: null,
“ContactTitle”: null,
“Address”: null,
“City”: null,
“Region”: null,
“PostalCode”: null,
“Country”: null,
“Phone”: null,
“Fax”: null,
“Salary”: null,
“EntryDate”: null,
“Id”: null
},
{
“CustomerID”: “1111”,
“CompanyName”: null,
“ContactName”: null,
“ContactTitle”: null,
“Address”: “houston”,
“City”: null,
“Region”: null,
“PostalCode”: null,
“Country”: “usa”,
“Phone”: null,
“Fax”: null,
“Salary”: 100000,
“EntryDate”: “2017-04-09T09:29:13”,
“Id”: null
}
.
.
.
],
“rowCountNoLimit”: 125,
“message”: “Data Load Success. Row Count = 125”,
“errorCode”: 0,
“details”: “”,
“stackTrace”: “”
}
]

 

Save Data API (Insert).
/data/saveData

This API will insert data into your database using a previously created Source Template. Note that the “operation” is set to “Insert”, and that in the example below each row is encased in {} inside the “data” section of the body call, and for each row inserted, there needs to be an entry in the “rowidentifiers” section. The sample call below shows you how to send in a call to insert data into a MySQL database. For the other supported AppComms, just change the body call to match the names and values reflected in your source template of that AppComm type. Lastly, there is an example of the API response.

URL:  http://localhost:6443/api/data/saveData

Body Call   Body Response
[
{
“namedConnectionId”: “5EB7FFDE8141476285AE39EF95F89D4A”,
“templateId”: “D856F9D6C62D4D63BBE4E51DD7D547AC”,
“dataObjects”: [
{
“operation”: “Insert”,
“data”: [
{
“CustomerID”: “NEWC5”,
“CompanyName”:”stone5″,
“ContactName”: “Name”,
“ContactTitle”:”bond”
},
{
“CustomerID”: “NEWC6”,
“CompanyName”:”name6″,
“ContactName”: “NameR”,
“ContactTitle”:”bond2″
}
],
“rowIdentifiers”:[
“new-1”,
“new-4”
]
}
],
“credentials”: {
“UserID”: “myuserid”,
“Password”: “mypassword”
},
“readQuery”: “”,
“page”: {
“offset”: 0,
“limit”: 0
}
}
]
[
{
“isSuccessful”: true,
“templateName”: “srcMySQLCustomer”,
“entityName”: “Customers”,
“namedConnectionId”: “5EB7FFDE8141476285AE39EF95F89D4A”,
“templateId”: “D856F9D6C62D4D63BBE4E51DD7D547AC”,
“data”: [
[
{
“CustomerID”: “NEWC5”,
“CompanyName”: “stone5”,
“ContactName”: “Name”,
“ContactTitle”: “bond”
}
],
[
{
“CustomerID”: “NEWC6”,
“CompanyName”: “name6”,
“ContactName”: “NameR”,
“ContactTitle”: “bond2”
}
]
],
“rowIdentifiers”: [
{
“rowIdentifier”: “new-1”,
“CustomerID”: “NEWC5”
},
{
“rowIdentifier”: “new-4”,
“CustomerID”: “NEWC6”
}
],
“message”: “Data Save Success.”,
“errorCode”: 0,
“details”: “”,
“stackTrace”: “”,
“rowErrors”: []
}
]

 

Save Data API (Update).
/data/saveData  

This API will update data in your database using a previously created Source Template. Note that the “operation” is set to “Update” and that in the example below, each row is encased in {} inside the “data” section of the body call, and for each row inserted, there needs to be an entry in the “rowidentifiers” section. The sample call below shows you how to send in a call to update data into a MySQL database. For the other supported AppComms, just change the body call to match the names and values reflected in your source template of that AppComm type. Lastly, there is an example of the API response.

URL:  http://localhost:6443/api/data/saveData

Body Call   Body Response
[
{
“namedConnectionId”: “5EB7FFDE8141476285AE39EF95F89D4A”,
“templateId”: “D856F9D6C62D4D63BBE4E51DD7D547AC”,
“dataObjects”: [
{
“operation”: “Update”,
“data”: [
{
“CustomerID”: “NEWC5”,
“CompanyName”:”stone5″,
“ContactName”: “Name”,
“ContactTitle”:”bond”
},
{
“CustomerID”: “NEWC6”,
“CompanyName”:”name6″,
“ContactName”: “NameR”,
“ContactTitle”:”bond2″
}
],
“rowIdentifiers”:[
“new-1”,
“new-4”
]
}
],
“credentials”: {
“UserID”: “myuserid”,
“Password”: “mypassword”
},
“readQuery”: “”,
“page”: {
“offset”: 0,
“limit”: 0
}
}
]
[
{
“isSuccessful”: true,
“templateName”: “srcMySQLCustomer”,
“entityName”: “Customers”,
“namedConnectionId”: “5EB7FFDE8141476285AE39EF95F89D4A”,
“templateId”: “D856F9D6C62D4D63BBE4E51DD7D547AC”,
“data”: [
[
{
“CustomerID”: “NEWC5”,
“CompanyName”: “stone5”,
“ContactName”: “Name”,
“ContactTitle”: “bond”
}
],
[
{
“CustomerID”: “NEWC6”,
“CompanyName”: “name6”,
“ContactName”: “NameR”,
“ContactTitle”: “bond2”
}
]
],
“rowIdentifiers”: [
{
“rowIdentifier”: “new-1”,
“CustomerID”: “NEWC5”
},
{
“rowIdentifier”: “new-4”,
“CustomerID”: “NEWC6”
}
],
“message”: “Data Save Success.”,
“errorCode”: 0,
“details”: “”,
“stackTrace”: “”,
“rowErrors”: []
}
]

 

Create Oragnization API.
/security/createOrganization

This API will create an Organization and a User per call. This organization and user will be saved under the name provided in the body call. When all data are provided correctly, the API will then return a User ID and an Organization ID assigned by Enterprise Enabler Studio along with a successful message. The sample call below shows you how to send in a call to create a new Organization and User. You need to send in “organizationName”, “userID”, “password”, “firstName”, “lastName”, and “email”. Lastly, there is an example of the API response.

http://localhost:6443/api/security/createOrganization

(Note that this API creates users in addition to organizations)

Body Call   Body Response
{
“organizationName”: “myorganizationO”,
“userID”: “userone”,
“password”: “passwordone”,
“firstName”: “myname”,
“lastName”: “mylastname”,
“email”: “myemail@mydomain.com”
}
{
“isSuccessful”: true,
“message”: “User saved successfully”,
“code”: 0,
“userID”: “88eb3639-b29c-4419-b7d9-90e83e250006”,
“orgID”: “84676D8BA6FA4A898058963B229444CD”
}