1 Reply Latest reply on Apr 4, 2017 2:50 AM by Tristan Tarrant

    Accessing Infinispan REST service

    Mylos Kathos Master

      Hi all,

      I'm struggling trying to access Infinispan (9 Final) REST interface. Accessing through the browser localhost:8080/rest brings the Authentication pop-up.

      I've created an application user according to the documentation:

       

      ./bin/add-user.sh -a -u myuser -p "qwer1234!" -ro supervisor,reader,writer

       

      However I'm getting as response a blank page (whatever Web context I use).

      am I supposed to install any extra module/application to use the REST service ? is it available out of the box ?

      Thanks

      Mylos

        • 1. Re: Accessing Infinispan REST service
          Tristan Tarrant Master

          There is nothing to see until you put data in the cache.

          From the command-line:

           

          # Create an entry "a" which will contain the string "Hello" stored as plain/text
          echo "Hello" | curl -v -u user:password -X PUT -d @- --header "Content-Type: text/plain" http://localhost:8080/rest/default/a
          # Retrieve the entry "a"
          curl -u user:password -o - http://localhost:8080/rest/default/a
          # List all entries in the default cache
          curl -u user:password -o - --header 'Accept: text/plain' http://localhost:8080/rest/default
          # Delete the entry "a"
          curl -u user:password -X DELETE http://localhost:8080/rest/default/a