Expand my Community achievements bar.

404 for Adobe I/O Runtime Restful API

Avatar

Level 1

Hi,
I followed the tutorial in the following documentation:
https://developer.adobe.com/runtime/docs/guides/using/creating_rest_apis/#securing-the-api-endpoints

1- created the action "getPet"

2- deployed it

3- Executed the command: 

aio rt:api:create /pet-store /pet get getPet --response-type http

I waited for 5 to 10 minutes as recommended, but I received a 404 error. Does anyone have any ideas on what might be wrong?

 

Thanks

2 Replies

Avatar

Level 1

If you created your action with App Builder, it's likely in a package

So you may need to include this in your action name when creating the api 

aio rt:api:create /pet-store /pet get package/getPet --response-type http

(Notice package/getPet) 

Your package can be found in app.config.yaml or ext.config.yaml. It's the first property under packages

Avatar

Level 1

Beyond that, there's a better way to define and use apis with App Builder. You can define them in app.config.yaml. See here: https://developer.adobe.com/app-builder/docs/guides/configuration/#api-gateway-configuration