Skip to content

Latest commit

 

History

History
406 lines (267 loc) · 12.9 KB

File metadata and controls

406 lines (267 loc) · 12.9 KB

cyperf.LicenseServersApi

All URIs are relative to http://localhost

Method HTTP request Description
create_license_servers POST /api/v2/license-servers
delete_license_server DELETE /api/v2/license-servers/{licenseServerId}
get_license_server_by_id GET /api/v2/license-servers/{licenseServerId}
get_license_servers GET /api/v2/license-servers
patch_license_server PATCH /api/v2/license-servers/{licenseServerId}

create_license_servers

List[LicenseServerMetadata] create_license_servers(license_servers=license_servers)

Register a license server.

Example

  • OAuth Authentication (OAuth2):
  • OAuth Authentication (OAuth2):
import cyperf
from cyperf.models.license_server_metadata import LicenseServerMetadata
from cyperf.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 = cyperf.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.

configuration.refresh_token = os.environ["OFFLINE_TOKEN_FROM_CYPERF_UI"]

configuration.refresh_token = os.environ["OFFLINE_TOKEN_FROM_CYPERF_UI"]

# Enter a context with an instance of the API client
with cyperf.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = cyperf.LicenseServersApi(api_client)
    license_servers = [cyperf.LicenseServerMetadata()] # List[LicenseServerMetadata] |  (optional)

    try:
        api_response = api_instance.create_license_servers(license_servers=license_servers)
        print("The response of LicenseServersApi->create_license_servers:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling LicenseServersApi->create_license_servers: %s\n" % e)

Parameters

Name Type Description Notes
license_servers List[LicenseServerMetadata] [optional]

Return type

List[LicenseServerMetadata]

Authorization

OAuth2, OAuth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 The license server that was registered -
400 Bad request -
500 Unexpected error -

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

delete_license_server

delete_license_server(license_server_id)

Remove a particular license server.

Example

  • OAuth Authentication (OAuth2):
  • OAuth Authentication (OAuth2):
import cyperf
from cyperf.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 = cyperf.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.

configuration.refresh_token = os.environ["OFFLINE_TOKEN_FROM_CYPERF_UI"]

configuration.refresh_token = os.environ["OFFLINE_TOKEN_FROM_CYPERF_UI"]

# Enter a context with an instance of the API client
with cyperf.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = cyperf.LicenseServersApi(api_client)
    license_server_id = 'license_server_id_example' # str | The ID of the license server.

    try:
        api_instance.delete_license_server(license_server_id)
    except Exception as e:
        print("Exception when calling LicenseServersApi->delete_license_server: %s\n" % e)

Parameters

Name Type Description Notes
license_server_id str The ID of the license server.

Return type

void (empty response body)

Authorization

OAuth2, OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
204 The license server was successfully removed. -
404 A license server with the specified ID was not found. -
500 Unexpected error -

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

get_license_server_by_id

LicenseServerMetadata get_license_server_by_id(license_server_id)

Get a particular license server.

Example

  • OAuth Authentication (OAuth2):
  • OAuth Authentication (OAuth2):
import cyperf
from cyperf.models.license_server_metadata import LicenseServerMetadata
from cyperf.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 = cyperf.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.

configuration.refresh_token = os.environ["OFFLINE_TOKEN_FROM_CYPERF_UI"]

configuration.refresh_token = os.environ["OFFLINE_TOKEN_FROM_CYPERF_UI"]

# Enter a context with an instance of the API client
with cyperf.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = cyperf.LicenseServersApi(api_client)
    license_server_id = 'license_server_id_example' # str | The ID of the license server.

    try:
        api_response = api_instance.get_license_server_by_id(license_server_id)
        print("The response of LicenseServersApi->get_license_server_by_id:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling LicenseServersApi->get_license_server_by_id: %s\n" % e)

Parameters

Name Type Description Notes
license_server_id str The ID of the license server.

Return type

LicenseServerMetadata

Authorization

OAuth2, OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 The requested license server -
404 A license server with the specified ID was not found. -
500 Unexpected error -

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

get_license_servers

GetLicenseServers200Response get_license_servers(take=take, skip=skip)

Get all the currently available license servers.

Example

  • OAuth Authentication (OAuth2):
  • OAuth Authentication (OAuth2):
import cyperf
from cyperf.models.get_license_servers200_response import GetLicenseServers200Response
from cyperf.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 = cyperf.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.

configuration.refresh_token = os.environ["OFFLINE_TOKEN_FROM_CYPERF_UI"]

configuration.refresh_token = os.environ["OFFLINE_TOKEN_FROM_CYPERF_UI"]

# Enter a context with an instance of the API client
with cyperf.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = cyperf.LicenseServersApi(api_client)
    take = 56 # int | The number of search results to return (optional)
    skip = 56 # int | The number of search results to skip (optional)

    try:
        api_response = api_instance.get_license_servers(take=take, skip=skip)
        print("The response of LicenseServersApi->get_license_servers:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling LicenseServersApi->get_license_servers: %s\n" % e)

Parameters

Name Type Description Notes
take int The number of search results to return [optional]
skip int The number of search results to skip [optional]

Return type

GetLicenseServers200Response

Authorization

OAuth2, OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 The list of license servers -
500 Unexpected error -

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

patch_license_server

patch_license_server(license_server_id, license_server_metadata=license_server_metadata)

Update a particular license server.

Example

  • OAuth Authentication (OAuth2):
  • OAuth Authentication (OAuth2):
import cyperf
from cyperf.models.license_server_metadata import LicenseServerMetadata
from cyperf.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 = cyperf.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.

configuration.refresh_token = os.environ["OFFLINE_TOKEN_FROM_CYPERF_UI"]

configuration.refresh_token = os.environ["OFFLINE_TOKEN_FROM_CYPERF_UI"]

# Enter a context with an instance of the API client
with cyperf.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = cyperf.LicenseServersApi(api_client)
    license_server_id = 'license_server_id_example' # str | The ID of the license server.
    license_server_metadata = cyperf.LicenseServerMetadata() # LicenseServerMetadata |  (optional)

    try:
        api_instance.patch_license_server(license_server_id, license_server_metadata=license_server_metadata)
    except Exception as e:
        print("Exception when calling LicenseServersApi->patch_license_server: %s\n" % e)

Parameters

Name Type Description Notes
license_server_id str The ID of the license server.
license_server_metadata LicenseServerMetadata [optional]

Return type

void (empty response body)

Authorization

OAuth2, OAuth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 The updated license server -
404 A license server with the specified ID was not found. -
500 Unexpected error -

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