Skip to main content

Create a relation type.

POST/api/v1/graph/relation-typescustom_fields:write

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.

Scopecustom_fields:write
AsynchronousNo
MCP toolcreate_graph_relation_type
Portal permissionscreate_graph_relation_types

Parameters​

NameInTypeRequiredDescription
Docwize-Versionheaderstring (date)Optional
Idempotency-KeyheaderstringOptionalmax 255

Request body​

Content typeType
application/jsonGraphRelationTypeCreateInput

Responses​

StatusDescriptionBody
201Success.application/json GraphRelationType or object
400invalid_version, malformed_jsonapplication/problem+json Problem
401token_expired, unauthenticatedapplication/problem+json Problem
403forbidden, insufficient_scope, token_owner_inactiveapplication/problem+json Problem
405method_not_allowedapplication/problem+json Problem
406not_acceptableapplication/problem+json Problem
409already_exists, idempotency_in_progressapplication/problem+json Problem
413payload_too_largeapplication/problem+json Problem
415unsupported_media_typeapplication/problem+json Problem
421wrong_regionapplication/problem+json Problem
422idempotency_key_reused, validation_failedapplication/problem+json Problem
500internal_errorapplication/problem+json Problem
503tenant_unavailable, unavailableapplication/problem+json Problem
504timeoutapplication/problem+json Problem

Errors​

The problem codes this operation can answer with. Each code links to its page.

Schemas​

GraphRelationType​

FieldTypeRequiredDescription
categorystring or nullRequired
colorstring or nullRequired
decision_categorystring or nullRequired
derivationstring or nullRequiredSet for a relation type the engine derives (it cannot be deleted).
external_codestring or nullRequired
from_kindsarray of stringRequiredWhat the relation can start from: document, register_row.
impact_directionstring or nullRequiredSet with impact_weight.
impact_weightnumber or nullRequiredAbove 0 up to 1, for an impact edge; null when the relation is not one.
inverse_labelstring or nullRequiredHow the relation reads from the other end; null when it reads the same.
is_activebooleanRequired
is_symmetricbooleanRequired
is_transitivebooleanRequired
labelstringRequired
navigation_audiencestring or nullRequiredWho sees the relation when navigating: all or analyst.
relation_type_idstringRequiredThe code, 2 to 40 capital letters, digits and underscores.
to_custom_field_template_idstring or nullRequiredThe register a relation ends at, when it is fixed.
to_kindsarray of stringRequiredWhat the relation can end at: document, register_row.
used_byarray of GraphUseRequiredThe fields and templates configured to use the relation type.

GraphRelationTypeCreateInput​

FieldTypeRequiredDescription
categorystring or nullOptionalUp to 40 characters.
colorstring or nullOptionalUp to 20 characters.
decision_categorystring or nullOptional
external_codestring or nullOptionalUp to 100 characters.
from_kindsarray of stringOptionaldocument and/or register_row. Both when left out.
impact_directionstring or nullOptional
impact_weightnumber or nullOptionalAbove 0 up to 1; send with impact_direction.
inverse_labelstring or nullOptionalUp to 100 characters.
is_activeboolean or nullOptionalTrue when left out.
is_symmetricboolean or nullOptionalFalse when left out.
is_transitiveboolean or nullOptionalFalse when left out.
labelstringRequiredUp to 100 characters.
navigation_audiencestring or nullOptionalall or analyst.
relation_type_idstringRequiredThe code: 2 to 40 capital letters, digits and underscores, starting with a letter.
to_custom_field_template_idstring or nullOptional
to_kindsarray of stringOptionaldocument and/or register_row. Both when left out.

GraphUse​

FieldTypeRequiredDescription
custom_field_idstring or nullRequiredThe field; null for a template-level use.
custom_field_template_idstring or nullRequiredThe template; null for a use outside a template.
labelstringRequiredThe template, or the template and field, as the builder names it.
wherestring or nullRequiredFor a normaliser: field_role or document_link, or null.