We LOVE the Confluence CLI / ACLI. However, one frustration is that the CLI will take a long time to fail when the provided space key does not exist.
Example for an existing space:
$ time ../atlassian-cli/confluence.sh --action getSpace --space "IISC"
Space key . . . . . . . . . . : IISC
Id . . . . . . . . . . . . . : 123412341234
Name . . . . . . . . . . . . : IISC
Description . . . . . . . . . :
Home page title . . . . . . . : foo
Home page id . . . . . . . . : 12341234
Type . . . . . . . . . . . . : global
Categories . . . . . . . . . :
URL . . . . . . . . . . . . . : https://confluence.foo.bar/display/IISC
real 0m0.937s
user 0m1.250s
sys 0m0.185s
Example for a non-existant space:
$ time ../atlassian-cli/confluence.sh --action getSpace --space "IISC2"
...zzz...
...many minutes go by...
Our Confluence Server instance has many thousands of spaces. When using the debug and verbose options, the call seems to be iterating over all of them in batches of 25, looking for the space key. Is there a way to make this call (or any other space-related call) fail faster when the key does not exist?