API Creation / Deployment / Invocation
Overview​
This tutorial demonstrates the complete API lifecycle in APIM - from creating a new API definition, deploying it to a Gateway, and verifying its invocation via HTTP request. The process includes common real-world configurations such as setting request paths, selecting deployment targets, and testing API responses after deployment.
Prerequisites​
Make sure the following are in place:
- A Gateway already exists and is active (e.g., gateway-prod-mj)
- You have access to the APIM Console with Developer or Admin permissions
- A project is already created (pj-test-01)
- At least one Gateway URL is registered (e.g., https://api.sksample.co.kr/gateway-test-01)
Step-by-Step Tutorial​
Step 1. Create a New API​
Navigate to API Management. Click on Create API
Field | Example |
---|---|
API Name | user-service-api |
Base Path | /user-service |
Description | Handles user registration and login |
Visibility | Private |
Tags | user, auth, v1 |
Click Next to proceed to version definition.
Step 2. Define API Version​
Field | Example |
---|---|
Version Name | v1.0 |
Target URL (Backend) | https://backend.sksample.co.kr/user |
Gateway | gateway-prod-mj |
Request Methods | GET, POST, PUT, DELETE |
Strip Base Path | Enabled (optional based on backend format) |
Click Save & Deploy
Step 3. Deploy API to Gateway​
Once API is saved:
- Go to API Configuration screen
- Review and confirm information
- Click Deploy (with version v1.0 selected)
- Wait for status to update to Deployed. You can re-deploy after edits.
Step 4. Test the Deployed API​
You can test the API using any HTTP client (Postman, curl, browser, etc.)
Example test with curl:
curl -X GET "[https://api.sksample.co.kr/gateway-test-01/user-service/v1/status](https://api.sksample.co.kr/gateway-test-01/user-service/v1/status)"
Expected Response:
{
"status": "ok",
"service": "user-service",
"version": "v1.0"
}
Common Issues & Troubleshooting​
Issue | Cause | Solution |
---|---|---|
404 Not Found | Incorrect route path | Double-check BasePath and RoutePath settings |
SSL Error | Gateway has no valid cert | Ensure HTTPS is enabled and TLS certificate is valid |
Timeout | Backend target URL unreachable | Verify DNS and network access from gateway to backend |
403 Forbidden | API key required | Check if authentication policies are enabled |
Best Practices​
- Keep BasePath and RoutePath clean and versioned (e.g., /api-name/v1)
- Deploy only to validated Gateways with proper TLS and base URL configuration
- Test with curl or Postman before sharing with consumers
- Use Tags for logical grouping (e.g., public, internal, v2)
- Maintain version history for rollback and iteration