In Api.php:
public function getRoles($project_key)
{
return $this->api(self::REQUEST_GET, sprintf('/rest/api/2/project/%s/roles', $project_key), array(), true);
}
roles should be fixed as role,
i.e. return $this->api(self::REQUEST_GET, sprintf('/rest/api/2/project/%s/role', $project_key), array(), true);