How to get changed files(name) between two commit sha's with gitlab api?

I am trying to compare two commits and get all the files changed between those two commits. Github provides this similar functionality by comparing two commits

Is there any way, I can achieve the same using gitlab api’s?

Were you able to accomplish this? I am looking at a combination of repository files, commits. Repo files has commit_id and last_commit_id but not the full list of commits.

The api could solve this by using the compare method.
However to do a --name-only action, you’d better to add a post-task to read all diff names from the response json.