Skip to content

Latest commit

 

History

History
138 lines (102 loc) · 5.69 KB

ServerApi.md

File metadata and controls

138 lines (102 loc) · 5.69 KB

swagger_client.ServerApi

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

Method HTTP request Description
list_properties GET /server/properties List server properties
modify_properties PUT /server/properties Modify server properties

list_properties

list[ServerProperty] list_properties(details=details, accept=accept, pretty=pretty)

List server properties

Get the main server properties (server.properties file). Required permissions: - server.properties.list

Example

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.ServerApi(swagger_client.ApiClient(configuration))
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 server properties
    api_response = api_instance.list_properties(details=details, accept=accept, pretty=pretty)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ServerApi->list_properties: %s\n" % e)

Parameters

Name Type Description Notes
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]

Return type

list[ServerProperty]

Authorization

ApiKeyHeader, ApiKeyQuery

HTTP request headers

  • 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]

modify_properties

list[ServerProperty] modify_properties(body=body, details=details, accept=accept, pretty=pretty)

Modify server properties

Modify settings in the server.properties file. **Note that these settings don't take effect until you restart the server. Required permissions: - server.properties.modify - server.properties.modify.[property]

Example

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.ServerApi(swagger_client.ApiClient(configuration))
body = NULL # object |  (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 server properties
    api_response = api_instance.modify_properties(body=body, details=details, accept=accept, pretty=pretty)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ServerApi->modify_properties: %s\n" % e)

Parameters

Name Type Description Notes
body object [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]

Return type

list[ServerProperty]

Authorization

ApiKeyHeader, ApiKeyQuery

HTTP request headers

  • 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]