As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
Hi,
I would like to see content of pdf file via alfresco CMIS 1.0 AtomPub Service Document.
When I enter this link: http://localhost:8081/alfresco/s/api/node/content/workspace/SpacesStore/26b11458-5059-48dd-989d-9183f8e9d025/name_of_file.pdf to my browser I need to log in and then I can see content of file. Everything works as it should.
I would like to do the same thing in script but I cant find rigth url that would log me in and redirect me to content of file in one url.
Is there a way how this can be done ?
Thanks
You can use this kind of URL:
http://localhost:8080/alfresco/api/-default-/public/cmis/versions/1.0/atom/content/Sample.pdf?id=09c6585e-c6a3-4362-9c99-4632a2868d23
Including your document name ("Sample.pdf") and your document id ("09c6585e-c6a3-4362-9c99-4632a2868d23"). Just remove the "workspace/SpacesStore/" to get this required id.
your link do not work. Because I still need to log in in modular window and then i see content.
You need to add Basic Auth header. For instance, using curl you can type following command:
curl --location --request GET 'http://localhost:8080/alfresco/api/-default-/public/cmis/versions/1.0/atom/content/Sample.pdf?id=887b6ef5-7651-4c3a-918d-85706364d65a' \ --header 'Authorization: Basic YWRtaW46YWRtaW4='