This is a very basic example of how to start developing a Rest API on the Alfresco Platform that conforms to the api standards.
It uses the Alfresco SDK.
-
Typed :
mvn archetype:generate -DarchetypeGroupId=org.alfresco.maven.archetype -DarchetypeArtifactId=alfresco-platform-jar-archetype -DarchetypeVersion=3.0.0 -DinteractiveMode=false -DgroupId=org.alfresco.demo -DartifactId=quick-api
-
Git init and added exclusions
-
Imported as a Maven Project into Intellij
-
Deleted unused files, see commit
-
Updated the pom.xml, Switched to Java 8 and added remote-api as a dependency, see commit
-
Added an endpoint for GET
/alfresco/api/-default-/private/mycompany/versions/1/categories
, see commit -
Added a
categories/[categoryId]/children
endpoint, see commit -
Added CREATE using POST endpoints for a root category and children, see commit
-
Added category DELETE endpoint, see commit
-
Ran
mvn clean install -DskipTests=true alfresco:run
-
In a browser : /alfresco/api/-default-/private/mycompany/versions/1/categories Alfresco is up and running :)
Copyright (C) 2017 Alfresco Software Limited
This file is part of an unsupported extension to Alfresco.
Alfresco Software Limited licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.