Rest API: get block, add block(template).