cancel
Showing results for 
Search instead for 
Did you mean: 

How to get a list of registered MimeTypes using cmis query language

jeevitha_balu
Champ in-the-making
Champ in-the-making
Hi,

I wanted to get a list of all registered  Mimetypes provided by Alfresco. I'm aware that there exists a ReST way of doing it using the following call:

http://localhost:8080/alfresco/service/mimetypes

But this returns a html response containing the list of registered mime types.


Note:
The below string displays mimetype for all the documents that are present currently in the repository.

String queryString = "select cmis:contentStreamMimeType from cmis:document";

Assuming that there are no documents currently in the repo, now how do I get list of mimetypes supported by Alfresco using dotcmis dll? or Is there any object type (say cmis:{something}) that can be queried to get list of mimetypes?

Can someone help me with your inputs

Thank in advance.
Jeevitha
1 REPLY 1

nickburch
Confirmed Champ
Confirmed Champ
There's no CMIS way to get this information. There's unlikely to be either, as it isn't really a cross-repository thing

If you want to get back the list of known mimetypes, in an easy to process format, then your best bet is the "Mimetypes and their Descriptions" api - /alfresco/service/api/mimetypes/descriptions . This returns as JSON information on all the known Mimetypes. It doesn't tell you which ones have metadata extractors, and doesn't tell you which ones have converters to plain text (or similar), but it provides all you need to offer a dropdown list of supported types for a user to pick from.