Skip to content

Latest commit

 

History

History
731 lines (529 loc) · 29.7 KB

CurrentAPISessionApi.md

File metadata and controls

731 lines (529 loc) · 29.7 KB

openziti_edge_management.CurrentAPISessionApi

All URIs are relative to https://demo.ziti.dev/edge/management/v1

Method HTTP request Description
current_api_session_delete DELETE /current-api-session Logout
detail_current_identity_authenticator GET /current-identity/authenticators/{id} Retrieve an authenticator for the current identity
extend_current_identity_authenticator POST /current-identity/authenticators/{id}/extend Allows the current identity to recieve a new certificate associated with a certificate based authenticator
extend_verify_current_identity_authenticator POST /current-identity/authenticators/{id}/extend-verify Allows the current identity to validate reciept of a new client certificate
get_current_api_session GET /current-api-session Return the current API session
list_current_identity_authenticators GET /current-identity/authenticators List authenticators for the current identity
patch_current_identity_authenticator PATCH /current-identity/authenticators/{id} Update the supplied fields on an authenticator of this identity
update_current_identity_authenticator PUT /current-identity/authenticators/{id} Update all fields on an authenticator of this identity

current_api_session_delete

Empty current_api_session_delete()

Logout

Terminates the current API session

Example

  • Api Key Authentication (ztSession):
  • OAuth Authentication (oauth2):
import time
import openziti_edge_management
from openziti_edge_management.api import current_api_session_api
from openziti_edge_management.model.api_error_envelope import ApiErrorEnvelope
from openziti_edge_management.model.empty import Empty
from pprint import pprint
# Defining the host is optional and defaults to https://demo.ziti.dev/edge/management/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = openziti_edge_management.Configuration(
    host = "https://demo.ziti.dev/edge/management/v1"
)

# 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: ztSession
configuration.api_key['ztSession'] = 'YOUR_API_KEY'

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

