KT DeveloperLoading Portfolio
Business & IT Guide
Software Basics • API

API කියන්නේ මොකද්ද?

API (Application Programming Interface) කියන්නේ software systems දෙකකට rules/requests/responses හරහා එකිනෙකා සමඟ වැඩ කරන්න දෙන interface/contract එකක්. User interface එක මිනිසාට; API එක software-to-software interaction එකට.

7–9 minSinhala + EnglishKasun Tharaka

මේකේ main idea එක

MDN explain කරන විදිහට API එක application එක offer කරන features/rules set එකක්. Web APIs බොහෝවිට HTTP requests use කර JSON data exchange කරනවා. REST කියන්නේ common architectural style/convention family එකක්; every HTTP API strict REST වෙන්නේ නෑ.

Practical checklist

  • Endpoint/URL
  • HTTP methods: GET, POST, PUT/PATCH, DELETE
  • Request parameters/body
  • Authentication/API keys/tokens
  • Response status + JSON data
  • Rate limits
  • Errors/retries
  • Versioning and documentation

Sri Lanka business එකකට apply කරන්නේ කොහොමද?

Example: website order එක pay කරලා payment gateway callback එක API endpoint එකකට එවීම; website එක SMS provider API එකට OTP request කිරීම; mobile app එක backend API එකෙන් orders load කිරීම.

Step-by-step plan

  1. Use case define කරන්න
  2. API docs + auth method read කරන්න
  3. Sandbox/test credentials use කරන්න
  4. Error/security/rate-limit handling build කරන්න
  5. Keys/secrets browser/public code එකේ expose නොකරන්න
Quick Note: API key එක password වගේ secret නම් frontend code/Git repo/public HTML එකේ hard-code කරන්න එපා.

Research & Verified Sources

Back to Articles Book a Project