Salesforce changed api endpoints and removed the -api part. Changed the endpoint regexp to match an endpoint with or without -api for backwards compatibility