# cybee_sdk.api.AgentsApi

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

Method | HTTP request | Description
------------- | ------------- | -------------
[**approve_agent_agent_agent_id_approve_post**](AgentsApi.md#approve_agent_agent_agent_id_approve_post) | **POST** /agent/{agent_id}/approve/ | Approve Agent
[**delete_agent_agent_agent_id_delete**](AgentsApi.md#delete_agent_agent_agent_id_delete) | **DELETE** /agent/{agent_id}/ | Delete Agent
[**get_agent_agent_unregistered_get**](AgentsApi.md#get_agent_agent_unregistered_get) | **GET** /agent/unregistered/ | Get Agent
[**list_agent_agent_get**](AgentsApi.md#list_agent_agent_get) | **GET** /agent/ | List Agent
[**lock_agent_agent_agent_id_lock_post**](AgentsApi.md#lock_agent_agent_agent_id_lock_post) | **POST** /agent/{agent_id}/lock/ | Lock Agent
[**unlock_agent_agent_agent_id_unlock_post**](AgentsApi.md#unlock_agent_agent_agent_id_unlock_post) | **POST** /agent/{agent_id}/unlock/ | Unlock Agent
[**update_agent_agent_agent_id_put**](AgentsApi.md#update_agent_agent_agent_id_put) | **PUT** /agent/{agent_id}/ | Update Agent


# **approve_agent_agent_agent_id_approve_post**
> approve_agent_agent_agent_id_approve_post(agent_id, cbe_user_org_id=cbe_user_org_id)

Approve Agent

# Approve agent

Register a previously **unknown** (unregistered) agent into the system. Once
approved, the agent becomes a fully registered agent and starts appearing in
`GET /agent/`.

By default the agent is approved for the **caller's own organization**. To
approve the agent on behalf of a different organization, set the
`Cbe-User-Org-Id` header to the target organization id.

**Endpoint**: `POST /agent/{agent_id}/approve/`

**Auth**: requires an authenticated user.

## Path parameter
- `agent_id` (uuid, required): Identifier of the unregistered agent to approve. See `GET /agent/unregistered/`.

## Headers
- `Cbe-User-Org-Id` (string, optional): Organization the agent should be approved for. Defaults to the caller's organization when omitted.

## Response
- `204 No Content`: The agent was approved and registered.

### Example

```http
POST /agent/c85a857f-4d70-4099-b84f-a6b74ea999de/approve/ HTTP/1.1
Authorization: Bearer <access_token>
Cbe-User-Org-Id: 123456789
```

### Example

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

```python
import cybee_sdk.api
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.AgentsApi(api_client)
    agent_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | 
    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:
        # Approve Agent
        api_instance.approve_agent_agent_agent_id_approve_post(agent_id, cbe_user_org_id=cbe_user_org_id)
    except Exception as e:
        print("Exception when calling AgentsApi->approve_agent_agent_agent_id_approve_post: %s\n" % e)
```



### Parameters


Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **agent_id** | **UUID**|  | 
 **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

void (empty response body)

### 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 |
|-------------|-------------|------------------|
**204** | 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)

# **delete_agent_agent_agent_id_delete**
> object delete_agent_agent_agent_id_delete(agent_id, cbe_user_org_id=cbe_user_org_id)

Delete Agent

### Example

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

```python
import cybee_sdk.api
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.AgentsApi(api_client)
    agent_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | 
    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:
        # Delete Agent
        api_response = api_instance.delete_agent_agent_agent_id_delete(agent_id, cbe_user_org_id=cbe_user_org_id)
        print("The response of AgentsApi->delete_agent_agent_agent_id_delete:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AgentsApi->delete_agent_agent_agent_id_delete: %s\n" % e)
```



### Parameters


Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **agent_id** | **UUID**|  | 
 **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

**object**

### 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)

# **get_agent_agent_unregistered_get**
> PageUnregisteredAgentInfo get_agent_agent_unregistered_get(page=page, per_page=per_page, order_by=order_by, cbe_user_org_id=cbe_user_org_id)

Get Agent

# List unregistered agents

Fetch a paginated list of agents that are connected to the backend but **not yet
registered** - i.e. agents awaiting approval. Approve one with
`POST /agent/{agent_id}/approve/` to turn it into a registered agent visible in
`GET /agent/`.

**Endpoint**: `GET /agent/unregistered/`

**Auth**: requires an authenticated user.

## Query parameters
- `page` (int, default 0): Zero-based page index.
- `per_page` (int, default 25, max 50): Page size.
- `order_by` (list[str]): Optional sort fields forwarded to the backend.

## Response
`200 OK` with a `Page[UnregisteredAgentInfo]` body:
- `page`, `per_page`, `total_items`, `total_pages`: Pagination metadata.
- `items`: Array of unregistered agents with fields:
  - `id` (uuid): Agent identifier. Pass this to `POST /agent/{agent_id}/approve/`.
  - `machine_id` (string): Stable hardware/machine identifier.
  - `host_name` (string): Reported host name.
  - `os_family` (string, nullable): Operating system family (e.g. `windows`, `linux`).
  - `os_details` (string, nullable): Detailed OS description.
  - `version` (string, nullable): Agent software version.
  - `last_seen` (datetime): Last time the agent contacted the system.

### Example

```http
GET /agent/unregistered/?page=0&per_page=25 HTTP/1.1
Authorization: Bearer <access_token>
```

```json
{
  "page": 0,
  "per_page": 25,
  "total_items": 1,
  "total_pages": 1,
  "items": [
    {
      "id": "c85a857f-4d70-4099-b84f-a6b74ea999de",
      "machine_id": "S-1-5-21-1004336348",
      "host_name": "WIN-WORKSTATION-02",
      "domain_name": "company.local",
      "os_family": "windows",
      "os_details": "Windows 11 Pro 23H2",
      "version": "1.4.2",
      "last_seen": "2024-05-06T12:00:00Z"
    }
  ]
}
```

### Example

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

```python
import cybee_sdk.api
from cybee_sdk.api.models.page_unregistered_agent_info import PageUnregisteredAgentInfo
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.AgentsApi(api_client)
    page = 0 # int |  (optional) (default to 0)
    per_page = 25 # int |  (optional) (default to 25)
    order_by = [] # List[str] |  (optional) (default to [])
    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:
        # Get Agent
        api_response = api_instance.get_agent_agent_unregistered_get(page=page, per_page=per_page, order_by=order_by, cbe_user_org_id=cbe_user_org_id)
        print("The response of AgentsApi->get_agent_agent_unregistered_get:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AgentsApi->get_agent_agent_unregistered_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 []]
 **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

[**PageUnregisteredAgentInfo**](PageUnregisteredAgentInfo.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_agent_agent_get**
> PageAgentInfo list_agent_agent_get(page=page, per_page=per_page, order_by=order_by, id=id, machine_id=machine_id, custom_name=custom_name, host_name=host_name, domain_name=domain_name, online=online, cbe_user_org_id=cbe_user_org_id)

List Agent

# List agents

Fetch a paginated list of all known and **registered** agents.

Most filters accept multiple entries. Values supplied for the same field are
combined with an **OR**; values supplied for different fields are combined with
an **AND**.

> Unregistered (not-yet-approved) agents are not returned here. Use
> `GET /agent/unregistered/` to list agents awaiting approval, then call
> `POST /agent/{agent_id}/approve/` to register one.

**Endpoint**: `GET /agent/`

**Auth**: requires an authenticated user.

## Query parameters
- `page` (int, default 0): Zero-based page index.
- `per_page` (int, default 25, max 50): Page size.
- `order_by` (list[str]): Optional sort fields forwarded to the backend.
- `id` (list[uuid]): Filter by one or more agent ids.
- `machine_id` (list[string]): Filter by one or more machine ids.
- `custom_name` (list[string]): Filter by one or more user-defined names.
- `host_name` (list[string]): Filter by one or more host names.
- `online` (bool): Filter by current connectivity state.

## Response
`200 OK` with a `Page[AgentInfo]` body:
- `page`, `per_page`, `total_items`, `total_pages`: Pagination metadata.
- `items`: Array of agents with fields:
  - `id` (uuid): Agent identifier.
  - `machine_id` (string): Stable hardware/machine identifier.
  - `host_name` (string): Reported host name.
  - `custom_name` (string, nullable): User-defined display name.
  - `version` (string, nullable): Agent software version.
  - `online` (bool, nullable): Whether the agent is currently connected.
  - `approved_at` (datetime, nullable): When the agent was approved/registered. `null` while unregistered.
  - `last_seen` (datetime): Last time the agent contacted the system.
  - `lock_reason` (string, nullable): Reason the agent is locked. By default this reflects the keypair credentials expiration. See `POST /agent/{agent_id}/lock/`.
  - `locked_at` (datetime, nullable): When the agent was locked. By default this reflects the keypair credentials expiration. A locked agent cannot perform any action until unlocked via `POST /agent/{agent_id}/unlock/`.
  - `timestamps`: `created_at`, `updated_at`.

### Example

```http
GET /agent/?page=0&per_page=25&online=true HTTP/1.1
Authorization: Bearer <access_token>
```

```json
{
  "page": 0,
  "per_page": 25,
  "total_items": 1,
  "total_pages": 1,
  "items": [
    {
      "id": "e33602da-cb5f-4b5f-9c49-6307b32cfac7",
      "machine_id": "S-1-5-21-1004336348",
      "host_name": "WIN-WORKSTATION-01",
      "custom_name": "Reception desk",
      "version": "1.4.2",
      "online": true,
      "approved_at": "2024-05-01T09:12:33Z",
      "last_seen": "2024-05-06T12:00:00Z",
      "lock_reason": "key_exp",
      "locked_at": "2024-06-02T12:00:00Z",
      "timestamps": {
        "created_at": "2024-05-01T09:12:33Z",
        "updated_at": "2024-05-06T12:00:00Z"
      }
    }
  ]
}
```

### Example

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

```python
import cybee_sdk.api
from cybee_sdk.api.models.page_agent_info import PageAgentInfo
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.AgentsApi(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)
    machine_id = ['machine_id_example'] # List[Optional[str]] |  (optional)
    custom_name = ['custom_name_example'] # List[str] |  (optional)
    host_name = ['host_name_example'] # List[str] |  (optional)
    domain_name = ['domain_name_example'] # List[str] |  (optional)
    online = True # bool |  (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 Agent
        api_response = api_instance.list_agent_agent_get(page=page, per_page=per_page, order_by=order_by, id=id, machine_id=machine_id, custom_name=custom_name, host_name=host_name, domain_name=domain_name, online=online, cbe_user_org_id=cbe_user_org_id)
        print("The response of AgentsApi->list_agent_agent_get:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AgentsApi->list_agent_agent_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] 
 **machine_id** | [**List[Optional[str]]**](str.md)|  | [optional] 
 **custom_name** | [**List[str]**](str.md)|  | [optional] 
 **host_name** | [**List[str]**](str.md)|  | [optional] 
 **domain_name** | [**List[str]**](str.md)|  | [optional] 
 **online** | **bool**|  | [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

[**PageAgentInfo**](PageAgentInfo.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)

# **lock_agent_agent_agent_id_lock_post**
> lock_agent_agent_agent_id_lock_post(agent_id, agent_lock, cbe_user_org_id=cbe_user_org_id)

Lock Agent

# Lock agent

"Block" an agent in the system. A locked agent is forbidden from performing any
action, but its data is preserved and the agent is **not** deleted; it can be
re-enabled later via `POST /agent/{agent_id}/unlock/`.

Every agent carries `locked_at` and `lock_reason` properties. By default these
reflect the keypair credentials expiration: the value is updated automatically
when the agent detects its key is about to expire. An agent that stays offline
for too long is also locked automatically, and must then be unlocked manually.

This endpoint locks the agent explicitly with a custom reason.

**Endpoint**: `POST /agent/{agent_id}/lock/`

**Auth**: requires an authenticated user.

## Path parameter
- `agent_id` (uuid, required): Identifier of the agent to lock.

## Request body (AgentLock)
- `lock_reason` (string, required): Non-empty human-readable reason for locking the agent. Stored on the agent's `lock_reason` property.

## Response
- `204 No Content`: The agent was locked.

### Example

```http
POST /agent/e33602da-cb5f-4b5f-9c49-6307b32cfac7/lock/ HTTP/1.1
Authorization: Bearer <access_token>
Content-Type: application/json

{
  "lock_reason": "Decommissioned workstation"
}
```

### Example

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

```python
import cybee_sdk.api
from cybee_sdk.api.models.agent_lock import AgentLock
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.AgentsApi(api_client)
    agent_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | 
    agent_lock = cybee_sdk.api.AgentLock() # AgentLock | 
    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:
        # Lock Agent
        api_instance.lock_agent_agent_agent_id_lock_post(agent_id, agent_lock, cbe_user_org_id=cbe_user_org_id)
    except Exception as e:
        print("Exception when calling AgentsApi->lock_agent_agent_agent_id_lock_post: %s\n" % e)
```



### Parameters


Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **agent_id** | **UUID**|  | 
 **agent_lock** | [**AgentLock**](AgentLock.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

void (empty response body)

### 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 |
|-------------|-------------|------------------|
**204** | 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)

# **unlock_agent_agent_agent_id_unlock_post**
> unlock_agent_agent_agent_id_unlock_post(agent_id, cbe_user_org_id=cbe_user_org_id)

Unlock Agent

# Unlock agent

Unlock an agent that has previously been locked, allowing it back into the
system so it can perform actions again. This clears the lock set either
explicitly via `POST /agent/{agent_id}/lock/` or automatically (for example
when the agent has been offline for too long, or its keypair credentials were
about to expire).

**Endpoint**: `POST /agent/{agent_id}/unlock/`

**Auth**: requires an authenticated user.

## Path parameter
- `agent_id` (uuid, required): Identifier of the locked agent to unlock.

## Response
- `204 No Content`: The agent was unlocked.

### Example

```http
POST /agent/e33602da-cb5f-4b5f-9c49-6307b32cfac7/unlock/ HTTP/1.1
Authorization: Bearer <access_token>
```

### Example

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

```python
import cybee_sdk.api
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.AgentsApi(api_client)
    agent_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | 
    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:
        # Unlock Agent
        api_instance.unlock_agent_agent_agent_id_unlock_post(agent_id, cbe_user_org_id=cbe_user_org_id)
    except Exception as e:
        print("Exception when calling AgentsApi->unlock_agent_agent_agent_id_unlock_post: %s\n" % e)
```



### Parameters


Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **agent_id** | **UUID**|  | 
 **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

void (empty response body)

### 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 |
|-------------|-------------|------------------|
**204** | 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)

# **update_agent_agent_agent_id_put**
> object update_agent_agent_agent_id_put(agent_id, agent_update, cbe_user_org_id=cbe_user_org_id)

Update Agent

### Example

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

```python
import cybee_sdk.api
from cybee_sdk.api.models.agent_update import AgentUpdate
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.AgentsApi(api_client)
    agent_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | 
    agent_update = cybee_sdk.api.AgentUpdate() # AgentUpdate | 
    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:
        # Update Agent
        api_response = api_instance.update_agent_agent_agent_id_put(agent_id, agent_update, cbe_user_org_id=cbe_user_org_id)
        print("The response of AgentsApi->update_agent_agent_agent_id_put:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AgentsApi->update_agent_agent_agent_id_put: %s\n" % e)
```



### Parameters


Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **agent_id** | **UUID**|  | 
 **agent_update** | [**AgentUpdate**](AgentUpdate.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

**object**

### 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)

