HTTP
Use HTTP when an app needs one value and does not use a client package.
GET /api/{environmentId}/{key}X-Api-Key: <api-key>The API key is bound to one project. The request only includes the environment and key. Without a version query parameter, Nona reads the environment’s active release.
Important scope note: this endpoint does not evaluate per-user context. Parameters or headers such as userId, X-User-Id, segments, cohorts, or percentage-rollout hints are not part of the Nona HTTP read model.
This makes HTTP the smallest possible integration path for:
- backend services
- scripts
- languages without an official client
- quick validation during setup or migration
Prepare the value in admin
Section titled “Prepare the value in admin”- open
Projects - open the project
- create the target environment such as
production - click
Add Parameter - create a key such as
Features:Checkout - publish a release and set it active
- create an API key in the
API Keyssection - keep the key scope aligned with the entry scope
Prepare the value with the CLI
Section titled “Prepare the value with the CLI”nona entries set \ --project storefront \ --environment production \ --key Features:Checkout \ --value true \ --scope client \ --content-type boolean
nona keys create \ --project storefront \ --name "HTTP smoke test" \ --scope client \ --environment productionThen publish and activate a release for the environment in admin.
Request
Section titled “Request”curl "https://nona.example.com/api/production/Features%3ACheckout" \ -H "X-Api-Key: $NONA_API_KEY"Encode the key path segment. For example, Features:Checkout becomes Features%3ACheckout.
To pin a client to a release, add version:
curl "https://nona.example.com/api/production/Features%3ACheckout?version=1.1.0" \ -H "X-Api-Key: $NONA_API_KEY"
curl "https://nona.example.com/api/production/Features%3ACheckout?version=1.1.x" \ -H "X-Api-Key: $NONA_API_KEY"1.1.0 resolves exactly. 1.1.x resolves to the highest patch in the 1.1 release line.
If you want to see the response headers too:
curl -i "https://nona.example.com/api/production/Features%3ACheckout" \ -H "X-Api-Key: $NONA_API_KEY"Response
Section titled “Response”The response body is the stored value.
trueNona also returns the logical value type:
X-Nona-Content-Type: booleanSupported logical types are:
textnumberbooleanjson
Why the response is simple
Section titled “Why the response is simple”The HTTP endpoint returns the raw stored value in the body and the logical type in the X-Nona-Content-Type header.
That keeps the endpoint easy to use from almost any language:
- read the body as text
- inspect the header if you need to interpret the type
For example:
trueplusX-Nona-Content-Type: boolean42plusX-Nona-Content-Type: number- a JSON string plus
X-Nona-Content-Type: json
Status codes
Section titled “Status codes”| Status | Meaning |
|---|---|
200 |
Value found. |
401 |
API key is missing or invalid. |
404 |
Environment, active release, requested release, key, or readable scope was not found. |
Common troubleshooting checks
Section titled “Common troubleshooting checks”If a request fails:
- confirm the environment name is correct
- confirm the key exists in that environment
- confirm the key is URL-encoded
- confirm the environment has an active release, or pass
version - confirm the API key belongs to the correct project
- confirm the API key scope can read the entry scope
Setup checklist
Section titled “Setup checklist”Before calling the endpoint:
- Create a project in the Nona admin UI.
- Create an environment, for example
production. - Create a config entry, for example
Features:Checkout. - Publish a release and set it active.
- Create an API key with a scope that can read the entry.
- Store the API key in your app’s secrets, not in source code.
Why HTTP is still important
Section titled “Why HTTP is still important”Even if you plan to use the JavaScript or .NET client later, HTTP is still the best first diagnostic step because it proves:
- the environment exists
- the key exists
- the API key is valid
- the public read path works
- the issue is not hidden inside client code
When to use the official client instead
Section titled “When to use the official client instead”Use JavaScript or .NET when you want:
- typed helper methods
- built-in cache behavior
- OpenFeature integration
- less manual request handling