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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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

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!

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!

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!

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!

Hello,

Anything updated about this issue?
Thank you!

0 votes

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
Community showcase
Published in Bitbucket

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,744 views 10 16
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you