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

rest-api for bitbucket release plugin?

sc0_0 June 8, 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
AUG Leaders

Atlassian Community Events