Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

1.Create a new Confluence page (or edit and existing one) and add JavaScript Runner macro with following script inside its body

Code Block
languagejs
var spacesWithCredential=JSON.parse(http.get("http://localhost:8090/rest/api/space","myCredential"));
var spacesWithoutCredential=JSON.parse(http.get("http://localhost:8090/rest/api/space"));
out.element("h3","Space count:"+spacesWithCredential.size);
out.element("h3","Space count:"+spacesWithoutCredential.size);