Application Programming Interface Guide > Web Services Operations > Operations Reference > moveResource
 
moveResource
Move the specified resource into a folder using a new name.
Note: This web services operation is different from the procedure of the same name, which is in the resource tree under /lib/resource.
Location
/services/webservices/system/admin/resource/operations/
Request Elements
path: The path of the resource to be moved.
type: The type of the resource specified by the given path. Valid values are CONTAINER, DATA_SOURCE, DEFINITION_SET, LINK, PROCEDURE, TABLE, TREE, or TRIGGER.
targetContainerPath: The path of the target container to move the resource into.
newName: The new name to call the moved resource.
overwrite: If a resource exists in the target container with the same name and type of the target resource and overwrite is TRUE, the resource within the target container is overwritten. If overwrite is FALSE, a DuplicateName fault is generated and resource are not moved.
Response Elements
N/A
Faults
DuplicateName: If a resource in the target container exists with the same name and type as one of the source and overwrite is FALSE.
IllegalArgument: If any of the given paths or types are malformed.
IllegalState: If the source resource cannot be moved. Resources in /services/databases/system, /services/webservices/system, or within any physical data source cannot be moved.
NotAllowed: If the source resource is not allowed to exist within the target container. Resources cannot be moved into a physical data source. LINK resources can only be moved into RELATIONAL_DATA_SOURCEs, SCHEMAs, and PORTs under /services. Non-LINK resources cannot be moved into any location under /services.
NotFound: If the source resource or any portion of the path to the target container do not exist.
Security: If the user does not have READ access on all items in the source path.
Security: If the user does not have READ access on the items in the targetContainerPath other than the last item.
Security: If the user does not have WRITE access to the last item in targetContainerPath.
Security: If the user does not have WRITE access to a resource that is to be overwritten.
Security: If the user does not have the ACCESS_TOOLS right.