HTTP Commands API

Commands

executePost

Execute commands

Execute one or more Minecraft commands on the server. Commands are executed sequentially in the order they are provided. ## Wait for Player Use the `waitForPlayer` parameter to delay command execution until a specific player joins the server. If the player is already online, commands execute immediately. If the player is offline, commands are saved and will execute when the player joins.


/execute

Usage and SDK Samples

curl -X POST \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "http://localhost:8080/execute" \
 -d '{
  "waitForPlayer" : "Player1",
  "commands" : [ "say Hello!", "give Player1 diamond 1" ]
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CommandsApi;

import java.io.File;
import java.util.*;

public class CommandsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: bearerAuth
        HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
        bearerAuth.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        CommandsApi apiInstance = new CommandsApi();
        CommandRequest commandRequest = {"commands":["say Hello from HTTP API!"]}; // CommandRequest | 

        try {
            CommandResponse result = apiInstance.executePost(commandRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CommandsApi#executePost");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final CommandRequest commandRequest = new CommandRequest(); // CommandRequest | 

try {
    final result = await api_instance.executePost(commandRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->executePost: $e\n');
}

import org.openapitools.client.api.CommandsApi;

public class CommandsApiExample {
    public static void main(String[] args) {
        CommandsApi apiInstance = new CommandsApi();
        CommandRequest commandRequest = {"commands":["say Hello from HTTP API!"]}; // CommandRequest | 

        try {
            CommandResponse result = apiInstance.executePost(commandRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CommandsApi#executePost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: bearerAuth
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
CommandsApi *apiInstance = [[CommandsApi alloc] init];
CommandRequest *commandRequest = {"commands":["say Hello from HTTP API!"]}; // 

// Execute commands
[apiInstance executePostWith:commandRequest
              completionHandler: ^(CommandResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var HttpCommandsApi = require('http_commands_api');
var defaultClient = HttpCommandsApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: bearerAuth
var bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new HttpCommandsApi.CommandsApi()
var commandRequest = {"commands":["say Hello from HTTP API!"]}; // {CommandRequest} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.executePost(commandRequest, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class executePostExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: bearerAuth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new CommandsApi();
            var commandRequest = new CommandRequest(); // CommandRequest | 

            try {
                // Execute commands
                CommandResponse result = apiInstance.executePost(commandRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling CommandsApi.executePost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: bearerAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CommandsApi();
$commandRequest = {"commands":["say Hello from HTTP API!"]}; // CommandRequest | 

try {
    $result = $api_instance->executePost($commandRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CommandsApi->executePost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::CommandsApi;

# Configure Bearer (JWT) access token for authorization: bearerAuth
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CommandsApi->new();
my $commandRequest = WWW::OPenAPIClient::Object::CommandRequest->new(); # CommandRequest | 

eval {
    my $result = $api_instance->executePost(commandRequest => $commandRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CommandsApi->executePost: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: bearerAuth
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.CommandsApi()
commandRequest = {"commands":["say Hello from HTTP API!"]} # CommandRequest | 

try:
    # Execute commands
    api_response = api_instance.execute_post(commandRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CommandsApi->executePost: %s\n" % e)
extern crate CommandsApi;

pub fn main() {
    let commandRequest = {"commands":["say Hello from HTTP API!"]}; // CommandRequest

    let mut context = CommandsApi::Context::default();
    let result = client.executePost(commandRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Body parameters
Name Description
commandRequest *

Responses


Players

playerUsernameGet

Get player information

Returns detailed information about a specific player. The player can be online or offline. For online players, additional information such as IP address, ping, and current world is included. If Vault is installed, the player's economy balance will also be included.


/player/{username}

Usage and SDK Samples

curl -X GET \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json" \
 "http://localhost:8080/player/{username}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.PlayersApi;

import java.io.File;
import java.util.*;

public class PlayersApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: bearerAuth
        HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
        bearerAuth.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        PlayersApi apiInstance = new PlayersApi();
        String username = Player1; // String | The Minecraft username of the player

        try {
            PlayerInfo result = apiInstance.playerUsernameGet(username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PlayersApi#playerUsernameGet");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String username = new String(); // String | The Minecraft username of the player

try {
    final result = await api_instance.playerUsernameGet(username);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->playerUsernameGet: $e\n');
}

import org.openapitools.client.api.PlayersApi;

public class PlayersApiExample {
    public static void main(String[] args) {
        PlayersApi apiInstance = new PlayersApi();
        String username = Player1; // String | The Minecraft username of the player

        try {
            PlayerInfo result = apiInstance.playerUsernameGet(username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PlayersApi#playerUsernameGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: bearerAuth
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
PlayersApi *apiInstance = [[PlayersApi alloc] init];
String *username = Player1; // The Minecraft username of the player (default to null)

// Get player information
[apiInstance playerUsernameGetWith:username
              completionHandler: ^(PlayerInfo output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var HttpCommandsApi = require('http_commands_api');
var defaultClient = HttpCommandsApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: bearerAuth
var bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new HttpCommandsApi.PlayersApi()
var username = Player1; // {String} The Minecraft username of the player

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.playerUsernameGet(username, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class playerUsernameGetExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: bearerAuth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new PlayersApi();
            var username = Player1;  // String | The Minecraft username of the player (default to null)

            try {
                // Get player information
                PlayerInfo result = apiInstance.playerUsernameGet(username);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling PlayersApi.playerUsernameGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: bearerAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\PlayersApi();
$username = Player1; // String | The Minecraft username of the player

try {
    $result = $api_instance->playerUsernameGet($username);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PlayersApi->playerUsernameGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::PlayersApi;

# Configure Bearer (JWT) access token for authorization: bearerAuth
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::PlayersApi->new();
my $username = Player1; # String | The Minecraft username of the player

eval {
    my $result = $api_instance->playerUsernameGet(username => $username);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PlayersApi->playerUsernameGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: bearerAuth
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.PlayersApi()
username = Player1 # String | The Minecraft username of the player (default to null)

try:
    # Get player information
    api_response = api_instance.player_username_get(username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PlayersApi->playerUsernameGet: %s\n" % e)
extern crate PlayersApi;

pub fn main() {
    let username = Player1; // String

    let mut context = PlayersApi::Context::default();
    let result = client.playerUsernameGet(username, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
username*
String
The Minecraft username of the player
Required

Responses


playersGet

Get online players

Returns a list of currently online players with player count and max players


/players

Usage and SDK Samples

curl -X GET \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json" \
 "http://localhost:8080/players"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.PlayersApi;

import java.io.File;
import java.util.*;

public class PlayersApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: bearerAuth
        HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
        bearerAuth.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        PlayersApi apiInstance = new PlayersApi();

        try {
            PlayersList result = apiInstance.playersGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PlayersApi#playersGet");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();


try {
    final result = await api_instance.playersGet();
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->playersGet: $e\n');
}

import org.openapitools.client.api.PlayersApi;

public class PlayersApiExample {
    public static void main(String[] args) {
        PlayersApi apiInstance = new PlayersApi();

        try {
            PlayersList result = apiInstance.playersGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PlayersApi#playersGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: bearerAuth
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
PlayersApi *apiInstance = [[PlayersApi alloc] init];

// Get online players
[apiInstance playersGetWithCompletionHandler: 
              ^(PlayersList output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var HttpCommandsApi = require('http_commands_api');
var defaultClient = HttpCommandsApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: bearerAuth
var bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new HttpCommandsApi.PlayersApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.playersGet(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class playersGetExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: bearerAuth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new PlayersApi();

            try {
                // Get online players
                PlayersList result = apiInstance.playersGet();
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling PlayersApi.playersGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: bearerAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\PlayersApi();

try {
    $result = $api_instance->playersGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PlayersApi->playersGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::PlayersApi;

# Configure Bearer (JWT) access token for authorization: bearerAuth
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::PlayersApi->new();

eval {
    my $result = $api_instance->playersGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PlayersApi->playersGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: bearerAuth
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.PlayersApi()

try:
    # Get online players
    api_response = api_instance.players_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PlayersApi->playersGet: %s\n" % e)
extern crate PlayersApi;

pub fn main() {

    let mut context = PlayersApi::Context::default();
    let result = client.playersGet(&context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Responses


Registration

validateRegistrationPost

Validate player registration

Sends a chat message to the player asking for confirmation to allow their account to be registered with the provided email and IP address. The player must be online to receive the validation message. They can respond with /register confirm or /register deny.


/validate-registration

Usage and SDK Samples

curl -X POST \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "http://localhost:8080/validate-registration" \
 -d '{
  "ip" : "192.168.1.1",
  "registrationId" : "550e8400-e29b-41d4-a716-446655440000",
  "callbackUrl" : "https://website.com/api/validate",
  "email" : "[email protected]",
  "username" : "Player1"
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.RegistrationApi;

import java.io.File;
import java.util.*;

public class RegistrationApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: bearerAuth
        HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
        bearerAuth.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        RegistrationApi apiInstance = new RegistrationApi();
        RegistrationValidationRequest registrationValidationRequest = {"username":"Player1","email":"[email protected]","ip":"192.168.1.1"}; // RegistrationValidationRequest | 

        try {
            RegistrationValidationResponse result = apiInstance.validateRegistrationPost(registrationValidationRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RegistrationApi#validateRegistrationPost");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final RegistrationValidationRequest registrationValidationRequest = new RegistrationValidationRequest(); // RegistrationValidationRequest | 

try {
    final result = await api_instance.validateRegistrationPost(registrationValidationRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->validateRegistrationPost: $e\n');
}

import org.openapitools.client.api.RegistrationApi;

public class RegistrationApiExample {
    public static void main(String[] args) {
        RegistrationApi apiInstance = new RegistrationApi();
        RegistrationValidationRequest registrationValidationRequest = {"username":"Player1","email":"[email protected]","ip":"192.168.1.1"}; // RegistrationValidationRequest | 

        try {
            RegistrationValidationResponse result = apiInstance.validateRegistrationPost(registrationValidationRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RegistrationApi#validateRegistrationPost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: bearerAuth
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
RegistrationApi *apiInstance = [[RegistrationApi alloc] init];
RegistrationValidationRequest *registrationValidationRequest = {"username":"Player1","email":"[email protected]","ip":"192.168.1.1"}; // 

// Validate player registration
[apiInstance validateRegistrationPostWith:registrationValidationRequest
              completionHandler: ^(RegistrationValidationResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var HttpCommandsApi = require('http_commands_api');
var defaultClient = HttpCommandsApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: bearerAuth
var bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new HttpCommandsApi.RegistrationApi()
var registrationValidationRequest = {"username":"Player1","email":"[email protected]","ip":"192.168.1.1"}; // {RegistrationValidationRequest} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.validateRegistrationPost(registrationValidationRequest, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class validateRegistrationPostExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: bearerAuth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new RegistrationApi();
            var registrationValidationRequest = new RegistrationValidationRequest(); // RegistrationValidationRequest | 

            try {
                // Validate player registration
                RegistrationValidationResponse result = apiInstance.validateRegistrationPost(registrationValidationRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling RegistrationApi.validateRegistrationPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: bearerAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\RegistrationApi();
$registrationValidationRequest = {"username":"Player1","email":"[email protected]","ip":"192.168.1.1"}; // RegistrationValidationRequest | 

try {
    $result = $api_instance->validateRegistrationPost($registrationValidationRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RegistrationApi->validateRegistrationPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::RegistrationApi;

# Configure Bearer (JWT) access token for authorization: bearerAuth
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::RegistrationApi->new();
my $registrationValidationRequest = WWW::OPenAPIClient::Object::RegistrationValidationRequest->new(); # RegistrationValidationRequest | 

eval {
    my $result = $api_instance->validateRegistrationPost(registrationValidationRequest => $registrationValidationRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RegistrationApi->validateRegistrationPost: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: bearerAuth
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.RegistrationApi()
registrationValidationRequest = {"username":"Player1","email":"[email protected]","ip":"192.168.1.1"} # RegistrationValidationRequest | 

try:
    # Validate player registration
    api_response = api_instance.validate_registration_post(registrationValidationRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RegistrationApi->validateRegistrationPost: %s\n" % e)
extern crate RegistrationApi;

pub fn main() {
    let registrationValidationRequest = {"username":"Player1","email":"[email protected]","ip":"192.168.1.1"}; // RegistrationValidationRequest

    let mut context = RegistrationApi::Context::default();
    let result = client.validateRegistrationPost(registrationValidationRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Body parameters
Name Description
registrationValidationRequest *

Responses


Server

infoGet

Get server information

Returns server information including player count, max players, and server version


/info

Usage and SDK Samples

curl -X GET \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json" \
 "http://localhost:8080/info"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.ServerApi;

import java.io.File;
import java.util.*;

public class ServerApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: bearerAuth
        HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
        bearerAuth.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        ServerApi apiInstance = new ServerApi();

        try {
            ServerInfo result = apiInstance.infoGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ServerApi#infoGet");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();


try {
    final result = await api_instance.infoGet();
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->infoGet: $e\n');
}

import org.openapitools.client.api.ServerApi;

public class ServerApiExample {
    public static void main(String[] args) {
        ServerApi apiInstance = new ServerApi();

        try {
            ServerInfo result = apiInstance.infoGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ServerApi#infoGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: bearerAuth
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
ServerApi *apiInstance = [[ServerApi alloc] init];

// Get server information
[apiInstance infoGetWithCompletionHandler: 
              ^(ServerInfo output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var HttpCommandsApi = require('http_commands_api');
var defaultClient = HttpCommandsApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: bearerAuth
var bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new HttpCommandsApi.ServerApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.infoGet(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class infoGetExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: bearerAuth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new ServerApi();

            try {
                // Get server information
                ServerInfo result = apiInstance.infoGet();
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling ServerApi.infoGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: bearerAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\ServerApi();

try {
    $result = $api_instance->infoGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ServerApi->infoGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::ServerApi;

# Configure Bearer (JWT) access token for authorization: bearerAuth
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::ServerApi->new();

eval {
    my $result = $api_instance->infoGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ServerApi->infoGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: bearerAuth
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.ServerApi()

try:
    # Get server information
    api_response = api_instance.info_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ServerApi->infoGet: %s\n" % e)
extern crate ServerApi;

pub fn main() {

    let mut context = ServerApi::Context::default();
    let result = client.infoGet(&context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Responses