> ## 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.

# get_records_json

<div className="kinetica-typedoc">
  <div className="section tsd-panel tsd-member">
    <h3 className="tsd-anchor-link" id="get_records_json"><span>get\_records\_json</span></h3>

    <ul className="tsd-signatures">
      <li className="">
        <div className="tsd-signature tsd-anchor-link" id="get_records_json-1"><span className="tsd-kind-call-signature">get\_records\_json</span><span className="tsd-signature-symbol">(</span><br /> <span className="tsd-kind-parameter">table\_name</span><span className="tsd-signature-symbol">:</span> <span className="tsd-signature-type">string</span><span className="tsd-signature-symbol">,</span><br /> <span className="tsd-kind-parameter">column\_names</span><span className="tsd-signature-symbol">?:</span> <span className="tsd-signature-type">string</span><span className="tsd-signature-symbol">\[]</span> <span className="tsd-signature-symbol">|</span> <span className="tsd-signature-type">null</span><span className="tsd-signature-symbol">,</span><br /> <span className="tsd-kind-parameter">offset</span><span className="tsd-signature-symbol">?:</span> <span className="tsd-signature-type">number</span><span className="tsd-signature-symbol">,</span><br /> <span className="tsd-kind-parameter">limit</span><span className="tsd-signature-symbol">?:</span> <span className="tsd-signature-type">number</span><span className="tsd-signature-symbol">,</span><br /> <span className="tsd-kind-parameter">expression</span><span className="tsd-signature-symbol">?:</span> <span className="tsd-signature-type">string</span> <span className="tsd-signature-symbol">|</span> <span className="tsd-signature-type">null</span><span className="tsd-signature-symbol">,</span><br /> <span className="tsd-kind-parameter">orderby\_columns</span><span className="tsd-signature-symbol">?:</span> <span className="tsd-signature-type">string</span><span className="tsd-signature-symbol">\[]</span> <span className="tsd-signature-symbol">|</span> <span className="tsd-signature-type">null</span><span className="tsd-signature-symbol">,</span><br /> <span className="tsd-kind-parameter">having\_clause</span><span className="tsd-signature-symbol">?:</span> <span className="tsd-signature-type">string</span> <span className="tsd-signature-symbol">|</span> <span className="tsd-signature-type">null</span><span className="tsd-signature-symbol">,</span><br /> <span className="tsd-kind-parameter">callback</span><span className="tsd-signature-symbol">?:</span> <a href="/content/api/javascript/types/GPUdbCallback" className="tsd-signature-type tsd-kind-type-alias">GPUdbCallback</a><span className="tsd-signature-symbol">,</span><br /><span className="tsd-signature-symbol">)</span><span className="tsd-signature-symbol">:</span> <span className="tsd-signature-type">Promise</span><span className="tsd-signature-symbol">\<</span><a href="/content/api/javascript/interfaces/GetRecordsJsonResponse" className="tsd-signature-type tsd-kind-interface">GetRecordsJsonResponse</a><span className="tsd-signature-symbol">></span></div>

        <div className="tsd-description">
          <div className="tsd-comment tsd-typography">
            <p>Retrieves records as JSON, via <code>/get/records/json</code>.</p>
            <p>Only <code>table\_name</code> is required; every other parameter is optional. Like <code>insert\_records\_from\_json</code>, this endpoint takes its parameters in the query string and is sent with an empty body.</p>
          </div>

          <div className="tsd-parameters">
            <h4 className="tsd-parameters-title">Parameters</h4>

            <ul className="tsd-parameter-list">
              <li>
                <span><span className="tsd-kind-parameter">table\_name</span>: <span className="tsd-signature-type">string</span></span>

                <div className="tsd-comment tsd-typography">
                  <p>Table to read from</p>
                </div>
              </li>

              <li>
                <span><code className="tsd-tag">Optional</code><span className="tsd-kind-parameter">column\_names</span>: <span className="tsd-signature-type">string</span><span className="tsd-signature-symbol">\[]</span> <span className="tsd-signature-symbol">|</span> <span className="tsd-signature-type">null</span></span>

                <div className="tsd-comment tsd-typography">
                  <p>Columns to return; all columns if omitted</p>
                </div>
              </li>

              <li>
                <span><code className="tsd-tag">Optional</code><span className="tsd-kind-parameter">offset</span>: <span className="tsd-signature-type">number</span></span>

                <div className="tsd-comment tsd-typography">
                  <p>Record offset; negative values are treated as 0</p>
                </div>
              </li>

              <li>
                <span><code className="tsd-tag">Optional</code><span className="tsd-kind-parameter">limit</span>: <span className="tsd-signature-type">number</span></span>

                <div className="tsd-comment tsd-typography">
                  <p>Maximum records; negative values mean END\_OF\_SET</p>
                </div>
              </li>

              <li>
                <span><code className="tsd-tag">Optional</code><span className="tsd-kind-parameter">expression</span>: <span className="tsd-signature-type">string</span> <span className="tsd-signature-symbol">|</span> <span className="tsd-signature-type">null</span></span>

                <div className="tsd-comment tsd-typography">
                  <p>Optional filter expression</p>
                </div>
              </li>

              <li>
                <span><code className="tsd-tag">Optional</code><span className="tsd-kind-parameter">orderby\_columns</span>: <span className="tsd-signature-type">string</span><span className="tsd-signature-symbol">\[]</span> <span className="tsd-signature-symbol">|</span> <span className="tsd-signature-type">null</span></span>

                <div className="tsd-comment tsd-typography">
                  <p>Optional ordering columns</p>
                </div>
              </li>

              <li>
                <span><code className="tsd-tag">Optional</code><span className="tsd-kind-parameter">having\_clause</span>: <span className="tsd-signature-type">string</span> <span className="tsd-signature-symbol">|</span> <span className="tsd-signature-type">null</span></span>

                <div className="tsd-comment tsd-typography">
                  <p>Optional HAVING clause</p>
                </div>
              </li>

              <li>
                <span><code className="tsd-tag">Optional</code><span className="tsd-kind-parameter">callback</span>: <a href="/content/api/javascript/types/GPUdbCallback" className="tsd-signature-type tsd-kind-type-alias">GPUdbCallback</a></span>

                <div className="tsd-comment tsd-typography">
                  <p>Optional callback function</p>
                </div>
              </li>
            </ul>
          </div>

          <h4 className="tsd-returns-title">Returns <span className="tsd-signature-type">Promise</span><span className="tsd-signature-symbol">\<</span><a href="/content/api/javascript/interfaces/GetRecordsJsonResponse" className="tsd-signature-type tsd-kind-interface">GetRecordsJsonResponse</a><span className="tsd-signature-symbol">></span></h4>
          <p>Promise resolving to the matching records</p>

          <div className="tsd-comment tsd-typography">
            <div className="tsd-tag-example">
              <h4 className="tsd-anchor-link" id="example-2">Example</h4>

              <div>
                ```
                const response = await gpudb.get_records_json(
                    'my_table', ['id', 'name'], 0, 100, 'value > 10', ['id'], '');
                response.records;                  // [{ id: 3, name: 'Charlie' }, ...]
                response.total_number_of_records;  // matches ignoring the limit
                ```
              </div>
            </div>
          </div>

          <div className="aside tsd-sources">
            <ul>
              <li>Defined in <a href="https://github.com/kineticadb/kinetica-api-typescript/blob/master/src/GPUdb.ts#L16015">src/GPUdb.ts:16015</a></li>
            </ul>
          </div>
        </div>
      </li>
    </ul>
  </div>
</div>


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