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?
Hi Ryan, by CLI I hope you mean this app ?I do not have experience with it, but I would use REST API method instead to check space existence.
Hi, Kishan. Yes, that is the Confluence CLI I was referring to. I am wondering if they could enhance their product to work as you had described (call the REST API /rest/api/space/{spaceKey} method as an early failsafe) or if there was another way using only the Confluence CLI to get that fail-fast behavior. We may just need to use /rest/api/space/{spaceKey} in our own toolchain before attempting potentially slow calls to the Confluence CLI.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.