You make API requests by sending a URL using one of five HTTP API methods, GET, POST, PUT, DELETE, and OPTIONS. Here’s an example of a URL to get all sites in a local Alfresco installation:
http://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1/sites
You can use the ReST API Explorer to make this request:
- In your web browser, navigate to [http://localhost:8080/api-explorer/#!/sites/listSites](http://localhost:8080/api-explorer/#!/sites/listSites). You’ll see full documentation for the GET /sites API method, including the query and body parameter formats, and the expected and error response schemas.
- At the end of the description you’ll see the Try it out! button. Press it now.
You’ve just made your first Alfresco ReST API request. You will see the request URL you’ve just invoked, the corresponding Curl command, the JSON response body that the Alfresco repository has returned, the HTTP response code, and the response headers:
Note this call returns a list of site entries. All lists returned by the Alfresco ReST API are of this format.