Hello dear Atlassian Community!
I'm trying to set announcement banner via REST API on customer portal.
Unfortunately, I couldn't find any official Atlassian documentation. From what I've managed to determine, we can retrieve information about it, but I'm unable to update it.
GET:
https://{sitename}.atlassian.net/rest/servicedesk/1/servicedesk-data/announcement/portal/{portalID}
Returns:
{ "header": "", "headerWiki": "", "message": "", "messageWiki": "", "canEditAnnouncement": true, "canAdministerProject": true, "portalId": {portalID}, "portalProjectKey": "", "translations": { "en-US": { "header": "", "message": "" } }, "defaultLanguageTag": "en-US" }
POST:
https://{sitename}.atlassian.net/rest/servicedesk/1/servicedesk-data/announcement/portal/{portalID}
json data:
{ "header": "Test", "message": "test2" }
Returns:
{ "errors": [ { "errorMessage": "sd.portal.announcement.update.bad.request" } ], "reasonKey": "sd.portal.announcement.update.bad.request", "reasonCode": "400" }
Do you know if that's possible to do so?
it is possible to update the banner via rest api.
@Marc - Devoteam is right, that there is no documented endpoint, but nevertheless it is possible. You were almost there. The missing part with your JSON is the outer part.
The message and title need to have a relation to the language of the portal. For example for my project I need to set the translation to EN:
{
"translations":
{
"en-US":
{
"header": "Test",
"message": "test2"
}
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Kai Becker
I got another interesting question - do you know how to set the main banner on the customer portal via REST API? I mean the banner that is visible in the view of all Service Desk portals.
Thanks in advance for your reply.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Hi @Jakub Nowicki
sadly I couldn't find anything related setting these global banners.
Looks like this has been rebuild when the whole multi helpcenter part got implemented.
Sorry about that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There is no endpoint on the API for this.
The data you got is based on viewable data.
But the api docs don't mention an endpoint on this; https://developer.atlassian.com/cloud/jira/service-desk/rest/intro/#jira-cloud-platform-apis
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.