# Accessing Entando APIs
Clone the Entando reference app if you don’t already have it.
git clone https://github.com/entando-k8s/entando-de-app
Start the app for local execution and enable the swagger profile by passing
-Dspring.profiles.active=swaggerto the jetty command. Set the value of
-Djetty.portto something available on your machine e.g. 8085.
mvn clean package jetty:run-war -Pjetty-local -Pderby -Dspring.profiles.active=swagger -Djetty.port=8085 -Dorg.slf4j.simpleLogger.log.org.eclipse.jetty.annotations.AnnotationParser=error
- Note: If you don't have docker installed or running add
-DskipDocker=trueto the command above
Wait for the app to start.
Once started, navigate to the swagger ui in a browser.
The Entando core exposes REST APIs for every action that can be taken in the App Builder and Admin Console environments. For example, you can use these apis to create pages, create page templates or to add widgets to pages. The APIs can be used to support automation, testing, or integrations with external systems.
# API structure
All of the APIs share a common top level structure. Each response will
contain a top level entry for
errors will always contain code and a message string indicating an
error condition in the request. The
metadata section is used for
paging, sorting, filtering and data that is distinct from the body. The
body of each response is included in the
payload section of the
response and varies according to each API.
All of the model classes returned by the Entando core are annotated so that the model definition is included in the swagger documentation. At the bottom of the swagger page all of the model classes returned by the API endpoints can be found.
Stop the Entando instance if it is running.
In the project open
Change the value of this property to reflect the port you are using to run the app.
For example if running on 8085 you would have
Login to the admin console at
Once logged in go to
Administration - API Management - Consumers.
Select the kebab button on the row labeled swagger.
On that screen enable the button for
On that screen enter
swaggeras the value for the secret.
Return to the Swagger UI, e.g.
Use the Try it out button on the APIs
Select the blue GET row
Select Try it out
Look at the results in the window