FFlogs API: Question about it

hello, i have a few questions about the API:
-How can i calculate the Percentile using “Rank and OutOf” as describe in the documentation??
-Why is the percentile that i extract from the api, is the percentile of aDps Parses insteed of rDps parses??
-How can i extract the rDps from the parses?
-Why is the duration of a fight (in seconds) that i “extract” from the api different from the duration(in seconds) of the logs that i can see in the website? From the api, i have extracted the duration in milliseconds and i have converted its in seconds by dividing to 1000. Then i divided by 60 the result of the precedent result.
The documentation i use is “https://www.fflogs.com/v1/docs” and i use the GET Method to extract the Parses ( [GET]https://www.fflogs.com/v1/docs#!/Parses/parses_character_characterName_serverName_serverRegion_get) [/parses/character/{characterName}/{serverName}/{serverRegion}] )