Skip to main content
Veeva Support US Holiday: Jul 4th - Limited staff, please plan accordingly

Community

Search

Welcome to Community

User List not created documents

Answered

Comments

5 comments

  • Official comment
    Isak Thomas

    Hi Baibhav,

    In order to achieve your use case, you will have to use more than one API call. The first call you make is to retrieve the user data:
    https://developer.veevavault.com/api/22.1/#retrieve-all-users

    Secondly, you will need to query each Vault you are interested in and extract the "Created By" field from all versions of documents. For example:

    SELECT created_by__v FROM ALLVERSIONS documents

    You can query Vault using this API call:
    https://developer.veevavault.com/api/22.1/#submitting-a-query

    Here is additional VQL documentation:
    https://developer.veevavault.com/vql/#introduction-to-vault-queries

    You will have to reconcile the results from both externally.

  • Baibhav Agarwal

    Hi Isak,

    Thanks for the input, I have already tried this way but as the vault is having lakhs of documents so it's taking too long to get the result.

    So I was looking for any straight forward query/api to get the user list who has not created any document in vault.

    If we already have the userlist with us for which we want to query the above problem, then is there any straight forward query/api by passing the userlist in the where clause to get the user who has not created any documents?

    If possible please respond.

    Thanks

    0
  • Isak Thomas

    There is no straightforward single API call to get those results. The other option is to use Vault Loader to extract document data. It may take as long as the VQL API call, but it would be an asynchronous process within Vault.

    0
  • Baibhav Agarwal

    I have another doubt which is related to this only.

    While running API 

    Select created_by__v from documents

    it returns the user list who has created the documents, but the problem is here that we got the duplicates user Id as they have created multiple documents.

    Is there any modification that can be done to above query to get only the unique user list.

    I mean only the single occurrence of the user.

    0
  • Isak Thomas

    You won't be able to modify the results any further using the API. You have two options: to reconcile this externally or you may be able to use a report within Vault to group by the User ID.

    https://vaulthelp.vod309.com/wordpress/user-help/reporting-user-help/creating-new-reports/

    0

Please sign in to leave a comment.

Powered by Zendesk