CAL-861 add subResources api for rest api, and some copyright comments