All URIs are relative to https://localhost/api/v5
Method | HTTP request | Description |
---|---|---|
create_region | POST /red-protect/region | Create a region |
delete_region | DELETE /red-protect/region/{id} | Delete a region |
get_region | GET /red-protect/region/{id} | Get a region |
list_regions | GET /red-protect/region | List regions |
modify_region | PUT /red-protect/region/{id} | Modify a region |
RedProtectRegion create_region(body=body, details=details, accept=accept, pretty=pretty)
Create a region
Create a new region at a specified location Required permissions: - red-protect.region.create
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: ApiKeyHeader
configuration = swagger_client.Configuration()
configuration.api_key['X-WebAPI-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-WebAPI-Key'] = 'Bearer'
# Configure API key authorization: ApiKeyQuery
configuration = swagger_client.Configuration()
configuration.api_key['key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.RedProtectApi(swagger_client.ApiClient(configuration))
body = swagger_client.RedProtectRegion() # RedProtectRegion | (optional)
details = true # bool | Add to include additional details, omit or false otherwise (optional)
accept = 'accept_example' # str | Override the 'Accept' request header (useful for debugging your requests) (optional)
pretty = true # bool | Add to make the Web-API pretty print the response (useful for debugging your requests) (optional)
try:
# Create a region
api_response = api_instance.create_region(body=body, details=details, accept=accept, pretty=pretty)
pprint(api_response)
except ApiException as e:
print("Exception when calling RedProtectApi->create_region: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
body | RedProtectRegion | [optional] | |
details | bool | Add to include additional details, omit or false otherwise | [optional] |
accept | str | Override the 'Accept' request header (useful for debugging your requests) | [optional] |
pretty | bool | Add to make the Web-API pretty print the response (useful for debugging your requests) | [optional] |
- Content-Type: application/json, application/xml
- Accept: application/json, application/xml
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RedProtectRegion delete_region(id, details=details, accept=accept, pretty=pretty)
Delete a region
Remove the specified protected region Required permissions: - red-protect.region.delete
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: ApiKeyHeader
configuration = swagger_client.Configuration()
configuration.api_key['X-WebAPI-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-WebAPI-Key'] = 'Bearer'
# Configure API key authorization: ApiKeyQuery
configuration = swagger_client.Configuration()
configuration.api_key['key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.RedProtectApi(swagger_client.ApiClient(configuration))
id = 'id_example' # str |
details = true # bool | Add to include additional details, omit or false otherwise (optional)
accept = 'accept_example' # str | Override the 'Accept' request header (useful for debugging your requests) (optional)
pretty = true # bool | Add to make the Web-API pretty print the response (useful for debugging your requests) (optional)
try:
# Delete a region
api_response = api_instance.delete_region(id, details=details, accept=accept, pretty=pretty)
pprint(api_response)
except ApiException as e:
print("Exception when calling RedProtectApi->delete_region: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | ||
details | bool | Add to include additional details, omit or false otherwise | [optional] |
accept | str | Override the 'Accept' request header (useful for debugging your requests) | [optional] |
pretty | bool | Add to make the Web-API pretty print the response (useful for debugging your requests) | [optional] |
- Content-Type: application/json, application/xml
- Accept: application/json, application/xml
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RedProtectRegion get_region(id, details=details, accept=accept, pretty=pretty)
Get a region
Get details for a specific protected region Required permissions: - red-protect.region.one
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: ApiKeyHeader
configuration = swagger_client.Configuration()
configuration.api_key['X-WebAPI-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-WebAPI-Key'] = 'Bearer'
# Configure API key authorization: ApiKeyQuery
configuration = swagger_client.Configuration()
configuration.api_key['key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.RedProtectApi(swagger_client.ApiClient(configuration))
id = 'id_example' # str |
details = true # bool | Add to include additional details, omit or false otherwise (optional)
accept = 'accept_example' # str | Override the 'Accept' request header (useful for debugging your requests) (optional)
pretty = true # bool | Add to make the Web-API pretty print the response (useful for debugging your requests) (optional)
try:
# Get a region
api_response = api_instance.get_region(id, details=details, accept=accept, pretty=pretty)
pprint(api_response)
except ApiException as e:
print("Exception when calling RedProtectApi->get_region: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | ||
details | bool | Add to include additional details, omit or false otherwise | [optional] |
accept | str | Override the 'Accept' request header (useful for debugging your requests) | [optional] |
pretty | bool | Add to make the Web-API pretty print the response (useful for debugging your requests) | [optional] |
- Content-Type: application/json, application/xml
- Accept: application/json, application/xml
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list[RedProtectRegion] list_regions(world=world, details=details, accept=accept, pretty=pretty)
List regions
Lists all the regions being protected Required permissions: - red-protect.region.list
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: ApiKeyHeader
configuration = swagger_client.Configuration()
configuration.api_key['X-WebAPI-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-WebAPI-Key'] = 'Bearer'
# Configure API key authorization: ApiKeyQuery
configuration = swagger_client.Configuration()
configuration.api_key['key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.RedProtectApi(swagger_client.ApiClient(configuration))
world = 'world_example' # str | (optional)
details = true # bool | Add to include additional details, omit or false otherwise (optional)
accept = 'accept_example' # str | Override the 'Accept' request header (useful for debugging your requests) (optional)
pretty = true # bool | Add to make the Web-API pretty print the response (useful for debugging your requests) (optional)
try:
# List regions
api_response = api_instance.list_regions(world=world, details=details, accept=accept, pretty=pretty)
pprint(api_response)
except ApiException as e:
print("Exception when calling RedProtectApi->list_regions: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
world | str | [optional] | |
details | bool | Add to include additional details, omit or false otherwise | [optional] |
accept | str | Override the 'Accept' request header (useful for debugging your requests) | [optional] |
pretty | bool | Add to make the Web-API pretty print the response (useful for debugging your requests) | [optional] |
- Content-Type: application/json, application/xml
- Accept: application/json, application/xml
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RedProtectRegion modify_region(id, body=body, details=details, accept=accept, pretty=pretty)
Modify a region
Update the details for a specific protected region Required permissions: - red-protect.region.modify
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: ApiKeyHeader
configuration = swagger_client.Configuration()
configuration.api_key['X-WebAPI-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-WebAPI-Key'] = 'Bearer'
# Configure API key authorization: ApiKeyQuery
configuration = swagger_client.Configuration()
configuration.api_key['key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.RedProtectApi(swagger_client.ApiClient(configuration))
id = 'id_example' # str |
body = swagger_client.RedProtectRegion() # RedProtectRegion | (optional)
details = true # bool | Add to include additional details, omit or false otherwise (optional)
accept = 'accept_example' # str | Override the 'Accept' request header (useful for debugging your requests) (optional)
pretty = true # bool | Add to make the Web-API pretty print the response (useful for debugging your requests) (optional)
try:
# Modify a region
api_response = api_instance.modify_region(id, body=body, details=details, accept=accept, pretty=pretty)
pprint(api_response)
except ApiException as e:
print("Exception when calling RedProtectApi->modify_region: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | ||
body | RedProtectRegion | [optional] | |
details | bool | Add to include additional details, omit or false otherwise | [optional] |
accept | str | Override the 'Accept' request header (useful for debugging your requests) | [optional] |
pretty | bool | Add to make the Web-API pretty print the response (useful for debugging your requests) | [optional] |
- Content-Type: application/json, application/xml
- Accept: application/json, application/xml
[Back to top] [Back to API list] [Back to Model list] [Back to README]