Update Tool
Update Tool
Supports updating the basic information, API definition, and authentication information of a Tool under a specified organization.
You can use this endpoint to update the basic information, API definition, and authentication information of a Tool under a specified organization.
Request Method
PUT
Request URL
https://api.${endpoint}/v1/org/tool/update
Request Authentication
Uses account-level DevKey / DevSecret Basic authentication, and requires the calling account to have organization Tool management permission.
Request
Request Example
curl -X PUT 'https://api.${endpoint}/v1/org/tool/update' \
-H 'Authorization: Basic ${BASIC_TOKEN}' \
-H 'Content-Type: application/json' \
-d '{
"org_id": "p-xxxx",
"tool_id": "tool-xxxx",
"name": "weather",
"display_name": "Weather Lookup",
"description": "Query current weather",
"logo": "https://cdn.example.com/weather.png",
"url": "https://api.example.com",
"show_request": true,
"api_schema": "{\"openapi\":\"3.0.0\",\"paths\":{}}",
"auth_provider": "Creator",
"auth_type": "Bearer",
"auth_key": "token"
}'
curl -X PUT 'https://api.${endpoint}/v1/org/tool/update' \
-H 'Authorization: Basic ${BASIC_TOKEN}' \
-H 'Content-Type: application/json' \
-d '{
"org_id": "p-xxxx",
"tool_id": "tool-xxxx",
"name": "weather",
"display_name": "Weather Lookup",
"description": "Query current weather",
"logo": "https://cdn.example.com/weather.png",
"url": "https://api.example.com",
"show_request": true,
"api_schema": "{\"openapi\":\"3.0.0\",\"paths\":{}}",
"auth_provider": "Creator",
"auth_type": "Bearer",
"auth_key": "token"
}'
This code block in the floating window
Request Headers
| Field | Type | Description |
|---|---|---|
| Authorization | Basic ${BASIC_TOKEN} | The Basic Token obtained by Base64-encoding DevKey:DevSecret. |
| Content-Type | application/json | Request body format. |
Request Parameters (Body Parameters)
| Parameter | Type | Description | required |
|---|---|---|---|
| org_id | String | Organization ID. | true |
| tool_id | String | Tool ID. | true |
| name | String | Tool name, up to 20 characters. | true |
| display_name | String | Tool display name, up to 50 characters. | false |
| description | String | Tool description, up to 100 characters. | true |
| logo | String | Tool icon URL. | true |
| url | String | Tool base URL, must be a public http/https address. |
true |
| show_request | Boolean | Whether to display the request content during the call. | true |
| api_schema | String | OpenAPI JSON Schema. When not provided, the API definition is not updated. | false |
| auth_provider | String | Authentication provider. When not provided, the authentication configuration is not updated. | false |
| auth_type | String | Authentication type. | false |
| auth_key | String | Authentication key or token. | false |
| auth_key_name | String | Authentication key display name. | false |
| auth_key_tip | String | Authentication key tip. | false |
| auth_secret | String | Authentication secret. | false |
| auth_secret_name | String | Authentication secret display name. | false |
| auth_secret_tip | String | Authentication secret tip. | false |
Response
Response Example
{
"code": 0,
"message": "OK",
"affect_count": 1
}
{
"code": 0,
"message": "OK",
"affect_count": 1
}
This code block in the floating window
Success Response
| Field | Type | Description |
|---|---|---|
| affect_count | Integer | Number of affected records. |
Failure Response
| Field | Type | Description |
|---|---|---|
| code | Integer | Error code. |
| message | String | Error details. |
Status Codes
| Status Code | Description |
|---|---|
| 200 | Success |
| 400 | Parameter error |
| 401 | Unauthorized |
| 403 | Insufficient permissions |
| 429 | Too many requests |
| 500 | Server error |
