# cybee_sdk.api.IdentityApi

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

Method | HTTP request | Description
------------- | ------------- | -------------
[**create_api_key_identity_keys_post**](IdentityApi.md#create_api_key_identity_keys_post) | **POST** /identity/keys/ | Create Api Key
[**list_all_api_keys_identity_keys_get**](IdentityApi.md#list_all_api_keys_identity_keys_get) | **GET** /identity/keys/ | List All Api Keys
[**list_all_organization_identity_organization_get**](IdentityApi.md#list_all_organization_identity_organization_get) | **GET** /identity/organization/ | List All Organization
[**revoke_api_key_identity_keys_key_id_delete**](IdentityApi.md#revoke_api_key_identity_keys_key_id_delete) | **DELETE** /identity/keys/{key_id}/ | Revoke Api Key


# **create_api_key_identity_keys_post**
> GeneratedApiKey create_api_key_identity_keys_post(generate_key_request, cbe_user_org_id=cbe_user_org_id)

Create Api Key

### Example

* OAuth Authentication (ZitadelWebAuthorizationBearer):
* Bearer Authentication (BearerToken):

```python
import cybee_sdk.api
from cybee_sdk.api.models.generate_key_request import GenerateKeyRequest
from cybee_sdk.api.models.generated_api_key import GeneratedApiKey
from cybee_sdk.api.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 = cybee_sdk.api.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.access_token = os.environ["ACCESS_TOKEN"]

# Configure Bearer authorization: BearerToken
configuration = cybee_sdk.api.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with cybee_sdk.api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = cybee_sdk.api.IdentityApi(api_client)
    generate_key_request = cybee_sdk.api.GenerateKeyRequest() # GenerateKeyRequest | 
    cbe_user_org_id = 'cbe_user_org_id_example' # str |  Organization ID to request against. Can be empty (uses the user's org), a specific ID, or an asterisk (*) in which case the returned data are sourced from all orgs you can access.  See `/identity/organization/`  (optional)

    try:
        # Create Api Key
        api_response = api_instance.create_api_key_identity_keys_post(generate_key_request, cbe_user_org_id=cbe_user_org_id)
        print("The response of IdentityApi->create_api_key_identity_keys_post:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling IdentityApi->create_api_key_identity_keys_post: %s\n" % e)
```



### Parameters


Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **generate_key_request** | [**GenerateKeyRequest**](GenerateKeyRequest.md)|  | 
 **cbe_user_org_id** | **str**|  Organization ID to request against. Can be empty (uses the user&#39;s org), a specific ID, or an asterisk (*) in which case the returned data are sourced from all orgs you can access.  See &#x60;/identity/organization/&#x60;  | [optional] 

### Return type

[**GeneratedApiKey**](GeneratedApiKey.md)

### Authorization

[ZitadelWebAuthorizationBearer](../README.md#ZitadelWebAuthorizationBearer), [BearerToken](../README.md#BearerToken)

### 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]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **list_all_api_keys_identity_keys_get**
> PageApiKey list_all_api_keys_identity_keys_get(page=page, per_page=per_page, order_by=order_by, id=id, name=name, expiration_at_gt=expiration_at_gt, expiration_at_lt=expiration_at_lt, created_at_gt=created_at_gt, created_at_lt=created_at_lt, cbe_user_org_id=cbe_user_org_id)

List All Api Keys

### Example

* OAuth Authentication (ZitadelWebAuthorizationBearer):
* Bearer Authentication (BearerToken):

```python
import cybee_sdk.api
from cybee_sdk.api.models.page_api_key import PageApiKey
from cybee_sdk.api.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 = cybee_sdk.api.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.access_token = os.environ["ACCESS_TOKEN"]

# Configure Bearer authorization: BearerToken
configuration = cybee_sdk.api.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with cybee_sdk.api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = cybee_sdk.api.IdentityApi(api_client)
    page = 0 # int |  (optional) (default to 0)
    per_page = 25 # int |  (optional) (default to 25)
    order_by = [] # List[Optional[str]] |  (optional) (default to [])
    id = None # List[UUID] |  (optional)
    name = 'name_example' # str |  (optional)
    expiration_at_gt = '2013-10-20T19:20:30+01:00' # datetime |  (optional)
    expiration_at_lt = '2013-10-20T19:20:30+01:00' # datetime |  (optional)
    created_at_gt = '2013-10-20T19:20:30+01:00' # datetime |  (optional)
    created_at_lt = '2013-10-20T19:20:30+01:00' # datetime |  (optional)
    cbe_user_org_id = 'cbe_user_org_id_example' # str |  Organization ID to request against. Can be empty (uses the user's org), a specific ID, or an asterisk (*) in which case the returned data are sourced from all orgs you can access.  See `/identity/organization/`  (optional)

    try:
        # List All Api Keys
        api_response = api_instance.list_all_api_keys_identity_keys_get(page=page, per_page=per_page, order_by=order_by, id=id, name=name, expiration_at_gt=expiration_at_gt, expiration_at_lt=expiration_at_lt, created_at_gt=created_at_gt, created_at_lt=created_at_lt, cbe_user_org_id=cbe_user_org_id)
        print("The response of IdentityApi->list_all_api_keys_identity_keys_get:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling IdentityApi->list_all_api_keys_identity_keys_get: %s\n" % e)
```



### Parameters


Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **page** | **int**|  | [optional] [default to 0]
 **per_page** | **int**|  | [optional] [default to 25]
 **order_by** | [**List[Optional[str]]**](str.md)|  | [optional] [default to []]
 **id** | [**List[UUID]**](UUID.md)|  | [optional] 
 **name** | **str**|  | [optional] 
 **expiration_at_gt** | **datetime**|  | [optional] 
 **expiration_at_lt** | **datetime**|  | [optional] 
 **created_at_gt** | **datetime**|  | [optional] 
 **created_at_lt** | **datetime**|  | [optional] 
 **cbe_user_org_id** | **str**|  Organization ID to request against. Can be empty (uses the user&#39;s org), a specific ID, or an asterisk (*) in which case the returned data are sourced from all orgs you can access.  See &#x60;/identity/organization/&#x60;  | [optional] 

### Return type

[**PageApiKey**](PageApiKey.md)

### Authorization

[ZitadelWebAuthorizationBearer](../README.md#ZitadelWebAuthorizationBearer), [BearerToken](../README.md#BearerToken)

### 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]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **list_all_organization_identity_organization_get**
> PageOrganization list_all_organization_identity_organization_get(page=page, per_page=per_page, order_by=order_by, id=id, display_name=display_name, created_at_gt=created_at_gt, created_at_lt=created_at_lt, updated_at_gt=updated_at_gt, updated_at_lt=updated_at_lt, cbe_user_org_id=cbe_user_org_id)

List All Organization

### Example

* OAuth Authentication (ZitadelWebAuthorizationBearer):
* Bearer Authentication (BearerToken):

```python
import cybee_sdk.api
from cybee_sdk.api.models.page_organization import PageOrganization
from cybee_sdk.api.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 = cybee_sdk.api.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.access_token = os.environ["ACCESS_TOKEN"]

# Configure Bearer authorization: BearerToken
configuration = cybee_sdk.api.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with cybee_sdk.api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = cybee_sdk.api.IdentityApi(api_client)
    page = 0 # int |  (optional) (default to 0)
    per_page = 25 # int |  (optional) (default to 25)
    order_by = [] # List[str] |  (optional) (default to [])
    id = None # List[UUID] |  (optional)
    display_name = 'display_name_example' # str |  (optional)
    created_at_gt = '2013-10-20T19:20:30+01:00' # datetime |  (optional)
    created_at_lt = '2013-10-20T19:20:30+01:00' # datetime |  (optional)
    updated_at_gt = '2013-10-20T19:20:30+01:00' # datetime |  (optional)
    updated_at_lt = '2013-10-20T19:20:30+01:00' # datetime |  (optional)
    cbe_user_org_id = 'cbe_user_org_id_example' # str |  Organization ID to request against. Can be empty (uses the user's org), a specific ID, or an asterisk (*) in which case the returned data are sourced from all orgs you can access.  See `/identity/organization/`  (optional)

    try:
        # List All Organization
        api_response = api_instance.list_all_organization_identity_organization_get(page=page, per_page=per_page, order_by=order_by, id=id, display_name=display_name, created_at_gt=created_at_gt, created_at_lt=created_at_lt, updated_at_gt=updated_at_gt, updated_at_lt=updated_at_lt, cbe_user_org_id=cbe_user_org_id)
        print("The response of IdentityApi->list_all_organization_identity_organization_get:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling IdentityApi->list_all_organization_identity_organization_get: %s\n" % e)
```



### Parameters


Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **page** | **int**|  | [optional] [default to 0]
 **per_page** | **int**|  | [optional] [default to 25]
 **order_by** | [**List[str]**](str.md)|  | [optional] [default to []]
 **id** | [**List[UUID]**](UUID.md)|  | [optional] 
 **display_name** | **str**|  | [optional] 
 **created_at_gt** | **datetime**|  | [optional] 
 **created_at_lt** | **datetime**|  | [optional] 
 **updated_at_gt** | **datetime**|  | [optional] 
 **updated_at_lt** | **datetime**|  | [optional] 
 **cbe_user_org_id** | **str**|  Organization ID to request against. Can be empty (uses the user&#39;s org), a specific ID, or an asterisk (*) in which case the returned data are sourced from all orgs you can access.  See &#x60;/identity/organization/&#x60;  | [optional] 

### Return type

[**PageOrganization**](PageOrganization.md)

### Authorization

[ZitadelWebAuthorizationBearer](../README.md#ZitadelWebAuthorizationBearer), [BearerToken](../README.md#BearerToken)

### 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]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **revoke_api_key_identity_keys_key_id_delete**
> PydGenericMessage revoke_api_key_identity_keys_key_id_delete(key_id, cbe_user_org_id=cbe_user_org_id)

Revoke Api Key

### Example

* OAuth Authentication (ZitadelWebAuthorizationBearer):
* Bearer Authentication (BearerToken):

```python
import cybee_sdk.api
from cybee_sdk.api.models.pyd_generic_message import PydGenericMessage
from cybee_sdk.api.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 = cybee_sdk.api.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.access_token = os.environ["ACCESS_TOKEN"]

# Configure Bearer authorization: BearerToken
configuration = cybee_sdk.api.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with cybee_sdk.api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = cybee_sdk.api.IdentityApi(api_client)
    key_id = 'key_id_example' # str | 
    cbe_user_org_id = 'cbe_user_org_id_example' # str |  Organization ID to request against. Can be empty (uses the user's org), a specific ID, or an asterisk (*) in which case the returned data are sourced from all orgs you can access.  See `/identity/organization/`  (optional)

    try:
        # Revoke Api Key
        api_response = api_instance.revoke_api_key_identity_keys_key_id_delete(key_id, cbe_user_org_id=cbe_user_org_id)
        print("The response of IdentityApi->revoke_api_key_identity_keys_key_id_delete:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling IdentityApi->revoke_api_key_identity_keys_key_id_delete: %s\n" % e)
```



### Parameters


Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **key_id** | **str**|  | 
 **cbe_user_org_id** | **str**|  Organization ID to request against. Can be empty (uses the user&#39;s org), a specific ID, or an asterisk (*) in which case the returned data are sourced from all orgs you can access.  See &#x60;/identity/organization/&#x60;  | [optional] 

### Return type

[**PydGenericMessage**](PydGenericMessage.md)

### Authorization

[ZitadelWebAuthorizationBearer](../README.md#ZitadelWebAuthorizationBearer), [BearerToken](../README.md#BearerToken)

### 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]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

