Command-Line Tools

Structr comes with a set of command-line tools to make interaction with the REST server more convenient.


There are two modes providing some scripts which are basically wrappers around curl:

  1. If you built Structr from source, the command-line tools are available in structr-ui/src/main/resources/bin and can be activated with the command . ./su. This will “source” the su script, adding parameters to the local shell environment, e.g. the URL of the REST server, username and password.

  2. If you extracted the distribution file (the one ending with, the scripts are available in the bin/ directory.

Provided Scripts

The following scripts are provided:

get "<url>"
put "<url>" '<data>'
post "<url>" '<data>'
delete "<url>"


  • Please note that you need to have curl installed to be able to use the scripts.
  • Also note that you have to omit the parameter -d when sending data as JSON body.
  • <url> should always be in double quotes to avoid issues with the & character
  • <data> has to be valid JSON data: ‘[…]’ or ‘{…}’


Some example usages of the provided scripts:

Issue a GET request to the User resource to list all users in the system

get users

Return the user with name = ‘foo’

get users?name=foo

Set a new password for the given user

put user/f6c7be79f5e24ece93eef4b597e7ba34 '{password:myNewPassword}'

Start rebuilding the index

post maintenance/rebuildIndex '{}'

Related resources

About this article
Last change 2017-05-04
Topics Structr 2.0