YY1
February 1, 2023, 6:42am
1
/rest/api/3/serverInfo
Please refer to for more details: https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-rest-api-3-serverinfo-get
export const getEnvironmentBaseUrl = async () => {
// refer to: https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-rest-api-3-serverinfo-get
try{
const response = await api
.asUser()
.requestJira(route `/rest/api/3/serverInfo`);
const serverInfo = await response.json();
return serverInfo.baseUrl;
}catch (error) {
if (error instanceof SyntaxError) {
console.error('SyntaxError in getEnvironmentBaseUrl: Cannot get base URL:', error.message);
} else {
throw error;
}
}
};
BTW: this site was migrated from on-premise to Cloud before.
2 Likes
hello @YY1 just tried the api call and worked fine using my cloud baseUrl got the needed info, consider checking the baseUrl, or maybe because of the migration the baseUrl used is the old on-premise one and not the cloud one, consider checking the baseUrl
1 Like
FYI if you have not seen it:
We’re seeing errors since a few days for both endpoints
/rest/api/3/serverInfo
/rest/applinks/latest/manifest
We access this URL to get the hostname of the product from a web trigger. The error is
Invalid URL: /rest/api/3/serverInfo
This API is officially documented here .
This is how we make the call which used to work until a few days ago.
This call is made within the context of a Forge Web Trigger!
const response = await api
.requestJira(route`/rest/api/3/serverInfo`);
const re…
It might be related.
1 Like
YY1
February 1, 2023, 2:06pm
4
Thanks, it seems correct for today @mohamadjawadAlHajjar
YY1
February 1, 2023, 2:06pm
5
It seems to be related. Thanks @SilvreLestang
@YY1 so it’s a random day-to-day thing cool
1 Like
YY1
February 1, 2023, 2:19pm
7
Maybe. Hopefully Atlassian developers could look into this issue. It has affected 3 customers of my Forge App: Sprint Reviewer | Atlassian Marketplace
3 Likes