validating api