@loopback/docs
Version:
Documentation for LoopBack 4
34 lines (21 loc) • 768 B
Markdown
---
lang: en
title: 'API docs: rest.getpathvariables'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
permalink: /doc/en/lb4/apidocs.rest.getpathvariables.html
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/rest](./rest.md) > [getPathVariables](./rest.getpathvariables.md)
## getPathVariables() function
Get all path variables. For example, `/root/{foo}/bar` =<!-- -->> `['foo']`
<b>Signature:</b>
```typescript
export declare function getPathVariables(path: string): RegExpMatchArray | null;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| path | <code>string</code> | |
<b>Returns:</b>
`RegExpMatchArray | null`