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

# Hybrid Job Graph

> The compiled pipeline of a hybrid job, as nodes and edges.

The worker writes this when the submitted program finishes lowering -- which is before
the job reaches the device, so the graph is readable while the job is still queued.
It describes the current run only: a restarted job drops it when the re-run starts and
compiles afresh, and the new graph may differ. A client must not cache it across runs.

Args:
    job_id (str): ID of the hybrid job.
    user (User): User authenticated with api key.
    db: Database.

Returns:
    dict: the executed pipeline as a graph, in networkx node-link form --
    ``{"directed", "multigraph", "graph", "nodes", "edges"}``. It carries its own schema
    version at ``graph.schema`` and needs no envelope unwrapped: a client reads
    ``nodes`` / ``edges`` directly, or loads it whole with
    ``networkx.node_link_graph(payload, edges="edges")``.

Raises:
    HTTPException: 404 if the job does not exist, is not accessible, is not a hybrid job,
        or its current run has not compiled (a queued or restarted job, or one that failed
        before lowering).



## OpenAPI

````yaml https://api.haiqu.ai/openapi.json get /jobs/{job_id}/graph
openapi: 3.1.0
info:
  title: Haiqu API
  summary: Haiqu RESTful API service.
  description: Cloud service providing the access to Haiqu cloud runtime
  contact:
    name: Haiqu Inc.
    url: https://haiqu.ai/
    email: info@haiqu.ai
  version: 1.8.1
servers: []
security: []
paths:
  /jobs/{job_id}/graph:
    get:
      summary: Hybrid Job Graph
      description: >-
        The compiled pipeline of a hybrid job, as nodes and edges.


        The worker writes this when the submitted program finishes lowering --
        which is before

        the job reaches the device, so the graph is readable while the job is
        still queued.

        It describes the current run only: a restarted job drops it when the
        re-run starts and

        compiles afresh, and the new graph may differ. A client must not cache
        it across runs.


        Args:
            job_id (str): ID of the hybrid job.
            user (User): User authenticated with api key.
            db: Database.

        Returns:
            dict: the executed pipeline as a graph, in networkx node-link form --
            ``{"directed", "multigraph", "graph", "nodes", "edges"}``. It carries its own schema
            version at ``graph.schema`` and needs no envelope unwrapped: a client reads
            ``nodes`` / ``edges`` directly, or loads it whole with
            ``networkx.node_link_graph(payload, edges="edges")``.

        Raises:
            HTTPException: 404 if the job does not exist, is not accessible, is not a hybrid job,
                or its current run has not compiled (a queued or restarted job, or one that failed
                before lowering).
      operationId: hybrid_job_graph_jobs__job_id__graph_get
      parameters:
        - name: job_id
          in: path
          required: true
          schema:
            type: string
            title: Job Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyQuery: []
        - APIKeyHeader: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyQuery:
      type: apiKey
      in: query
      name: HAIQU_API_KEY
    APIKeyHeader:
      type: apiKey
      in: header
      name: authorization

````

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