NRN API
This API may be removed in the future. Use Providers for infrastructure configuration and Parameters for application runtime settings.
The NRN API is a hierarchical configuration store accessible at https://api.nullplatform.com/nrn/:id. It stores key-value data keyed by NRN strings and supports hierarchical merging — child entities automatically inherit parent values.
Reading configuration
GET /nrn/organization=1:account=2:namespace=3:application=4:scope=5?ids=some-key,mynamespace.another-key
{
"nrn": "organization=1:account=2:namespace=3:application=4:scope=5",
"namespaces": {
"global": {
"some-key": "some-value"
},
"mynamespace": {
"another-key": "another-value"
}
},
"profiles": {}
}
Key points:
- You must specify keys to retrieve using the
idsquery parameter (comma-separated). - Keys in the
globalnamespace can omit the namespace prefix. All other keys use the formatnamespace.key. - Pass
output_json_values=trueto deserialize JSON string values in the response. - Pass
no-merge=trueto see only the values set at that exact node, without inheriting from parent levels.
Available methods
| Method | Description |
|---|---|
GET | Retrieve namespaced keys for an NRN |
POST | Create an NRN entry |
PUT | Fully replace an NRN's content (destructive) |
PATCH | Update specific keys (additive) |
PUT and PATCH behave differently. PUT replaces all content; PATCH only updates the specified keys.
Object and array merging
When values are JSON objects or arrays stored as strings, the API merges them across the hierarchy. For example, if a parent defines {"the": "thing"} and a child defines {"another": "thing"} for the same key, a query at the child level returns the merged result:
{"the": "thing", "another": "thing"}
Profiles
Profiles apply cross-cutting configuration overrides to multiple branches of the NRN tree. For example, you can define a production profile at the organization level that sets specific cloud accounts for every production scope, regardless of which application or namespace they belong to.
Creating a profile
Use the naming convention profilename::namespace.key:
POST /nrn/organization=1
{
"testing::some_cloud_provider.account_id": "1234_testing",
"production::some_cloud_provider.account_id": "1234_production"
}
Assigning a profile to a scope
Assign profiles when you create the scope, by adding the profiles field to the request body. They can't be changed afterwards. Each profile must be available for the application's NRN (see Checking available profiles), otherwise the request fails.
POST /scope
{
"profiles": ["production"]
}
Querying with a profile
GET /nrn/organization=1:account=2:namespace=3?profile=production&ids=some_cloud_provider.account_id
The profile values merge with (and override) the natural NRN hierarchy response.
Checking available profiles
GET /nrn/organization=1:account=2/available_profiles
{
"nrn": "organization=1:account=2",
"available_profiles": ["development", "testing", "production"]
}
Multiple profiles
Apply multiple profiles by separating them with commas. When profiles define the same key, the one with the lower order value takes precedence:
GET /nrn/organization=1:account=2:namespace=3?profile=production,hardened_ami
Hierarchical profiles
Profiles compose hierarchically just like NRN values — keys inside a profile merge upward through the hierarchy. This lets you define shared settings at the organization level and team-specific overrides at the namespace level.
Deleting configuration
DELETE /nrn/organization=1:account=2?namespaces=example,another_example
DELETE /nrn/organization=1:account=2?profiles=development,testing
Pass include_parents=true to delete across the entire hierarchy, not just the specified node.