db api for getting snippets by user-id