Can I execute a SQL statement using the Web services API?
book
Article ID: KB0082372
calendar_today
Updated On:
TIBCO Data Virtualization
|
7.0.0 and higher
|
Description
The following Web services API call may be used to execute a SQL statement:
/services/webservices/system/admin/execute/operations/executeSql
Below is sample XML input for the API call, to run a SELECT query on a table named PERSONS:
<execute:executeSql xmlns:execute="http://www.compositesw.com/services/system/admin/execute" xmlns:user="http://www.compositesw.com/services/system/admin/user">
<execute:sqlText>select * from /shared/DATASOURCES/oracle_VM/JOE/PERSONS</execute:sqlText>
</execute:executeSql>
The results of the query will be in XML, as shown below:
<execute:executeSqlResponse xmlns:execute="http://www.compositesw.com/services/system/admin/execute" xmlns:common="http://www.compositesw.com/services/system/util/common" xmlns:resource="http://www.compositesw.com/services/system/admin/resource">
<execute:completed>true</execute:completed>
<execute:requestStatus>COMPLETED</execute:requestStatus>
<execute:rowsAffected>1</execute:rowsAffected>
<execute:result>
<execute:hasMoreRows>false</execute:hasMoreRows>
<execute:totalRowCount>1</execute:totalRowCount>
<execute:rows>
<execute:row>
<execute:value>Ann</execute:value>
<execute:value>11</execute:value>
</execute:row>
</execute:rows>
</execute:result>
<execute:requestId>3401716</execute:requestId>
<execute:resultId>3401716-0</execute:resultId>
</execute:executeSqlResponse>
Issue/Introduction
Can I execute a SQL statement using the Web services API?
Feedback
thumb_up
Yes
thumb_down
No