API to export user data

Hi - I was looking for an API that pulls all user’s data like topics, posts, replies etc from discourse. The idea is that on the sso server, user should be able to request/export all its data stored in discourse. Additionally, an api that deletes user and all its data from the discourse. The purpose is for GDRP.