> ## Documentation Index
> Fetch the complete documentation index at: https://docs.niadra.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Relationship graph

> A customer's relations (masked identifiers, companies, objects, agents and systems) or the map of the space's most connected customers, for the Console.



## OpenAPI

````yaml openapi/en/cell.json GET /v1/graph
openapi: 3.1.0
info:
  title: Niadra data API
  version: '1'
  description: >-
    Writing, context, history, objects, identity, privacy and governance of one
    space. Every space has a stable address, with the space and the region in
    its name.
servers:
  - url: https://{space}.{region}.api.niadra.com
    variables:
      space:
        default: acme-prod
        description: The space, which comes in the source key.
      region:
        default: us-east-2
        description: The region of the space, which also comes in the key.
security: []
paths:
  /v1/graph:
    get:
      tags:
        - governance
      summary: Relationship graph
      description: >-
        One customer's relations (`center`, `depth` 1 or 2, up to `limit` nodes,
        150 by default), or the

        space's most connected customers and companies among the latest active
        (`overview=1`, 100 by default).

        A profile that was erased or merged into another is not found.


        **Authentication.** Console person token with the `security`,
        `integration` role (or admin), or a source key with the `admin` scope.
      operationId: graph_v1_graph_get
      parameters:
        - in: query
          name: center
          required: false
          schema:
            anyOf:
              - format: uuid
                type: string
              - type: 'null'
            title: Center
        - in: query
          name: overview
          required: false
          schema:
            default: false
            title: Overview
            type: boolean
        - in: query
          name: depth
          required: false
          schema:
            default: 1
            maximum: 2
            minimum: 1
            title: Depth
            type: integer
        - in: query
          name: limit
          required: false
          schema:
            anyOf:
              - maximum: 300
                minimum: 1
                type: integer
              - type: 'null'
            title: Limit
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Graph'
          description: Successful Response
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: The request does not match the contract.
      security:
        - sourceKey: []
        - personToken: []
components:
  schemas:
    Graph:
      additionalProperties: false
      properties:
        center:
          anyOf:
            - type: string
            - type: 'null'
          description: The profile the graph is centered on; None for the overview.
          title: Center
        edges:
          items:
            $ref: '#/components/schemas/GraphEdge'
          title: Edges
          type: array
        generated_at:
          format: date-time
          title: Generated At
          type: string
        nodes:
          items:
            $ref: '#/components/schemas/GraphNode'
          title: Nodes
          type: array
        truncated:
          description: >-
            Whether nodes were left out: past the limit, the farthest first
            (never the center, its identifiers or its own companies, partners
            and look-alikes before anything else), or a customer's objects past
            the 25 latest.
          title: Truncated
          type: boolean
        withheld:
          description: >-
            Nodes left out because the reader's role may not see them:
            identifiers joined by a claim nobody confirmed yet, and objects the
            policy denies.
          title: Withheld
          type: integer
      required:
        - center
        - nodes
        - edges
        - truncated
        - withheld
        - generated_at
      title: Graph
      type: object
    Problem:
      additionalProperties: false
      description: RFC 9457 problem details; `code` comes from the versioned error catalog.
      properties:
        code:
          title: Code
          type: string
        detail:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Detail
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Request Id
        status:
          title: Status
          type: integer
        title:
          title: Title
          type: string
        type:
          default: about:blank
          title: Type
          type: string
      required:
        - title
        - status
        - code
      title: Problem
      type: object
    GraphEdge:
      additionalProperties: false
      properties:
        from:
          description: The node the relation starts at.
          title: From
          type: string
        id:
          title: Id
          type: string
        kind:
          enum:
            - identifies
            - member_of
            - partner_of
            - parent_of
            - owns
            - relates_to
            - acted_on
            - talked_with
            - reported
            - handed_off
            - suggested_same
          title: Kind
          type: string
        meta:
          additionalProperties: true
          description: >-
            `identifies`: `strength` (strong or weak), `weight`, `since`.
            `member_of` and `partner_of`: `role`, `since`. `parent_of`: `since`.
            `owns`: `role` (owner or participant). `relates_to`: `relation`.
            `acted_on`: `count`, `last_at`, `operations`. `talked_with`:
            `count`, `last_at`, `channels`. `reported`: `count`, `last_at`.
            `handed_off`: `count`, `status`, `outcome`, `last_at`, `about` (the
            customer's node). `suggested_same`: `score`.
          title: Meta
          type: object
        to:
          title: To
          type: string
      required:
        - id
        - from
        - to
        - kind
      title: GraphEdge
      type: object
    GraphNode:
      additionalProperties: false
      properties:
        id:
          description: Opaque, and stable within this answer only.
          title: Id
          type: string
        kind:
          enum:
            - person
            - account
            - partner
            - handle
            - object
            - agent
            - system
          title: Kind
          type: string
        label:
          description: >-
            A customer or a company by its pseudonym, an identifier masked
            whatever the reader's role, an object by its type and id, an agent
            or a system by its source's name.
          title: Label
          type: string
        meta:
          additionalProperties: true
          description: >-
            `hop`, the distance from the center (0 for the center; 0 for every
            node of the overview), and per kind: a customer's `pseudonym`,
            `handles` and, when its relations were read, `objects_total` (how
            many objects it owns or takes part in; a graph shows its 25 latest);
            an identifier's `type`, `channel`, `weight`, `provisional` and
            `last_seen`; an object's `type`, `namespace`, `external_id`,
            `state`, `state_label`, `masked` and `as_of`; a source's `channel`
            and `vendor`, or a handoff target's `target`. The overview adds
            `links`, `objects`, `interactions` and `score` to each customer.
          title: Meta
          type: object
        ref:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The real id the Console links to: the profile, the business object
            or the source. None for an identifier and for a handoff target that
            is not a source.
          title: Ref
      required:
        - id
        - kind
        - label
        - ref
      title: GraphNode
      type: object
  securitySchemes:
    sourceKey:
      type: http
      scheme: bearer
      description: nia_sk_...
    personToken:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.