adding apiresource code