Skip to content

Latest commit

 

History

History
1050 lines (814 loc) · 31.5 KB

LicensesApi.md

File metadata and controls

1050 lines (814 loc) · 31.5 KB

pollination_sdk.LicensesApi

All URIs are relative to http://localhost

Method HTTP request Description
delete_activation DELETE /licenses/pools/{pool_id}/activations/{activation_id} Delete the activation
get_available_pools GET /licenses/pools Get license pools available to authenticated user
get_license_activations GET /licenses/pools/{pool_id}/activations Get the activations for the license
get_pool_license GET /licenses/pools/{pool_id}/license Get the license associated with a pool
grant_access_to_pool PATCH /licenses/pools/{pool_id}/permissions Grant access to the license pool
regenerate_license_pool POST /licenses/pools/{pool_id}/regenerate Regenerate the license associated with the pool
revoke_access_to_pool DELETE /licenses/pools/{pool_id}/permissions Revoke access to the license pool
update_license_pool PUT /licenses/pools/{pool_id} Update the license pool

delete_activation

delete_activation(pool_id, activation_id)

Delete the activation

Example

  • Api Key Authentication (APIKeyAuth):
from __future__ import print_function
import time
import pollination_sdk
from pollination_sdk.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyAuth
configuration = pollination_sdk.Configuration(
    host = "http://localhost",
    api_key = {
        'APIKeyAuth': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKeyAuth'] = 'Bearer'

# Retrieve a temporary Acces Token (JWT) using your API token
API_TOKEN = 'some-token-string'

auth = pollination_sdk.UserApi()
api_token = pollination_sdk.LoginDto(
  api_token=API_TOKEN
)

auth_response = auth.login(api_token)

# Configure Bearer authorization (JWT): JWTAuth
configuration = pollination_sdk.Configuration(
    access_token=auth_response.access_token
)

# Enter a context with an instance of the API client
with pollination_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = pollination_sdk.LicensesApi(api_client)
    pool_id = 'pool_id_example' # str | 
activation_id = 'activation_id_example' # str | 

    try:
        # Delete the activation
        api_instance.delete_activation(pool_id, activation_id)
    except ApiException as e:
        print("Exception when calling LicensesApi->delete_activation: %s\n" % e)
  • Bearer (JWT) Authentication (JWTAuth):
from __future__ import print_function
import time
import pollination_sdk
from pollination_sdk.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyAuth
configuration = pollination_sdk.Configuration(
    host = "http://localhost",
    api_key = {
        'APIKeyAuth': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKeyAuth'] = 'Bearer'

# Retrieve a temporary Acces Token (JWT) using your API token
API_TOKEN = 'some-token-string'

auth = pollination_sdk.UserApi()
api_token = pollination_sdk.LoginDto(
  api_token=API_TOKEN
)

auth_response = auth.login(api_token)

# Configure Bearer authorization (JWT): JWTAuth
configuration = pollination_sdk.Configuration(
    access_token=auth_response.access_token
)

# Enter a context with an instance of the API client
with pollination_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = pollination_sdk.LicensesApi(api_client)
    pool_id = 'pool_id_example' # str | 
activation_id = 'activation_id_example' # str | 

    try:
        # Delete the activation
        api_instance.delete_activation(pool_id, activation_id)
    except ApiException as e:
        print("Exception when calling LicensesApi->delete_activation: %s\n" % e)

Parameters

Name Type Description Notes
pool_id str
activation_id str

Return type

void (empty response body)

Authorization

APIKeyAuth, JWTAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
204 Successful Response -
422 Validation Error -

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

get_available_pools

LicensePoolList get_available_pools(owner=owner)

Get license pools available to authenticated user

Example

  • Api Key Authentication (APIKeyAuth):
from __future__ import print_function
import time
import pollination_sdk
from pollination_sdk.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyAuth
configuration = pollination_sdk.Configuration(
    host = "http://localhost",
    api_key = {
        'APIKeyAuth': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKeyAuth'] = 'Bearer'

# Retrieve a temporary Acces Token (JWT) using your API token
API_TOKEN = 'some-token-string'

auth = pollination_sdk.UserApi()
api_token = pollination_sdk.LoginDto(
  api_token=API_TOKEN
)

auth_response = auth.login(api_token)

# Configure Bearer authorization (JWT): JWTAuth
configuration = pollination_sdk.Configuration(
    access_token=auth_response.access_token
)

# Enter a context with an instance of the API client
with pollination_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = pollination_sdk.LicensesApi(api_client)
    owner = ['owner_example'] # list[str] | Owner of the project (optional)

    try:
        # Get license pools available to authenticated user
        api_response = api_instance.get_available_pools(owner=owner)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling LicensesApi->get_available_pools: %s\n" % e)
  • Bearer (JWT) Authentication (JWTAuth):
from __future__ import print_function
import time
import pollination_sdk
from pollination_sdk.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyAuth
configuration = pollination_sdk.Configuration(
    host = "http://localhost",
    api_key = {
        'APIKeyAuth': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKeyAuth'] = 'Bearer'

# Retrieve a temporary Acces Token (JWT) using your API token
API_TOKEN = 'some-token-string'

auth = pollination_sdk.UserApi()
api_token = pollination_sdk.LoginDto(
  api_token=API_TOKEN
)

auth_response = auth.login(api_token)

# Configure Bearer authorization (JWT): JWTAuth
configuration = pollination_sdk.Configuration(
    access_token=auth_response.access_token
)

# Enter a context with an instance of the API client
with pollination_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = pollination_sdk.LicensesApi(api_client)
    owner = ['owner_example'] # list[str] | Owner of the project (optional)

    try:
        # Get license pools available to authenticated user
        api_response = api_instance.get_available_pools(owner=owner)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling LicensesApi->get_available_pools: %s\n" % e)

Parameters

Name Type Description Notes
owner list[str] Owner of the project [optional]

Return type

LicensePoolList

Authorization

APIKeyAuth, JWTAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -

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

get_license_activations

ActivationList get_license_activations(pool_id)

Get the activations for the license

Example

  • Api Key Authentication (APIKeyAuth):
from __future__ import print_function
import time
import pollination_sdk
from pollination_sdk.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyAuth
configuration = pollination_sdk.Configuration(
    host = "http://localhost",
    api_key = {
        'APIKeyAuth': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKeyAuth'] = 'Bearer'

# Retrieve a temporary Acces Token (JWT) using your API token
API_TOKEN = 'some-token-string'

auth = pollination_sdk.UserApi()
api_token = pollination_sdk.LoginDto(
  api_token=API_TOKEN
)

auth_response = auth.login(api_token)

# Configure Bearer authorization (JWT): JWTAuth
configuration = pollination_sdk.Configuration(
    access_token=auth_response.access_token
)

# Enter a context with an instance of the API client
with pollination_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = pollination_sdk.LicensesApi(api_client)
    pool_id = 'pool_id_example' # str | 

    try:
        # Get the activations for the license
        api_response = api_instance.get_license_activations(pool_id)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling LicensesApi->get_license_activations: %s\n" % e)
  • Bearer (JWT) Authentication (JWTAuth):
from __future__ import print_function
import time
import pollination_sdk
from pollination_sdk.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyAuth
configuration = pollination_sdk.Configuration(
    host = "http://localhost",
    api_key = {
        'APIKeyAuth': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKeyAuth'] = 'Bearer'

# Retrieve a temporary Acces Token (JWT) using your API token
API_TOKEN = 'some-token-string'

auth = pollination_sdk.UserApi()
api_token = pollination_sdk.LoginDto(
  api_token=API_TOKEN
)

auth_response = auth.login(api_token)

# Configure Bearer authorization (JWT): JWTAuth
configuration = pollination_sdk.Configuration(
    access_token=auth_response.access_token
)

# Enter a context with an instance of the API client
with pollination_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = pollination_sdk.LicensesApi(api_client)
    pool_id = 'pool_id_example' # str | 

    try:
        # Get the activations for the license
        api_response = api_instance.get_license_activations(pool_id)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling LicensesApi->get_license_activations: %s\n" % e)

Parameters

Name Type Description Notes
pool_id str

Return type

ActivationList

Authorization

APIKeyAuth, JWTAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -

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

get_pool_license

LicensePublic get_pool_license(pool_id)

Get the license associated with a pool

Example

  • Api Key Authentication (APIKeyAuth):
from __future__ import print_function
import time
import pollination_sdk
from pollination_sdk.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyAuth
configuration = pollination_sdk.Configuration(
    host = "http://localhost",
    api_key = {
        'APIKeyAuth': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKeyAuth'] = 'Bearer'

# Retrieve a temporary Acces Token (JWT) using your API token
API_TOKEN = 'some-token-string'

auth = pollination_sdk.UserApi()
api_token = pollination_sdk.LoginDto(
  api_token=API_TOKEN
)

auth_response = auth.login(api_token)

# Configure Bearer authorization (JWT): JWTAuth
configuration = pollination_sdk.Configuration(
    access_token=auth_response.access_token
)

# Enter a context with an instance of the API client
with pollination_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = pollination_sdk.LicensesApi(api_client)
    pool_id = 'pool_id_example' # str | 

    try:
        # Get the license associated with a pool
        api_response = api_instance.get_pool_license(pool_id)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling LicensesApi->get_pool_license: %s\n" % e)
  • Bearer (JWT) Authentication (JWTAuth):
from __future__ import print_function
import time
import pollination_sdk
from pollination_sdk.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyAuth
configuration = pollination_sdk.Configuration(
    host = "http://localhost",
    api_key = {
        'APIKeyAuth': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKeyAuth'] = 'Bearer'

# Retrieve a temporary Acces Token (JWT) using your API token
API_TOKEN = 'some-token-string'

auth = pollination_sdk.UserApi()
api_token = pollination_sdk.LoginDto(
  api_token=API_TOKEN
)

auth_response = auth.login(api_token)

# Configure Bearer authorization (JWT): JWTAuth
configuration = pollination_sdk.Configuration(
    access_token=auth_response.access_token
)

# Enter a context with an instance of the API client
with pollination_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = pollination_sdk.LicensesApi(api_client)
    pool_id = 'pool_id_example' # str | 

    try:
        # Get the license associated with a pool
        api_response = api_instance.get_pool_license(pool_id)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling LicensesApi->get_pool_license: %s\n" % e)

Parameters

Name Type Description Notes
pool_id str

Return type

LicensePublic

Authorization

APIKeyAuth, JWTAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -

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

grant_access_to_pool

LicensePoolPublic grant_access_to_pool(pool_id, license_pool_access_policy_list)

Grant access to the license pool

Example

  • Api Key Authentication (APIKeyAuth):
from __future__ import print_function
import time
import pollination_sdk
from pollination_sdk.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyAuth
configuration = pollination_sdk.Configuration(
    host = "http://localhost",
    api_key = {
        'APIKeyAuth': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKeyAuth'] = 'Bearer'

# Retrieve a temporary Acces Token (JWT) using your API token
API_TOKEN = 'some-token-string'

auth = pollination_sdk.UserApi()
api_token = pollination_sdk.LoginDto(
  api_token=API_TOKEN
)

auth_response = auth.login(api_token)

# Configure Bearer authorization (JWT): JWTAuth
configuration = pollination_sdk.Configuration(
    access_token=auth_response.access_token
)

# Enter a context with an instance of the API client
with pollination_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = pollination_sdk.LicensesApi(api_client)
    pool_id = 'pool_id_example' # str | 
license_pool_access_policy_list = pollination_sdk.LicensePoolAccessPolicyList() # LicensePoolAccessPolicyList | 

    try:
        # Grant access to the license pool
        api_response = api_instance.grant_access_to_pool(pool_id, license_pool_access_policy_list)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling LicensesApi->grant_access_to_pool: %s\n" % e)
  • Bearer (JWT) Authentication (JWTAuth):
from __future__ import print_function
import time
import pollination_sdk
from pollination_sdk.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyAuth
configuration = pollination_sdk.Configuration(
    host = "http://localhost",
    api_key = {
        'APIKeyAuth': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKeyAuth'] = 'Bearer'

# Retrieve a temporary Acces Token (JWT) using your API token
API_TOKEN = 'some-token-string'

auth = pollination_sdk.UserApi()
api_token = pollination_sdk.LoginDto(
  api_token=API_TOKEN
)

auth_response = auth.login(api_token)

# Configure Bearer authorization (JWT): JWTAuth
configuration = pollination_sdk.Configuration(
    access_token=auth_response.access_token
)

# Enter a context with an instance of the API client
with pollination_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = pollination_sdk.LicensesApi(api_client)
    pool_id = 'pool_id_example' # str | 
license_pool_access_policy_list = pollination_sdk.LicensePoolAccessPolicyList() # LicensePoolAccessPolicyList | 

    try:
        # Grant access to the license pool
        api_response = api_instance.grant_access_to_pool(pool_id, license_pool_access_policy_list)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling LicensesApi->grant_access_to_pool: %s\n" % e)

Parameters

Name Type Description Notes
pool_id str
license_pool_access_policy_list LicensePoolAccessPolicyList

Return type

LicensePoolPublic

Authorization

APIKeyAuth, JWTAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -

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

regenerate_license_pool

object regenerate_license_pool(pool_id)

Regenerate the license associated with the pool

Example

  • Api Key Authentication (APIKeyAuth):
from __future__ import print_function
import time
import pollination_sdk
from pollination_sdk.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyAuth
configuration = pollination_sdk.Configuration(
    host = "http://localhost",
    api_key = {
        'APIKeyAuth': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKeyAuth'] = 'Bearer'

# Retrieve a temporary Acces Token (JWT) using your API token
API_TOKEN = 'some-token-string'

auth = pollination_sdk.UserApi()
api_token = pollination_sdk.LoginDto(
  api_token=API_TOKEN
)

auth_response = auth.login(api_token)

# Configure Bearer authorization (JWT): JWTAuth
configuration = pollination_sdk.Configuration(
    access_token=auth_response.access_token
)

# Enter a context with an instance of the API client
with pollination_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = pollination_sdk.LicensesApi(api_client)
    pool_id = 'pool_id_example' # str | 

    try:
        # Regenerate the license associated with the pool
        api_response = api_instance.regenerate_license_pool(pool_id)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling LicensesApi->regenerate_license_pool: %s\n" % e)
  • Bearer (JWT) Authentication (JWTAuth):
from __future__ import print_function
import time
import pollination_sdk
from pollination_sdk.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyAuth
configuration = pollination_sdk.Configuration(
    host = "http://localhost",
    api_key = {
        'APIKeyAuth': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKeyAuth'] = 'Bearer'

# Retrieve a temporary Acces Token (JWT) using your API token
API_TOKEN = 'some-token-string'

auth = pollination_sdk.UserApi()
api_token = pollination_sdk.LoginDto(
  api_token=API_TOKEN
)

auth_response = auth.login(api_token)

# Configure Bearer authorization (JWT): JWTAuth
configuration = pollination_sdk.Configuration(
    access_token=auth_response.access_token
)

# Enter a context with an instance of the API client
with pollination_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = pollination_sdk.LicensesApi(api_client)
    pool_id = 'pool_id_example' # str | 

    try:
        # Regenerate the license associated with the pool
        api_response = api_instance.regenerate_license_pool(pool_id)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling LicensesApi->regenerate_license_pool: %s\n" % e)

Parameters

Name Type Description Notes
pool_id str

Return type

object

Authorization

APIKeyAuth, JWTAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -

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

revoke_access_to_pool

LicensePoolPublic revoke_access_to_pool(pool_id, license_pool_policy_subject_list)

Revoke access to the license pool

Example

  • Api Key Authentication (APIKeyAuth):
from __future__ import print_function
import time
import pollination_sdk
from pollination_sdk.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyAuth
configuration = pollination_sdk.Configuration(
    host = "http://localhost",
    api_key = {
        'APIKeyAuth': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKeyAuth'] = 'Bearer'

# Retrieve a temporary Acces Token (JWT) using your API token
API_TOKEN = 'some-token-string'

auth = pollination_sdk.UserApi()
api_token = pollination_sdk.LoginDto(
  api_token=API_TOKEN
)

auth_response = auth.login(api_token)

# Configure Bearer authorization (JWT): JWTAuth
configuration = pollination_sdk.Configuration(
    access_token=auth_response.access_token
)

# Enter a context with an instance of the API client
with pollination_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = pollination_sdk.LicensesApi(api_client)
    pool_id = 'pool_id_example' # str | 
license_pool_policy_subject_list = pollination_sdk.LicensePoolPolicySubjectList() # LicensePoolPolicySubjectList | 

    try:
        # Revoke access to the license pool
        api_response = api_instance.revoke_access_to_pool(pool_id, license_pool_policy_subject_list)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling LicensesApi->revoke_access_to_pool: %s\n" % e)
  • Bearer (JWT) Authentication (JWTAuth):
from __future__ import print_function
import time
import pollination_sdk
from pollination_sdk.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyAuth
configuration = pollination_sdk.Configuration(
    host = "http://localhost",
    api_key = {
        'APIKeyAuth': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKeyAuth'] = 'Bearer'

# Retrieve a temporary Acces Token (JWT) using your API token
API_TOKEN = 'some-token-string'

auth = pollination_sdk.UserApi()
api_token = pollination_sdk.LoginDto(
  api_token=API_TOKEN
)

auth_response = auth.login(api_token)

# Configure Bearer authorization (JWT): JWTAuth
configuration = pollination_sdk.Configuration(
    access_token=auth_response.access_token
)

# Enter a context with an instance of the API client
with pollination_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = pollination_sdk.LicensesApi(api_client)
    pool_id = 'pool_id_example' # str | 
license_pool_policy_subject_list = pollination_sdk.LicensePoolPolicySubjectList() # LicensePoolPolicySubjectList | 

    try:
        # Revoke access to the license pool
        api_response = api_instance.revoke_access_to_pool(pool_id, license_pool_policy_subject_list)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling LicensesApi->revoke_access_to_pool: %s\n" % e)

Parameters

Name Type Description Notes
pool_id str
license_pool_policy_subject_list LicensePoolPolicySubjectList

Return type

LicensePoolPublic

Authorization

APIKeyAuth, JWTAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -

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

update_license_pool

object update_license_pool(pool_id, license_pool_update)

Update the license pool

Example

  • Api Key Authentication (APIKeyAuth):
from __future__ import print_function
import time
import pollination_sdk
from pollination_sdk.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyAuth
configuration = pollination_sdk.Configuration(
    host = "http://localhost",
    api_key = {
        'APIKeyAuth': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKeyAuth'] = 'Bearer'

# Retrieve a temporary Acces Token (JWT) using your API token
API_TOKEN = 'some-token-string'

auth = pollination_sdk.UserApi()
api_token = pollination_sdk.LoginDto(
  api_token=API_TOKEN
)

auth_response = auth.login(api_token)

# Configure Bearer authorization (JWT): JWTAuth
configuration = pollination_sdk.Configuration(
    access_token=auth_response.access_token
)

# Enter a context with an instance of the API client
with pollination_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = pollination_sdk.LicensesApi(api_client)
    pool_id = 'pool_id_example' # str | 
license_pool_update = pollination_sdk.LicensePoolUpdate() # LicensePoolUpdate | 

    try:
        # Update the license pool
        api_response = api_instance.update_license_pool(pool_id, license_pool_update)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling LicensesApi->update_license_pool: %s\n" % e)
  • Bearer (JWT) Authentication (JWTAuth):
from __future__ import print_function
import time
import pollination_sdk
from pollination_sdk.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyAuth
configuration = pollination_sdk.Configuration(
    host = "http://localhost",
    api_key = {
        'APIKeyAuth': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKeyAuth'] = 'Bearer'

# Retrieve a temporary Acces Token (JWT) using your API token
API_TOKEN = 'some-token-string'

auth = pollination_sdk.UserApi()
api_token = pollination_sdk.LoginDto(
  api_token=API_TOKEN
)

auth_response = auth.login(api_token)

# Configure Bearer authorization (JWT): JWTAuth
configuration = pollination_sdk.Configuration(
    access_token=auth_response.access_token
)

# Enter a context with an instance of the API client
with pollination_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = pollination_sdk.LicensesApi(api_client)
    pool_id = 'pool_id_example' # str | 
license_pool_update = pollination_sdk.LicensePoolUpdate() # LicensePoolUpdate | 

    try:
        # Update the license pool
        api_response = api_instance.update_license_pool(pool_id, license_pool_update)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling LicensesApi->update_license_pool: %s\n" % e)

Parameters

Name Type Description Notes
pool_id str
license_pool_update LicensePoolUpdate

Return type

object

Authorization

APIKeyAuth, JWTAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -

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