What is Bob Swift Command line plugin and why can it fetch data not available via REST APIs?
Asked by Christoffer Pettersson:

I find this a bit strange.

Currently, there is no REST APIs for Confluence Questions \[1\], but apparently there is a serie of plugins from "Bob Swift" called "Command Line Interface (CLI)", such as this:

<https://marketplace.atlassian.com/plugins/org.swift.confluence.cli>

Which has an API to get the list of questions:

<https://bobswift.atlassian.net/wiki/display/CSOAP/Reference#Reference-getQuestionList>

Is this "Bob Swift" company special or just another company that does third party addons? How come they can read and write data without official public APIs? Im so confused how this works :smile:

\[1\] <https://jira.atlassian.com/browse/CQ-376>


Answers:
author: Joe Clark
body: @Bob Swift \[Bob Swift Atlassian Add-ons\] (who now works for [AppFire](http://www.appfire.com/)) is "just another company" that does third party add-ons, although Bob himself has been around the Atlassian space for a *long* time and I would say is one of the most well-known and trusted add-on developers.

In addition to providing a simple interface to Atlassian's published, official APIs (SOAP, XML-RPC and REST), the CLI also employs a number of other 'tricks' to expose parts of Atlassian products without an official API. Firstly, some of the functions in the CLI actually send screen-scraping requests to JIRA and Confluence that emulate behaviour of a browser to achieve the desired goal. Secondly, there are also unoffficial Atlassian APIs. For example, Confluence Questions does already expose a REST API eg. <https://answers.atlassian.com/rest/questions/1.0/questions> - this API is not documented and has no guarantees on forwards/backwards compatability (yet! Until the CQ team commits to working on <https://jira.atlassian.com/browse/CQ-376>) - but if you want to dig into the Confluence Questions source code, many of the basic API operations are already technically possible.

comments: author: Nic Brough -Adaptavist-
body: Also, if CQ-376 does make changes that break the CLI functions (if the CLI is using them), you can rely on Bob to get it updated really quickly. And update for any new functions as well.


author: Bob Swift (personal)
body: Joe is correct, as usual ;). We use any available APIs and a few other things to support specific use cases. Usually the best one available at the time the function is provided and then migrate over to new ones when they become available. Specific to Questions, we have been using the undocumented REST APIs for some time and they have (so far) been stable. We needed the support for our own website implementation of Questions to create standard topics, etc... about a year ago. With the CLI we are able to have version specific method implementations so we can readily adapt to a changed or new API while maintaining a compatible CLI interface across multiple server releases. Once the documented APIs are available, there might be some small adjustments needed internally.


author: Bob Swift (personal)
body: The Bob Swift CLI uses the publicly documented [SOAP API](https://developer.atlassian.com/confdev/confluence-rest-api/confluence-xml-rpc-and-soap-apis). It has been invaluable for us.

comments: author: Bob Swift (personal)
body: Thanks for the compliment! Yes, we do still use many SOAP APIs for JIRA and Confluence, especially in areas not yet covered by newer REST APIs. They will be switched out over time once JIRA and Confluence complete their equivalent REST implementations.


Tags: cloud

command-line

confluence-cloud

questions-for-confluence