# Configure OAuth2 access token for authorization: oauth2
configuration = openziti_edge_management.Configuration(
    host = "https://demo.ziti.dev/edge/management/v1"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'

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

    # example, this endpoint has no required or optional parameters
    try:
        # Logout
        api_response = api_instance.current_api_session_delete()
        pprint(api_response)
    except openziti_edge_management.ApiException as e:
        print("Exception when calling CurrentAPISessionApi->current_api_session_delete: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

Empty

Authorization

ztSession, oauth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Base empty response -
401 The currently supplied session does not have the correct access rights to request this resource -

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

detail_current_identity_authenticator

DetailAuthenticatorEnvelope detail_current_identity_authenticator(id)

Retrieve an authenticator for the current identity

Retrieves a single authenticator by id. Will only show authenticators assigned to the API session's identity.

Example

  • Api Key Authentication (ztSession):
  • OAuth Authentication (oauth2):
import time
import openziti_edge_management
from openziti_edge_management.api import current_api_session_api
from openziti_edge_management.model.api_error_envelope import ApiErrorEnvelope
from openziti_edge_management.model.detail_authenticator_envelope import DetailAuthenticatorEnvelope
from pprint import pprint
# Defining the host is optional and defaults to https://demo.ziti.dev/edge/management/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = openziti_edge_management.Configuration(
    host = "https://demo.ziti.dev/edge/management/v1"
)

# 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: ztSession
configuration.api_key['ztSession'] = 'YOUR_API_KEY'

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

# Configure OAuth2 access token for authorization: oauth2
configuration = openziti_edge_management.Configuration(
    host = "https://demo.ziti.dev/edge/management/v1"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Enter a context with an instance of the API client
with openziti_edge_management.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = current_api_session_api.CurrentAPISessionApi(api_client)
    id = "id_example" # str | The id of the requested resource

    # example passing only required values which don't have defaults set
    try:
        # Retrieve an authenticator for the current identity
        api_response = api_instance.detail_current_identity_authenticator(id)
        pprint(api_response)
    except openziti_edge_management.ApiException as e:
        print("Exception when calling CurrentAPISessionApi->detail_current_identity_authenticator: %s\n" % e)

Parameters

Name Type Description Notes
id str The id of the requested resource

Return type

DetailAuthenticatorEnvelope

Authorization

ztSession, oauth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 A singular authenticator resource -
401 The currently supplied session does not have the correct access rights to request this resource -
404 The requested resource does not exist -

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

extend_current_identity_authenticator

IdentityExtendEnrollmentEnvelope extend_current_identity_authenticator(id, extend)

Allows the current identity to recieve a new certificate associated with a certificate based authenticator

This endpoint only functions for certificates issued by the controller. 3rd party certificates are not handled. Allows an identity to extend its certificate's expiration date by using its current and valid client certificate to submit a CSR. This CSR may be passed in using a new private key, thus allowing private key rotation. The response from this endpoint is a new client certificate which the client must be verified via the /authenticators/{id}/extend-verify endpoint. After verification is completion any new connections must be made with new certificate. Prior to verification the old client certificate remains active.

Example

  • Api Key Authentication (ztSession):
  • OAuth Authentication (oauth2):
import time
import openziti_edge_management
from openziti_edge_management.api import current_api_session_api
from openziti_edge_management.model.identity_extend_enrollment_request import IdentityExtendEnrollmentRequest
from openziti_edge_management.model.identity_extend_enrollment_envelope import IdentityExtendEnrollmentEnvelope
from openziti_edge_management.model.api_error_envelope import ApiErrorEnvelope
from pprint import pprint
# Defining the host is optional and defaults to https://demo.ziti.dev/edge/management/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = openziti_edge_management.Configuration(
    host = "https://demo.ziti.dev/edge/management/v1"
)

# 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: ztSession
configuration.api_key['ztSession'] = 'YOUR_API_KEY'

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

# Configure OAuth2 access token for authorization: oauth2
configuration = openziti_edge_management.Configuration(
    host = "https://demo.ziti.dev/edge/management/v1"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Enter a context with an instance of the API client
with openziti_edge_management.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = current_api_session_api.CurrentAPISessionApi(api_client)
    id = "id_example" # str | The id of the requested resource
    extend = IdentityExtendEnrollmentRequest(
        client_cert_csr="client_cert_csr_example",
    ) # IdentityExtendEnrollmentRequest | 

    # example passing only required values which don't have defaults set
    try:
        # Allows the current identity to recieve a new certificate associated with a certificate based authenticator
        api_response = api_instance.extend_current_identity_authenticator(id, extend)
        pprint(api_response)
    except openziti_edge_management.ApiException as e:
        print("Exception when calling CurrentAPISessionApi->extend_current_identity_authenticator: %s\n" % e)

Parameters

Name Type Description Notes
id str The id of the requested resource
extend IdentityExtendEnrollmentRequest

Return type

IdentityExtendEnrollmentEnvelope

Authorization

ztSession, oauth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 A response containg the identity's new certificate -
401 The currently supplied session does not have the correct access rights to request this resource -

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

extend_verify_current_identity_authenticator

Empty extend_verify_current_identity_authenticator(id, extend)

Allows the current identity to validate reciept of a new client certificate

After submitting a CSR for a new client certificate the resulting public certificate must be re-submitted to this endpoint to verify receipt. After receipt, the new client certificate must be used for new authentication requests.

Example

  • Api Key Authentication (ztSession):
  • OAuth Authentication (oauth2):
import time
import openziti_edge_management
from openziti_edge_management.api import current_api_session_api
from openziti_edge_management.model.identity_extend_validate_enrollment_request import IdentityExtendValidateEnrollmentRequest
from openziti_edge_management.model.api_error_envelope import ApiErrorEnvelope
from openziti_edge_management.model.empty import Empty
from pprint import pprint
# Defining the host is optional and defaults to https://demo.ziti.dev/edge/management/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = openziti_edge_management.Configuration(
    host = "https://demo.ziti.dev/edge/management/v1"
)

# 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: ztSession
configuration.api_key['ztSession'] = 'YOUR_API_KEY'

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

# Configure OAuth2 access token for authorization: oauth2
configuration = openziti_edge_management.Configuration(
    host = "https://demo.ziti.dev/edge/management/v1"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Enter a context with an instance of the API client
with openziti_edge_management.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = current_api_session_api.CurrentAPISessionApi(api_client)
    id = "id_example" # str | The id of the requested resource
    extend = IdentityExtendValidateEnrollmentRequest(
        client_cert="client_cert_example",
    ) # IdentityExtendValidateEnrollmentRequest | 

    # example passing only required values which don't have defaults set
    try:
        # Allows the current identity to validate reciept of a new client certificate
        api_response = api_instance.extend_verify_current_identity_authenticator(id, extend)
        pprint(api_response)
    except openziti_edge_management.ApiException as e:
        print("Exception when calling CurrentAPISessionApi->extend_verify_current_identity_authenticator: %s\n" % e)

Parameters

Name Type Description Notes
id str The id of the requested resource
extend IdentityExtendValidateEnrollmentRequest

Return type

Empty

Authorization

ztSession, oauth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Base empty response -
401 The currently supplied session does not have the correct access rights to request this resource -

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

get_current_api_session

CurrentApiSessionDetailEnvelope get_current_api_session()

Return the current API session

Retrieves the API session that was used to issue the current request

Example

  • Api Key Authentication (ztSession):
  • OAuth Authentication (oauth2):
import time
import openziti_edge_management
from openziti_edge_management.api import current_api_session_api
from openziti_edge_management.model.current_api_session_detail_envelope import CurrentApiSessionDetailEnvelope
from openziti_edge_management.model.api_error_envelope import ApiErrorEnvelope
from pprint import pprint
# Defining the host is optional and defaults to https://demo.ziti.dev/edge/management/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = openziti_edge_management.Configuration(
    host = "https://demo.ziti.dev/edge/management/v1"
)

# 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: ztSession
configuration.api_key['ztSession'] = 'YOUR_API_KEY'

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

# Configure OAuth2 access token for authorization: oauth2
configuration = openziti_edge_management.Configuration(
    host = "https://demo.ziti.dev/edge/management/v1"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'

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

    # example, this endpoint has no required or optional parameters
    try:
        # Return the current API session
        api_response = api_instance.get_current_api_session()
        pprint(api_response)
    except openziti_edge_management.ApiException as e:
        print("Exception when calling CurrentAPISessionApi->get_current_api_session: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

CurrentApiSessionDetailEnvelope

Authorization

ztSession, oauth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 The API session associated with the session used to issue the request -
401 The currently supplied session does not have the correct access rights to request this resource -

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

list_current_identity_authenticators

ListAuthenticatorsEnvelope list_current_identity_authenticators()

List authenticators for the current identity

Retrieves a list of authenticators assigned to the current API session's identity; supports filtering, sorting, and pagination.

Example

  • Api Key Authentication (ztSession):
  • OAuth Authentication (oauth2):
import time
import openziti_edge_management
from openziti_edge_management.api import current_api_session_api
from openziti_edge_management.model.list_authenticators_envelope import ListAuthenticatorsEnvelope
from openziti_edge_management.model.api_error_envelope import ApiErrorEnvelope
from pprint import pprint
# Defining the host is optional and defaults to https://demo.ziti.dev/edge/management/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = openziti_edge_management.Configuration(
    host = "https://demo.ziti.dev/edge/management/v1"
)

# 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: ztSession
configuration.api_key['ztSession'] = 'YOUR_API_KEY'

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

# Configure OAuth2 access token for authorization: oauth2
configuration = openziti_edge_management.Configuration(
    host = "https://demo.ziti.dev/edge/management/v1"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Enter a context with an instance of the API client
with openziti_edge_management.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = current_api_session_api.CurrentAPISessionApi(api_client)
    limit = 1 # int |  (optional)
    offset = 1 # int |  (optional)
    filter = "filter_example" # str |  (optional)

    # example passing only required values which don't have defaults set
    # and optional values
    try:
        # List authenticators for the current identity
        api_response = api_instance.list_current_identity_authenticators(limit=limit, offset=offset, filter=filter)
        pprint(api_response)
    except openziti_edge_management.ApiException as e:
        print("Exception when calling CurrentAPISessionApi->list_current_identity_authenticators: %s\n" % e)

Parameters

Name Type Description Notes
limit int [optional]
offset int [optional]
filter str [optional]

Return type

ListAuthenticatorsEnvelope

Authorization

ztSession, oauth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 A list of authenticators -
400 The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information -
401 The currently supplied session does not have the correct access rights to request this resource -

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

patch_current_identity_authenticator

Empty patch_current_identity_authenticator(id, authenticator)

Update the supplied fields on an authenticator of this identity

Update the supplied fields on an authenticator by id. Will only update authenticators assigned to the API session's identity.

Example

  • Api Key Authentication (ztSession):
  • OAuth Authentication (oauth2):
import time
import openziti_edge_management
from openziti_edge_management.api import current_api_session_api
from openziti_edge_management.model.authenticator_patch_with_current import AuthenticatorPatchWithCurrent
from openziti_edge_management.model.api_error_envelope import ApiErrorEnvelope
from openziti_edge_management.model.empty import Empty
from pprint import pprint
# Defining the host is optional and defaults to https://demo.ziti.dev/edge/management/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = openziti_edge_management.Configuration(
    host = "https://demo.ziti.dev/edge/management/v1"
)

# 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: ztSession
configuration.api_key['ztSession'] = 'YOUR_API_KEY'

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

# Configure OAuth2 access token for authorization: oauth2
configuration = openziti_edge_management.Configuration(
    host = "https://demo.ziti.dev/edge/management/v1"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Enter a context with an instance of the API client
with openziti_edge_management.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = current_api_session_api.CurrentAPISessionApi(api_client)
    id = "id_example" # str | The id of the requested resource
    authenticator = AuthenticatorPatchWithCurrent(None) # AuthenticatorPatchWithCurrent | An authenticator patch object

    # example passing only required values which don't have defaults set
    try:
        # Update the supplied fields on an authenticator of this identity
        api_response = api_instance.patch_current_identity_authenticator(id, authenticator)
        pprint(api_response)
    except openziti_edge_management.ApiException as e:
        print("Exception when calling CurrentAPISessionApi->patch_current_identity_authenticator: %s\n" % e)

Parameters

Name Type Description Notes
id str The id of the requested resource
authenticator AuthenticatorPatchWithCurrent An authenticator patch object

Return type

Empty

Authorization

ztSession, oauth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 The patch request was successful and the resource has been altered -
400 The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information -
401 The currently supplied session does not have the correct access rights to request this resource -
404 The requested resource does not exist -

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

update_current_identity_authenticator

Empty update_current_identity_authenticator(id, authenticator)

Update all fields on an authenticator of this identity

Update all fields on an authenticator by id. Will only update authenticators assigned to the API session's identity.

Example

  • Api Key Authentication (ztSession):
  • OAuth Authentication (oauth2):
import time
import openziti_edge_management
from openziti_edge_management.api import current_api_session_api
from openziti_edge_management.model.authenticator_update_with_current import AuthenticatorUpdateWithCurrent
from openziti_edge_management.model.api_error_envelope import ApiErrorEnvelope
from openziti_edge_management.model.empty import Empty
from pprint import pprint
# Defining the host is optional and defaults to https://demo.ziti.dev/edge/management/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = openziti_edge_management.Configuration(
    host = "https://demo.ziti.dev/edge/management/v1"
)

# 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: ztSession
configuration.api_key['ztSession'] = 'YOUR_API_KEY'

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

# Configure OAuth2 access token for authorization: oauth2
configuration = openziti_edge_management.Configuration(
    host = "https://demo.ziti.dev/edge/management/v1"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Enter a context with an instance of the API client
with openziti_edge_management.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = current_api_session_api.CurrentAPISessionApi(api_client)
    id = "id_example" # str | The id of the requested resource
    authenticator = AuthenticatorUpdateWithCurrent(None) # AuthenticatorUpdateWithCurrent | An authenticator put object

    # example passing only required values which don't have defaults set
    try:
        # Update all fields on an authenticator of this identity
        api_response = api_instance.update_current_identity_authenticator(id, authenticator)
        pprint(api_response)
    except openziti_edge_management.ApiException as e:
        print("Exception when calling CurrentAPISessionApi->update_current_identity_authenticator: %s\n" % e)

Parameters

Name Type Description Notes
id str The id of the requested resource
authenticator AuthenticatorUpdateWithCurrent An authenticator put object

Return type

Empty

Authorization

ztSession, oauth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 The update request was successful and the resource has been altered -
400 The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information -
401 The currently supplied session does not have the correct access rights to request this resource -
404 The requested resource does not exist -

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