Updates a DataService Studio API in the development state.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| TenantId |
integer |
No |
The tenant ID. To obtain this ID, log on to the DataWorks console, go to the DataStudio page, click your username in the upper-right corner, and click User Info. |
10001 |
| ProjectId |
integer |
Yes |
The ID of the workspace. |
10001 |
| ApiId |
integer |
Yes |
The ID of the API. |
10000 |
| RequestMethod |
integer |
Yes |
The request method of the API. Valid values: 0 (GET), 1 (POST), 2 (PUT), and 3 (DELETE). APIs generated in wizard or script mode support GET and POST. APIs generated by registration support all four methods. |
0 |
| ResponseContentType |
integer |
Yes |
The response format of the API. Valid values: 0 (JSON) and 1 (XML). APIs generated in wizard or script mode support only JSON. APIs generated by registration support both JSON and XML. |
0 |
| Timeout |
integer |
Yes |
The timeout period of the API request. Unit: milliseconds. Valid values: (0,30000]. |
10000 |
| VisibleRange |
integer |
Yes |
The visibility scope of the API. Valid values: 0 (visible within the workspace) and 1 (visible only to the owner). |
0 |
| Protocols |
string |
Yes |
The protocol used by the API. Valid values: 0 (HTTP) and 1 (HTTPS). Separate multiple values with commas (,). |
0,1 |
| WizardDetails |
string |
No |
The details of the wizard-mode API. For more information, see the WizardDetails parameter of the GetDataServiceApi operation. |
{"isPagedResponse":true,"wizardConnection":{"connectionId":122786,"tableName":"person"},"wizardRequestParameters":[{"columnName":"id","defaultValue":"","exampleValue":"1","isRequiredParameter":true,"parameterDataType":2,"parameterDescription":"","parameterName":"id","parameterOperator":0,"parameterPosition":0}],"wizardResponseParameters":[{"columnName":"id","exampleValue":"11","parameterDataType":2,"parameterDescription":"","parameterName":"id"}]} |
| ScriptDetails |
string |
No |
The details of the script-mode API. For more information, see the ScriptDetails parameter of the GetDataServiceApi operation. |
{"isPagedResponse":false,"script":"select id as id1, name as name1 from person where id=${inputid}","scriptConnection":{"connectionId":122786,"tableName":"person"},"scriptRequestParameters":[{"defaultValue":"","exampleValue":"","isRequiredParameter":true,"parameterDataType":0,"parameterDescription":"","parameterName":"inputid","parameterOperator":0,"parameterPosition":1}],"scriptResponseParameters":[{"exampleValue":"","parameterDataType":0,"parameterDescription":"","parameterName":"id1"},{"exampleValue":"","parameterDataType":0,"parameterDescription":"","parameterName":"name1"}]} |
| RegistrationDetails |
string |
No |
The details of the registration-based API. For more information, see the RegistrationDetails parameter of the GetDataServiceApi operation. |
{"failedResultSample":"fail","registrationErrorCodes":[{"errorCode":"e1","errorMessage":"msg1","errorSolution":"sol1"},{"errorCode":"e2","errorMessage":"msg2","errorSolution":"sol2"}],"registrationRequestParameters":[{"columnName":"","defaultValue":"","exampleValue":"","isRequiredParameter":true,"parameterDataType":0,"parameterDescription":"","parameterName":"id","parameterOperator":0,"parameterPosition":1},{"columnName":"","defaultValue":"xx","exampleValue":"","isRequiredParameter":true,"parameterDataType":0,"parameterDescription":"","parameterName":"cc","parameterOperator":2,"parameterPosition":2}],"serviceContentType":1,"serviceHost":"http://www.baidu.com","servicePath":"/[uid]","serviceRequestBodyDescription":"body","successfulResultSample":"success"} |
| ApiPath |
string |
Yes |
The path of the API. |
/test/2 |
| ApiDescription |
string |
Yes |
The description of the API. |
API description |
| ResourceGroupId |
integer |
No |
The ID of the exclusive resource group. |
3242432423 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| HttpStatusCode |
integer |
The HTTP status code. |
200 |
| Data |
boolean |
Indicates whether the API information was updated. |
true |
| ErrorMessage |
string |
The error message. |
The connection does not exist. |
| RequestId |
string |
The request ID. |
0000-ABCD-EFG**** |
| ErrorCode |
string |
The error code. |
Invalid.Tenant.ConnectionNotExists |
| Success |
boolean |
Indicates whether the request was successful. |
true |
Examples
Success response
JSON format
{
"HttpStatusCode": 200,
"Data": true,
"ErrorMessage": "The connection does not exist.",
"RequestId": "0000-ABCD-EFG****",
"ErrorCode": "Invalid.Tenant.ConnectionNotExists",
"Success": true
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 500 | InternalError.System | An internal system error occurred. Try again later. | |
| 500 | InternalError.UserId.Missing | An internal system error occurred. Try again later. | |
| 403 | Forbidden.Access | Access is forbidden. Please first activate DataWorks Enterprise Edition or Flagship Edition. | No permission, please authorize |
| 429 | Throttling.Api | The request for this resource has exceeded your available limit. | |
| 429 | Throttling.System | The DataWorks system is busy. Try again later. | |
| 429 | Throttling.User | Your request is too frequent. Try again later. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.