Application Programming Interface Guide > Web Services Operations > Operations Reference > createResource
 
createResource
Create a resource in a default state. Resources cannot be created under /services unless otherwise noted, and cannot be created within a physical data source.
See the table in TDV Resource Types and Subtypes for a list of the resource type-subtype element combinations supported by this operation.
CONTAINER / CATALOG_CONTAINER: Can only be created within a data source under /services/databases.
CONTAINER / PORT_CONTAINER: Can only be created within a SERVICE under /services/webservices.
CONTAINER / SCHEMA_CONTAINER: Can only be created within a CATALOG that is under /services/databases.
CONTAINER / SERVICE_CONTAINER: Can only be created within a TDV Web Services data source that is under /services/webservices.
CONTAINER / FOLDER_CONTAINER: Cannot be created anywhere under /services except in another FOLDER under /services/webservices.
DEFINITION_SET / SQL_DEFINITION_SET
DEFINITION_SET / XML_SCHEMA_DEFINITION_SET
DEFINITION_SET / WSDL_DEFINITION_SET
PROCEDURE / BASIC_TRANSFORM_PROCEDURE: Created with no target procedure and no output columns, so it is not runnable.
PROCEDURE / CUSTOM_PROCEDURE: Created empty, with no associated data source, so it is not runnable.
PROCEDURE / EXTERNAL_SQL_PROCEDURE: Created with no SQL text, so it is not runnable.
PROCEDURE / SQL_SCRIPT_PROCEDURE: Created with a simple default script body that is runnable.
PROCEDURE / XQUERY_PROCEDURE: Created with no XQuery text, so it is not runnable.
PROCEDURE / XSLT_PROCEDURE: Created with no XSLT text, so it is not runnable.
PROCEDURE / STREAM_TRANSFORM_PROCEDURE: Created with no target procedure and no output columns, so it is not runnable.
PROCEDURE / XQUERY_TRANSFORM_PROCEDURE: Created with no target schema and no model, so it is not runnable.
PROCEDURE / XSLT_TRANSFORM_PROCEDURE: Created with no target procedure and no output columns, so it is not runnable.
TABLE / SQL_TABLE: Created with no SQL text or model, so it is not runnable.
TRIGGER / NONE: Created disabled.
CONNECTOR / JMS: Created with no connection information.
CONNECTOR / HTTP: Created with no connection information.
Location
/services/webservices/system/admin/resource/operations/
Request Elements
path: A path to the container with which to place the resource.
name: The name of the resource.
detail: The level of detail about the resources to include in the response. Valid values are NONE, SIMPLE, and FULL.
type: The type of resource to create. See the list above.
subtype: The subtype of resource to create. See the above list.
annotation (optional): A description of the resource.
resource (optional): An entire resource.
resourceBundle (optional).
includeOwnership (optional): If resource is supplied, apply the ownership.
Response Elements
resources: List of the newly created resources. See Resources Element. The amount of detail returned varies depending on the value specified for detail in the request.
Faults
DuplicateName: If a resource already exists with the given path and name.
IllegalArgument: If any of the given paths, types, or detail levels are malformed.
NotAllowed: If it is not legal to create the resource at the specified path.
NotAllowed: If an attempt is made to create a custom Java procedure, SQL script, or a trigger, with an insufficient license.
NotFound: If any portion of path 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.