API Endpoints
What is an API
API stands for "Application Programming Interface". An API is a software intermediary that allows two applications to communicate with each other (like a messenger). APIs are a set of functions and procedures that allow for the creation of applications. They access the data and features of other applications, services, and databases.
Endpoints in Koxy AI
A Cloudspace in Koxy AI comes with an API. You can add more endpoints to this API as you wish. an endpoint in Koxy AI is a set of nodes and functions connected together that defines how the endpoint works and what it returns as a response.
Nodes in endpoints
Every endpoint in Koxy AI is a set of nodes connected together in a specific order. The nodes define the functionality of the endpoint. For example, a node might be responsible for validating the input data, while another node might be responsible for storing the data in a database.
How to create an endpoint
After creating your Cloudspace, You can go to your Cloudspace, and click on API from the sidebar. now you should see an endpoint called main
built-in in your Cloudspace, you can add more endpoints to your API by clicking on Add Endpoint, you just need to give your endpoint a name to create it.
Notice: Endpoint names should be unique and can't be changed. so if you create an endpoint that has the name of another one the system will replace it with the older one.
After adding a new endpoint, you need to define the nodes that will make up the endpoint. You can do this by using the Koxy AI API builder. The API builder is a graphical interface that allows you to create and configure endpoints without writing any code.
Connecting endpoints together
You can set the trigger of any node in your endpoint as another andpoint, If you set the trigger of a node as another endpoint, the other endpoint will be executed in the same environment and It will share all the previous nodes responses that are saved as a response. see how nodes triggers work.