Hello
I took a look at the Get Smart Link in the content tree by id API and it doesn’t seem to return the most important piece of information which is the actual URL given to the smart link? How can I get the smart links value?
Hello
I took a look at the Get Smart Link in the content tree by id API and it doesn’t seem to return the most important piece of information which is the actual URL given to the smart link? How can I get the smart links value?
Is it not the _links.base
value? Can you share an example that you’ve tried here?
It doesn’t seem to be, here’s an public example:
I have created a Smart link with the value: https://www.google.com
Then the value from the API: https://miika-development.atlassian.net/wiki/api/v2/embeds/475463688
{
"id": "475463688",
"type": "embed",
"parentId": "474873991",
"title": "Google",
"parentType": "page",
"position": 350444391,
"authorId": "6033994cf0327400684f8356",
"ownerId": "6033994cf0327400684f8356",
"createdAt": 1724244003133,
"version": {
"number": 2,
"message": "",
"minorEdit": false,
"authorId": "6033994cf0327400684f8356",
"createdAt": "2024-08-21T12:40:15.823Z"
},
"status": "current",
"spaceId": "474873861",
"_links": {
"editui": "/spaces/SL/embed/475463688",
"webui": "/spaces/SL/embed/475463688",
"base": "https://miika-development.atlassian.net/wiki"
}
}
I would expect to find the smart links value https://www.google.com somewhere in this response.
Given that the object for defining the URL when creating a Smart Link is the embedUrl parameter, it seems to me that a matching embedUrl object is probably what’s missing from the response.
I have the same problem Getting the URL but also… getting the ID of the Smart Link from the parent page also does not seem to be possible.
I have a general support request open to log it as a bug or, if not, as a feature request. When I get an answer back, I’ll update this thread with the details.
Folks,
I was able to confirm with Confluence Cloud there isn’t a way to get the embedded URL (ie the content of the Smart Link). As such, I opened CONFCLOUD-79395. Please watch, vote, and comment.
@sunnyape, since you have a customer case open, maybe you can inform them of the above issue. Due to privacy policy, I don’t have permissions to just “jump into” your case. I’ll leave the thread open in case you learn more through your interaction.
Otherwise, future commenters should probably direct their efforts to the above ticket. Further notes here will not help prioritization.
Thank you.
I ended up retreiving the SmartLink URL using the Get Content by ID method from the API V1.
The reply have a “body” section containing a “a href” url that contains the embed smartlink link!
I know it is deprecated and this is not the API V2, but… at least I am able to get the link for the moment! I anyway have a Frankenstein V1/V2 setup while we wait for an official solution.
The fact that you would combine V1 & V2 APIs is not in-and-of itself “Frankenstein”. Many endpoints in V1 are not deprecated.
For this case, CONFCLOUD-79395 is currently marked “in progress” and the changelog entry has been submitted for publication tomorrow. If you can still rework tomorrow, maybe you can get yourself out of the “Frankenstein” usage for Smart Links.
https://developer.atlassian.com/changelog/#CHANGE-1954 Nice one I can now see embedUrl in the API response!
And the Create Smart Link endpoint also returns the embedUrl object in the response when the Smart Link is created. Excellent
Now all that needs to happen is for the REST API documentation to be updated.