Application Programming Interface Guide > Web Services Operations > Operations Reference > createLink
 
createLink
Create a link in the /services directory that points to a TABLE or a PROCEDURE resource. Links effectively publish a resource so that it can be consumed by external clients.
A link can be created even if the target resource does not exist. No validation of the existence of the target resource is performed by this procedure. Privileges must also be set appropriately and independently for use of the linked resource.
Location
/services/webservices/system/admin/resource/operations/
Request Elements
path: Place where the link is to be created. Links can only be created in the /services container and within a Data Service, schema, or operations resource.
name: The name of the link.
detail: The level of detail about the resources to include in the response. Valid values are NONE, SIMPLE, and FULL.
targetPath: The fully qualified path of the resource that the new link points to.
targetType: Valid targets specified by targetPath can be either TABLE or PROCEDURE.
annotation (optional): A description of the link.
Response Elements
resources: List of the newly created resources. The resource:impactlevel can be checked when detail is set to SIMPLE or FULL for some target validity information in the response. See Resources Element.
Faults
DuplicateName: If a resource of any type already exists with the given path and name.
IllegalArgument: If either path or targetPath is malformed, or either detail or targetType is illegal.
NotAllowed: If it is not legal to create the resource using the given path and name. Links can only be created under /services and within RELATIONAL_DATA_SOURCE, SCHEMA, and OPERATION resources.
NotAllowed: If the targetType is not allowed to be linked. Only TABLE and PROCEDURE resources can be used as the target of a link.
NotFound: If any portion of the path does not exist.
Security: If the user does not have READ access on all items in path.
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.