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

# Get an entity

> An entity of the knowledge graph and its relations.



## OpenAPI

````yaml https://staging.soma.evarist.com/v1/openapi.json get /workspaces/{workspace_id}/entities/{entity_id}
openapi: 3.1.0
info:
  title: Soma API
  summary: 'Your organization''s knowledge: documents, search, knowledge graph, answers.'
  description: >-
    Authenticate with `Authorization: Bearer <token>`: an OAuth access token
    (the Soma CLI and MCP clients get one by signing in) or an API key created
    in Soma under Account settings.
  version: 1.0.0
servers:
  - url: https://staging.soma.evarist.com/v1
security: []
paths:
  /workspaces/{workspace_id}/entities/{entity_id}:
    get:
      tags:
        - Knowledge graph
      summary: Get an entity
      description: An entity of the knowledge graph and its relations.
      operationId: get_entity_workspaces__workspace_id__entities__entity_id__get
      parameters:
        - name: workspace_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Workspace Id
        - name: entity_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Entity Id
        - name: depth
          in: query
          required: false
          schema:
            type: integer
            maximum: 2
            minimum: 1
            description: 1 = direct relations, 2 = also theirs.
            default: 1
            title: Depth
          description: 1 = direct relations, 2 = also theirs.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EntityNeighborhood'
        '404':
          description: Not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    EntityNeighborhood:
      properties:
        entity:
          $ref: '#/components/schemas/EntityRef'
        depth:
          type: integer
          title: Depth
        outgoing:
          items:
            $ref: '#/components/schemas/Relation'
          type: array
          title: Outgoing
          description: Relations from this entity to others.
        incoming:
          items:
            $ref: '#/components/schemas/Relation'
          type: array
          title: Incoming
          description: Relations from others to this entity.
      type: object
      required:
        - entity
        - depth
        - outgoing
        - incoming
      title: EntityNeighborhood
    Error:
      properties:
        error:
          $ref: '#/components/schemas/Body'
      type: object
      required:
        - error
      title: Error
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    EntityRef:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        type:
          anyOf:
            - type: string
            - type: 'null'
          title: Type
      type: object
      required:
        - id
        - name
      title: EntityRef
    Relation:
      properties:
        type:
          type: string
          title: Type
        evidence_count:
          type: integer
          title: Evidence Count
        entity:
          $ref: '#/components/schemas/EntityRef'
          description: The entity at the other end.
      type: object
      required:
        - type
        - evidence_count
        - entity
      title: Relation
    Body:
      properties:
        type:
          type: string
          title: Type
        message:
          type: string
          title: Message
      type: object
      required:
        - type
        - message
      title: Body
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      description: An OAuth access token (`soma_at_…`) or an API key (`scribe_mcp_…`).
      scheme: bearer

````

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