Skip to main content

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

FieldExample
API Nameuser-service-api
Base Path/user-service
DescriptionHandles user registration and login
VisibilityPrivate
Tagsuser, auth, v1

Click Next to proceed to version definition.

Step 2. Define API Version​

FieldExample
Version Namev1.0
Target URL (Backend)https://backend.sksample.co.kr/user
Gatewaygateway-prod-mj
Request MethodsGET, POST, PUT, DELETE
Strip Base PathEnabled (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 FoundIncorrect route pathDouble-check BasePath and RoutePath settings
SSL ErrorGateway has no valid certEnsure HTTPS is enabled and TLS certificate is valid
TimeoutBackend target URL unreachableVerify DNS and network access from gateway to backend
403 ForbiddenAPI key requiredCheck 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