Forums

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

API to retrive data from database.

sai siva October 6, 2021

I need to Retrive data from jira database and copy to another database with REST API.

 

Any suggestion to look forward so or any documentation related to this.

1 answer

1 vote
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 6, 2021

Yes, you'll need to be scraping data over the REST API.  See https://docs.atlassian.com/software/jira/docs/api/REST/8.19.1/ for the calls you can make

sai siva October 6, 2021

@Nic Brough -Adaptavist- 

Any examples i can follow to which copy data from one database and update data in another database. Using REST API.

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 7, 2021

I have one, but it's written in quite an obscure language and an old database that you almost certainly won't be using (it's not quite ANSI SQL based!).  You'd need to do a lot of translation.

I would strongly recommend that you write your extract to fetch the data, parse it for what you need, and poke it into your database using a language that you are familiar with and is well supported within your organisation, so other people can maintain and enhance it if needed.

sai siva October 7, 2021

@Nic Brough -Adaptavist- 

Thanks for the reply , 

I used to fetch and update data via API using web extension. (yet another rest clinet)

but as aper my new requirement i need to to add rest endpoint in the jira itself and that should run on a time interval.

if you can provide me any stepts how to add and rest api and use it in jira without an webextension that would help  a lot.

thanks

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 8, 2021

Ok, sorry, but this makes no sense:

"rest endpoint in the jira itself and that should run on a time interval"

A REST endpoint is a url that does something when called by an external service (usually responding with data, but could also be updating Jira).  There's nothing to "run on a time interval", because an endpoint is listening and responding, there's nothing to do if it's just "run".

You can add REST end points by writing apps that provide them.  https://developer.atlassian.com/server/jira/platform/getting-started/ for writing from scratch, but you might also want to look at things like Scriptrunner which allow you to create scripts for endpoints without having to code entire apps (I'm using that because I work with it, as you might expect of an Adaptavist, and I don't know if other apps can do it)

Suggest an answer

Log in or Sign up to answer