To-do List Gateway

To provide public access to your new deployment, you need to configure one of the existing API gateways or deploy a new one.

Open the Gateway Channel Screen

Open the Gateway > Channel screen from your Devops app. Unless you've modified your implementation, this screen is located at https://[YOUR_ADMIN_UI_DOMAIN]/app/devops/common/gateway_channel.

Gateway Channel Screen

Create a Gateway Channel

Next, you will create a new API channel on this new Gateway System to assign a specific URL path to your deployment.

Click on "CREATE NEW" button, assign "todo_crud" as the id, enter the following details and save:

Gateway Channel Definition Screen
  • DEFINITION

    • Channel Name: Todo

    • Channel Status: ACTIVE

    • Description: CRUD path to todo list runner

    • Applicable Gateways: admin-prod

    • System Executor: CRUD

    • System Parameters:

      • Key: server.baseUrl, Value: http://runner-example-0001-service.admin-backend.svc.cluster.local:1235

    • Target: /api/todo

  • AUTHENTICATION

    • Path Authentications: { "*": { "isPublic": true } }

These settings will map "todo_crud" endpoint on "admin-prod" gateway to "/api/todo" endpoint of your "example-0001" deployment. The authentication settings provide public access to all paths on this endpoint.

After saving the new channel, your settings will be automatically applied to your gateway (after a few seconds as defined in configuration). You can also refresh gateway settings manually, by making calls to the following endpoints using your favorite API client:

POST https://[YOUR_ADMIN_API_DOMAIN]/api/control/system/example-admin
POST https://[YOUR_ADMIN_API_DOMAIN]/api/control/channel/todo_crud

Test your Gateway

Now, you can access your todo list APIs publicly through your gateway. Test your access by listing the record you've created in last section by:

GET https://[YOUR_ADMIN_API_DOMAIN]/api/request/todo_crud/todo

Please note that you only need to create new gateway mappings when you create microservices that should be directly accessible by end users.

Last updated