HTTP
Use HTTP when an app needs config values 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. If none is active, Nona falls back to its editable working parameters even when historical releases exist.
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.
Fetch all client-visible values
Section titled “Fetch all client-visible values”Use the environment-only route to fetch the complete client snapshot in one request:
curl -i "https://nona.example.com/api/production" \ -H "X-Api-Key: $NONA_API_KEY"The API key must have client or all scope. The response includes entries with client or all scope and always excludes server-only entries. A valid server-only key receives 404, matching the single-key endpoint’s behavior for an unreadable scope.
{ "Features:Checkout": { "value": "true", "contentType": "boolean" }, "App:Banner": { "value": "Welcome", "contentType": "text" }}The bulk route also accepts ?version=1.1.0 and ?version=1.1.x.
Conditional polling with ETag
Section titled “Conditional polling with ETag”Every successful bulk response includes an ETag. Send it back in If-None-Match when polling:
curl -i "https://nona.example.com/api/production" \ -H "X-Api-Key: $NONA_API_KEY" \ -H 'If-None-Match: "<etag-from-the-previous-response>"'If the client-visible snapshot has not changed, Nona returns 304 Not Modified with no response body. Server-only entry changes do not change this client snapshot ETag.
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 or bulk snapshot found. |
304 |
Bulk snapshot is unchanged for the supplied If-None-Match value. |
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 expected release is active, pass
version, or verify the current working parameter when none is active - 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
- one-call cache priming
- OpenFeature integration
- less manual request handling