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

Forge scopes for deployments and environments endpoints

Alex Figliolia
Contributor
April 15, 2024

We're trying to write a Forge app for the Bitbucket sidebar (module bitbucket:repoCodeOverviewCard). For this app we need to be able to call these endpoints:

 

When calling these, this is the error that I get:

{
"type": "error",
"error": {
"message": "This resource does not support authentication using OAuth tokens."
}
}

The API docs say the scope that is needed is: pipeline

I have tried both:

- read:pipeline:bitbucket
- admin:pipeline:bitbucket

Is there any way to call these endpoints from within a Forge app?

3 answers

1 accepted

Suggest an answer

Log in or Sign up to answer
2 votes
Answer accepted
Edmund Munday
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 22, 2024

@Alex Figliolia - just a quick note to say that these endpoints are coming very soon, the team is just wrapping up work on a major Forge related release for Pipelines, and then we'll be moving over to supporting all the remaining Pipelines related API's in Forge.

Caterina Curti
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 22, 2024

@Alex Figliolia I think this is the most important answer to your follow-up question (thanks Edmund).

I'm checking why the BCLOUD project is setup in a different way, I don't have an answer to that yet.

Like Alex Figliolia likes this
1 vote
Caterina Curti
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 18, 2024

Hey @Alex Figliolia ,

The short answer is that these endpoints can't be called from a Forge app today.



The slightly longer answer is available here.


And here is how I go about finding out if an endpoint is available from a Forge app or not (with screenshot).

For a REST API to be available in Forge, it needs to have Forge app scopes.

Here is an example from another endpoint:
ListBranchRestrictions.png

Because the endpoints you mentioned only have OAuth 2.0 scopes (and no Forge app scopes), they can't be called from a Forge app.

OAuth only scopes.png

(I couldn't find a ticket on jira.atlassian.com and I'm asking if there is one. I'll add it here if there is one already.)


Cheers,
Caterina

Alex Figliolia
Contributor
April 19, 2024

@Caterina Curti thanks so much, I figured this would require a development change in the API. I couldn't find a ticket either, but for some reason, I do not have permission to create one in the BCLOUD project. I can create tickets for most of the other projects.

Like Caterina Curti likes this
1 vote
Alex Figliolia
Contributor
April 17, 2024

@Caterina Curti any chance that you can point me in the right direction?

 

DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events