You're correct on both fronts; you can get the page_id from the breakdown returned from the 'general' report from the Analytics API, and you can get them from the Pages API (see below). The same is true for blog posts. It's generally easier to obtain them from the more 'general' request to the Analytics API, since you know in advance that there exists data within your time frame for that piece of content.