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:
-
Create the
web/
subdirectory under your project folder (next to your project descriptor). This directory contains static files served by Lingo4G server. -
Create the
requests/
subdirectory under theweb/
directory. For each analysis request JSON in your project, create one corresponding file under theweb/requests
directory. 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.json
with 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
name
andcomment
tags. 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/requests
directory, 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/requests
directory into one JSON array. To retrieve this aggregated array, use a HTTP GET request to fetchhttp:​//localhost:​8080/requests.json
(when you run Lingo4G server with one project) orhttp:​//localhost:​8080/project-id/requests.json
(when you run Lingo4G server with multiple projects at once).