Create a relation type.
POST/api/v1/graph/relation-typescustom_fields:write
注記
このページの操作の説明は、API の OpenAPI 文書のとおり英語で記載しています。
Adds a relation type under a code of 2 to 40 capital letters, digits and underscores starting with a letter (409 already_exists when taken). from_kinds and to_kinds hold document and/or register_row. Needs Create Graph Relation Types.
| スコープ | custom_fields:write |
| 非同期 | いいえ |
| MCP ツール | create_graph_relation_type |
| Portal の権限 | create_graph_relation_types |
パラメーター
| 名前 | 場所 | 型 | 必須 | 説明 |
|---|---|---|---|---|
Docwize-Version | header | string (date) | 任意 | |
Idempotency-Key | header | string | 任意 | max 255 |
リクエスト本文
| Content-Type | 型 |
|---|---|
application/json | GraphRelationTypeCreateInput |
応答
| ステータス | 説明 | 本文 |
|---|---|---|
201 | Success. | application/json GraphRelationType または object |
400 | invalid_version, malformed_json | application/problem+json Problem |
401 | token_expired, unauthenticated | application/problem+json Problem |
403 | forbidden, insufficient_scope, token_owner_inactive | application/problem+json Problem |
405 | method_not_allowed | application/problem+json Problem |
406 | not_acceptable | application/problem+json Problem |
409 | already_exists, idempotency_in_progress | application/problem+json Problem |
413 | payload_too_large | application/problem+json Problem |
415 | unsupported_media_type | application/problem+json Problem |
421 | wrong_region | application/problem+json Problem |
422 | idempotency_key_reused, validation_failed | application/problem+json Problem |
500 | internal_error | application/problem+json Problem |
503 | tenant_unavailable, unavailable | application/problem+json Problem |
504 | timeout | application/problem+json Problem |
エラー
この操作が返す可能性のある problem のコードです。各コードからそのページに移動できます。
スキーマ
GraphRelationType
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
category | string または null | 必須 | |
color | string または null | 必須 | |
decision_category | string または null | 必須 | |
derivation | string または null | 必須 | Set for a relation type the engine derives (it cannot be deleted). |
external_code | string または null | 必須 | |
from_kinds | string の配列 | 必須 | What the relation can start from: document, register_row. |
impact_direction | string または null | 必須 | Set with impact_weight. |
impact_weight | number または null | 必須 | Above 0 up to 1, for an impact edge; null when the relation is not one. |
inverse_label | string または null | 必須 | How the relation reads from the other end; null when it reads the same. |
is_active | boolean | 必須 | |
is_symmetric | boolean | 必須 | |
is_transitive | boolean | 必須 | |
label | string | 必須 | |
navigation_audience | string または null | 必須 | Who sees the relation when navigating: all or analyst. |
relation_type_id | string | 必須 | The code, 2 to 40 capital letters, digits and underscores. |
to_custom_field_template_id | string または null | 必須 | The register a relation ends at, when it is fixed. |
to_kinds | string の配列 | 必須 | What the relation can end at: document, register_row. |
used_by | GraphUse の配列 | 必須 | The fields and templates configured to use the relation type. |
GraphRelationTypeCreateInput
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
category | string または null | 任意 | Up to 40 characters. |
color | string または null | 任意 | Up to 20 characters. |
decision_category | string または null | 任意 | |
external_code | string または null | 任意 | Up to 100 characters. |
from_kinds | string の配列 | 任意 | document and/or register_row. Both when left out. |
impact_direction | string または null | 任意 | |
impact_weight | number または null | 任意 | Above 0 up to 1; send with impact_direction. |
inverse_label | string または null | 任意 | Up to 100 characters. |
is_active | boolean または null | 任意 | True when left out. |
is_symmetric | boolean または null | 任意 | False when left out. |
is_transitive | boolean または null | 任意 | False when left out. |
label | string | 必須 | Up to 100 characters. |
navigation_audience | string または null | 任意 | all or analyst. |
relation_type_id | string | 必須 | The code: 2 to 40 capital letters, digits and underscores, starting with a letter. |
to_custom_field_template_id | string または null | 任意 | |
to_kinds | string の配列 | 任意 | document and/or register_row. Both when left out. |
GraphUse
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
custom_field_id | string または null | 必須 | The field; null for a template-level use. |
custom_field_template_id | string または null | 必須 | The template; null for a use outside a template. |
label | string | 必須 | The template, or the template and field, as the builder names it. |
where | string または null | 必須 | For a normaliser: field_role or document_link, or null. |