add a has function to the api

this can be used to check if an api exists before
calling it
update todo