Skip to content

Latest commit

 

History

History
135 lines (102 loc) · 4.84 KB

MetricsApi.md

File metadata and controls

135 lines (102 loc) · 4.84 KB

OmniCore.MetricsApi

All URIs are relative to https://api.korewireless.com

Method HTTP request Description
get_metrics GET /omnicore/subscriptions/{subscriptionId}/metrics

get_metrics

Metrics get_metrics(subscription_id)

get metrics

Example

  • Api Key Authentication (apiKey):
from __future__ import print_function
import time
import os
import OmniCore
from OmniCore.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.korewireless.com
# See configuration.py for a list of all supported configuration parameters.
configuration = OmniCore.Configuration(
    host = "https://api.korewireless.com"
)

# 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 API key authorization: apiKey
configuration.api_key['apiKey'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apiKey'] = 'Bearer'

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

# Enter a context with an instance of the API client
with OmniCore.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = OmniCore.MetricsApi(api_client)
    subscription_id = 'subscription_id_example' # str | Subscription ID

    try:
        api_response = api_instance.get_metrics(subscription_id)
        print("The response of MetricsApi->get_metrics:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling MetricsApi->get_metrics: %s\n" % e)
  • Bearer (JWT) Authentication (bearerAuth):
from __future__ import print_function
import time
import os
import OmniCore
from OmniCore.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.korewireless.com
# See configuration.py for a list of all supported configuration parameters.
configuration = OmniCore.Configuration(
    host = "https://api.korewireless.com"
)

# 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 API key authorization: apiKey
configuration.api_key['apiKey'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apiKey'] = 'Bearer'

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

# Enter a context with an instance of the API client
with OmniCore.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = OmniCore.MetricsApi(api_client)
    subscription_id = 'subscription_id_example' # str | Subscription ID

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

Parameters

Name Type Description Notes
subscription_id str Subscription ID

Return type

Metrics

Authorization

apiKey, bearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK * Access-Control-Allow-Origin -
* Access-Control-Allow-Methods -
* Access-Control-Allow-Credentials -
* Access-Control-Allow-Headers -
400 Bad Request * Access-Control-Allow-Origin -
* Access-Control-Allow-Methods -
* Access-Control-Allow-Credentials -
* Access-Control-Allow-Headers -
404 Not Found * Access-Control-Allow-Origin -
* Access-Control-Allow-Methods -
* Access-Control-Allow-Credentials -
* Access-Control-Allow-Headers -
500 Internal Server Error * Access-Control-Allow-Origin -
* Access-Control-Allow-Methods -
* Access-Control-Allow-Credentials -
* Access-Control-Allow-Headers -

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