Application settings
Every application carries a settings object: configuration values nullplatform keeps for the application, such as its default branch and environment, where its build assets are stored, and which code repository it's linked to. Keeping them accurate lets nullplatform resolve the right defaults and find your build assets.
You can read and update these values through the Application API. All settings are optional, so any field may be empty if it hasn't been set yet.
What's in the settings object
The settings object groups related configuration into three blocks. A fully populated object looks like this:
{
"settings": {
"defaults": {
"branch": "main",
"environment": "staging"
},
"asset": {
"docker_server": {
"uri": "registry.example.com/acme-corp/billing-api"
},
"ecr": {
"uri": "123456789012.dkr.ecr.us-east-1.amazonaws.com/billing-api",
"arn": "arn:aws:ecr:us-east-1:123456789012:repository/billing-api"
}
},
"code_repository": {
"specification_id": "7f3c910e-8138-4d65-9d09-b97d89f2c509",
"specification_slug": "github-configuration",
"specification_name": "GitHub",
"specification_icon": "github",
"provider_id": "82eee42c-46c9-4bb7-a53d-c08b027817f3"
}
}
}
Defaults
defaults holds the values nullplatform falls back to when one isn't specified explicitly.
| Field | Description |
|---|---|
branch | Default branch name for the application. |
environment | Default environment name for the application. |
Asset location
asset records where the application's build assets are stored, so nullplatform knows where to find the images it deploys.
| Field | Description |
|---|---|
docker_server.uri | Location of the application's Docker server assets. |
asset.ecr.uri | Amazon ECR repository URI for the application's assets. |
asset.ecr.arn | Amazon ECR repository ARN for the application's assets. |
Code repository
code_repository describes the repository provider the application is linked to. It references the provider specification (specification_id, specification_slug, specification_name, specification_icon) and the provider instance (provider_id).
Read the settings
Send a GET request to the Application API. The settings object is included in the application's response body.
- CLI
- cURL
np application get --id 123
curl -L 'https://api.nullplatform.com/application/123' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <token>'
Update the settings
Send a PATCH request to the Application API with the keys you want to change. For example, to set the default branch and environment:
- CLI
- cURL
np application patch
--id 123
--body '{
"settings": {
"defaults": {
"branch": "main",
"environment": "staging"
}
}
}'
curl -L -X PATCH 'https://api.nullplatform.com/application/123' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <token>' \
-d '{
"settings": {
"defaults": {
"branch": "main",
"environment": "staging"
}
}
}'
Updates to settings follow JSON Merge Patch (RFC 7396). This means you only send the keys you want to change:
- A key with a non-null value is created or updated.
- A key set to
nullis deleted. - A key you omit is left untouched.
To clear a value, send the key with null rather than an empty string. For example, { "settings": { "defaults": { "branch": null } } } removes the default branch while preserving every other setting.
Related resources
- Create a new application: set up an application and its repository
- Update the name of your repository: keep
repository_urlin sync after renaming