Externally you can get all the metadata used to generate the types at /types/metadata e.g:
This is the source code to implement the service which you can re-use yourself internally:
public INativeTypesMetadata NativeTypesMetadata { get; set; }
public MetadataTypes Any(TypesMetadata request)
{
var typesConfig = NativeTypesMetadata.GetConfig(request);
var metadataTypes = NativeTypesMetadata.GetMetadataTypes(Request, typesConfig);
return metadataTypes;
}
However what’s returned are DTO’s, i.e. they don’t contain the original C# Type, for that you need to get it from the metadata:
HostContext.Metadata
This contains all the operation and type metadata however determining whether to show the type can only be done at runtime since it’s based on the incoming Request, you can use the IsVisible() API’s for this at:
HostContext.Metadata.IsVisible()