I/O command line interface (CLI)

As of version 3.0, usual administrative tasks can be done using the curl command line tool using the I/O endpoint.

Note: the -b cookies.txt -c cookies.txt parameters of the curl calls bellow are required as they allow to use the same server session (identified by the JSESSIONID cookie)._

As of version 3.1, the I/O endpoint supports either legacy I/O authentication (using the I/O password stored in a EAI <login>:<password> system parameter), in this case <credentials> is -u <login>[:<I/O password>], or the API endpoint authentication mechanisms described in this document, in this case <credentials> are API endpoint authentication headers.

Warning: In production this I/O endpoint's URL should be restricted only to allowed origins e.g. using URL filtering on request's origin IP address or similar approaches.

Rights

The I/O interface uses the system pseudo user which is only granted the ADMIN group, and thus only the groups being part of the ADMIN group's profile.

If you get "Object ... not granted" messages, make sure the requested object is allowed to at least one of the groups of the ADMIN group profile.

XSD schemas

The standard Simplicité XML follows these XSD schemas

Imports

To import a file <file> the command is:

curl <credentials> -b cookies.txt -c cookies.txt --form service=<import command> --form file=@<file> [<extra parameters>] http[s]://<host[:port]>[/<app root>]/io

Where <import command> is one of :

The file can also be designated by a URL then the --form file=@<file> is to be changed to --form url=@<url>.

Note: the standard XML, ZIP and CSV formats are described here

Exports

To export data in a file <file> the command is:

curl <credentials> -b cookies.txt -c cookies.txt --form service=<export command> -o <file> [<extra parameters>] http[s]://<host[:port]>[/<app root>]/io

Where <export command> is one of :

Note: the standard XML, ZIP and CSV formats are described here

Git

As of version 3.2, to do a Git commit on a module, the command is:

curl <credentials> -b cookies.txt -c cookies.txt --form service=modulecommit --form module=<module name> --form message="<commit message>" http[s]://<host[:port]>[/<app root>]/io

Others

Clear cache

To flush server-side cache, the command is:

curl <credentials> -b cookies.txt -c cookies.txt --form service=clearcache http[s]://<host[:port]>[/<app root>]/io

Purge tasks

Various purge tasks can be processed using following commands:

curl <credentials> --form service=<purge command> http[s]://<host[:port]>[/<app root>]/io

Where <purge command> is one of:

Indexation

To force indexation to be (re)built, the command is:

curl <credentials> -b cookies.txt -c cookies.txt --form service=buildindex http[s]://<host[:port]>[/<app root>]/io