A dataset in CKAN is only a logical container of data. Each dataset can have one or more resources. A resource represents primary data, e.g.
An uploaded file
A link to a file that was uploaded somewhere else
A link to an API
So you can absolutely add the link to an API as a resource to a dataset.
How this data is previewed is again something different. There are several CKAN extensions around that help you to preview data. In the core there is a build in preview for tabular data (CSV, XLS or the like). But if you want to preview a WMS, you can use the preview provided by ckanext-spatial.
So it really depends on the data that you want to preview, but for many common formats there already is a solution. And if not, it would be a great opportunity to create an extension and provide it to the community.
A dataset in CKAN is only a logical container of data. Each dataset can have one or more resources. A resource represents primary data, e.g.
So you can absolutely add the link to an API as a resource to a dataset.
How this data is previewed is again something different. There are several CKAN extensions around that help you to preview data. In the core there is a build in preview for tabular data (CSV, XLS or the like). But if you want to preview a WMS, you can use the preview provided by ckanext-spatial.
So it really depends on the data that you want to preview, but for many common formats there already is a solution. And if not, it would be a great opportunity to create an extension and provide it to the community.