Querying Relationship Details
Function
This API is used to query the details of a relationship with a specified ID.
URI
GET /v2/{project_id}/design/relation/{id}
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID |
|
id |
Yes |
String |
Entity ID |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
latest |
No |
Boolean |
Whether to query the latest data |
Request Parameters
None
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
Long |
ID |
|
source_table_id |
Long |
Source table ID |
|
target_table_id |
Long |
Destination table ID |
|
name |
String |
Relationship name |
|
source_table_name |
String |
Source table name |
|
target_table_name |
String |
Destination table name |
|
role |
String |
Role |
|
tenant_id |
String |
Tenant ID |
|
source_type |
String |
Relationship type Enumeration values:
|
|
target_type |
String |
Relationship type Enumeration values:
|
|
create_by |
String |
Creator |
|
update_by |
String |
User who updated the relationship |
|
create_time |
String |
Creation time |
|
update_time |
String |
Update time |
|
mappings |
Array of RelationMappingVO objects |
Relationship mappings |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
Long |
ID |
|
relation_id |
Long |
Relationship ID |
|
source_field_id |
Long |
Source field ID |
|
target_field_id |
Long |
Destination field ID |
|
source_field_name |
String |
Source field name |
|
target_field_name |
String |
Destination field name |
|
create_by |
String |
Creator |
|
update_by |
String |
User who updated the mapping |
|
create_time |
String |
Creation time |
|
update_time |
String |
Update time |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code, for example, DS.000 which indicates that the request was successfully processed. |
|
error_msg |
String |
Error message |
|
data |
Object |
Returned data |
Status code: 401
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code, for example, DS.000 which indicates that the request was successfully processed. |
|
error_msg |
String |
Error message |
|
data |
Object |
Returned data |
Status code: 403
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code, for example, DS.000 which indicates that the request was successfully processed. |
|
error_msg |
String |
Error message |
|
data |
Object |
Returned data |
Example Requests
None
Example Responses
Status code: 200
The operation succeeds. RelationVO is returned.
{
"id" : "1000068927784710144",
"source_table_id" : "873243083737899008",
"target_table_id" : "888462883313393664",
"name" : "sdi_taxi_trip_data_wang_1",
"source_table_name" : "demo_sdi_db.sdi_taxi_trip_data",
"target_table_name" : "default.wang",
"role" : null,
"tenant_id" : "0cf68da0ba80f2962ff7c01ba8c0b7f7-workspace-f7eee36e67e541a59679f9b1b7f4eab0",
"source_type" : "ONE_OR_N",
"target_type" : "ONE_OR_N",
"create_by" : "abc",
"update_by" : "abc",
"create_time" : "2022-07-22T15:56:53+08:00",
"update_time" : "2022-07-22T15:57:28+08:00",
"mappings" : [ {
"id" : "1000068927818264576",
"relation_id" : "1000068927784710144",
"source_field_id" : "873243083737899013",
"target_field_id" : "888462883317587968",
"source_field_name" : "trip_distance",
"target_field_name" : "id",
"create_by" : "abc",
"update_by" : "abc",
"create_time" : "2022-07-22T15:56:53+08:00",
"update_time" : "2022-07-22T15:57:28+08:00"
} ]
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
The operation succeeds. RelationVO is returned. |
|
400 |
BadRequest |
|
401 |
Unauthorized |
|
403 |
Forbidden |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.