GET /{o}/{p}/relationship-typesList relationship types
Auth: Bearer token required · Permission:
catalog:read
Path parameters
| Name | Type | Description |
|---|---|---|
o | string | |
p | string |
Responses
| Status | Description | Schema |
|---|---|---|
200 | Relationship types | RelationshipTypeList |
POST /{o}/{p}/relationship-typesCreate a relationship type
Auth: Bearer token required · Permission:
catalog:write
Path parameters
| Name | Type | Description |
|---|---|---|
o | string | |
p | string |
Request body (application/json)
| Field | Type | Description |
|---|---|---|
kind | RelationshipType | (required) |
name | string | (required) |
displayName | string | |
from | string | (required) |
to | string | (required) |
cardinality | one-to-one | one-to-many | many-to-one | many-to-many | |
states | string[] | (required) |
properties | object[] | |
constraints | object[] |
Responses
| Status | Description | Schema |
|---|---|---|
201 | Created relationship type | RelationshipType |
409 | Relationship type already exists | Error |
GET /{o}/{p}/relationship-types/{name}Get a relationship type by name
Auth: Bearer token required · Permission:
catalog:read
Path parameters
| Name | Type | Description |
|---|---|---|
o | string | |
p | string | |
name | string |
Responses
| Status | Description | Schema |
|---|---|---|
200 | The relationship type | RelationshipType |
404 | Relationship type not found | Error |
PUT /{o}/{p}/relationship-types/{name}Update a relationship type
Auth: Bearer token required · Permission:
catalog:write
Path parameters
| Name | Type | Description |
|---|---|---|
o | string | |
p | string | |
name | string |
Request body (application/json)
| Field | Type | Description |
|---|---|---|
kind | RelationshipType | (required) |
name | string | (required) |
displayName | string | |
from | string | (required) |
to | string | (required) |
cardinality | one-to-one | one-to-many | many-to-one | many-to-many | |
states | string[] | (required) |
properties | object[] | |
constraints | object[] |
Responses
| Status | Description | Schema |
|---|---|---|
200 | Updated relationship type | RelationshipType |
404 | Relationship type not found | Error |
DELETE /{o}/{p}/relationship-types/{name}Delete a relationship type
Auth: Bearer token required · Permission:
catalog:write
Path parameters
| Name | Type | Description |
|---|---|---|
o | string | |
p | string | |
name | string |
Responses
| Status | Description | Schema |
|---|---|---|
200 | Deletion result | Deleted |
404 | Relationship type not found | Error |
Deleted| Field | Type | Description |
|---|---|---|
deleted | true | (required) |
name | string | (required) |
Error| Field | Type | Description |
|---|---|---|
error | string | (required) |
code | string |
RelationshipType| Field | Type | Description |
|---|---|---|
name | string | (required) |
displayName | string | |
cardinality | one-to-one | one-to-many | many-to-one | many-to-many | (required) |
states | string[] | (required) |
properties | object[] | (required) |
constraints | object[] | (required) |
fromEntityTypeName | string | (required) |
toEntityTypeName | string | (required) |
orgId | string | (required) |
projectId | string | (required) |
createdAt | string | string | (required) |
updatedAt | string | string | (required) |
RelationshipTypeListType: RelationshipType[]