Skip to content

Latest commit

 

History

History
577 lines (420 loc) · 22.3 KB

File metadata and controls

577 lines (420 loc) · 22.3 KB

actinia_openapi_python_client.ResourceManagementApi

All URIs are relative to http://localhost

Method HTTP request Description
resource_storage_delete DELETE /resource_storage Clean the resource storage and remove all cached data
resource_storage_get GET /resource_storage Get the current size of the resource storage
resources_user_id_delete DELETE /resources/{user_id} Terminate all accepted and running resources of the specified user.
resources_user_id_get GET /resources/{user_id} Get a list of resources that have been generated by the specified user.
resources_user_id_resource_id_delete DELETE /resources/{user_id}/{resource_id} Request the termination of a resource.
resources_user_id_resource_id_get GET /resources/{user_id}/{resource_id} Get the status of a resource.
resources_user_id_resource_id_put PUT /resources/{user_id}/{resource_id} Updates/Resumes the status of a resource.

resource_storage_delete

ProcessingResponseModel resource_storage_delete(olderthan=olderthan)

Clean the resource storage and remove all cached data

Clean the resource storage and remove all cached data. Minimum required user role: admin.

Example

  • Basic Authentication (basicAuth):
import time
import os
import actinia_openapi_python_client
from actinia_openapi_python_client.models.processing_response_model import ProcessingResponseModel
from actinia_openapi_python_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = actinia_openapi_python_client.Configuration(
    host = "http://localhost"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basicAuth
configuration = actinia_openapi_python_client.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Enter a context with an instance of the API client
with actinia_openapi_python_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = actinia_openapi_python_client.ResourceManagementApi(api_client)
    olderthan = 3.4 # float | Number of days to delete the resource files. If this parameter is set all resources older than this number of days will be deleted. (optional)

    try:
        # Clean the resource storage and remove all cached data
        api_response = api_instance.resource_storage_delete(olderthan=olderthan)
        print("The response of ResourceManagementApi->resource_storage_delete:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ResourceManagementApi->resource_storage_delete: %s\n" % e)

Parameters

Name Type Description Notes
olderthan float Number of days to delete the resource files. If this parameter is set all resources older than this number of days will be deleted. [optional]

Return type

ProcessingResponseModel

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 Processing status of resource storage deletion -
400 The error message why resource storage cleaning did not succeeded -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

resource_storage_get

StorageResponseModel resource_storage_get()

Get the current size of the resource storage

Get the current size of the resource storage. Minimum required user role: admin.

Example

  • Basic Authentication (basicAuth):
import time
import os
import actinia_openapi_python_client
from actinia_openapi_python_client.models.storage_response_model import StorageResponseModel
from actinia_openapi_python_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = actinia_openapi_python_client.Configuration(
    host = "http://localhost"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basicAuth
configuration = actinia_openapi_python_client.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Enter a context with an instance of the API client
with actinia_openapi_python_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = actinia_openapi_python_client.ResourceManagementApi(api_client)

    try:
        # Get the current size of the resource storage
        api_response = api_instance.resource_storage_get()
        print("The response of ResourceManagementApi->resource_storage_get:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ResourceManagementApi->resource_storage_get: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

StorageResponseModel

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 The current state of the resource storage -
400 The error message why resource storage information gathering did not succeeded -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

resources_user_id_delete

SimpleResponseModel resources_user_id_delete(user_id)

Terminate all accepted and running resources of the specified user.

Terminate all accepted and running resources of the specified user. Minimum required user role: user.

Example

  • Basic Authentication (basicAuth):
import time
import os
import actinia_openapi_python_client
from actinia_openapi_python_client.models.simple_response_model import SimpleResponseModel
from actinia_openapi_python_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = actinia_openapi_python_client.Configuration(
    host = "http://localhost"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basicAuth
configuration = actinia_openapi_python_client.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Enter a context with an instance of the API client
with actinia_openapi_python_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = actinia_openapi_python_client.ResourceManagementApi(api_client)
    user_id = 'user_id_example' # str | The unique user name/id

    try:
        # Terminate all accepted and running resources of the specified user.
        api_response = api_instance.resources_user_id_delete(user_id)
        print("The response of ResourceManagementApi->resources_user_id_delete:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ResourceManagementApi->resources_user_id_delete: %s\n" % e)

Parameters

Name Type Description Notes
user_id str The unique user name/id

Return type

SimpleResponseModel

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 Termination requests have been successfully committed. Be aware that does not mean, that the resources have been successfully terminated. -
401 The error message why the resource termination did not succeeded -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

resources_user_id_get

ProcessingResponseListModel resources_user_id_get(user_id, num=num, type=type)

Get a list of resources that have been generated by the specified user.

Get a list of resources that have been generated by the specified user. Minimum required user role: user.

Example

  • Basic Authentication (basicAuth):
import time
import os
import actinia_openapi_python_client
from actinia_openapi_python_client.models.processing_response_list_model import ProcessingResponseListModel
from actinia_openapi_python_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = actinia_openapi_python_client.Configuration(
    host = "http://localhost"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basicAuth
configuration = actinia_openapi_python_client.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Enter a context with an instance of the API client
with actinia_openapi_python_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = actinia_openapi_python_client.ResourceManagementApi(api_client)
    user_id = 'user_id_example' # str | The unique user name/id
    num = 56 # int | The maximum number of jobs that should be returned (optional)
    type = 'type_example' # str | The type of job that should be returned: accepted, running, error, terminated, finished (optional)

    try:
        # Get a list of resources that have been generated by the specified user.
        api_response = api_instance.resources_user_id_get(user_id, num=num, type=type)
        print("The response of ResourceManagementApi->resources_user_id_get:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ResourceManagementApi->resources_user_id_get: %s\n" % e)

Parameters

Name Type Description Notes
user_id str The unique user name/id
num int The maximum number of jobs that should be returned [optional]
type str The type of job that should be returned: accepted, running, error, terminated, finished [optional]

Return type

ProcessingResponseListModel

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 Returned a list of resources that have been generated by the specified user. -
401 The error message why resource gathering did not succeeded -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

resources_user_id_resource_id_delete

SimpleResponseModel resources_user_id_resource_id_delete(user_id, resource_id)

Request the termination of a resource.

Request the termination of a resource. Minimum required user role: user.

Example

  • Basic Authentication (basicAuth):
import time
import os
import actinia_openapi_python_client
from actinia_openapi_python_client.models.simple_response_model import SimpleResponseModel
from actinia_openapi_python_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = actinia_openapi_python_client.Configuration(
    host = "http://localhost"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basicAuth
configuration = actinia_openapi_python_client.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Enter a context with an instance of the API client
with actinia_openapi_python_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = actinia_openapi_python_client.ResourceManagementApi(api_client)
    user_id = 'user_id_example' # str | The unique user name/id
    resource_id = 'resource_id_example' # str | The id of the resource

    try:
        # Request the termination of a resource.
        api_response = api_instance.resources_user_id_resource_id_delete(user_id, resource_id)
        print("The response of ResourceManagementApi->resources_user_id_resource_id_delete:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ResourceManagementApi->resources_user_id_resource_id_delete: %s\n" % e)

Parameters

Name Type Description Notes
user_id str The unique user name/id
resource_id str The id of the resource

Return type

SimpleResponseModel

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 Returned if termination request of the resource was successfully committed. Be aware that this does not mean, that the resource was successfully terminated. -
400 The error message why resource storage information gathering did not succeeded -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

resources_user_id_resource_id_get

ProcessingResponseModel resources_user_id_resource_id_get(user_id, resource_id)

Get the status of a resource.

Get the status of a resource. Minimum required user role: user.

Example

  • Basic Authentication (basicAuth):
import time
import os
import actinia_openapi_python_client
from actinia_openapi_python_client.models.processing_response_model import ProcessingResponseModel
from actinia_openapi_python_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = actinia_openapi_python_client.Configuration(
    host = "http://localhost"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basicAuth
configuration = actinia_openapi_python_client.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Enter a context with an instance of the API client
with actinia_openapi_python_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = actinia_openapi_python_client.ResourceManagementApi(api_client)
    user_id = 'user_id_example' # str | The unique user name/id
    resource_id = 'resource_id_example' # str | The id of the resource

    try:
        # Get the status of a resource.
        api_response = api_instance.resources_user_id_resource_id_get(user_id, resource_id)
        print("The response of ResourceManagementApi->resources_user_id_resource_id_get:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ResourceManagementApi->resources_user_id_resource_id_get: %s\n" % e)

Parameters

Name Type Description Notes
user_id str The unique user name/id
resource_id str The id of the resource

Return type

ProcessingResponseModel

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 The current state of the resource -
400 The error message if the resource does not exists -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

resources_user_id_resource_id_put

ProcessingResponseModel resources_user_id_resource_id_put(user_id, resource_id, process_chain)

Updates/Resumes the status of a resource.

Updates/Resumes the status of a failed resource. This assumes that 'save_interim_results' is configured. The job will restart at the step before the failed one and execute these steps in the possibly corrected process chain sent along with it. If 'save_interim_results' is set to 'True' the temporary mapset is saved before the failed step and the resumption should work without any problem. But if 'save_interim_results' is set to 'onError' the temporary mapset is only saved if an error occurs and so the mapset may contain changes from the failed step what may make resumption difficult or impossible. In the event of such an error, the process chain can then be adjusted so that the missing data is generated again, or the entire process can be started as a new job.Minimum required user role: user.

Example

  • Basic Authentication (basicAuth):
import time
import os
import actinia_openapi_python_client
from actinia_openapi_python_client.models.process_chain_model import ProcessChainModel
from actinia_openapi_python_client.models.processing_response_model import ProcessingResponseModel
from actinia_openapi_python_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = actinia_openapi_python_client.Configuration(
    host = "http://localhost"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basicAuth
configuration = actinia_openapi_python_client.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Enter a context with an instance of the API client
with actinia_openapi_python_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = actinia_openapi_python_client.ResourceManagementApi(api_client)
    user_id = 'user_id_example' # str | The unique user name/id
    resource_id = 'resource_id_example' # str | The id of the resource
    process_chain = actinia_openapi_python_client.ProcessChainModel() # ProcessChainModel | The process chain that should be executed

    try:
        # Updates/Resumes the status of a resource.
        api_response = api_instance.resources_user_id_resource_id_put(user_id, resource_id, process_chain)
        print("The response of ResourceManagementApi->resources_user_id_resource_id_put:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ResourceManagementApi->resources_user_id_resource_id_put: %s\n" % e)

Parameters

Name Type Description Notes
user_id str The unique user name/id
resource_id str The id of the resource
process_chain ProcessChainModel The process chain that should be executed

Return type

ProcessingResponseModel

Authorization

basicAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 The current state of the resource -
400 The error message if the resource does not exists -

[Back to top] [Back to API list] [Back to Model list] [Back to README]