Deleting Submissions through API

How can i delete submission through API using AJAX. Is there any example of it, kindly share. Also when i was reading the article i found one thing where it was mention as

What is {pk} and what is {dataid} here, kindly both the points.

@khasaab, this post discussed previously should be helpful to solve your issue:

When i try to delete submission through ajax i get this error. And also to mention i am using the host as{formid}/{dataid}

“CSRF Failed: Referer checking failed - no Referer.”