JBoss.orgCommunity Documentation

Chapter 85. RestServicesList Service

85.1. Usage
85.1.1. HTML format
85.1.2. JSON format

RestServicesList service provides information about REST services deployed to the application server.

The list can be provided in two formats: HTML and JSON.

To get the list of services in HTML format use listHTML() method:

@GET
@Produces({MediaType.TEXT_HTML})
public byte[] listHTML()
{
   ...
}  

To do this, perform a simple GET request to the RestServicesList link.

f.e. curl -u root:exo http://localhost:8080/rest/ will return such HTML code:

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
   <head>
      <title>eXo JAXRS Implementation</title>
   </head>
   <body>
      <h3 style="text-align:center;">Root resources</h3>
      <table   width="90%"   style="table-layout:fixed;">
         <tr>
            <th>Path</th>
            <th>Regex</th>
            <th>FQN</th>
         </tr>
         <tr>
            <td>script/groovy</td>
            <td>/script/groovy(/.*)?</td>
            <td>org.exoplatform.services.jcr.ext.script.groovy.GroovyScript2RestLoader</td>
         </tr>
         <tr>
            <td>/lnkproducer/</td>
            <td>/lnkproducer(/.*)?</td>
            <td>org.exoplatform.services.jcr.webdav.lnkproducer.LnkProducer</td>
         </tr>
         <tr>
            <td>/registry/</td>
            <td>/registry(/.*)?</td>
            <td>org.exoplatform.services.jcr.ext.registry.RESTRegistryService</td>
         </tr>
         <tr>
            <td>/jcr</td>
            <td>/jcr(/.*)?</td>
            <td>org.exoplatform.services.jcr.webdav.WebDavServiceImpl</td>
         </tr>
         <tr>
            <td>/</td>
            <td>(/.*)?</td>
            <td>org.exoplatform.services.rest.ext.service.RestServicesList</td>
         </tr>
      </table>
   </body>
</html>    

If you perform the same request with your browser, you'll see the table with the list of deployed services like this: