Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages


home | help
OPENXPKICLI(1)	      User Contributed Perl Documentation	OPENXPKICLI(1)

       openxpkicli - command line tool for running API requests

       openxpkicli [options] command

	 Options (all arguments	are optional):
	   --help		 brief help message
	   --man		 full documentation
	   --socketfile	FILE	 OpenXPKI daemon socket	file
	   --instance  NAME	 Shortcut to set socket	on multi-instance configs
	   --realm REALM	 OpenXPKI realm
	   --authstack STACK	 authentication	stack to use
	   --authuser USER	 authentication	user
	   --authpass PASS	 password for authentication user
	   --arg KEY=VALUE	 pass VALUE to method as parameter KEY
	   --filearg KEY=FILE	 as --arg but read value from file name
	   --param VALUE	 stack VALUE onto methods PARAMS array
	   --param KEY=VALUE	 set VALUE in methods PARAMS hash using	KEY
	   --debug		 enable	debug mode
	   --timeout		 socket	timeout	in seconds (default 30s)
	   --json		 activate json mode
				 If active you can pass	either a JSON string or
				 a filename to read a json string from as second
				 argument AFTER	the command name. The parameters
				 are merged with the other arguments.
	   --json-pretty	 human readble json
	   --session		 session mode, see below for details

       Invoke the named	command	through	the OpenXPKI API using the given
       conenction socket.

       Anything	passed using "arg" is added to the methods argument list. If
       the method has a	PARAMS argument	which accepts an array or hash,	you
       can use param to	fill this argument. You	must not mix value only	and
       key=value param calls on	one command.

       openxpkicli --realm "Server CA" --arg message=testmail --param
       rcpt=pki@mycompany.local	send_notification

Operational Modes
       This is the default mode, you must pass all parameters as arguments as
       stated above. The client	will try to login with the credentials given
       (or as anonymous) and run the provided command.

       Activated by adding --session to	the command line. This mode allows you
       to reuse	an existing session id for subsequent calls to a command. The
       session id must be passed in the	environment variable

       To initialize a session,	call openxpkicli with the expected auth*
       parameters and pass login as command. This will perform the login and
       print the session id as output. Put the received	id into	the
       environment and run your	commands. If you are done, pass	command

       If you are using	bash, the output of the	init command can be directly
       passed to an eval to set	the environment.

       Note: session mode is currently not fully compatible with --json
       (session	init and error handling	do not print proper json).


	   `openxpkicli	--authstack=Testing --authuser=raop --authpass=openxpki	\
	       --session login`


	   openxpkicli --session get_session_info

	   openxpkicli --session logout

       Pass --session as parameter and pass the	ID of an existings session in

   JSON	Mode
	   openxpkicli --json search_workflow_instances_count '{"proc_state":["exception","retry_exceeded"]}'

       Not supported yet :)

perl v5.32.0			  2020-08-29			OPENXPKICLI(1)


Want to link to this manual page? Use this URL:

home | help