# Switch the function version of the agent - SwitchAgentFunctionVersion

## Overview

Switching between different functional versions of the agent






## Definition

### Public Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Action**     | string  | Corresponding API command name, the current API is `SwitchAgentFunctionVersion`.                      | **Yes** |
| **PublicKey**  | string  | The user's public key can be obtained from [Console](https://console.nubexcloud.com/uaccount/api_manage)                                             | **Yes** |
| **Signature**  | string  | User signature generated based on public key and API command, see [Signature Algorithm](/docs/api/summary/signature.md)  | **Yes** |

### Request Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **ProjectId** | string | Project ID |**Yes**|
| **FuncVersion** | int | Function Version (0-Basic Edition 1-Enterprise Edition) |**Yes**|
| **AgentList** | string | List of Agents to operate, separated by commas, set to ALL if all. |**Yes**|
| **ChargeType** | int | Billing Type: Monthly or Yearly |**Yes**|
| **Quantity** | int | Purchase Quantity |No|
| **Coupon** | string | Voucher |No|

### Response Field

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **RetCode** | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. |**Yes**|
| **Action** | string | Operation command name. |**Yes**|
| **Message** | string | Returns an error message, providing detailed description when `RetCode` is non-zero. |No|
| **Records** | [*SwitchAgentRecord*](#switchagentrecord) | Switch Agent Version Result |No|

#### Data Model


#### SwitchAgentRecord

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **AgentID** | string |  |No|
| **RetCode** | int |  |No|
| **Message** | string |  |No|

## Example

### Request Example
    
```
https://api.nubexcloud.com/?Action=SwitchAgentFunctionVersion
&ProjectId=WJRalMZM
&FuncVersion=7
&AgentList=FivBWYyj
&ChargeType=3
&Quantity=6
&Coupon=KMzrxygC
```

### Response Example
    
```json
{
  "Action": "SwitchAgentFunctionVersionResponse",
  "Records": {},
  "RetCode": 0
}
```





