4.3.1.2. JSON format

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

@GET

@Produces({MediaType.APPLICATION_JSON})
public RootResourcesList listJSON()
{
   ...
}

To do this, add "Accept:application/json" header to your GET request

f.e. curl -u root:exo http://localhost:8080/rest/ -H "Accept:application/json" will return such JSON:

{"rootResources":[
   {
      "fqn":"org.exoplatform.services.jcr.ext.script.groovy.GroovyScript2RestLoader",
      "regex":"/script/groovy(/.*)?",
      "path":"script/groovy"
   },
   {
      "fqn":"org.exoplatform.services.jcr.webdav.lnkproducer.LnkProducer",
      "regex":"/lnkproducer(/.*)?",
      "path":"/lnkproducer/"
   },
   {
      "fqn":"org.exoplatform.services.jcr.ext.registry.RESTRegistryService",
      "regex":"/registry(/.*)?",
      "path":"/registry/"
   },
   {
      "fqn":"org.exoplatform.services.jcr.webdav.WebDavServiceImpl",
      "regex":"/jcr(/.*)?",
      "path":"/jcr"
   },
   {
      "fqn":"org.exoplatform.services.rest.ext.service.RestServicesList",
      "regex":"(/.*)?",
      "path":"/"
   }
]}

Copyright ©2012. All rights reserved. eXo Platform SAS