Previous Page | Next Page

Overview of Querying Metadata

Using GetTypes to Get Actual Metadata Types in a Repository

After adding metadata objects, you can get all metadata types defined in a repository by using the GetTypes method with the OMI_SUCCINCT (2048) flag set. When used with OMI_SUCCINCT and its <REPOSID> element, the GetTypes method returns the metadata types for which metadata has been defined in a specific repository.

Here is an example of a GetTypes request that sets the OMI_SUCCINCT flag:

<GetTypes>
   <Types/>
   <NS>SAS</NS>
   <!-- specify the OMI_SUCCINCT flag -->
   <Flags>2048</Flags>
   <Options>
     <!-- include <REPOSID> XML element and a repository identifier -->
     <Reposid>A0000001.A53TPPVI</Reposid>
   </Options>
</GetTypes>

The <NS>, <FLAGS>, <OPTIONS>, and <REPOSID> elements are input parameters.

The <TYPES> element is an output parameter. Here is an example of the output returned by the SAS Metadata Server:

<!-- Using the GETTYPES method. -->

<Types>
<Type Id="Column" Desc="Columns" HasSubtypes="0"/>
<Type Id="PhysicalTable" Desc="Physical Table" HasSubtypes="1"/>
<Type Id="ResponsibleParty" Desc="Responsible Party" HasSubtypes="0"/>
<Type Id="SASLibrary" Desc="SAS Library" HasSubtypes="0"/>
</Types>

The repository contains metadata objects of four metadata types: Column, PhysicalTable, ResponsibleParty, and SASLibrary.

To list the actual metadata objects of each metadata type, you must use the GetMetadataObjects method. See GetMetadataObjects.

Previous Page | Next Page | Top of Page