Text update on mural
Hi, I am using the API to add and update Stickies on my mural. I can successfully update a sticky, however, the text does not update on the mural itself. If I query the widget via the API, I can see the text has been updated.
I receive a 200 HTTP code response with the following body, the updated tag appears on the sticky notes, but the text remains as the old value:
Updating widget f840c461-4189-4ac2-9999-30ab431bc36a XXP-4673: Your reg
{"value":{"contentEditedBy":{"firstName":"Steven","lastName":"Dodd","type":"member"},"contentEditedOn":1680251775237,"createdBy":{"firstName":"Steven","lastName":"Dodd","type":"member"},"createdOn":1680251775237,"height":260,"hidden":false,"hideEditor":false,"hideOwner":false,"id":"f840c461-4189-4ac2-9999-30ab431bc36a","instruction":"","locked":false,"lockedByFacilitator":false,"parentId":"9-1680187869126","presentationIndex":-1,"rotation":0,"stackingOrder":2240,"title":"Epic","updatedBy":{"firstName":"Steven","lastName":"Dodd","type":"member"},"updatedOn":1680254077565,"width":280,"x":20,"y":148,"hyperlink":"https://xxx.atlassian.net/browse/XXP-4673","hyperlinkTitle":"XXP-4673","minLines":6,"shape":"rectangle","style":{"backgroundColor":"#18A7D7FF","bold":false,"font":"proxima-nova","fontSize":15,"italic":false,"strike":false,"textAlign":"left","underline":false,"border":false},"tags":["tag-1680249602807"],"text":XXP-4673: Your -Understand requirements and define architecture design.\n\nStatus: Open\nDue: 29 Dec 2023","type":"sticky note"}}
Here is the python code I am using to update the sticky note:
def updateText(muralId,widgetId,type,text,tag):
url = "https://app.mural.co/api/public/v1/murals/" + muralId + "/widgets/" + type + "/" + widgetId
payload = {"tags": [tag],"text": text}
headers = {
"Authorization": "Bearer {token}".format(token=token),
"Accept": "application/json",
"Content-Type": "application/json"
}
success = False
while not success:
try:
print("Updating widget {} {}".format(widgetId,text[:20]))
response = requests.patch(url, json=payload, headers=headers)
if response.status_code == 200:
print(response.text)
success = True
else:
print(response.text)
except Exception as e:
print(e)
time.sleep(10)
Comments
-
API response = 200
API query shows text and tag have been updated
Mural shows old text
Mural shows new tag
0 -
Hi @stevendodd, thanks for sharing this- I'll send your question to a Muralista who can help.
0 -
Hey @stevendodd,
Is there any rich text in the stickies that you are updating? Can you please share a screenshot of the mural/text that you are trying to update using API?
Thanks,
Anuj
0 -
Hi, there is no rich text, I created the sticky with the API. It has a hyperlink and some text.
Here is the code that are used to create the sticky:
url = "https://app.mural.co/api/public/v1/murals/" + muralId + "/widgets/sticky-note"
payload = {
"height": 260,
"presentationIndex": -1,
"rotation": 0,
"style": {
"backgroundColor": backgroundColour,
"bold": False,
"italic": False,
"underline": False,
"strike": False,
"font": "proxima-nova",
"fontSize": 15,
"textAlign": "left",
"border": False
},
"parentId": parentId,
"width": 280,
"hyperlink": "https://xx.com/jira/browse/" + issue["key"],
"hyperlinkTitle": issue["key"],
"shape": "rectangle",
"text": issue["summary"],
"title": issue["issuetype"],
"x": 20,
"y": 148
}
headers = {
"Authorization": "Bearer {token}".format(token=token),
"Accept": "application/json",
"Content-Type": "application/json"
}
response = session.post(url, json=payload, headers=headers, timeout=(5, 10))
0 -
@stevendodd We are currently working on a fix for this issue. Will keep you informed as soon as a fix is available. Thanks for your patience!
0