All Products
Search
Document Center

DataWorks:GetComponent

Last Updated:Dec 19, 2025

Gets component information.

Operation description

  1. This API operation is available for all DataWorks editions.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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 Resources is 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.
OperationAccess levelResource typeCondition keyAssociated operation
dataworks:GetComponentget
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ProjectIdlongNo

The DataWorks workspace ID. You can log on to the DataWorks console and go to the Workspace page to query the ID. You must configure either this parameter or the ProjectIdentifier parameter to determine the DataWorks workspace to which the operation is applied.

10000
ComponentIdstringYes

The component ID.

1112312312312

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

Id of the request

0000-ABCD-EFG****
Componentobject

JSON serialization of the component module.

ComponentIdstring

The ID of the dataset acceleration component. For information on how to obtain the component ID, see ListComponents .

43cd873b-235c-44f8-be07-e4d4cf7e73b0
ProjectIdlong

The DataWorks workspace ID.

64623
Namestring

Parameter

dim_whse_epet_warehouse_jz_storage_stock_lot_relation_id
Ownerstring

The ID of the task owner.

207316543660665792
CreateTimestring

The creation time.

2017-04-27T05:37:05Z
ModifyTimestring

The modification time (millisecond-level timestamp).

2024-01-26T07:44:21Z
Specstring

The FlowSpec information for this workflow. For more information, see FlowSpec .

{ "kind": "Component", "name": "com1", "spec": { "components": [ { "name": "test11", "id": "8196828925037*****", "owner": "054664", "description": "", "script": { "language": "odps-sql", "path": "test11", "content": "select '@@{bizdate}', '@@{my_input_table}'", "runtime": { "command": "SQL_COMPONENT" } }, "inputs": [ { "name": "bizdate", "type": "string" }, { "name": "my_input_table", "type": "string" } ], "outputs": [ { "name": "my_output_table1", "type": "string" } ] } ] } }
Descriptionstring

The description.

None
RegionIdstring

The region ID, such as ap-southeast-1. The region ID is automatically parsed from your endpoint.

cn-hangzhou

Examples

Sample success responses

JSONformat

{
  "RequestId": "0000-ABCD-EFG****",
  "Component": {
    "ComponentId": "43cd873b-235c-44f8-be07-e4d4cf7e73b0",
    "ProjectId": 64623,
    "Name": "dim_whse_epet_warehouse_jz_storage_stock_lot_relation_id",
    "Owner": 207316543660665800,
    "CreateTime": "2017-04-27T05:37:05Z",
    "ModifyTime": "2024-01-26T07:44:21Z",
    "Spec": {
      "kind": "Component",
      "name": "com1",
      "spec": {
        "components": [
          {
            "name": "test11",
            "id": "8196828925037*****",
            "owner": "054664",
            "description": "",
            "script": {
              "language": "odps-sql",
              "path": "test11",
              "content": "select '@@{bizdate}', '@@{my_input_table}'",
              "runtime": {
                "command": "SQL_COMPONENT"
              }
            },
            "inputs": [
              {
                "name": "bizdate",
                "type": "string"
              },
              {
                "name": "my_input_table",
                "type": "string"
              }
            ],
            "outputs": [
              {
                "name": "my_output_table1",
                "type": "string"
              }
            ]
          }
        ]
      }
    },
    "Description": "None",
    "RegionId": "cn-hangzhou"
  }
}

Error codes

HTTP status codeError codeError message
404InvalidComponent.NotFoundThe specified Component does not exist.

For a list of error codes, visit the Service error codes.