getMetadata task and REST method.