Skip to content

Latest commit

 

History

History
516 lines (362 loc) · 16.2 KB

File metadata and controls

516 lines (362 loc) · 16.2 KB

halo_client.CounterV1alpha1Api

All URIs are relative to http://localhost:8091

Method HTTP request Description
create_counter POST /apis/metrics.halo.run/v1alpha1/counters
delete_counter DELETE /apis/metrics.halo.run/v1alpha1/counters/{name}
get_counter GET /apis/metrics.halo.run/v1alpha1/counters/{name}
list_counter GET /apis/metrics.halo.run/v1alpha1/counters
patch_counter PATCH /apis/metrics.halo.run/v1alpha1/counters/{name}
update_counter PUT /apis/metrics.halo.run/v1alpha1/counters/{name}

create_counter

Counter create_counter(counter=counter)

Create Counter

Example

  • Basic Authentication (basicAuth):
  • Bearer (JWT) Authentication (bearerAuth):
import halo_client
from halo_client.models.counter import Counter
from halo_client.rest import ApiException
from pprint import pprint

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

# 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 = halo_client.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure Bearer authorization (JWT): bearerAuth
configuration = halo_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with halo_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = halo_client.CounterV1alpha1Api(api_client)
    counter = halo_client.Counter() # Counter | Fresh counter (optional)

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

Parameters

Name Type Description Notes
counter Counter Fresh counter [optional]

Return type

Counter

Authorization

basicAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 Response counters created just now -

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

delete_counter

delete_counter(name)

Delete Counter

Example

  • Basic Authentication (basicAuth):
  • Bearer (JWT) Authentication (bearerAuth):
import halo_client
from halo_client.rest import ApiException
from pprint import pprint

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

# 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 = halo_client.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure Bearer authorization (JWT): bearerAuth
configuration = halo_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with halo_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = halo_client.CounterV1alpha1Api(api_client)
    name = 'name_example' # str | Name of counter

    try:
        api_instance.delete_counter(name)
    except Exception as e:
        print("Exception when calling CounterV1alpha1Api->delete_counter: %s\n" % e)

Parameters

Name Type Description Notes
name str Name of counter

Return type

void (empty response body)

Authorization

basicAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 Response counter deleted just now -

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

get_counter

Counter get_counter(name)

Get Counter

Example

  • Basic Authentication (basicAuth):
  • Bearer (JWT) Authentication (bearerAuth):
import halo_client
from halo_client.models.counter import Counter
from halo_client.rest import ApiException
from pprint import pprint

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

# 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 = halo_client.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure Bearer authorization (JWT): bearerAuth
configuration = halo_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with halo_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = halo_client.CounterV1alpha1Api(api_client)
    name = 'name_example' # str | Name of counter

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

Parameters

Name Type Description Notes
name str Name of counter

Return type

Counter

Authorization

basicAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 Response single counter -

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

list_counter

CounterList list_counter(page=page, size=size, label_selector=label_selector, field_selector=field_selector, sort=sort)

List Counter

Example

  • Basic Authentication (basicAuth):
  • Bearer (JWT) Authentication (bearerAuth):
import halo_client
from halo_client.models.counter_list import CounterList
from halo_client.rest import ApiException
from pprint import pprint

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

# 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 = halo_client.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure Bearer authorization (JWT): bearerAuth
configuration = halo_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with halo_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = halo_client.CounterV1alpha1Api(api_client)
    page = 56 # int | Page number. Default is 0. (optional)
    size = 56 # int | Size number. Default is 0. (optional)
    label_selector = ['label_selector_example'] # List[str] | Label selector. e.g.: hidden!=true (optional)
    field_selector = ['field_selector_example'] # List[str] | Field selector. e.g.: metadata.name==halo (optional)
    sort = ['sort_example'] # List[str] | Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional)

    try:
        api_response = api_instance.list_counter(page=page, size=size, label_selector=label_selector, field_selector=field_selector, sort=sort)
        print("The response of CounterV1alpha1Api->list_counter:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling CounterV1alpha1Api->list_counter: %s\n" % e)

Parameters

Name Type Description Notes
page int Page number. Default is 0. [optional]
size int Size number. Default is 0. [optional]
label_selector List[str] Label selector. e.g.: hidden!=true [optional]
field_selector List[str] Field selector. e.g.: metadata.name==halo [optional]
sort List[str] Sorting criteria in the format: property,(asc desc). Default sort order is ascending. Multiple sort criteria are supported.

Return type

CounterList

Authorization

basicAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 Response counters -

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

patch_counter

Counter patch_counter(name, json_patch_inner=json_patch_inner)

Patch Counter

Example

  • Basic Authentication (basicAuth):
  • Bearer (JWT) Authentication (bearerAuth):
import halo_client
from halo_client.models.counter import Counter
from halo_client.models.json_patch_inner import JsonPatchInner
from halo_client.rest import ApiException
from pprint import pprint

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

# 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 = halo_client.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure Bearer authorization (JWT): bearerAuth
configuration = halo_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with halo_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = halo_client.CounterV1alpha1Api(api_client)
    name = 'name_example' # str | Name of counter
    json_patch_inner = [halo_client.JsonPatchInner()] # List[JsonPatchInner] |  (optional)

    try:
        api_response = api_instance.patch_counter(name, json_patch_inner=json_patch_inner)
        print("The response of CounterV1alpha1Api->patch_counter:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling CounterV1alpha1Api->patch_counter: %s\n" % e)

Parameters

Name Type Description Notes
name str Name of counter
json_patch_inner List[JsonPatchInner] [optional]

Return type

Counter

Authorization

basicAuth, bearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Response counter patched just now -

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

update_counter

Counter update_counter(name, counter=counter)

Update Counter

Example

  • Basic Authentication (basicAuth):
  • Bearer (JWT) Authentication (bearerAuth):
import halo_client
from halo_client.models.counter import Counter
from halo_client.rest import ApiException
from pprint import pprint

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

# 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 = halo_client.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure Bearer authorization (JWT): bearerAuth
configuration = halo_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with halo_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = halo_client.CounterV1alpha1Api(api_client)
    name = 'name_example' # str | Name of counter
    counter = halo_client.Counter() # Counter | Updated counter (optional)

    try:
        api_response = api_instance.update_counter(name, counter=counter)
        print("The response of CounterV1alpha1Api->update_counter:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling CounterV1alpha1Api->update_counter: %s\n" % e)

Parameters

Name Type Description Notes
name str Name of counter
counter Counter Updated counter [optional]

Return type

Counter

Authorization

basicAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 Response counters updated just now -

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