createDataSource

Create a data source resource.

Location

/services/webservices/system/admin/resource/operations/

Request Elements

path: An existing path to the container where the new data source metadata is to be placed.

name: Name to give to the new data source.

detail: The level of detail about the resources to include in the response. Valid values are NONE, SIMPLE, and FULL.

dataSourceType: The type of data source to create. Invoke the operation getDataSourceTypes to get a list of valid data source types. Valid values include, but are not limited to, the following (excluding descriptions in parentheses):

CustomProc
Netezza
DataDirect_Mainframe
Oracle (for Oracle 9i and 10g (Thin Driver) resources)
DB2 (for DB2 v7 (Type 4) resources)
Oracle_Type2 (for Oracle 9i and 10g (OCI Driver) resources)
DB2_Mainframe (for DB2 z/OS v8 (Type 4) resources)
SqlServer
DB2_Type2 (for DB2 v7 (Type 2) resources)
Sybase
File
Teradata
FileCache
VirtualRelational
Informix (for Informix 9.x resources)
VirtualWsdl
Ldap
Wsdl
MsAccess
XmlFile
MsExcel
XmlHttp
MySql

 

annotation (optional): A description of the resource.

attributes (optional): Connection information and other information as defined by the data source type. Although this is optional, most data sources require that some attributes be provided when created. If a required attribute is missing and the attribute has no default value, a NotAllowed fault is generated. See Attributes Element.

Response Elements

resources: List of the newly created resource. See Resources Element.

Faults

DuplicateName: If a resource already exists with the given path and name.

IllegalArgument: If the path is malformed or the detail is not a legal value.

IllegalArgument: If an unsupported attribute is provided.

NotAllowed: If a required attribute is missing.

NotAllowed: If it is not legal to create the resource using the given path and name. Data sources cannot be created inside other data sources. Only COMPOSITE_DATABASE typed sources can be created in /services/databases, and only COMPOSITE_SERVICE typed sources can be created in /services/webservices (or within folders under this location). No other type of data source can be created under /services, nor can these data source types be created at any other location.

NotAllowed: If an attempt is made to create a custom Java procedure or custom data source with an insufficient license.

NotFound: If any portion of path does not exist.

NotFound: If the requested data source type does not exist.

Security: If the user does not have READ access on all items in path except the last one.

Security: If the user does not have WRITE access to the last item in path.

Security: If the user does not have the ACCESS_TOOLS right.