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

# match_graph

### match\_graph

<ul>
  <li>
    match\_graph(\
    &#x20;graph\_name: string,\
    &#x20;sample\_points: string\[],\
    &#x20;solve\_method?: string,\
    &#x20;solution\_table?: string,\
    &#x20;options?: Record\<string, string>,\
    &#x20;callback?: [GPUdbCallback](https://docs.kinetica.com/content/api/javascript/types/GPUdbCallback.md),\
    ): Promise\<[MatchGraphResponse](https://docs.kinetica.com/content/api/javascript/interfaces/MatchGraphResponse.md)>

    Matches a directed route implied by a given set of latitude/longitude points to an existing underlying road network graph using a given solution type.IMPORTANT: It's highly recommended that you review the Graphs and Solvers concepts documentation, the Graph REST Tutorial, and/or some /match/graph examples before using this endpoint.

    #### Parameters

    <ul>
      <li>
        graph\_name: string

        Name of the underlying geospatial graph resource to match to using `sample_points`.
      </li>

      <li>
        sample\_points: string\[]

        Sample points used to match to an underlying geospatial graph. Sample points must be specified using identifiers; identifiers are grouped as combinations. Identifiers can be used with: existing column names, e.g., 'table.column AS SAMPLE\_X'; expressions, e.g., 'ST\_MAKEPOINT(table.x, table.y) AS SAMPLE\_WKTPOINT'; or constant values, e.g., '\{1, 2, 10} AS SAMPLE\_TRIPID'.
      </li>

      <li>
        `Optional`solve\_method: string

        The type of solver to use for graph matching.
      </li>

      <li>
        `Optional`solution\_table: string

        The name of the table used to store the results, in \[schema\_name.]table\_name format, using standard name resolution rules and meeting table naming criteria. This table contains a track of geospatial points for the matched portion of the graph, a track ID, and a score value. Also outputs a details table containing a trip ID (that matches the track ID), the latitude/longitude pair, the timestamp the point was recorded at, and an edge ID corresponding to the matched road segment. Must not be an existing table of the same name.
      </li>

      <li>
        `Optional`options: Record\<string, string>

        Additional parameters.
      </li>

      <li>
        `Optional`callback: [GPUdbCallback](https://docs.kinetica.com/content/api/javascript/types/GPUdbCallback.md)

        Optional callback function
      </li>
    </ul>

    #### Returns Promise\<[MatchGraphResponse](https://docs.kinetica.com/content/api/javascript/interfaces/MatchGraphResponse.md)>

    Promise\<Types.MatchGraphResponse> - Promise resolving to the response

    <ul>
      <li>Defined in [src/GPUdb.ts:12237](https://github.com/kineticadb/kinetica-api-typescript/blob/master/src/GPUdb.ts#L12237)</li>
    </ul>
  </li>
</ul>

### match\_graph\_request

<ul>
  <li>
    match\_graph\_request(\
    &#x20;request: [MatchGraphRequest](https://docs.kinetica.com/content/api/javascript/interfaces/MatchGraphRequest.md),\
    &#x20;callback?: [GPUdbCallback](https://docs.kinetica.com/content/api/javascript/types/GPUdbCallback.md),\
    ): Promise\<[MatchGraphResponse](https://docs.kinetica.com/content/api/javascript/interfaces/MatchGraphResponse.md)>

    Matches a directed route implied by a given set of latitude/longitude points to an existing underlying road network graph using a given solution type.IMPORTANT: It's highly recommended that you review the Graphs and Solvers concepts documentation, the Graph REST Tutorial, and/or some /match/graph examples before using this endpoint.

    #### Parameters

    <ul>
      <li>
        request: [MatchGraphRequest](https://docs.kinetica.com/content/api/javascript/interfaces/MatchGraphRequest.md)

        Request object containing the parameters for the operation
      </li>

      <li>
        `Optional`callback: [GPUdbCallback](https://docs.kinetica.com/content/api/javascript/types/GPUdbCallback.md)

        Optional callback function
      </li>
    </ul>

    #### Returns Promise\<[MatchGraphResponse](https://docs.kinetica.com/content/api/javascript/interfaces/MatchGraphResponse.md)>

    Promise\<Types.MatchGraphResponse> - Promise resolving to the response

    <ul>
      <li>Defined in [src/GPUdb.ts:12197](https://github.com/kineticadb/kinetica-api-typescript/blob/master/src/GPUdb.ts#L12197)</li>
    </ul>
  </li>
</ul>


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