cURL
curl --request POST \ --url https://api.myidvirtual.com/server \ --header 'Authorization: <authorization>' \ --header 'Content-Type: application/json' \ --data ' { "name": "<string>", "ip": "<string>", "port": 123, "country": "<string>", "city": "<string>", "username": "<string>", "password": "<string>", "notes": "<string>" } '
{ "server": { "id": "123e4567-e89b-12d3-a456-426614174000", "name": "BR-SP-001", "ip": "192.168.1.100", "port": 1194, "country": "Brazil", "city": "São Paulo", "username": "root", "password": "password", "notes": "Servidor principal em São Paulo", "createdAt": "2024-01-15T10:30:00.000Z", "updatedAt": "2024-01-15T10:30:00.000Z" }, "message": "Server cadastrado com sucesso" }
Cria um novo servidor VPN no sistema
curl --location --request POST 'http://localhost:3333/server' \ --header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...' \ --header 'Content-Type: application/json' \ --data-raw '{ "name": "BR-SP-001", "ip": "192.168.1.100", "port": 1194, "country": "Brazil", "city": "São Paulo", "username": "root", "password": "password", "notes": "Servidor principal em São Paulo", }'
/server/setup/:id