Refactor promql_api after project structure change