Appearance
Getting Started
This guide will help you make your first API call to the IPCom API.
Prerequisites
Before you begin, you'll need:
- An IPCom account with username and password
- A tool to make HTTP requests (curl, Postman, or your preferred HTTP client)
Base URL
All API requests should be made to one of the following URLs:
HTTPS (Recommended for production):
https://IP:30003/apiHTTP (Local networks only):
http://IP:8080/apiReplace IP with your IPCom server's IP address. Use HTTPS for secure communication in production environments, or HTTP for local network testing.
Default Ports
- HTTPS: 30003 (secure, recommended)
- HTTP: 8080 (insecure, local networks only)
Authentication
First, obtain a JWT token by logging in:
HTTPS (Recommended):
bash
curl -X POST "https://your-server-ip:30003/api/login" \
-H "Content-Type: application/json" \
-d '{
"username": "your_username",
"password": "your_password",
"api_key": ""
}'HTTP (Local networks only):
bash
curl -X POST "http://your-server-ip:8080/api/login" \
-H "Content-Type: application/json" \
-d '{
"username": "your_username",
"password": "your_password",
"api_key": ""
}'Then include the JWT token in the Authorization header:
Authorization: Bearer YOUR_JWT_TOKENMaking Your First Request
Let's start by logging in and then making an authenticated request:
Step 1: Login
HTTPS (Recommended):
bash
curl -X POST "https://your-server-ip:30003/api/login" \
-H "Content-Type: application/json" \
-d '{
"username": "your_username",
"password": "your_password",
"api_key": ""
}'HTTP (Local networks only):
bash
curl -X POST "http://your-server-ip:8080/api/login" \
-H "Content-Type: application/json" \
-d '{
"username": "your_username",
"password": "your_password",
"api_key": ""
}'Response
json
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"name": "Your Display Name"
}Step 2: Use the JWT Token
Now use the token to make authenticated requests. Let's try getting system logs:
HTTPS (Recommended):
bash
curl -X GET "https://your-server-ip:30003/api/logs" \
-H "Authorization: Bearer YOUR_JWT_TOKEN"HTTP (Local networks only):
bash
curl -X GET "http://your-server-ip:8080/api/logs" \
-H "Authorization: Bearer YOUR_JWT_TOKEN"Response
json
[
{
"id": 1,
"created_at": "2025-08-22T14:45:49Z",
"text": "IPCom started. v5.0.0 B4",
"type": 0
},
{
"id": 2,
"created_at": "2025-08-22T15:00:07Z",
"text": "IPCom shutdown initiated by termination signal.",
"type": 1
},
{
"id": 3,
"created_at": "2025-08-22T16:26:39Z",
"text": "Settings updated by administrator",
"type": 3
}
]HTTP Status Codes
The API uses standard HTTP status codes:
200- Success400- Bad Request401- Unauthorized404- Not Found500- Internal Server Error
Next Steps
Now that you've made your first API call:
- Learn about Authentication in detail
- Check out the Logs endpoint for system monitoring and debugging
- Explore other available API endpoints
- Understand Scopes & Permissions for proper access control
- Review the complete Configuration Documentation for system setup