Analysis requests repository
A repository of analysis requests specific to your project is an excellent way to share example requests with other members of your team. The JSON Sandbox makes these example requests available for editing and execution.
To add example requests to your project, perform these steps:
web/subdirectory under your project folder (next to your project descriptor). This directory contains static files served by Lingo4G server.
requests/subdirectory under the
web/directory. For each analysis request JSON in your project, create one corresponding file under the
web/requestsdirectory. The JSON Sandbox app displays these requests in the order of their file names so you can use a numeric prefix to order them to prioritize more common or important requests.
For example, you may create a file called
documents-by-query.jsonwith the following contents:Document your requests.
To make the request repository easier to understand for other users, document the requests and their variables using the
commenttags. The JSON sandbox app can search names and comments of the requests in the repository.Reloading of the request repository.
If you make any edits in any of the requests in the the
web/requestsdirectory, reload Lingo4G Explorer in your browser to see the changes. There is no need to restart Lingo4G server.
Lingo4G merges all requests from individual files you created in the
web/requestsdirectory into one JSON array. To retrieve this aggregated array, use a HTTP GET request to fetch
http://localhost:8080/requests.json(when you run Lingo4G server with one project) or
http://localhost:8080/project-id/requests.json(when you run Lingo4G server with multiple projects at once).