How to get list of all datalinks for a particular user

Comments

2 comments

  • Official comment
    Joel Stewart

    There are a few API calls that can be used to collect this information. The first API is to get a List all the Import Jobs, Data Links and File Uploads.

    With the output of this list, you could filter for just the Data Links (the *.lnk files in the path value). Then you can use the Read Import Job, Data Link, File Upload REST API to get the UUID for the particular Data Link.

    Lastly, you could use the Read the Owner of the File REST API using the UUIDs provided to collect the user IDs and filter for the user that you're interested in.

    Comment actions Permalink
  • Alan

    Hi Swethha,

    In addition to Joel's comments, I crafted this MySQL statement that will give you an explicit list for a particular user.  Please note that the database schema is subject to change at any time, so this query may stop working in the future after an upgrade.  I developed this against 6.1.25, but verified it also works against 5.11.38.  So it should work on all 6.1 and 5.11 releases.

    SELECT df.id FileID, djc.id ConfID, p.owner Owner, df.name Artifact 
    FROM dap_file df
    INNER JOIN dap_job_configuration djc ON df.id = djc.dap_file__id
    INNER JOIN permission p ON p.id = df.permission_fk
    WHERE df.extension='IMPORT_LINK_JOB_EXTENSION' and owner='USERID';

    Simply replace "USERID" with the id of the user in question - and this sql will return all of the Data Links for that specific user.

    0
    Comment actions Permalink

Please sign in to leave a comment.