New York City Tax Part-time resident

I moved from a foreign country to NYC in April 2017 and lived in NYC for the rest of the year (9 months). Will i get a refund of 100% for the New York City tax or just a partial refund (e.g. 3 months)? How do I apply for such a refund?