This guide documents the API interfaces that your adapter needs to implement and expose as RESTful APIs on the AWS API Gateway service. The Amazon Yojaka product will invoke these APIs at appropriate instances as documented below.
Note
These APIs are referred to as the Outbound APIs from the perspective of the Amazon Yojaka product as the Amazon Yojaka product makes calls to these APIs on an external adapter service.
The APIs that your adapter implements and exposes over the AWS API Gateway service need to be protected using the AWS_IAM mechanism for both authentication and authorization. Setup your AWS API Gateway to use IAM permissions for invoking the API as documented here.
To allow the Amazon Yojaka product to invoke the APIs that you have implemented, add a resource policy on your AWS API Gateway granting the execute-api:Invoke permission to the AWS IAM role given below, based on the stage/region that you are working in.
Country / Area |
Stage |
AWS IAM Role ARN |
---|---|---|
IN |
Production |
arn:aws:iam::<acc_id>:role/<role_name> |
Exact IAM role ARN will be provided by SmartConnect team during integration.
Below is an example of what the resource policy on your adapter’s AWS API Gateway should look like.
1 2 3 4 5 6 7 8 9 10 11 | { "Version": "2012-10-17", "Statement": [{ "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::<acc_id>:role/<role_name>" }, "Action": "execute-api:Invoke", "Resource": "arn:aws:execute-api:eu-west-1:123456789012:*/*/*/*" }] } |
Replace the AWS account id on line 9 with your adapter’s AWS account id.
The API interface that your adapter service has to implement and expose is documented using the standard Swagger documentation model here.