For the complete documentation index, see llms.txt. This page is also available as Markdown.

Relaciones

Use el endpoint de Relaciones para consultar las relaciones entre entidades de Violet.

Usa el violet-relationships endpoint para consultar las relaciones entre entidades. Recomendamos usar el explore endpoint para identificar el sourceID para la entidad o entidades que te interesan, luego el violet-relationships endpoint para crear estructuras como líneas de pedido de compra que pertenecen a una orden de compra, o piezas que pertenecen a un ensamblaje.

get

Get all Violet Relationships, or relationship graph from a source entity. When sourceId is provided, returns a graph (entityNodes, requirementNodes, links) for traversal: Assembly → BOM → Parts, Part/BOM line → PO line → PO, PO ↔ Invoice ↔ Bill, PO/line → receipts/delivery. Use recursiveRelationshipTypes / nonRecursiveRelationshipTypes to restrict traversal; see GET /model for types.

Autorizaciones
AuthorizationstringRequerido
Bearer authentication header of the form Bearer <token>.
Parámetros de consulta
sourceIdstring · uuidOpcional

Violet entity ID to start graph traversal from. If omitted, returns all relationships.

recursiveRelationshipTypesstringOpcional

Comma-separated relationship types to follow recursively (e.g. assemblyContains,contains for BOM; containsPOLine,receipts,linkedTo for PO/delivery/3-way match). See GET /model for all types.

Example: assemblyContains,contains
nonRecursiveRelationshipTypesstringOpcional

Comma-separated relationship types to include only one level.

Example: contains
afterIdstring · uuidOpcional

When sourceId is omitted, cursor for keyset pagination: relationship id from the last item of the previous response. Omit for the first page. Ignored when sourceId is provided.

limitinteger · mín: 1 · máx: 500Opcional

When sourceId is omitted, max readable relationships per page (default 100, max 500). Ignored when sourceId is provided.

Default: 100
Respuestas
200

Without sourceId: array of relationships (paginated). With sourceId: graph of nodes and links.

application/json
o
get/api/violet-relationships
GET /api/violet-relationships HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Without sourceId: array of relationships (paginated). With sourceId: graph of nodes and links.

{
  "entityNodes": [
    {
      "id": "text"
    }
  ],
  "requirementNodes": [
    {
      "id": "text"
    }
  ],
  "links": [
    {
      "id": "text",
      "sourceId": "text",
      "targetId": "text",
      "metadata": {},
      "relationshipType": "containsPOLine",
      "pushPendingStatus": "create",
      "deletedAt": "2026-01-01T00:00:00.000Z",
      "isCustom": true,
      "requirementId": "text",
      "nameOverride": "text"
    }
  ]
}

Get relationship model (types and examples) for assistant/MCP traversal

get

Relationship model for MCP/assistant: which entity types can be related and in which direction. Returns allRelationshipTypes and relationshipTypeExamples (from current DB specs). Use with GET /violet-relationships?sourceId=... to traverse Assembly–BOM–Part, Part–PO line–PO, PO–Invoice–Bill, etc. Optional suggestPath: comma-separated entity types (e.g. "Part,Purchase Order" or "Purchase Order,Invoice,Bill" for 3-way match); response includes suggestedTypesForPath to pass as recursiveRelationshipTypes.

Autorizaciones
AuthorizationstringRequerido
Bearer authentication header of the form Bearer <token>.
Parámetros de consulta
suggestPathstringOpcional

Comma-separated entity types to get suggested relationship types for (e.g. "Part,Purchase Order" or "Purchase Order,Invoice,Bill" for 3-way match). Response includes suggestedTypesForPath to pass as recursiveRelationshipTypes to getEntityRelationships.

Respuestas
200Éxito
application/json
get/api/violet-relationships/model
GET /api/violet-relationships/model HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200Éxito
{
  "allRelationshipTypes": [
    "containsPOLine"
  ],
  "relationshipTypeExamples": {
    "ANY_ADDITIONAL_PROPERTY": [
      {
        "sourceEntityType": "text",
        "targetEntityType": "text"
      }
    ]
  },
  "suggestedTypesForPath": [
    "containsPOLine"
  ]
}

¿Te fue útil?