Merged core specific code from RestApiSDK