   
#### 🧩 Composable
`ts`
#### 🌀 REST Endpoint
This module exposes the REST endpoints that are used by the composable internally. This could be useful if you wanted to get all the flags on app init and save them to the store for example.
The module exposes two endpoints:
1. ${apiPath}/flags${apiPath}/user
1.
Query Parameters:
`ts`
key: string // required
email?: string
firstName?: string
lastName?: string
`html`
?key=xxx-xxx&email=user@domain.com&firstName=Jane&lastName=Doe
These query parameters are valid for all requests. key is the only required parameter.
The API path will default to /api/launch-darkly but you can set a custom path in the launchDarkly config in nuxt.config.ts. See the setup section for details
#### /flags
##### Get all variants
`html`
GET /api/launch-darkly/flags?{query-params}
##### Get single variant
`html`
GET /api/launch-darkly/flags/flag-key?{query-params}
##### Get single variant with detail
`html`
GET /api/launch-darkly/flags/flag-key/detail?{query-params}
#### /user
##### Identify
`html`
GET /api/launch-darkly/user/identify?{query-params}
##### Track
`bash`
curl -X POST "/api/launch-darkly/user/track?{query-params}" -H "Content-Type: application/json" -d '{"myKey":{"arr":[1,"foo"],"nested":{"a":1,"b":{"key":"bar"}}},"metricValue":1}'
- Create a .env file in the playground directory and add these variables:
`bash`
LD_SDK_KEY= # with the value of a Launch Darkly server-side SDK Key.
EMAIL= # email address of a user captured by LD (optional)
USER_KEY= # the unique key of a user captured by LD
FIRST_NAME= # first name
LAST_NAME= # last name
- Run npm run prepare:playground to generate type stubs.npm run play` to start playground in development mode.
- Use