Back to Knowledge Base
ITLDC API Documentation
Complete API reference for managing your servers, deployments, and resources programmatically.
Updated:
ITLDC Team
api rest automation
ITLDC API Documentation
Our REST API allows you to manage your infrastructure programmatically. This documentation covers all available endpoints and authentication methods.
Authentication
All API requests require authentication using API tokens.
Getting Your API Token
- Log in to your ITLDC account
- Navigate to Account Settings → API Tokens
- Generate a new token
- Store it securely
Authentication Header
Authorization: Bearer YOUR_API_TOKEN
Base URL
https://api.itldc.com/v1
Endpoints
Servers
List All Servers
GET /servers
Response:
{
"servers": [
{
"id": "srv_123abc",
"name": "web-server-01",
"status": "running",
"ip": "203.0.113.1",
"plan": "nvme-vds-2",
"location": "EU1-AMS"
}
]
}
Get Server Details
GET /servers/:id
Create Server
POST /servers
Request Body:
{
"name": "my-server",
"plan": "nvme-vds-2",
"location": "EU1-AMS",
"os": "ubuntu-22.04"
}
Restart Server
POST /servers/:id/restart
Delete Server
DELETE /servers/:id
Billing
Get Invoices
GET /billing/invoices
Get Usage Statistics
GET /billing/usage
Locations
List Available Locations
GET /locations
Response:
{
"locations": [
{
"code": "EU1-AMS",
"city": "Amsterdam",
"country": "Netherlands",
"available": true
}
]
}
Rate Limiting
API requests are limited to:
- 100 requests per minute
- 1000 requests per hour
Rate limit headers are included in all responses:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1640000000
Error Handling
Error Response Format
{
"error": {
"code": "invalid_request",
"message": "The request was invalid",
"details": "Server plan 'invalid-plan' does not exist"
}
}
HTTP Status Codes
200- Success201- Created400- Bad Request401- Unauthorized403- Forbidden404- Not Found429- Too Many Requests500- Internal Server Error
Code Examples
cURL
curl -X GET https://api.itldc.com/v1/servers \
-H "Authorization: Bearer YOUR_API_TOKEN"
Python
import requests
headers = {
"Authorization": "Bearer YOUR_API_TOKEN"
}
response = requests.get(
"https://api.itldc.com/v1/servers",
headers=headers
)
print(response.json())
Node.js
const fetch = require('node-fetch');
const headers = {
'Authorization': 'Bearer YOUR_API_TOKEN'
};
fetch('https://api.itldc.com/v1/servers', { headers })
.then(res => res.json())
.then(data => console.log(data));
Webhooks
Configure webhooks to receive real-time notifications:
Available Events
server.createdserver.startedserver.stoppedserver.deletedinvoice.createdinvoice.paid
Webhook Payload
{
"event": "server.created",
"timestamp": "2024-01-15T10:30:00Z",
"data": {
"server_id": "srv_123abc",
"name": "web-server-01"
}
}
Support
For API support:
- Email: api-support@itldc.com
- Documentation updates: Check changelog
- Report bugs: support@itldc.com