Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to write REST API in a plugins and store data into DB custom table by REST API?

Cloud_NEW March 19, 2021

Hello Support,

 

We want to write a custom server's plugins

but we encountered the following questions:

 

1. How to write REST API in a plugins ?

2. How to store data into DB custom table by REST API?

3. Could you provide some example source code to reference

 

Please advise, thank you!

2 answers

0 votes
Cloud_NEW March 21, 2021

Hello ,

1.Bitbucket only has the following REST API

https://<bitbucket-base-url>/rest/build-status/1.0/commits/<commit-hash>

https://developer.atlassian.com/server/bitbucket/how-tos/updating-build-status-for-commits/

but we add a new web section(TESTS) on commit overview page so we need a new REST API to update TESTS column's value , we are confused about how to update TESTS column's value ?

How to write a new REST API like this

https://<bitbucket-base-url>/rest/test-status/1.0/commits/<commit-hash>

 

2. If we want to create a new plugins, how to store data in a new table in our bitbucket DB?

 

3.We want to reference plugins that has write a custom table to original DB, is there any example to reference?

 

Please advise, thank you!

Cloud_NEW March 21, 2021

https://developer.atlassian.com/server/bitbucket/tutorials-and-examples/pull-request-overview/

 

This page will return 404 ERROR , please advise how to solve it , thank you!

Cloud_NEW March 21, 2021

https://community.atlassian.com/t5/Jira-questions/How-to-make-a-plugin-create-a-table-in-jira-database/qaq-p/629350

 

I want to make a plugin create a table in Bitbucket database , is method same as in JIRA Database? 

 

Thank you!

Cloud_NEW March 21, 2021

Is Active Objects support bitbucket?

https://developer.atlassian.com/server/framework/atlassian-sdk/installing-active-objects/

I fond the above page but didn't find that bitbucket download link?

 

Please advise, thank you!

Cloud_NEW March 24, 2021

Hello,

Anything updated about this issue?
Thank you!

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 19, 2021

I'm afraid your first two questions are unclear:

1.  In a plugin reaching out to another system, or one that provides a new REST API in Bitbucket?

2. In the Bitbucket database or another db?

3. https://developer.atlassian.com/server/bitbucket/tutorials-and-examples/bitbucket-server-tutorials/

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
7.3.1
TAGS
AUG Leaders

Atlassian Community Events