Open Inventory / Docs
EndpunkteInventory structureRelation typesKey

Update, archive, or restore a relationship type

Die API läuft auf deiner Anwendungsinstanz. Schemas und Feldnamen stammen unverändert aus der OpenAPI-Spezifikation. Browsergebundene Aufrufe benötigen eine Sitzung auf der Instanz.

PATCH
/relation-types/{key}

Requires an authenticated administrator browser session. Built-in relationship types cannot be archived.

Authentifizierung

adminSession
cookieauthjs.session-token<token>

Authenticated Auth.js browser session cookie; each operation declares its required permission. Not restricted to administrators. HTTPS deployments use the secure-prefixed cookie variant.

Pfadparameter

key*string

Stable key of an administrator-configurable directed relationship type.

Muster^[a-z][a-z0-9_-]{0,63}$
Länge1 <= length <= 64

Header-Parameter

X-Organization-ID?string

Organization membership selected for this request. User-bound credentials may select any active membership; standalone tokens may only repeat their pinned organization ID.

Formatuuid

Anfrageinhalt

application/json
  1. body
Eigenschaften1 <= properties
label?string
Länge1 <= length <= 120
inverseLabel?string
Länge1 <= length <= 120
description?string
Längelength <= 5000
allowManual?boolean
position?integer
Bereich0 <= value <= 100000
archived?boolean

Archive when true or restore when false.

Antwortinhalt

Relationship type updated

application/json
  1. response
relationType*
Beispielanfrage
curl -X PATCH 'https://inventory.example.com/api/v1/relation-types/string' \  -H 'Content-Type: application/json' \  -d '{}'
Beispielantwort
{  "relationType": {    "key": "string",    "label": "string",    "inverseLabel": "string",    "description": "string",    "allowManual": true,    "spatial": true,    "position": 0,    "isSystem": true,    "createdBy": "string",    "updatedBy": "string",    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z",    "archivedAt": "2019-08-24T14:15:22Z"  }}