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

# getGraphEntities

<div className="kinetica-doxygen">
  <div id="a6646fdaddf14aa7d9857ec0636fa204f" />

  <h2 className="memtitle"><span className="permalink"><a href="#a6646fdaddf14aa7d9857ec0636fa204f">◆ </a></span>getGraphEntities() <span className="overload">\[1/4]</span></h2>

  <div className="memitem">
    <div className="memproto">
      <table className="memname">
        <tr>
          <td className="memname"><a className="el" href="/content/api/cpp/structgpudb_1_1GetGraphEntitiesResponse">GetGraphEntitiesResponse</a> gpudb::GPUdb::getGraphEntities </td>
          <td>(</td>
          <td className="paramtype">const <a className="el" href="/content/api/cpp/structgpudb_1_1GetGraphEntitiesRequest">GetGraphEntitiesRequest</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">request\_</span></span></td>
          <td>)</td>
          <td> const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Retrieves node or edge entities from an existing graph, with pagination support via offset and limit. </p>
      <p>Use <a className="el" href="#aa26104ece9a4825f8fd309470e2477ec">showGraph</a> to obtain the total number of nodes and edges.</p>

      <div className="dl params">
        <div className="dt">Parameters</div>

        <div className="dd">
          <table className="params">
            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">request\_</td>
              <td><a className="el" href="/content/api/cpp/structgpudb_1_1GetGraphEntitiesRequest">Request</a> object containing the parameters for the operation.</td>
            </tr>
          </table>
        </div>
      </div>

      <div className="dl section return">
        <div className="dt">Returns</div>
        <div className="dd"><a className="el" href="/content/api/cpp/structgpudb_1_1GetGraphEntitiesResponse">Response</a> object containing the result of the operation. </div>
      </div>
    </div>
  </div>

  <div id="a2ece66c08b4b6d9350f7d829b792ccec" />

  <h2 className="memtitle"><span className="permalink"><a href="#a2ece66c08b4b6d9350f7d829b792ccec">◆ </a></span>getGraphEntities() <span className="overload">\[2/4]</span></h2>

  <div className="memitem">
    <div className="memproto">
      <table className="memname">
        <tr>
          <td className="memname"><a className="el" href="/content/api/cpp/structgpudb_1_1GetGraphEntitiesResponse">GetGraphEntitiesResponse</a> & gpudb::GPUdb::getGraphEntities </td>
          <td>(</td>
          <td className="paramtype">const <a className="el" href="/content/api/cpp/structgpudb_1_1GetGraphEntitiesRequest">GetGraphEntitiesRequest</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">request\_</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype"><a className="el" href="/content/api/cpp/structgpudb_1_1GetGraphEntitiesResponse">GetGraphEntitiesResponse</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">response\_</span></span> ) const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Retrieves node or edge entities from an existing graph, with pagination support via offset and limit. </p>
      <p>Use <a className="el" href="#aa26104ece9a4825f8fd309470e2477ec">showGraph</a> to obtain the total number of nodes and edges.</p>

      <div className="dl params">
        <div className="dt">Parameters</div>

        <div className="dd">
          <table className="params">
            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">request\_</td>
              <td><a className="el" href="/content/api/cpp/structgpudb_1_1GetGraphEntitiesRequest">Request</a> object containing the parameters for the operation. </td>
            </tr>

            <tr>
              <td className="paramdir">\[out]</td>
              <td className="paramname">response\_</td>
              <td><a className="el" href="/content/api/cpp/structgpudb_1_1GetGraphEntitiesResponse">Response</a> object containing the results of the operation.</td>
            </tr>
          </table>
        </div>
      </div>

      <div className="dl section return">
        <div className="dt">Returns</div>
        <div className="dd"><a className="el" href="/content/api/cpp/structgpudb_1_1GetGraphEntitiesResponse">Response</a> object containing the result of the operation (initially passed in by reference). </div>
      </div>
    </div>
  </div>

  <div id="a6800299fb04843d1be5d5ffbd2a425f7" />

  <h2 className="memtitle"><span className="permalink"><a href="#a6800299fb04843d1be5d5ffbd2a425f7">◆ </a></span>getGraphEntities() <span className="overload">\[3/4]</span></h2>

  <div className="memitem">
    <div className="memproto">
      <table className="memname">
        <tr>
          <td className="memname"><a className="el" href="/content/api/cpp/structgpudb_1_1GetGraphEntitiesResponse">GetGraphEntitiesResponse</a> gpudb::GPUdb::getGraphEntities </td>
          <td>(</td>
          <td className="paramtype">const std::string &</td>
          <td className="paramname"><span className="paramname"><span className="em">graphName</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const int64\_t</td>
          <td className="paramname"><span className="paramname"><span className="em">offset</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const int64\_t</td>
          <td className="paramname"><span className="paramname"><span className="em">limit</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::map\< std::string, std::string > &</td>
          <td className="paramname"><span className="paramname"><span className="em">options</span></span> ) const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Retrieves node or edge entities from an existing graph, with pagination support via offset and limit. </p>
      <p>Use <a className="el" href="#a9debdae46b9cb8ce19f782d73a958c51">showGraph</a> to obtain the total number of nodes and edges.</p>

      <div className="dl params">
        <div className="dt">Parameters</div>

        <div className="dd">
          <table className="params">
            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">graphName</td>
              <td>Name of the graph from which to retrieve entities. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">offset</td>
              <td>Starting index of the entities to retrieve (0-based). The default value is 0. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">limit</td>
              <td>Number of entities to retrieve starting from <span className="em arg">offset</span>. A value of -1 returns all entities from the offset to the end. Note: the <a className="el" href="/content/api/cpp/structgpudb_1_1GetGraphEntitiesResponse#a44bf7d173a8d88f14d3589ab46f37b65">entitiesInt</a> or <a className="el" href="/content/api/cpp/structgpudb_1_1GetGraphEntitiesResponse#aeb990f1a1e8c5d3b326cd9a25e72278e">entitiesString</a> array size will be 2x this value for nodes (stride 2) or 4x for edges (stride 4). The default value is 10000. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">options</td>

              <td>
                Optional parameters.

                <ul>
                  <li>
                    <a className="el" href="/content/api/cpp/namespacegpudb#a2345820580392f2dbccc1b28d215e5a0">get\_graph\_entities\_entity\_type</a>: The type of entity to retrieve. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a4d16381ec71a2d7f4feee2369f21802b">get\_graph\_entities\_edge</a>: Retrieve edge entities (default). </li>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a696aae2efa2ebe46637e98aefe09237c">get\_graph\_entities\_node</a>: Retrieve node entities. </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a4d16381ec71a2d7f4feee2369f21802b">get\_graph\_entities\_edge</a>.
                  </li>

                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#ab50ee21961f648d580d24453c91ff2da">get\_graph\_entities\_server\_id</a>: Indicates which graph server to send the request to. Required when the graph is distributed across multiple servers. The default value is '0'. </li>

                  <li>
                    <a className="el" href="/content/api/cpp/namespacegpudb#a0f68beb9ed8678c5c7f481da0d3e3301">get\_graph\_entities\_concise\_edge\_connectivity</a>: When true, edges are emitted in a compact connectivity form regardless of the graph's identifier type: <a className="el" href="/content/api/cpp/structgpudb_1_1GetGraphEntitiesResponse#a44bf7d173a8d88f14d3589ab46f37b65">entitiesInt</a> contains stride-4 records \[edge\_id, node1\_index, node2\_index, edge\_label\_index] where node1\_index/node2\_index are 0-based positions into the node array (obtained from a node-entity call on the same graph). When requesting nodes with this option, the response includes tombstoned (deleted) slots in order to keep position indices stable so edge indices resolve correctly; deleted slots carry id=0 for integer graphs or an empty identifier for string/WKT graphs. For paginated node calls, subtract <span className="em arg">offset</span> from an edge endpoint index to locate it within the returned page. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a86324b9933191bf4884d7861a71493e3">get\_graph\_entities\_true</a>: Compact integer connectivity for edges; deleted node slots included in node output. </li>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#aa0a47c74aba42ebff1ec88a0567f0a01">get\_graph\_entities\_false</a>: Default: edges emit node identifiers (int/string/WKT) matching the graph; deleted nodes are skipped. </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cpp/namespacegpudb#aa0a47c74aba42ebff1ec88a0567f0a01">get\_graph\_entities\_false</a>.
                  </li>

                  <li>
                    <a className="el" href="/content/api/cpp/namespacegpudb#a0a4c968d1f2d30f7b826f7ea60a2dbd2">get\_graph\_entities\_include\_weights</a>: When true and <span className="em arg">options</span> entityType is 'edge', the response <a className="el" href="/content/api/cpp/structgpudb_1_1GetGraphEntitiesResponse#acddf7d172e34c1d5dba5970ebfd1501a">entitiesWeight</a> array is populated with one float weight per emitted edge (aligned 1:1 with the edge records in <a className="el" href="/content/api/cpp/structgpudb_1_1GetGraphEntitiesResponse#a44bf7d173a8d88f14d3589ab46f37b65">entitiesInt</a> or <a className="el" href="/content/api/cpp/structgpudb_1_1GetGraphEntitiesResponse#aeb990f1a1e8c5d3b326cd9a25e72278e">entitiesString</a>). Empty when the graph has no weights component or when requesting nodes. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a86324b9933191bf4884d7861a71493e3">get\_graph\_entities\_true</a>: Populate <a className="el" href="/content/api/cpp/structgpudb_1_1GetGraphEntitiesResponse#acddf7d172e34c1d5dba5970ebfd1501a">entitiesWeight</a> with per-edge weights (edge requests only). </li>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#aa0a47c74aba42ebff1ec88a0567f0a01">get\_graph\_entities\_false</a>: Default: <a className="el" href="/content/api/cpp/structgpudb_1_1GetGraphEntitiesResponse#acddf7d172e34c1d5dba5970ebfd1501a">entitiesWeight</a> is empty. </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cpp/namespacegpudb#aa0a47c74aba42ebff1ec88a0567f0a01">get\_graph\_entities\_false</a>.
                  </li>
                </ul>

                The default value is an empty map.
              </td>
            </tr>
          </table>
        </div>
      </div>

      <div className="dl section return">
        <div className="dt">Returns</div>
        <div className="dd"><a className="el" href="/content/api/cpp/structgpudb_1_1GetGraphEntitiesResponse">Response</a> object containing the result of the operation. </div>
      </div>
    </div>
  </div>

  <div id="a641d9be4063a18ae8970878abb94d0ed" />

  <h2 className="memtitle"><span className="permalink"><a href="#a641d9be4063a18ae8970878abb94d0ed">◆ </a></span>getGraphEntities() <span className="overload">\[4/4]</span></h2>

  <div className="memitem">
    <div className="memproto">
      <table className="memname">
        <tr>
          <td className="memname"><a className="el" href="/content/api/cpp/structgpudb_1_1GetGraphEntitiesResponse">GetGraphEntitiesResponse</a> & gpudb::GPUdb::getGraphEntities </td>
          <td>(</td>
          <td className="paramtype">const std::string &</td>
          <td className="paramname"><span className="paramname"><span className="em">graphName</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const int64\_t</td>
          <td className="paramname"><span className="paramname"><span className="em">offset</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const int64\_t</td>
          <td className="paramname"><span className="paramname"><span className="em">limit</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::map\< std::string, std::string > &</td>
          <td className="paramname"><span className="paramname"><span className="em">options</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype"><a className="el" href="/content/api/cpp/structgpudb_1_1GetGraphEntitiesResponse">GetGraphEntitiesResponse</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">response\_</span></span> ) const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Retrieves node or edge entities from an existing graph, with pagination support via offset and limit. </p>
      <p>Use <a className="el" href="#a9debdae46b9cb8ce19f782d73a958c51">showGraph</a> to obtain the total number of nodes and edges.</p>

      <div className="dl params">
        <div className="dt">Parameters</div>

        <div className="dd">
          <table className="params">
            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">graphName</td>
              <td>Name of the graph from which to retrieve entities. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">offset</td>
              <td>Starting index of the entities to retrieve (0-based). The default value is 0. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">limit</td>
              <td>Number of entities to retrieve starting from <span className="em arg">offset</span>. A value of -1 returns all entities from the offset to the end. Note: the <a className="el" href="/content/api/cpp/structgpudb_1_1GetGraphEntitiesResponse#a44bf7d173a8d88f14d3589ab46f37b65">entitiesInt</a> or <a className="el" href="/content/api/cpp/structgpudb_1_1GetGraphEntitiesResponse#aeb990f1a1e8c5d3b326cd9a25e72278e">entitiesString</a> array size will be 2x this value for nodes (stride 2) or 4x for edges (stride 4). The default value is 10000. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">options</td>

              <td>
                Optional parameters.

                <ul>
                  <li>
                    <a className="el" href="/content/api/cpp/namespacegpudb#a2345820580392f2dbccc1b28d215e5a0">get\_graph\_entities\_entity\_type</a>: The type of entity to retrieve. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a4d16381ec71a2d7f4feee2369f21802b">get\_graph\_entities\_edge</a>: Retrieve edge entities (default). </li>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a696aae2efa2ebe46637e98aefe09237c">get\_graph\_entities\_node</a>: Retrieve node entities. </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a4d16381ec71a2d7f4feee2369f21802b">get\_graph\_entities\_edge</a>.
                  </li>

                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#ab50ee21961f648d580d24453c91ff2da">get\_graph\_entities\_server\_id</a>: Indicates which graph server to send the request to. Required when the graph is distributed across multiple servers. The default value is '0'. </li>

                  <li>
                    <a className="el" href="/content/api/cpp/namespacegpudb#a0f68beb9ed8678c5c7f481da0d3e3301">get\_graph\_entities\_concise\_edge\_connectivity</a>: When true, edges are emitted in a compact connectivity form regardless of the graph's identifier type: <a className="el" href="/content/api/cpp/structgpudb_1_1GetGraphEntitiesResponse#a44bf7d173a8d88f14d3589ab46f37b65">entitiesInt</a> contains stride-4 records \[edge\_id, node1\_index, node2\_index, edge\_label\_index] where node1\_index/node2\_index are 0-based positions into the node array (obtained from a node-entity call on the same graph). When requesting nodes with this option, the response includes tombstoned (deleted) slots in order to keep position indices stable so edge indices resolve correctly; deleted slots carry id=0 for integer graphs or an empty identifier for string/WKT graphs. For paginated node calls, subtract <span className="em arg">offset</span> from an edge endpoint index to locate it within the returned page. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a86324b9933191bf4884d7861a71493e3">get\_graph\_entities\_true</a>: Compact integer connectivity for edges; deleted node slots included in node output. </li>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#aa0a47c74aba42ebff1ec88a0567f0a01">get\_graph\_entities\_false</a>: Default: edges emit node identifiers (int/string/WKT) matching the graph; deleted nodes are skipped. </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cpp/namespacegpudb#aa0a47c74aba42ebff1ec88a0567f0a01">get\_graph\_entities\_false</a>.
                  </li>

                  <li>
                    <a className="el" href="/content/api/cpp/namespacegpudb#a0a4c968d1f2d30f7b826f7ea60a2dbd2">get\_graph\_entities\_include\_weights</a>: When true and <span className="em arg">options</span> entityType is 'edge', the response <a className="el" href="/content/api/cpp/structgpudb_1_1GetGraphEntitiesResponse#acddf7d172e34c1d5dba5970ebfd1501a">entitiesWeight</a> array is populated with one float weight per emitted edge (aligned 1:1 with the edge records in <a className="el" href="/content/api/cpp/structgpudb_1_1GetGraphEntitiesResponse#a44bf7d173a8d88f14d3589ab46f37b65">entitiesInt</a> or <a className="el" href="/content/api/cpp/structgpudb_1_1GetGraphEntitiesResponse#aeb990f1a1e8c5d3b326cd9a25e72278e">entitiesString</a>). Empty when the graph has no weights component or when requesting nodes. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a86324b9933191bf4884d7861a71493e3">get\_graph\_entities\_true</a>: Populate <a className="el" href="/content/api/cpp/structgpudb_1_1GetGraphEntitiesResponse#acddf7d172e34c1d5dba5970ebfd1501a">entitiesWeight</a> with per-edge weights (edge requests only). </li>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#aa0a47c74aba42ebff1ec88a0567f0a01">get\_graph\_entities\_false</a>: Default: <a className="el" href="/content/api/cpp/structgpudb_1_1GetGraphEntitiesResponse#acddf7d172e34c1d5dba5970ebfd1501a">entitiesWeight</a> is empty. </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cpp/namespacegpudb#aa0a47c74aba42ebff1ec88a0567f0a01">get\_graph\_entities\_false</a>.
                  </li>
                </ul>

                The default value is an empty map.
              </td>
            </tr>

            <tr>
              <td className="paramdir">\[out]</td>
              <td className="paramname">response\_</td>
              <td><a className="el" href="/content/api/cpp/structgpudb_1_1GetGraphEntitiesResponse">Response</a> object containing the results of the operation.</td>
            </tr>
          </table>
        </div>
      </div>

      <div className="dl section return">
        <div className="dt">Returns</div>
        <div className="dd"><a className="el" href="/content/api/cpp/structgpudb_1_1GetGraphEntitiesResponse">Response</a> object containing the result of the operation (initially passed in by reference). </div>
      </div>
    </div>
  </div>
</div>
