The DeleteMetadata method
deletes metadata objects from a repository. To replace or modify the
properties of a metadata object, use the UpdateMetadata method.
The DeleteMetadata method
is typically issued in the SAS namespace to delete metadata representing
application elements. The method can also be issued in the REPOS namespace
on a RepositoryBase object to unregister the repository, to destroy
the repository, or to clear all objects from the repository without
harming the repository's registration. Flags that are valid only in
the REPOS namespace are provided to perform these tasks.
For
more information, see Deleting a Repository. You must have administrative status
on the SAS Metadata Server to issue the DeleteMetadata method in the
REPOS namespace. For more information about administrative user status,
see the
SAS Intelligence Platform: Security Administration Guide.
Regardless of the namespace in which it is issued (REPOS
or SAS), a DeleteMetadata method call must set the OMI_TRUSTED_CLIENT
flag (268435456). The OMI_TRUSTED_CLIENT flag is required in all method
calls that write or remove metadata.
The object to delete
is primarily identified in a metadata property string that is submitted
to the method in the INMETADATA parameter. To delete multiple objects,
stack their metadata property strings in the INMETADATA parameter.
In addition to deleting specified SAS Metadata Model
objects, a DeleteMetadata method issued in the SAS namespace deletes
associated objects using a type definition from the SAS type dictionary,
or, when the OMI_TEMPLATE flag is set, associated objects that are
specified in a template.
For usage information, see Deleting Metadata Objects.
Check the return code
of a DeleteMetadata method call. A nonzero return code indicates that
a failure occurred while trying to delete the metadata objects. A
nonzero return code means none of the changes indicated by the method
call were made.