Before starting the description of the development environment setup, let's share some prerequisites. First of all we assume that you have available Alfresco Content Services 5.2 and the Alfresco API Explorer, up and running. There are no specific requirements and setup for both the softwares.
We suggest to have the Alfresco instance installed into the same server/machine of the development environment. It's not mandatory in general, but be aware the provided source code assumes this as a prerequisite. If you decide to use two different servers/machines please remember to change the
localhost in every URL.
In this task we're going to use an environment based on Ubuntu 16.04 LTS, though all the described tasks are valid for all Linux based, Windows based, and Mac OS X platforms. Tests and screenshots are based on tests developed on this specific environment.
Installing Microsoft Visual Studio
Installing the Microsoft Visual Studio Community is very straightforward. Below the steps to follow, to complete the task.
- Download Visual Studio for Linux here. A
tar.gzfile will be downloaded.
- Extract the
tar.gzfile to the target path (in our case
/home/<user>path). A folder called
VSCode-linux-x64will be extracted.
- Run the code executable to open Visual Studio Code. You should see a black window appearing into you desktop.
- (Optional) Create a symbolic link to conveniently run code from the terminal:
sudo ln -s ~/VSCode-linux-x64/code /usr/local/bin/code
Now that Microsoft Visual Studio for Linux is installed into your development environment, we're going to setup Postman REST client. Postman is released as a Chrome App which means that Postman can only run on the Chrome browser. So to use Postman, you'll first need to install Google Chrome.
If you already have Chrome installed, head over to Postman’s page on the Chrome Webstore, and click
Add to Chrome. The download should take few minutes, depending on your internet connection. Once you’ve downloaded the app, launch Postman. Here the description on how to launch it in all the available platforms.
Checking the environment
How can we be sure everything is working properly? Let's test it with the tasks described below.
This test is a first access to Alfresco REST APIs using Postman. To try it into your environment, open Postman and select
Basic Auth in the
Type field in the
Authorization tab. In the URL input (on top of the panel) enter the following link:
http://<alfresco IP>:<alfresco port>/alfresco/api/-default-/public/alfresco/versions/1/nodes/-root-/children
Send and you should see something similar to the following screenshot.
If this is confirmed, then congratulations! You've successfully installed everything needed to test the new Alfresco REST APIs.