Logic for recording and validating api dependencies