On my instance, i just want to add announcement on JSD customer portal whenever a version is released, is there any way to do it programmatically? Any suggestions are welcome.
Hello there! Thanks for reaching out the Atlassian Community!
I was able to find an endpoint to change the announcement message with a REST API call. This is not in the official Jira's REST API, so you should use the following to make the call:
POST /rest/servicedesk/1/servicedesk-data/announcement/portal/{portalId}
You can get the "portalId" by checking the URL when you access the portal in the GUI, it should be the last number in it.
Now, you can create a script that makes this call to change the announcement message. You can also release the version with the script by calling the official API:
PUT /rest/api/2/version/{id}
Kind regards,
Maurício Karas
Thank you for the reply @Mauricio Karas, can you help me with one more thing. As above mentioned announcement will work on portal page, what if i want to make global announcement?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can use the Announcement Banner(configuration in System > Announcement Banner) to make the text visible throughout the entire instance. Unfortunately, there's no REST API to change it, the only way to change it programmatically would be to change the value directly in the database.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey, Pornima.
I'm not sure I got your question, but regarding authentication for the REST API I recommend you to check the following page that shows all available methods that you case use:
Also, so you know, if you're using Jira Cloud instead of Server, the announcement banner feature will not be available.
Kind regards,
Maurício Karas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, I've 2 portals, and I am able to changing annoucement banner for the first one, but not the second one...what could be the trick ?
(I can change both in servicedesk).
Ok:
for portal:
http://pmljiradeskdev01.maif.local:8080/jira/servicedesk/customer/portal/15
KO: (forbidden 403)
for portal:
http://pmljiradeskdev01.maif.local:8080/jira/servicedesk/customer/portal/11
thanks you !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
solved...just a wrong password :(
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
we were using above mentioned API in our app, but it stopped working and we are getting 404. Recently is there any change from atlassian side in this URL or this REST api not supported now.
/rest/servicedesk/1/servicedesk-data/announcement/portal/{portalId}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Mauricio Karas
Thanks for sharing the endpoint for updating the portal announcement banner. I just want to add here that we can also update the Help Center banner using the following:
Example cURL call:
curl -X POST -u username:pass -H "Content-Type: application/json" --data '{"header":"","message":"Help Center message"}' -k https://jira/rest/servicedesk/1/servicedesk-data/announcement/help-center
Tested on my instance and worked beautifully, thanks @Rodrigo Baldasso !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Mauricio Karas
i am new in JSM ,iam searching for api to get portal announcement, using your given api i get message from portal
GET /rest/servicedesk/1/servicedesk-data/announcement/portal/{portalId}
so firstly,to get portalId i hit api to get service desk id
https://portalname.net/rest/servicedeskapi/servicedesk
and it give me id like this
{
"id": "01",
"projectId": "10101",
"projectName": "exmple-project",
"projectKey": "EP",
"_links": {
"self": "https://portalname.net/rest/servicedeskapi/servicedesk/01"
}
}, so this is : "id": "01", portalid
i use in api like this:
GET /rest/servicedesk/1/servicedesk-data/announcement/portal/01
so i want to know what is 1 after servicedesk/: in this url /rest/servicedesk/1/ . it help me lot.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.