> ## 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-javadoc">
  <ul className="member-list">
    <li>
      <div className="section detail" id="getGraphEntities(com.gpudb.protocol.GetGraphEntitiesRequest)">
        <h3>getGraphEntities</h3>
        <div className="member-signature"><span className="modifiers">public</span> <span className="return-type"><a href="/content/api/java/com/gpudb/protocol/GetGraphEntitiesResponse" title="class in com.gpudb.protocol">GetGraphEntitiesResponse</a></span> <span className="element-name">getGraphEntities</span><wbr /><span className="parameters">(<a href="/content/api/java/com/gpudb/protocol/GetGraphEntitiesRequest" title="class in com.gpudb.protocol">GetGraphEntitiesRequest</a> request)</span> throws <span className="exceptions"><a href="/content/api/java/com/gpudb/GPUdbException" title="class in com.gpudb">GPUdbException</a></span></div>
        <div className="block">Retrieves node or edge entities from an existing graph, with pagination support via offset and limit. Use <a href="#showGraph(com.gpudb.protocol.ShowGraphRequest)"><code>showGraph</code></a> to obtain the total number of nodes and edges.</div>

        <div className="dl notes">
          <div className="dt">Parameters:</div>
          <div className="dd"><code>request</code> - <a href="/content/api/java/com/gpudb/protocol/GetGraphEntitiesRequest" title="class in com.gpudb.protocol"><code>Request</code></a> object containing the parameters for the operation.</div>
          <div className="dt">Returns:</div>
          <div className="dd"><a href="/content/api/java/com/gpudb/protocol/GetGraphEntitiesResponse" title="class in com.gpudb.protocol"><code>Response</code></a> object containing the results of the operation.</div>
          <div className="dt">Throws:</div>
          <div className="dd"><code><a href="/content/api/java/com/gpudb/GPUdbException" title="class in com.gpudb">GPUdbException</a></code> - if an error occurs during the operation.</div>
        </div>
      </div>
    </li>

    <li>
      <div className="section detail" id="getGraphEntities(java.lang.String,long,long,java.util.Map)">
        <h3>getGraphEntities</h3>
        <div className="member-signature"><span className="modifiers">public</span> <span className="return-type"><a href="/content/api/java/com/gpudb/protocol/GetGraphEntitiesResponse" title="class in com.gpudb.protocol">GetGraphEntitiesResponse</a></span> <span className="element-name">getGraphEntities</span><wbr /><span className="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a> graphName, long offset, long limit, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" className="external-link">Map</a>\<<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a>,<wbr /><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a>> options)</span> throws <span className="exceptions"><a href="/content/api/java/com/gpudb/GPUdbException" title="class in com.gpudb">GPUdbException</a></span></div>
        <div className="block">Retrieves node or edge entities from an existing graph, with pagination support via offset and limit. Use <a href="#showGraph(java.lang.String,java.util.Map)"><code>showGraph</code></a> to obtain the total number of nodes and edges.</div>

        <div className="dl notes">
          <div className="dt">Parameters:</div>
          <div className="dd"><code>graphName</code> - Name of the graph from which to retrieve entities.</div>
          <div className="dd"><code>offset</code> - Starting index of the entities to retrieve (0-based). The default value is 0.</div>
          <div className="dd"><code>limit</code> - Number of entities to retrieve starting from <code> offset</code>. A value of -1 returns all entities from the offset to the end. Note: the <a href="/content/api/java/com/gpudb/protocol/GetGraphEntitiesResponse#getEntitiesInt()"><code>entitiesInt</code></a> or <a href="/content/api/java/com/gpudb/protocol/GetGraphEntitiesResponse#getEntitiesString()"><code>entitiesString</code></a> array size will be 2x this value for nodes (stride 2) or 4x for edges (stride 4). The default value is 10000.</div>

          <div className="dd">
            <code>options</code> - Optional parameters.

            <ul>
              <li>
                <a href="/content/api/java/com/gpudb/protocol/GetGraphEntitiesRequest.Options#ENTITY_TYPE"><code>ENTITY\_TYPE</code></a>: The type of entity to retrieve. Supported values:

                <ul>
                  <li><a href="/content/api/java/com/gpudb/protocol/GetGraphEntitiesRequest.Options#EDGE"><code>EDGE</code></a>: Retrieve edge entities (default). </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/GetGraphEntitiesRequest.Options#NODE"><code>NODE</code></a>: Retrieve node entities. </li>
                </ul>

                The default value is <a href="/content/api/java/com/gpudb/protocol/GetGraphEntitiesRequest.Options#EDGE"><code>EDGE</code></a>.
              </li>

              <li><a href="/content/api/java/com/gpudb/protocol/GetGraphEntitiesRequest.Options#SERVER_ID"><code>SERVER\_ID</code></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 href="/content/api/java/com/gpudb/protocol/GetGraphEntitiesRequest.Options#CONCISE_EDGE_CONNECTIVITY"><code>CONCISE\_EDGE\_CONNECTIVITY</code></a>: When true, edges are emitted in a compact connectivity form regardless of the graph's identifier type: <a href="/content/api/java/com/gpudb/protocol/GetGraphEntitiesResponse#getEntitiesInt()"><code>entitiesInt</code></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 <code>offset</code> from an edge endpoint index to locate it within the returned page. Supported values:

                <ul>
                  <li><a href="/content/api/java/com/gpudb/protocol/GetGraphEntitiesRequest.Options#TRUE"><code>TRUE</code></a>: Compact integer connectivity for edges; deleted node slots included in node output. </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/GetGraphEntitiesRequest.Options#FALSE"><code>FALSE</code></a>: Default: edges emit node identifiers (int/string/WKT) matching the graph; deleted nodes are skipped. </li>
                </ul>

                The default value is <a href="/content/api/java/com/gpudb/protocol/GetGraphEntitiesRequest.Options#FALSE"><code>FALSE</code></a>.
              </li>

              <li>
                <a href="/content/api/java/com/gpudb/protocol/GetGraphEntitiesRequest.Options#INCLUDE_WEIGHTS"><code>INCLUDE\_WEIGHTS</code></a>: When true and <code>options entityType</code> is 'edge', the response <a href="/content/api/java/com/gpudb/protocol/GetGraphEntitiesResponse#getEntitiesWeight()"><code>entitiesWeight</code></a> array is populated with one float weight per emitted edge (aligned 1:1 with the edge records in <a href="/content/api/java/com/gpudb/protocol/GetGraphEntitiesResponse#getEntitiesInt()"><code>entitiesInt</code></a> or <a href="/content/api/java/com/gpudb/protocol/GetGraphEntitiesResponse#getEntitiesString()"><code>entitiesString</code></a>). Empty when the graph has no weights component or when requesting nodes. Supported values:

                <ul>
                  <li><a href="/content/api/java/com/gpudb/protocol/GetGraphEntitiesRequest.Options#TRUE"><code>TRUE</code></a>: Populate <a href="/content/api/java/com/gpudb/protocol/GetGraphEntitiesResponse#getEntitiesWeight()"><code>entitiesWeight</code></a> with per-edge weights (edge requests only). </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/GetGraphEntitiesRequest.Options#FALSE"><code>FALSE</code></a>: Default: <a href="/content/api/java/com/gpudb/protocol/GetGraphEntitiesResponse#getEntitiesWeight()"><code>entitiesWeight</code></a> is empty. </li>
                </ul>

                The default value is <a href="/content/api/java/com/gpudb/protocol/GetGraphEntitiesRequest.Options#FALSE"><code>FALSE</code></a>.
              </li>
            </ul>

            The default value is an empty <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" className="external-link"><code>Map</code></a>.
          </div>

          <div className="dt">Returns:</div>
          <div className="dd"><a href="/content/api/java/com/gpudb/protocol/GetGraphEntitiesResponse" title="class in com.gpudb.protocol"><code>Response</code></a> object containing the results of the operation.</div>
          <div className="dt">Throws:</div>
          <div className="dd"><code><a href="/content/api/java/com/gpudb/GPUdbException" title="class in com.gpudb">GPUdbException</a></code> - if an error occurs during the operation.</div>
        </div>
      </div>
    </li>
  </ul>
</div>
