Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.



...

Get status of whether Pages is enabled for specified repository and branch/tag

...

perl
GET /rest/pages/latest/pages-settings/{projectKey}/{repositorySlug}/enabled
Example Request
top
Code Block
language
themeConfluence
Expand
title

Example Request

Code Block
languagebash
curl -u username:password -H "Content-Type:application/json" http://bitbucket.example.com/rest/pages/latest/pages-settings/PROJECT_1/rep_1/enabled?refId=refs/heads/master
Expand
title

Example Response

js
Code Block
language
json
{"repositoryId":1,"refId":"refs/heads/master","isEnabled":true}

Enable Pages

...

for specified repository and branch/tag

theme
PUT /rest/pages/latest/pages-settings/{projectKey}/{repositorySlug}/enabled
curl -u
Code Block
languageperl
Confluence
Expand
titleExample Request

Example Request

title
Code Block
languagebash
 curl -u username:password -H "Content-Type:application/json" -X PUT http://bitbucket.example.com/rest/pages/latest/pages-settings/PROJECT_1/rep_1/enabled?refId=refs/heads/master
Expand

Example Response

js
Code Block
language
json
{"repositoryId":1,"refId":"refs/heads/master","isEnabled":true}

Disable Pages

...

for

...

specific repository and branch/tag

theme
DELETE /rest/pages/latest/pages-settings/{projectKey}/{repositorySlug}/enabled
Code Block
languageperl
Confluence

Example Request

expandtitleExample Request
Code Block
language
bash
curl -u username:password -H "Content-Type:application/json" -X DELETE http://bitbucket.example.com/rest/pages/latest/pages-settings/PROJECT_1/rep_1/enabled?refId=refs/heads/master
Expand
title

Example Response

js
Code Block
language
json
{"repositoryId":1,"refId":"refs/heads/master","isEnabled":false}

Enable Pages support for any new branch in the specified repository

theme
PUT /rest/pages/latest/pages-settings/{projectKey}/{repositorySlug}/enabled-for-new-branches
Example Request
Code Block
languageperl
Confluence
Expand
title

Example Request

Code Block
languagebash
curl -u username:password -H "Content-Type:application/json" -X PUT http://bitbucket.example.com/rest/pages/latest/pages-settings/PROJECT_1/rep_1/enabled-for-new-branches
Expand
title

Example Response

js
Code Block
language
json
{"repositoryId":1,"isEnabledForBranches":false,"isEnabledForTags":true}

Disable Pages support for new branches in the specified repository

DELETE /rest/pages/latest/pages-settings/{projectKey}/{repositorySlug}/enabled-for-new-branches
title
Code Block
languageperl
themeConfluence
Expand

Example Request

title
Code Block
curl -u username:password -H "Content-Type:application/json" -X DELETE http://bitbucket.example.com/rest/pages/latest/pages-settings/PROJECT_1/rep_1/enabled-for-new-branches
Expand

Example Response

js
Code Block
language
json
{"repositoryId":1,"isEnabledForBranches":false,"isEnabledForTags":true}

Enable Pages support for any new tag in the specified repository

PUT /rest/pages/latest/pages-settings/{projectKey}/{repositorySlug}/enabled-for-new-tags
Example Request
Code Block
languageperl
themeConfluence
Expand
title

Example Request

Code Block
languagebash
curl -u username:password -H "Content-Type:application/json" -X
PUT http
 PUT http://bitbucket.example.com/rest/pages/latest/pages-settings/PROJECT_1/rep_1/enabled-for-new-tags
expand
title

Example Response

js
Code Block
language
json
{"repositoryId":1,"isEnabledForBranches":false,"isEnabledForTags":true}

Disable Pages support for new tags in the specified repository

DELETE /rest/pages/latest/pages-settings/{projectKey}/{repositorySlug}/enabled-for-new-tags
Example Request
Code Block
languageperl
themeConfluence
Expand
title

Example Request

Code Block
languagebash
curl -u username:password -H "Content-Type:application/json" -X
DELETE http
 DELETE http://bitbucket.example.com/rest/pages/latest/pages-settings/PROJECT_1/rep_1/enabled-for-new-tags
Expand
title

Example Response

js
Code Block
language
json
{"repositoryId":1,"isEnabledForBranches":false,"isEnabledForTags":false}