API
An application programming interface (API).
On this page you can see how to make API in Autoflow.
How to make API in Autoflow? 🤔
Basically, You can make your API with just Two Steps.
Create API ➡️ Create Server
1. Create API
First, you should create API on the API page.
To make API, you should Make API first. Let's See How to make API!
1.1. Click the Create button
Click the left button then Click the 'Create New' button.
1.2. Write the API's name.
Write your API's Name
Also, ID may only contain lowercase letters, numbers, hyphens, and underscores.
When you create API, you can see below screen.
1.3. Click your API
You can delete API here.
Also, When you click API Operation,
1.4. API page overview
You can make an API Path by UI or Using OpenAPI.
If you want to know how to write OpenAPI schema, You can see here.
1.5. Add API Path
Click the Add Path button,
then write the Path name, then Select the Method that want to make.
1.6 Add Information or Response (Optional)
When you add Path, basically when you make Path, this page is done.
But, If you want to write description of this API's Path,
You can write Additional Infomation, you should Click Info,
Also, If you want to make response, you can Add Responses by clicking the Responses button.
2. Create Server
Second, when you finished making the API, you should create a Server on the Server page.
Let's See How to make API on the Server Page!
2.1. Click the create button
Click the left button then Click the 'Create New' button.
2.2. Write Server Name
Write your Server's Name and Port Number.
Then you must select your 'API' which you made from Step 1.
The Server name Must be at least 2 characters.
Also, ID may only contain lowercase letters, numbers, hyphens, and underscores .
2.3. Click your Server
You can Delete the Server here. Also, You can Stop the Server.
When you click Server Operation,
2.4. Add API Operation
Click the Add API Operation Button, then Select the API that made from Step 1.
2.5. Overview Server
When you see the below screen, Your API (including the server) is already done!
Now your can access your Server. 👏
As you know, We made API as 8080 port and GET /hello ,
That's why you can access http://localhost:8080/hello without 404 error!
HTTP Method Examples! 📡
- GET
- POST
- DELETE
- PUT
You can see how to make each API Method.