I am using Amplify in my iOS app. And we have a backend team for giving us some external APIs. There was this API which gets called and was working fine. We have to had two more endpoints so they have created that endpoints and pushed it to amplify. After taking the pull the API was not working as expected. It is returning "More than one rest api configured. Could not infer which API to call" this error. Please walk me through this.
This is what the amplifyconfiguration.json file in xcode look like
"api": {
"plugins": {
"awsAPIPlugin": {
"companies": {
"endpointType": "REST",
"endpoint": "https://j7l0jwnq27.execute-api.us-east-1.amazonaws.com/dev",
"region": "us-east-1",
"authorizationType": "AWS_IAM"
},
"projection": {
"endpointType": "REST",
"endpoint": "https://z57ijgfs16.execute-api.us-east-1.amazonaws.com/dev",
"region": "us-east-1",
"authorizationType": "AWS_IAM"
},
"tableCalculation": {
"endpointType": "REST",
"endpoint": "https://5nt0tfg2a6.execute-api.us-east-1.amazonaws.com/dev",
"region": "us-east-1",
"authorizationType": "AWS_IAM"
}
}
}
}
Here /getCompanies was working fine until the other two endpoints came. Now when calling the /getCompanies endpoint I am getting "More than one rest api configured. Could not infer which API to call" this error.
This is how I am calling the API
let request = RESTRequest(path: "/getCompanies")
Amplify.API.get(request: request)
Thanks in advance