Updated on 2022-09-15 GMT+08:00

Querying All Relationships in a Model

Function

This API is used to query all the relationships in a model.

URI

GET /v2/{project_id}/design/{model_id}/table-model/relation

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID

model_id

Yes

String

Parameters for querying workspaces by ID

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

table_ids

No

String

IDs of table models

biz_type

No

String

Table type

Default: TABLE_MODEL

Enumeration values:

  • TABLE_MODEL

  • FACT_LOGIC_TABLE

limit

No

Integer

Number of records to be queried, that is, Y records. The value ranges from 1 to 100. The default value is 50.

Maximum: 100

Default: 50

offset

No

Integer

Query offset, that is, X data records are skipped. The value must be 0 or an integer multiple of limit. If the value does not meet the requirements, it will be rounded down. The default value is 0.

Default: 0

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

data

Object

Returned data

Status code: 400

Table 4 Response body parameters

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

Table 5 Response body parameters

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

Table 6 Response body parameters

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.

{
  "data" : {
    "value" : ""
  }
}

Status Codes

Status Code

Description

200

The operation succeeds. RelationVO is returned.

400

BadRequest

401

Unauthorized

403

Forbidden