> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.getunleash.io/api/frontend-get-feature/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.getunleash.io/_mcp/server. # Frontend Get Feature GET https://edge.unleash-instance.example.com/api/frontend/features/{feature_name} Reference: https://docs.getunleash.io/api/frontend-get-feature ## Authentication - `Authorization` header (required) — API Key authentication via header ## Request ### Path parameters - `feature_name` (string, required) — The name of the feature ### Query parameters - `userId` (string, optional) - `sessionId` (string, optional) - `environment` (string, optional) - `appName` (string, optional) - `currentTime` (string, optional) - `remoteAddress` (string, optional) - `properties` (ApiFrontendFeaturesFeatureNameGetParameters, required) ## Response ### 200 Return evaluated state for a single feature - `enabled` (boolean, required) - `impressionData` (boolean, required) - `impression_data` (boolean, required) - `name` (string, required) - `variant` (EvaluatedVariant, required) ## Errors ### 403 Forbidden Error Was not allowed to access features - `any` ### 404 Not Found Error The feature was not found - `any` ## Types ### ApiFrontendFeaturesFeatureNameGetParameters ### EvaluatedVariant - `enabled` (boolean, required) - `name` (string, required) - `payload` (Payload, optional, nullable) ### Payload - `type` (string, required) - `value` (string, required) ## Examples **Response** ```json { "enabled": true, "impressionData": true, "impression_data": true, "name": "string", "variant": { "enabled": true, "name": "string", "payload": null } } ``` **SDK Code** ```python import requests url = "https://edge.unleash-instance.example.com/api/frontend/features/feature_name" querystring = {"properties":"{}"} headers = {"Authorization": ""} response = requests.get(url, headers=headers, params=querystring) print(response.json()) ``` ```javascript const url = 'https://edge.unleash-instance.example.com/api/frontend/features/feature_name?properties=%7B%7D'; const options = {method: 'GET', headers: {Authorization: ''}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://edge.unleash-instance.example.com/api/frontend/features/feature_name?properties=%7B%7D" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://edge.unleash-instance.example.com/api/frontend/features/feature_name?properties=%7B%7D") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = '' response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://edge.unleash-instance.example.com/api/frontend/features/feature_name?properties=%7B%7D") .header("Authorization", "") .asString(); ``` ```php request('GET', 'https://edge.unleash-instance.example.com/api/frontend/features/feature_name?properties=%7B%7D', [ 'headers' => [ 'Authorization' => '', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://edge.unleash-instance.example.com/api/frontend/features/feature_name?properties=%7B%7D"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", ""); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["Authorization": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://edge.unleash-instance.example.com/api/frontend/features/feature_name?properties=%7B%7D")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```