---
title: "Legacy - Creates a relationship between two catalog resources"
method: POST
path: "/metadata/relationships/{owner}"
tags: ["legacy catalog - relationships"]
---

# Legacy - Creates a relationship between two catalog resources

`POST /metadata/relationships/{owner}`

Please refer to the updated IRI-based relationship endpoints.

## Path parameters

- `owner` string, required

## Request body

- RelationshipCreateOrDeleteRequest
  - `relationshipType` string, uri, required — IRI of the relationship type
  - `sourceDatasetId` string — If source is a table or column, populate with database ID that contains table.
  - `sourceId` string, required
  - `sourceTableId` string — If source is a column, populate with table ID that contains column.
  - `sourceType` 'CATALOG' | 'ANALYSIS' | 'BUSINESS_TERM' | 'COLUMN' | 'DATA_TYPE' | 'DATABASE' | 'DATASET' | 'PROJECT' | 'TABLE' | 'CONCEPT' | 'UNKNOWN_CATALOG_ENTRY', required
  - `sourceTypeIri` string, uri — IRI of specified sourceType, this is required when sourceType is generic.
  - `targetDatasetId` string — If target is a table or column, populate with database ID that contains table.
  - `targetId` string, required
  - `targetTableId` string — If target is a column, populate with table ID that contains column.
  - `targetType` 'CATALOG' | 'ANALYSIS' | 'BUSINESS_TERM' | 'COLUMN' | 'DATA_TYPE' | 'DATABASE' | 'DATASET' | 'PROJECT' | 'TABLE' | 'CONCEPT' | 'UNKNOWN_CATALOG_ENTRY', required — Type of targetId.

## Response `200`

default response

- SuccessMessage
  - `message` string

---

[API](https://skmtc.dev/data/apis/data-world-public-api.md) · [All operations](https://skmtc.dev/data/apis/data-world-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/data/data-world-public-api/revisions/0a0cb1f94dad/schema)
