Scopes enable an app to request a level of access to an Atlassian product.
The easiest way to set your app's scopes is to:
forge lint --fix
to add the scopes to the manifest.If you want to set the scopes manually, you need to:
Currently, Assets APIs that return a 3xx status code with a redirect URL in the Location header are not handled properly in Forge. To work around this, you need to manually manage redirects by making a new request to the URL provided in the Location header.
1 2// Call API that returns 3xx with destination set in Location header const response = await api .asUser() .requestJira( route`<API>`, { // ...all the other options..., redirect: 'manual' }, ); const locationHeader = response.headers.get('Location'); let redirectAPI; try { // Dropping the host from url redirectAPI = (locationHeader.split(new URL(locationHeader).origin))[1]; } catch (error) { // url is relative, no change required redirectAPI = locationHeader; } const response = await api .asUser() .requestJira(route`${redirectAPI}`);
Constructing the URL is similar to constructing the request URL for Jira Service Management.
Paths should be prefixed with /ex/jira/{cloudId}
. For example, to load an object the URL should be:
https://api.atlassian.com/ex/jira/{cloudId}/jsm/assets/workspace/{workspaceId}/v1/object/{id}
This is not required when making the request in a Forge app using requestJira
.
For OAuth 2.0 apps, you need to:
These scopes are for apps using OAuth 2.0 authorization code grants (3LO) for authorization and Forge apps. The title and description are displayed to the user on the consent screen during the authorization flow.
Scope name | Title | Description |
---|---|---|
import:import-configuration:cmdb | Allow the app to read import structure and import data into Assets | Allow the app to read import structure and import data into Assets |
write:cmdb-object:jira | Allow the app to change Objects data in Assets | Allow the app to change Objects data in Assets |
delete:cmdb-object:jira | Allow the app to delete Objects from Assets | Allow the app to delete Objects from Assets |
read:cmdb-object:jira | Allow the app to read Objects from Assets | Allow the app to read Objects from Assets |
write:cmdb-schema:jira | Allow the app to change Schemas in Assets | Allow the app to change Schemas in Assets |
delete:cmdb-schema:jira | Allow the app to delete Schemas from Assets | Allow the app to delete Schemas from Assets |
read:cmdb-schema:jira | Allow the app to read Schemas from Assets | Allow the app to read Schemas from Assets |
write:cmdb-type:jira | Allow the app to change Object Types in Assets | Allow the app to change Object Types in Assets |
delete:cmdb-type:jira | Allow the app to delete Object Types from Assets | Allow the app to delete Object Types from Assets |
read:cmdb-type:jira | Allow the app to read Object Types from Assets | Allow the app to read Object Types from Assets |
write:cmdb-attribute:jira | Allow the app to change Object Type Attributes in Assets | Allow the app to change Object Type Attributes in Assets |
delete:cmdb-attribute:jira | Allow the app to delete Object Type Attributes from Assets | Allow the app to delete Object Type Attributes from Assets |
read:cmdb-attribute:jira | Allow the app to read Object Type Attributes from Assets | Allow the app to read Object Type Attributes from Assets |
read:cmdb-icon:jira | Allow the app to read Icons from Assets | Allow the app to read Icons from Assets |
Rate this page: