Access the grid data using REST

Introduction

As a developer, I want to access the grid information through a REST call





Solution

You can get the data from the TGE field via REST API :

Request example
http://your.domain/jira/rest/idalko-igrid/1.0/datagrid/data?_mode=view&_issueId=10000&_fieldId=customfield_10001&_confSchemeId=10101&rows=20&page=1&sidx=DEFAULT&sord=desc



You can find this request in the list of requests (in the browser developer console) which are fired when you open or refresh an issue page.

Important parameters are:

  • _mode you should use _mode=view to get the data

  • _issueId is the issue id (not issue key)

  • fieldId is customfield<id_of_desired_TGE_custom_field> (if you go to configuration screen of the desired TGE custom field - you will see the id in the URL)

  • _confSchemeId - id of the configuration scheme for the TGE custom field. 


If you click the 'Wrench' button titled 'Edit Scheme' on the TGE configuration screen it will open the scheme. In the URL you will see parameter 'fieldConfigSchemeId'. That is what you need.

The request returns a json object. It is not a formatted table, of course. But it contains the grid data. This is the closest you can get to TGE data with REST API

 

Caveat

This REST interface might change with new versions of the add-on. 

 

Â