DataSet queries to JIRA API (Xibo 2.0) [SOLVED]

Xibo: Version 2.0.0

May I have some thoughts, and possibly examples, of how to setup a DataSet that will work with the JIRA API - I have tried a few permutations and always end up returning the Xibo default JSON response, as documented in Remote dataset: Xibo always fetches same response (Xibo 2.0.0).

I am trying to understand how to define the DataSet parameters with reference to the following JIRA guidance:

https://developer.atlassian.com/server/jira/platform/basic-authentication/

https://developer.atlassian.com/server/jira/platform/jira-rest-api-examples/

The example I am trying is to return all tickets assigned to me from our JIRA system. If I manually login to JIRA and then paste the following into a Browser window I see the right response (I have sanitised some info):

https://[Our JIRA site]/rest/api/2/search?jql=assignee=[myJIRAName]

Trying to put this into a DataSet query, Xibo log-wise, I see:

Making request to [Our JIRA site] with params: array ( 'auth' => array ( 0 => '[myJIRAName]', 1 => '[MyJIRAPassword', ), 'form_params' => array ( '/rest/api/2/search?jql' => 'assignee=[myJIRAName]', ), )

and

No data found at the DataRoot issues#0 /var/www/cms/lib/Controller/DataSet.php(1074): Xibo\Factory\DataSetFactory->processResults(Object(Xibo\Entity\DataSet), Object(stdClass), false) #1 [internal function]: Xibo\Controller\DataSet->testRemoteRequest() #2 /var/www/cms/vendor/akrabat/rka-slim-controller/RKA/Slim.php(79): call_user_func_array(Array, Array) #3 [internal function]: RKA\Slim->RKA\{closure}() #4 /var/www/cms/vendor/slim/slim/Slim/Route.php(468): call_user_func_array(Object(Closure), Array) #5 /var/www/cms/vendor/slim/slim/Slim/Slim.php(1355): Slim\Route->dispatch() #6 /var/www/cms/vendor/slim/slim/Slim/Middleware/Flash.php(85): Slim\Slim->call() #7 /var/www/cms/vendor/slim/slim/Slim/Middleware/MethodOverride.php(92): Slim\Middleware\Flash->call() #8 /var/www/cms/lib/Middleware/Actions.php(150): Slim\Middleware\MethodOverride->call() #9 /var/www/cms/lib/Middleware/Theme.php(36): Xibo\Middleware\Actions->call() #10 /var/www/cms/lib/Middleware/WebAuthentication.php(131): Xibo\Middleware\Theme->call() #11 /var/www/cms/lib/Middleware/CsrfGuard.php(63): Xibo\Middleware\WebAuthentication->call() #12 /var/www/cms/lib/Middleware/State.php(119): Xibo\Middleware\CsrfGuard->call() #13 /var/www/cms/lib/Middleware/Storage.php(47): Xibo\Middleware\State->call() #14 /var/www/cms/lib/Middleware/Xmr.php(37): Xibo\Middleware\Storage->call() #15 /var/www/cms/vendor/slim/slim/Slim/Slim.php(1300): Xibo\Middleware\Xmr->call() #16 /var/www/cms/web/index.php(127): Slim\Slim->run() #17 {main}

It would be good if the log could show the exact URL/API call string sent to the site.

How can I piece this together as a Xibo DataSet, incorporating the authentication string?

Thanks

PROGRESS: To maybe save others some time…

Here’s the JIRA API query as run in a Web Browser after I have manually authenticated:

https://[SNIP]/rest/api/2/search?jql=assignee=[myusername]

Here’s the top of the returned JSON data as viewed in Firefox:

Here’s how to structure the query in Xibo:

On the Authentication tab, select Basic and enter a valid JIRA username and password in plain text, don’t follow the JIRA API guide and encode them (You’re good if your JIRA connection is via https).

On the Data tab, the data root is ‘issues’ (no quotes, no curly braces, no anything else).

On the Advanced tab, change Truncate Data Set to Always, unless you want to keep adding the results of the same query to a growing data set.

Here’s how I tested the data collection by picking up the id, key and description fields as the columns:

One thing I noticed while working on this is that if you have defined a set of columns and have pulled in some data, you cannot revise or add to the column set (the data doesn’t turn up) - it seems that once a set of columns has been defined, this creates a schema into which future, revised, data sets won’t fit (??) - the workaround for me was to copy the DataSet and then add/modify the columns before picking up any more data. Not sure if this down to my knowledge or it’s a bug/feature?