Interact with the MyAlfresco service from your on-premise install. It currently provides a MyAlfresco Sites dashlet, an extension to Share’s search results page to search your Cloud content and an API Explorer admin console component that allows you to run live queries against the Alfresco Cloud public API.
Use Maven to build the JAR file, which you can then install into the Tomcat instance where you have the Share webapp deployed
mvn clean package && \
cp myalfresco-dashlets/target/myalfresco-dashlets-1.0-SNAPSHOT.jar <TOMCAT_HOME>/webapps/share/WEB-INF/lib
If you prefer to install an AMP file, you can find this in the myalfresco-dashlets-amp
subdirectory.
There is no need to install any repository-side component, but as mentioned in Pre-requisites above, you must have already installed Share OAuth as detailed in that project.
If you are not running your Share instance on localhost:8081
, then before using the add-on you must register a new application of your own on the Alfresco developer portal and specify the Callback URL as http://host:port/share/page/extras/oauth/auth2-return/myalfresco-api
.
Then, add some configuration to your share-config-custom.xml
to override the endpoint used by the dashlets, e.g.
<config evaluator="string-compare" condition="Remote">
<remote>
<endpoint>
<id>myalfresco-api</id>
<name>Custom MyAlfresco Public API</name>
<connector-id>myalfresco</connector-id>
<endpoint-url>https://api.alfresco.com</endpoint-url>
<client-id>myclientid</client-id>
<client-secret>myclientsecret</client-secret>
<access-token-url>https://api.alfresco.com/auth/oauth/versions/2/token</access-token-url>
</endpoint>
</remote>
</config>
Your config should contain the correct details for the app you registered.
client-id
and client-secret
parameters, which you can find in the developer portalname
field can be anything of your choosing, whatever makes sense to you, but do not change the id
valueYou must deploy the My Alfresco Search module in the Module Deployment Console in order to enable this functionality. Once added, Cloud search results will be displayed for any user who has recently used the dashlet or the API Explorer console.