Queries the information about a user-defined function (UDF) in Data Studio.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dataworks:* |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ProjectId |
integer |
No |
The DataWorks workspace ID. You can log on to the DataWorks console and go to the workspace configuration page to query the ID. You must configure this parameter to specify the DataWorks workspace to which the API operation is applied. |
10000 |
| Id |
string |
Yes |
The unique identifier of the UDF function. Note
This field is of type Long in SDK versions prior to 8.0.0, and of type String in SDK version 8.0.0 and later. This change does not affect the normal use of the SDK; parameters are still returned according to the type defined in the SDK. Compilation failures due to the type change may occur only when upgrading the SDK across version 8.0.0, in which case users need to manually correct the data type. |
86043887262011**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The request ID. |
6CF95929-6D12-5A88-8CC3-4B2F4C2EXXXX |
| Function |
object |
UDF function details. |
|
| ProjectId |
integer |
The ID of the DataWorks workspace to which the UDF belongs. |
10000 |
| Name |
string |
The name of the UDF. |
Function name |
| Owner |
string |
The owner of the UDF. |
110755000425XXXX |
| CreateTime |
integer |
The time when the UDF was created. This value is a UNIX timestamp. |
1724505917000 |
| ModifyTime |
integer |
The time when the UDF was last modified. This value is a UNIX timestamp. |
1724506661000 |
| Spec |
string |
The FlowSpec field information about the UDF. For more information, see FlowSpec. |
{ "version": "1.1.0", "kind": "Function", "spec": { "functions": [ { "name": "Function_Name", "id": "580667964888595XXXX", "script": { "content": "{ \"uuid\": \"580667964888595XXXX\", \"name\": \"Function_Name\", \"datasource\": { \"type\": \"odps\", \"name\": \"odps_first\" }, \"runtimeResource\": { \"resourceGroup\": \"S_res_group_XXXX_XXXX\", \"resourceGroupId\": 6591XXXX }}", "path": "XXX/OpenAPI/Function/Function_Name", "runtime": { "command": "ODPS_FUNCTION" } }, "datasource": { "name": "odps_first", "type": "odps" }, "runtimeResource": { "resourceGroup": "S_res_group_XXXX_XXXX", "id": "723932906364267XXXX", "resourceGroupId": "6591XXXX" }, "metadata": { "owner": "110755000425XXXX" } } ] } } |
| Id |
string |
The unique identifier of the UDF function. Note
Prior to SDK version 8.0.0, this field is of type Long. In SDK version 8.0.0 and later, it is of type String. This change does not affect the normal use of the SDK. The parameter is returned based on the type defined in the SDK. Compilation failures caused by the type change may occur only when you upgrade the SDK across version 8.0.0. In this case, you must manually update the data type. |
860438872620113XXXX |
Examples
Success response
JSON format
{
"RequestId": "6CF95929-6D12-5A88-8CC3-4B2F4C2EXXXX",
"Function": {
"ProjectId": 10000,
"Name": "Function name",
"Owner": "110755000425XXXX",
"CreateTime": 1724505917000,
"ModifyTime": 1724506661000,
"Spec": "{\n \"version\": \"1.1.0\",\n \"kind\": \"Function\",\n \"spec\": {\n \"functions\": [\n {\n \"name\": \"Function_Name\",\n \"id\": \"580667964888595XXXX\",\n \"script\": {\n \"content\": \"{ \\\"uuid\\\": \\\"580667964888595XXXX\\\", \\\"name\\\": \\\"Function_Name\\\", \\\"datasource\\\": { \\\"type\\\": \\\"odps\\\", \\\"name\\\": \\\"odps_first\\\" }, \\\"runtimeResource\\\": { \\\"resourceGroup\\\": \\\"S_res_group_XXXX_XXXX\\\", \\\"resourceGroupId\\\": 6591XXXX }}\",\n \"path\": \"XXX/OpenAPI/Function/Function_Name\",\n \"runtime\": {\n \"command\": \"ODPS_FUNCTION\"\n }\n },\n \"datasource\": {\n \"name\": \"odps_first\",\n \"type\": \"odps\"\n },\n \"runtimeResource\": {\n \"resourceGroup\": \"S_res_group_XXXX_XXXX\",\n \"id\": \"723932906364267XXXX\",\n \"resourceGroupId\": \"6591XXXX\"\n },\n \"metadata\": {\n \"owner\": \"110755000425XXXX\"\n }\n }\n ]\n }\n}",
"Id": "860438872620113XXXX\n"
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.