We assume you are familiar with cURL . Note that cURL requires URL encoding.
See tools to test REST requests for other possibilities.
Find webpages in the Travel Demo which were last modified before or on June 12, 2015:
curl 'http://localhost:8080/magnoliaAuthor/.rest/delivery/ep/?mgnl:lastModified[lte]=2015-06-12' --globoff
By using the option
--globoffyou can specify URLs that contain the letters {}[] without having them being interpreted by cURL itself.
Find webpages with the word "Customer" in the title.
Usecurl -g -G "http://localhost:8080/magnoliaAuthor/.rest/delivery/ep" --data-urlencode "title[like]=%Customer%"
--data-urlencodeand-g -Gto encode the request parameter values, if required.
In the
websiteworkspace, find all nodes for which/travel/about/careersis the ancestor:curl 'http://localhost:8080/magnoliaAuthor/.rest/delivery/ep/?@ancestor=/travel/about/careers'
Find nodes in the
toursworkspace that contain the keyword "beach". Return the results in descending order based on thelocationproperty and restrict the number of results to two:curl 'http://localhost:8080/magnoliaAuthor/.rest/delivery/ep/?q=beach&orderBy=location%20desc&limit=2'
Find a tour with the word "Japan" in its
description. Return only the variant in the German language:curl -g -G 'http://localhost:8080/magnoliaAuthor/.rest/delivery/ep?lang=de-DE' --data-urlencode "description[like]=%Japan%"
Note that we use
--data-urlencodeto encode one of the request parameters, whereas the one that does not require encoding is added to the URL directly.