Flushing the list of recent share actions for cloud api

Where is the list of recently shared links stored that are retrieved with cloud.getSharedArtifacts() and can it be refreshed somehow?

Are they stored in the XD file, itself…in the application somewhere? When using this I am getting some odd results. The documentation mentions that it may still list items that are deleted from the cloud and older items, that are still live, may not get listed.

I guess I’m really just looking for a way to get an accurate list of the prototypes and specs that have been shared from an XD file and are still accessible.

Hi @nateUX, could you please provide us more details on the “odd results” you are getting? It will help us replicate the results on our end. Thank you.

Sure. I’ll try to to add example steps over a few replies but here is one to get started.

Prerequisite:
Create a plugin that will log all Shared artifacts (name, url, accessLevel) to the console.

Example 1:

  • In XD, create a new file
  • Save it to your cloud documents, named “LinkTest”
  • Click Share then Share for review
  • Give it a Title, “Proto1”. Let all other features remain default.
  • Click Create Link
  • Dismiss Share popup
    • Run plugin (works as expected this time)
  • Open the Share popup again and select Share for Review again.
  • Update Proto1 to Require Password and provide a password.
  • Dismiss the popup (you are not allowed to Update or create a New Link, or at least, I’m not)
  • Run the plugin again.
  • Result: The prototype accessLevel shows passwordProtected but opening the url shows that it is not password protected.
  • Expected result: accessLevel = linkable or prototype is, indeed, password protected.

Example 2 (starts at end of Example 1):

  • Create copy of “LinkTest” by clicking Save As… and saving to your local machine. I used the default name of “Copy of LinkTest”
  • Run plugin
  • Results: shows link from other file (still passwordProtected). Expected result: there are no links.

Example 3 (starts at end of Example 2):

  • Go to Share popup and select Manage Links…
  • Permanently Delete “Proto1”
  • Run Plugin
  • Result: Link is still present
  • Expected result: No link present as it has been deleted
    Note: This behavior is documented in the api documentation but goes back to my original question of if there is a way to get an accurate list of shared artifacts.
  • Copy url and paste in browser
  • Result: Presented with a password entry screen.
  • Expected result: Some kind of page that lets me know this file doesn’t exist…since I deleted it.

@stevekwak, have to had a chance to replicate this?

Hi Nate, this one totally slipped - sorry for the delay. However, I’m unable to replicate the error you are seeing here. What I’m suspecting here is that you are not providing a strong enough password. Once you include an uppercase, lowercase, and a number, the update button should be activated.

Looks like this is an XD behavior. When you “save as” a doc, the link will still be there.

This one is an expected behavior as the doc points out (also as you mentioned). Also, as you can see in XD, this is an XD behavior as well. You will still see the link after you “permanently delete” the link on the server when you click on the “share” button.

Unfortunately, there is really no way of knowing the exact status from the XD app itself or from the APIs. A potential solution to this will come in the future in the form of REST APIs. Please stay tuned for that update!

Thanks man. I look forward to what REST APIs can provide.