Modifies the configurations of a specified API data source.
Operation description
When you modify a query statement, you can modify only the top-level JsonObject. You cannot modify parameters that are nested in multiple layers. For more information about the parameters, see Create an API data source.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resourcesis used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
| Operation | Access level | Resource type | Condition key | Associated operation |
|---|---|---|---|---|
| quickbi-public:ModifyApiDatasourceParameters | update | *All Resources * |
| none |
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| ApiId | string | Yes | The ID of the API data source. | b66a66de51f24d149116c17718138194 |
| WorkspaceId | string | Yes | The workspace ID. | 726bee5a-****-43e1-9a8e-b550f0120f35 |
| Parameters | string | Yes | The configuration of API data parameters in the JSONArray format. You can modify a maximum of 10 parameters.
| [{"name":"token","value":"xxxxxxxxxxxx"},{"name":"pageSize","value":100}] |
Response parameters
Examples
Sample success responses
JSONformat
{
"RequestId": "D8749D65-E80A-433C-AF1B-CE9C180FF3B4",
"Result": true,
"Success": true
}Error codes
| HTTP status code | Error code | Error message | Description |
|---|---|---|---|
| 400 | ApiDataSource.NotIn.Workspace | Target apiId not in target workspace. | - |
| 400 | Workspace.NotIn.Organization | The workspace is not owned by the organization. | The workspace is not owned by the organization. |
| 400 | ApiDatasource.Not.Exist | Api datasource not exist. | - |
| 400 | ApiDatasource.Param.IsNull | Api datasource modify parameters is null. | - |
| 400 | ApiDatasource.Param.Oversize | The number of parameters of API data source exceeds the limit and cannot exceed %s. | - |
For a list of error codes, visit the Service error codes.
