Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Get table structure for issues table for Jira cloud using REST API

Aniruddha Gayake November 15, 2021

Hi All,

I am using Jira cloud. I want to get the table structure for Issues table through REST API.

Is it possible to get it? If yes, how? If anybody knows please suggest the suitable way.

More details:

What I mean by table structure is that I want to get the column names and its data-type like-

Id   Nvarchar2(255),

IssueName  Nvarchar2(500),

CreatedBy Nvarchar2(255),

....

and so on.

My use case is that I want to replicate the Jira data to my other database for analysis purpose. So I am able to get the issues data through REST API but I have no idea what is the data-type for those columns. That's why I am not able to create table in target DB.

 

Thanks in advance!

1 answer

1 accepted

0 votes
Answer accepted
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 17, 2021

Hi Aniruddah,

I understand that you are using the Jira Cloud REST API and are looking to better understand the specific datatypes that issue fields in Jira would be using when storing that data into a database.  However the REST API for Jira is operating on a completely separate layer above the database itself.  In turn the REST API cannot provide you this exact information, as it does not know what those specific datatypes would be on the database level.

The REST API can tell you what those fields are on a different level, such as the custom field level in the REST API, see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-fields/#api-rest-api-3-field-post

Those custom field types don't directly explain how they are being stored on the database level. But this is the closest you can come with the REST API alone. Knowing the custom field type could at least allow you to then make an educated guess at the datatype necessary for storing such values in the database itself.

If you were using Jira Server or Data Center, then it might be possible for you to access the database directly to make these determinations.  However Jira Cloud though doesn't offer end users direct access to the database. 

Sorry there does not appear to be a clear cut way for the REST API to provide this level of data information.

Andy

Aniruddha Gayake November 18, 2021

Thank you @Andy Heinzer for your answer. 

After some research, I came across this document by JIRA https://developer.atlassian.com/server/jira/platform/attachments/jira-7-9-2-database-schema.pdf . Though this is the schema for JIRA Server, it is useful as a reference when creating tables in DB.

 

Thanks again :)

Suggest an answer

Log in or Sign up to answer