cancel
Showing results for 
Search instead for 
Did you mean: 

Reflection of properties and aspects of document type

ghernando
Champ in-the-making
Champ in-the-making
I'd like to be able to query via a REST Web Service what the properties (and data types) and aspects are that belong to a document type.
I thought that a query like the following would do it, but it does not seem to return any aspects or custom properties:
http://localhost:8080/alfresco/s/cmis/type/D:xyz:myCustomDocument

When I query an existing document of the type, the results will bring back all the properties which is good.
But I don't want to have to rely on there even being a document of that type already existing.

How can I do that?
1 REPLY 1

jpotts
World-Class Innovator
World-Class Innovator
Old thread, but what you need to do is query the type definition.

For example, to get the type definition for cmis:document, I'd do a GET on:
http://localhost:8080/alfresco/cmisatom/52e60818-a3d2-45d5-a753-cac9929315e0/type?id=cmis:document

If you want to query for custom types, remember that the ID starts with "D:" for types that extend from cmis:document, like this:
http://localhost:8080/alfresco/cmisatom/558e5b3c-71a0-42ac-b420-eda16e93e95b/type?id=D:sc:whitepaper

If you want to query for custom aspects, they start with a "P:" (for policy), like this:
http://localhost:8080/alfresco/cmisatom/558e5b3c-71a0-42ac-b420-eda16e93e95b/type?id=P:sc:webable

That "558e5b3c…" number is the repository ID.

These are all using Alfresco 4 URLs.

Jeff