Skip to content

Latest commit

 

History

History
422 lines (322 loc) · 17.3 KB

BlockApi.md

File metadata and controls

422 lines (322 loc) · 17.3 KB

BlockApi

All URIs are relative to https://localhost/api/v5

Method HTTP request Description
createBlockOperation POST /block/op Create a block operation
deleteBlockOperation DELETE /block/op/{uuid} Stop a block operation
getBlock GET /block/{world}/{x}/{y}/{z} Get a block
getBlockOperation GET /block/op/{uuid} Get a block operation
listBlockOperations GET /block/op List block operations
modifyBlockOperation PUT /block/op/{uuid} Modify a block operation

createBlockOperation

BlockOperation createBlockOperation(body, details, accept, pretty)

Create a block operation

Start a request to get or change blocks on the server. Required permissions: - block.op.create

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.BlockApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: ApiKeyHeader
ApiKeyAuth ApiKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyHeader");
ApiKeyHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyHeader.setApiKeyPrefix("Token");

// Configure API key authorization: ApiKeyQuery
ApiKeyAuth ApiKeyQuery = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyQuery");
ApiKeyQuery.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyQuery.setApiKeyPrefix("Token");

BlockApi apiInstance = new BlockApi();
CreateBlockOperationRequest body = new CreateBlockOperationRequest(); // CreateBlockOperationRequest | 
Boolean details = true; // Boolean | Add to include additional details, omit or false otherwise
String accept = "accept_example"; // String | Override the 'Accept' request header (useful for debugging your requests)
Boolean pretty = true; // Boolean | Add to make the Web-API pretty print the response (useful for debugging your requests)
try {
    BlockOperation result = apiInstance.createBlockOperation(body, details, accept, pretty);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling BlockApi#createBlockOperation");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body CreateBlockOperationRequest [optional]
details Boolean Add to include additional details, omit or false otherwise [optional]
accept String Override the 'Accept' request header (useful for debugging your requests) [optional] [enum: json, xml]
pretty Boolean Add to make the Web-API pretty print the response (useful for debugging your requests) [optional]

Return type

BlockOperation

Authorization

ApiKeyHeader, ApiKeyQuery

HTTP request headers

  • Content-Type: application/json, application/xml
  • Accept: application/json, application/xml

deleteBlockOperation

BlockOperation deleteBlockOperation(uuid, details, accept, pretty)

Stop a block operation

Cancel a pending or running block operation. THIS DOES NOT UNDO THE BLOCK CHANGES Required permissions: - block.op.delete

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.BlockApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: ApiKeyHeader
ApiKeyAuth ApiKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyHeader");
ApiKeyHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyHeader.setApiKeyPrefix("Token");

// Configure API key authorization: ApiKeyQuery
ApiKeyAuth ApiKeyQuery = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyQuery");
ApiKeyQuery.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyQuery.setApiKeyPrefix("Token");

BlockApi apiInstance = new BlockApi();
UUID uuid = new UUID(); // UUID | The uuid of the block operation
Boolean details = true; // Boolean | Add to include additional details, omit or false otherwise
String accept = "accept_example"; // String | Override the 'Accept' request header (useful for debugging your requests)
Boolean pretty = true; // Boolean | Add to make the Web-API pretty print the response (useful for debugging your requests)
try {
    BlockOperation result = apiInstance.deleteBlockOperation(uuid, details, accept, pretty);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling BlockApi#deleteBlockOperation");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
uuid UUID The uuid of the block operation
details Boolean Add to include additional details, omit or false otherwise [optional]
accept String Override the 'Accept' request header (useful for debugging your requests) [optional] [enum: json, xml]
pretty Boolean Add to make the Web-API pretty print the response (useful for debugging your requests) [optional]

Return type

BlockOperation

Authorization

ApiKeyHeader, ApiKeyQuery

HTTP request headers

  • Content-Type: application/json, application/xml
  • Accept: application/json, application/xml

getBlock

BlockState getBlock(world, x, y, z, details, accept, pretty)

Get a block

Gets information about one block in the world. Required permissions: - block.one

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.BlockApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: ApiKeyHeader
ApiKeyAuth ApiKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyHeader");
ApiKeyHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyHeader.setApiKeyPrefix("Token");

// Configure API key authorization: ApiKeyQuery
ApiKeyAuth ApiKeyQuery = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyQuery");
ApiKeyQuery.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyQuery.setApiKeyPrefix("Token");

BlockApi apiInstance = new BlockApi();
String world = "world_example"; // String | The uuid of the world to get the block from
Integer x = 56; // Integer | The x-coordinate of the block
Integer y = 56; // Integer | The y-coordinate of the block
Integer z = 56; // Integer | The z-coordinate of the block
Boolean details = true; // Boolean | Add to include additional details, omit or false otherwise
String accept = "accept_example"; // String | Override the 'Accept' request header (useful for debugging your requests)
Boolean pretty = true; // Boolean | Add to make the Web-API pretty print the response (useful for debugging your requests)
try {
    BlockState result = apiInstance.getBlock(world, x, y, z, details, accept, pretty);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling BlockApi#getBlock");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
world String The uuid of the world to get the block from
x Integer The x-coordinate of the block
y Integer The y-coordinate of the block
z Integer The z-coordinate of the block
details Boolean Add to include additional details, omit or false otherwise [optional]
accept String Override the 'Accept' request header (useful for debugging your requests) [optional] [enum: json, xml]
pretty Boolean Add to make the Web-API pretty print the response (useful for debugging your requests) [optional]

Return type

BlockState

Authorization

ApiKeyHeader, ApiKeyQuery

HTTP request headers

  • Content-Type: application/json, application/xml
  • Accept: application/json, application/xml

getBlockOperation

BlockOperation getBlockOperation(uuid, details, accept, pretty)

Get a block operation

Gets details about a specific block operation Required permissions: - block.op.one

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.BlockApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: ApiKeyHeader
ApiKeyAuth ApiKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyHeader");
ApiKeyHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyHeader.setApiKeyPrefix("Token");

// Configure API key authorization: ApiKeyQuery
ApiKeyAuth ApiKeyQuery = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyQuery");
ApiKeyQuery.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyQuery.setApiKeyPrefix("Token");

BlockApi apiInstance = new BlockApi();
UUID uuid = new UUID(); // UUID | The uuid of the block operation
Boolean details = true; // Boolean | Add to include additional details, omit or false otherwise
String accept = "accept_example"; // String | Override the 'Accept' request header (useful for debugging your requests)
Boolean pretty = true; // Boolean | Add to make the Web-API pretty print the response (useful for debugging your requests)
try {
    BlockOperation result = apiInstance.getBlockOperation(uuid, details, accept, pretty);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling BlockApi#getBlockOperation");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
uuid UUID The uuid of the block operation
details Boolean Add to include additional details, omit or false otherwise [optional]
accept String Override the 'Accept' request header (useful for debugging your requests) [optional] [enum: json, xml]
pretty Boolean Add to make the Web-API pretty print the response (useful for debugging your requests) [optional]

Return type

BlockOperation

Authorization

ApiKeyHeader, ApiKeyQuery

HTTP request headers

  • Content-Type: application/json, application/xml
  • Accept: application/json, application/xml

listBlockOperations

List<BlockOperation> listBlockOperations(details, accept, pretty)

List block operations

Returns a list of all the currently running block operations. Required permissions: - block.op.list

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.BlockApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: ApiKeyHeader
ApiKeyAuth ApiKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyHeader");
ApiKeyHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyHeader.setApiKeyPrefix("Token");

// Configure API key authorization: ApiKeyQuery
ApiKeyAuth ApiKeyQuery = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyQuery");
ApiKeyQuery.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyQuery.setApiKeyPrefix("Token");

BlockApi apiInstance = new BlockApi();
Boolean details = true; // Boolean | Add to include additional details, omit or false otherwise
String accept = "accept_example"; // String | Override the 'Accept' request header (useful for debugging your requests)
Boolean pretty = true; // Boolean | Add to make the Web-API pretty print the response (useful for debugging your requests)
try {
    List<BlockOperation> result = apiInstance.listBlockOperations(details, accept, pretty);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling BlockApi#listBlockOperations");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
details Boolean Add to include additional details, omit or false otherwise [optional]
accept String Override the 'Accept' request header (useful for debugging your requests) [optional] [enum: json, xml]
pretty Boolean Add to make the Web-API pretty print the response (useful for debugging your requests) [optional]

Return type

List<BlockOperation>

Authorization

ApiKeyHeader, ApiKeyQuery

HTTP request headers

  • Content-Type: application/json, application/xml
  • Accept: application/json, application/xml

modifyBlockOperation

BlockOperation modifyBlockOperation(uuid, body, details, accept, pretty)

Modify a block operation

Modify an existing block operation to either pause or continue it. Required permissions: - block.op.modify

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.BlockApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: ApiKeyHeader
ApiKeyAuth ApiKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyHeader");
ApiKeyHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyHeader.setApiKeyPrefix("Token");

// Configure API key authorization: ApiKeyQuery
ApiKeyAuth ApiKeyQuery = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyQuery");
ApiKeyQuery.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyQuery.setApiKeyPrefix("Token");

BlockApi apiInstance = new BlockApi();
UUID uuid = new UUID(); // UUID | The uuid of the block operation
ModifyBlockOperationRequest body = new ModifyBlockOperationRequest(); // ModifyBlockOperationRequest | 
Boolean details = true; // Boolean | Add to include additional details, omit or false otherwise
String accept = "accept_example"; // String | Override the 'Accept' request header (useful for debugging your requests)
Boolean pretty = true; // Boolean | Add to make the Web-API pretty print the response (useful for debugging your requests)
try {
    BlockOperation result = apiInstance.modifyBlockOperation(uuid, body, details, accept, pretty);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling BlockApi#modifyBlockOperation");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
uuid UUID The uuid of the block operation
body ModifyBlockOperationRequest [optional]
details Boolean Add to include additional details, omit or false otherwise [optional]
accept String Override the 'Accept' request header (useful for debugging your requests) [optional] [enum: json, xml]
pretty Boolean Add to make the Web-API pretty print the response (useful for debugging your requests) [optional]

Return type

BlockOperation

Authorization

ApiKeyHeader, ApiKeyQuery

HTTP request headers

  • Content-Type: application/json, application/xml
  • Accept: application/json, application/xml