Querying Resource Lineage
Function
This API is used to query resource lineage.
URI
POST /v1/{project_id}/resources/relationships
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For how to obtain the project ID, see Obtaining a Project ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Workspace-Id |
Yes |
String |
Workspace ID. For how to obtain it, see Obtaining a Workspace ID. |
X-Auth-Token |
Yes |
String |
User token. Obtain a user token by calling IAM's "Obtaining a User Token" API. X-Subject-Token in the response header is the desired user token. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
resources |
Yes |
Array of resources objects |
List of resources whose lineage is to be queried. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
resource_type |
Yes |
String |
Explanation Enumerated value of the resource type, which is used to specify the type of the authorized object. For example, datasource indicates that the type of the authorized object is a data source. Constraints N/A Value range The enumerated values are:
Default value N/A |
resource_id |
Yes |
String |
Resource ID. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
resources |
Array of ResourceRelationDetailVO objects |
Resource lineage list. |
workspace_id |
String |
Workspace ID. For how to obtain it, see Obtaining a Workspace ID. |
Parameter |
Type |
Description |
---|---|---|
resource_id |
String |
Resource ID. |
resource_name |
String |
Resource name. |
resource_type |
String |
Explanation Enumerated value of the resource type, which is used to specify the type of the authorized object. For example, datasource indicates that the type of the authorized object is a data source. Constraints N/A Value range The enumerated values are:
Default value N/A |
relations |
Array of ResourceRelationDetailVO objects |
Dependent resource list. |
Example Request
Query the lineage of resources.
POST https://{endpoint}/v1/0e****127d****6b7****95750da/resources/relationships { "resources" : [ { "resource_type" : "portal", "resource_id" : "96334c9****4510a0035dff29a7582b" } ] }
Example Response
Status code: 200
The lineage of resources is successfully queried.
{ "resources" : [ { "resource_id" : "96334c9923****0a0035dff29a7582b", "resource_name": "Test Data Portal", "resource_type" : "portal", "relations" : [ { "resource_id" : "2545c456-****-a6d4-dd8419cac54a", "resource_name": "Large Screen", "resource_type" : "screen", "relations" : [ ] }, { "resource_id" : "12e25f5f-4*****-8468-bdf69c25438f", "resource_name": "Dashboard", "resource_type" : "dashboard", "relations" : [ { "resource_id" : "980bc5e2-******4-a168-4d344065bcb3", "resource_name": "Dataset", "resource_type" : "dataset", "relations" : [ { "resource_id" : "c4d84a8******ba190c5cabf75dfe", "resource_name" : "datasource", "resource_type" : "datasource", "relations" : [ ] } ] } ] } ] } ], "workspace_id" : "e10aa3****e713d779c65e74" }
Status Codes
Status Code |
Description |
---|---|
200 |
The lineage of resources is successfully queried. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot