cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing a File (URL) without uuid (by folder or folderId)

alpe
Champ in-the-making
Champ in-the-making
2 REPLIES 2

jpotts
World-Class Innovator
World-Class Innovator
When I have a question about "does Alfresco have a URL that does XXXX?" I always start by looking at the Web Script Index. The Web Script Index for repository web scripts is accessible at http://localhost:8080/alfresco/service/index while the Web Script Index for the Share web scripts is accessible at http://localhost:8080/share/service/index. (The web script engine runs on both the repo tier and the Share tier, each with a different set of web scripts and capabilities).

The "getContent" URL you are referring to is a repository tier web script. You can tell that because the URL you provided uses Share's proxy servlet. In this case, Share is proxying that request back to the repository tier.

If you go to the repository Web Script index and search for something like "/api/node/content" you'll find the getContent web script. You'll note it has several possible URLs bound to it and that a few of them use the path rather than the node reference:

/alfresco/s/api/path/content{property}/{store_type}/{store_id}/{nodepath}?a={attach?}&streamId={streamId?}
/alfresco/s/api/path/{store_type}/{store_id}/{nodepath}/content{property}?a={attach?}&streamId={streamId?}
/alfresco/s/cmis/p/{path}/content{property}?a={attach?}&streamId={streamId?}

So, in your example, assuming your files were in a Share site called test-site-1, you could get to those documents like this:

http://localhost:8080/alfresco/s/api/path/content/workspace/SpacesStore//Sites/test-site-1/documentL...
http://localhost:8080/alfresco/s/api/path/content/workspace/SpacesStore//Sites/test-site-1/documentL...

(Even if you had found the right web script, that "documentLibrary" part of the path might have thrown you off because it isn't visible in the UI. To find stuff like that you should use the Node Browser, either in Explorer or in Alfresco 4 Share).

If you wanted to hit the same web script through Share's proxy servlet, you would use this:
http://localhost:8080/share/proxy/alfresco/api/path/content/workspace/SpacesStore//Sites/test-site-1...

Jeff

jpotts
World-Class Innovator
World-Class Innovator
Actually, in testing out the proxy version of that URL I think I may have found a bug. The proxy servlet appears to be stripping out the extra slash. I've filed a Jira on it:
https://issues.alfresco.com/jira/browse/ALF-11942

Jeff