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

rest-api for bitbucket release plugin?

sc0_0 I'm New Here Jun 08, 2020

I'm using bitbucket-server with under plugin for the moment.

https://marketplace.atlassian.com/apps/1218118/release-plugin-for-bitbucket-server

 

I was able to upload new release via curl without file(can upload with uploaded file).

 

But I can't upload files on release.

 

Is there any way to upload file via curl like release-create-attach file ?

using under api

POST /rest/releases/latest/projects/PROJECT_NAME/repos/REPO_NAME/files

response on success

{"name":"file_name","uuid":"97ae11ac-974d-4d2e-bd7c-e1697eb6abb9"}

After success this api, the file will be on "/rest/releases/latest/projects/PROJECT_NAME/repos/REPO_NAME/files/UUID/file_name"

 

Below is result of using pages release create - attach file.

Request header---------------------

POST http://BITBUCKET_URL/rest/releases/latest/projects/PROJECT_NAME/repos/REPO_NAME/files HTTP/1.1
Host: BITBUCKET_URL
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://BITBUCKET_URL/plugins/servlet/releases/projects/PROJECT_NAME/repos/REPO_NAME/25?edit
X-Requested-With: XMLHttpRequest
Content-Type: multipart/form-data; boundary=---------------------------15979594691323621148361704183
Content-Length: 237
Connection: keep-alive
Cookie: logimage.index=0; saveLanguage=en_US.EUC-KR; @EP_LOGINID=USER_ID; _fbp=fb.1.1583411194693.916871616; _biz_uid=3d6954a1305f457a8b312388ffe6c58c; _biz_nA=13; _biz_pendingA=%5B%5D; _ga=GA1.2.1584519061.1585546446; _atl_bitbucket_remember_me=MDFhMTQxODY2ODczOTY4OWMxODA2NDJmNWUzNGFiNzgyMjI4ZThmOTozN2RlNWQzNjQyYTk4MjViNDc1ZjJlMmVhOWUyNDdhOTlkYjljMjFk; crowd.token_key=D0aoT8M4IWW9LkGIr24lfwAAAAAAFYAHc2MxMDgubGVl; BITBUCKETSESSIONID=C32F9EBDF8FB8A438DCCA895F21E566C
Pragma: no-cache
Cache-Control: no-cache

Request header---------------------

 

Post Data--------------------

-----------------------------15979594691323621148361704183
Content-Disposition: form-data; name="file"; filename="t"
Content-Type: application/octet-stream

test steven

-----------------------------15979594691323621148361704183--

Post Data--------------------

 

response

{"name":"t","uuid":"97ae11ac-974d-4d2e-bd7c-e1697eb6abb9"}

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

1,878 views 0 7
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