Database Connection Web Services
Universal Controller supports the following RESTful-based web services for Database Connection operations, which are listed alphabetically on this page.
- Create a Database Connection
- Delete a Database Connection
- List Database Connections
- Modify a Database Connection
- Read a Database Connection
Formatting specifications for each web service, including details about property requirements, are provided.
Create a Database Connection
Description | |
|---|---|
URI | http://host_name/uc/resources/databaseconnection |
HTTP Method | POST |
Description | Creates a Database Connection. |
Example URI | |
Consumes Content-Type | application/xml, application/json |
Produces Content-Type | n/a |
Example Request | See Create a Database Connection: Example Request, below. |
Example Response |
|
Database Connection Properties | See Database Connection Properties, below. |
Create a Database Connection: Example Request
- JSON
- XML
JSON Request
{
"credentials": null,'
"dbDescription": null,
"dbDriver": "com.mysql.jdbc.Driver",
"dbMaxRows": null,
"dbType": "My SQL",
"dbUrl": "jdbc:mysql://localhost:3306/uc",
"name": "Database Connection 1",
"opswiseGroups": null,
"retainSysIds": true,
"sysId": "62701879a6264107bb757a952bcc65cc"
}
XML Request
<databaseConnection retainSysIds="true">
<credentials />
<dbDescription />
<dbDriver>com.mysql.jdbc.Driver</dbDriver>
<dbMaxRows />
<dbType>My SQL</dbType>
<dbUrl>jdbc:mysql://localhost:3306/uc</dbUrl>
<name>Database Connection 1</name>
<opswiseGroups />
<sysId>62701879a6264107bb757a952bcc65cc</sysId>
</databaseConnection>
Database Connection Properties
Property | UI Field Name | Description | Specifications | Required |
|---|---|---|---|---|
| Credentials | Credentials for this Database Connection. | N | |
| Description | Description of this record. | N | |
| Driver | Name of the JDBC driver. | Y | |
| Maximum Rows | If necessary, specifies a limit to the number of rows you want returned by the SQL statement. | N | |
| Database Type | Type of Database. | Valid Values:
Default is MySQL (1). | Y |
| Connection URL | URL of the database. | Y | |
| n/a | Universal Controller release that the record was exported from. | read only | N |
| n/a | Record table information. | read only | N |
| Connection Name | Name used within the Controller to identify this Database Connection. | Y | |
| Member of Business Services | Business Services that this record belongs to. XML JSON | N | |
| n/a | Specification for whether or not the Create a Database Connection web service will persist the
info In XML web services, | Valid values: true/false (default is true). | N |
| n/a | System ID field in the database for this Database Connection record. | Persisted only if retainSysIds is set to true. | N |
Delete a Database Connection
Description | |
|---|---|
URI | http://host_name/uc/resources/databaseconnection |
HTTP Method | DELETE |
Description | Deletes a Database Connection. |
URI Parameters | See Delete a Database Connection: URI Parameters, below. |
Example URI | http://localhost:8080/uc/resources/databaseconnection?connectionname=Test4 |
Example Response |
|
Delete a Database Connection: URI Parameters
Parameter | Description | Specifications | Required | Mutually Exclusive With |
|---|---|---|---|---|
| ID used within the Controller to identify this Database Connection. | String; URI parameter. | Y |
|
| Name used within the Controller to identify this Database Connection. | String; URI parameter. | Y |
|
List Database Connections
Description | |
|---|---|
URI | http://host_name/uc/resources/databaseconnection/list |
HTTP Method | GET |
Description | Retrieves information on all Database Connections. |
Example URI | |
Authentication | HTTP Basic |
Consumes Content-Type | n/a |
Produces Content-Type | application/xml, application/json |
Example Response | See List Database Connections: Example Response, below. |
Database Connection Properties |
List Database Connections: Example Response
- JSON
- XML
JSON Response
[
{
"credentials": null,
"dbDriver": "com.mysql.jdbc.Driver",
"dbMaxRows": null,
"dbType": "My SQL",
"dbUrl": "jdbc:mysql://localhost:3306/uc",
"dbDescription": null,
"exportReleaseLevel": "7.2.0.0",
"exportTable": "ops_database_connection",
"name": "Database Connection 1",
"opswiseGroups": null,
"sysId": "62701879a6264107bb757a952bcc65cc",
"version": 3
},
{
"credentials": null,
"dbDescription": null,
"dbDriver": "com.mysql.jdbc.Driver",
"dbMaxRows": null,
"dbType": "My SQL",
"dbUrl": "jdbc:mysql://localhost:3306/uc",
"exportReleaseLevel": "7.2.0.0",
"exportTable": "ops_database_connection",
"name": "Database Connection 2",
"opswiseGroups": null,
"sysId": "3d7a03053ad64de1b21b6849e6deafd9",
"version": 6
}
]
XML Response
<databaseConnections>
<databaseConnection exportReleaseLevel="7.2.0.0" exportTable="ops_database_connection" version="3">
<credentials />
<dbDescription />
<dbDriver>com.mysql.jdbc.Driver</dbDriver>
<dbMaxRows />
<dbType>My SQL</dbType>
<dbUrl>jjdbc:mysql://localhost:3306/uc</dbUrl>
<name>Database Connection 1</name>
<opswiseGroups />
<sysId>62701879a6264107bb757a952bcc65cc</sysId>
</databaseConnection>
<databaseConnection exportReleaseLevel="7.2.0.0" exportTable="ops_database_connection" version="6">
<credentials />
<dbDescription />
<dbDriver>com.mysql.jdbc.Driver</dbDriver>
<dbMaxRows />
<dbType>My SQL</dbType>
<dbUrl>jdbc:mysql://localhost:3306/uc</dbUrl>
<name>Database Connection 2</name>
<opswiseGroups />
<sysId>3d7a03053ad64de1b21b6849e6deafd9</sysId>
</databaseConnection>
<databaseConnections>
Modify a Database Connection
Description | |
|---|---|
URI | http://host_name/uc/resources/databaseconnection |
HTTP Method | PUT |
Description | Modifies the Database Connection specified by the |
Example URI | |
Consumes Content-Type | application/xml, application/json |
Produces Content-Type | n/a |
Example Request | See Modify a Database Connection: Example Request, below. |
Database Connection Properties | |
Example Response |
|
Modify a Database Connection: Example Request
- JSON
- XML
JSON Request
{
"credentials": null,
"dbDescription": null,
"dbDriver": "com.mysql.jdbc.Driver",
"dbMaxRows": null,
"dbType": "My SQL",
"dbUrl": "jdbc:mysql://localhost:3306/uc",
"name": "Database Connection 1",
"opswiseGroups": [ "Accounting" ],
"sysId": "62701879a6264107bb757a952bcc65cc"
}
XML Request
<databaseConnection>
<credentials />
<dbDescription />
<dbDriver>com.mysql.jdbc.Driver</dbDriver>
<dbMaxRows />
<dbType>My SQL</dbType>
<dbUrl>jdbc:mysql://localhost:3306/uc</dbUrl>
<name>Database Connection 1</name>
<opswiseGroups>
<opswiseGroup>Accounting</opswiseGroup>
</opswiseGroups>
<sysId>62701879a6264107bb757a952bcc65cc</sysId>
</databaseConnection>
Read a Database Connection
URI | http://host_name/uc/resources/databaseconnection |
HTTP Method | GET |
Description | Retrieves information on a specific Database Connection. |
URI Parameters | See Read a Database Connection: URI Parameters, below. |
Example URI | http://localhost:8080/uc/resources/databaseconnection?connectionname=Test4 |
Consumes Content-Type | n/a |
Produces Content-Type | application/xml, application/json |
Example Response | See Read a Database Connection: Example Response, below. |
Database Connection Properties |
Read a Database Connection: URI Parameters
Parameter | Description | Specifications | Required | Mutually Exclusive With |
|---|---|---|---|---|
| ID used within the Controller to identify this Database Connection. | String; URI parameter. | Y |
|
| Name used within the Controller to identify this Database Connection. | String; URI parameter. | Y |
|
Read a Database Connection: Example Response
- JSON
- XML
JSON Response
{
"credentials": null,
"dbDescription": null,
"dbDriver": "com.mysql.jdbc.Driver",
"dbMaxRows": null,
"dbType": "My SQL",
"dbUrl": "jdbc:mysql://localhost:3306/uc",
"exportReleaseLevel": "7.2.0.0",
"exportTable": "ops_database_connection",
"name": "Database Connection 1",
"opswiseGroups": null,
"retainSysIds": true,
"sysId": "62701879a6264107bb757a952bcc65cc",
"version": 1
}
XML Response
<databaseConnection exportReleaseLevel="7.2.0.0" exportTable="ops_database_connection" retainSysIds="true" version="1">
<credentials />
<dbDescription />
<dbDriver>com.mysql.jdbc.Driver</dbDriver>
<dbMaxRows />
<dbType>My SQL</dbType>
<dbUrl>jdbc:mysql://localhost:3306/uc</dbUrl>
<name>Database Connection 1</name>
<opswiseGroups />
<sysId>62701879a6264107bb757a952bcc65cc</sysId>
</databaseConnection>