Windows Servers
These endpoints allow you to manage your Windows Servers, including provisioning, configuring, and monitoring server instances.
The Server object
The server object contains all information about a Windows Server instance, including its configuration and current status.
Properties
- Name
id
- Type
- string
- Description
Unique identifier for the server
- Name
name
- Type
- string
- Description
Custom name for the server
- Name
status
- Type
- string
- Description
Current server status (e.g., "running", "stopped", "provisioning")
- Name
region_id
- Type
- integer
- Description
Region identifier where server is deployed
- Name
cpu
- Type
- integer
- Description
Number of CPU cores
- Name
memory
- Type
- integer
- Description
RAM in GB
- Name
storage
- Type
- integer
- Description
SSD storage in GB
- Name
os_version
- Type
- string
- Description
Operating system version
- Name
ip_address
- Type
- string
- Description
Server's public IP address
- Name
created_at
- Type
- timestamp
- Description
When the server was created
List Windows Servers
Retrieve a paginated list of all your Windows servers.
Optional Query Parameters
- Name
date_from
- Type
- string
- Description
Start date for filtering (format: YYYY-MM-DD)
- Name
date_to
- Type
- string
- Description
End date for filtering (format: YYYY-MM-DD)
- Name
per_page
- Type
- integer
- Description
Number of items per page (1-100). Defaults to 10
- Name
page
- Type
- integer
- Description
Page number to retrieve (min: 1)
- Name
search
- Type
- string
- Description
Search term to filter servers by name (max: 255 characters)
- Name
sort_by
- Type
- string
- Description
Field to sort by. Options:
created_at
,name
,status
,region_id
. Defaults tocreated_at
- Name
sort_direction
- Type
- string
- Description
Sort direction. Options:
asc
,desc
. Defaults todesc
- Name
status
- Type
- string
- Description
Filter by status. Comma-separated list of status codes
- Name
region_id
- Type
- integer
- Description
Filter by region ID
- Name
project_id
- Type
- string
- Description
Filter by project ID
- Name
os_version
- Type
- string
- Description
Filter by OS version ("windows11", "windows10", "server2022", "server2019")
Request
curl -X GET "https://api.tradevps.net/v1/my/trading/windows?date_from=2024-01-01&date_to=2024-01-31&search=trading&sort_by=created_at&sort_direction=desc&status=running®ion_id=2&project_id=123&os_version=windows11&per_page=20&page=1" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
Response 200
{
"ok": true,
"msg": "Windows servers fetched",
"data": [
{
"id": "ws-01234567",
"name": "Trading Server 1",
"status": "running",
"region_id": 2,
"region": {
"id": 2,
"label": "Frankfurt",
"icon": "https://api.tradevps.net/assets/media/flags/germany.svg"
},
"project_id": "123",
"cpu": 4,
"memory": 16,
"storage": 200,
"os_version": "windows11",
"ip_address": "123.45.67.89",
"created_at": "2024-01-01T12:00:00Z",
"updated_at": "2024-01-01T12:00:00Z"
}
// ... more servers
],
"pagination": {
"current_page": 1,
"last_page": 5,
"per_page": 20,
"total": 100,
"first_page_url": "https://api.tradevps.net/v1/my/trading/windows?page=1",
"last_page_url": "https://api.tradevps.net/v1/my/trading/windows?page=5",
"next_page_url": "https://api.tradevps.net/v1/my/trading/windows?page=2",
"prev_page_url": null,
"from": 1,
"to": 20
}
}
List Available Regions
Retrieve a list of available regions for Windows Server deployment.
Response
Returns an array of available regions with their identifiers, labels, and flag icons.
Request
curl -X GET https://api.tradevps.net/v1/my/trading/windows/regions \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
Response 200
{
"ok": true,
"msg": "Available regions fetched",
"data": [
{
"id": 0,
"label": "New York",
"icon": "https://api.tradevps.net/assets/media/flags/united-states.svg"
},
{
"id": 1,
"label": "Amsterdam",
"icon": "https://api.tradevps.net/assets/media/flags/netherlands.svg"
},
{
"id": 2,
"label": "Frankfurt",
"icon": "https://api.tradevps.net/assets/media/flags/germany.svg"
},
{
"id": 3,
"label": "London",
"icon": "https://api.tradevps.net/assets/media/flags/united-kingdom.svg"
}
]
}
Create Windows Server
Provision a new Windows Server instance.
Required Parameters
- Name
name
- Type
- string
- Description
Custom name for the server
- Name
region_id
- Type
- integer
- Description
Region identifier for server deployment
Optional Parameters
- Name
cpu
- Type
- integer
- Description
Number of CPU cores (2-16)
- Name
memory
- Type
- integer
- Description
RAM in GB (4-64)
- Name
storage
- Type
- integer
- Description
SSD storage in GB (100-1000)
- Name
os_version
- Type
- string
- Description
Operating system version ("windows11", "windows10", "server2022", "server2019")
Request
curl -X POST https://api.tradevps.net/v1/my/trading/windows \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-d '{
"name": "Trading Server 1",
"region_id": 2,
"cpu": 4,
"memory": 16,
"storage": 200,
"os_version": "windows11"
}'
Response 200
{
"ok": true,
"msg": "Server provisioning started",
"data": {
"id": "ws-01234567",
"name": "Trading Server 1",
"status": "provisioning",
"region_id": 2,
"cpu": 4,
"memory": 16,
"storage": 200,
"os_version": "windows11",
"created_at": "2023-01-01T12:00:00Z"
}
}
Get Server Details
Retrieve details for a specific Windows Server.
URL Parameters
- Name
server_id
- Type
- string
- Description
The unique identifier of the server
Request
curl -X GET https://api.tradevps.net/v1/my/trading/windows/{server_id} \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
Response 200
{
"ok": true,
"msg": "Server details retrieved",
"data": {
"id": "ws-01234567",
"name": "Trading Server 1",
"status": "running",
"region_id": 2,
"cpu": 4,
"memory": 16,
"storage": 200,
"os_version": "windows11",
"ip_address": "123.45.67.89",
"created_at": "2023-01-01T12:00:00Z"
}
}
Delete Server
Delete a specific Windows Server.
URL Parameters
- Name
server_id
- Type
- string
- Description
The unique identifier of the server to delete
Request
curl -X DELETE https://api.tradevps.net/v1/my/trading/windows/{server_id} \
-H "Authorization: Bearer {token}"
Response 200
{
"ok": true,
"msg": "Server deletion initiated",
"data": "ws-01234567"
}
Server Actions
Perform actions on a Windows Server instance.
URL Parameters
- Name
server_id
- Type
- string
- Description
The unique identifier of the server
Required Parameters
- Name
action
- Type
- string
- Description
Action to perform: "start", "stop", "restart"
Request
curl -X POST https://api.tradevps.net/v1/my/trading/windows/{server_id}/action \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-d '{
"action": "restart"
}'
Response 200
{
"ok": true,
"msg": "Server restart initiated",
"data": {
"id": "ws-01234567",
"status": "restarting",
"cpu": 4,
"memory": 16,
"storage": 200,
"os_version": "windows11"
}
}