Addons /
Patch addon
Required permission
Project > Addons > General > Update
Path parameters
projectId
string requiredID of the projectaddonId
string requiredID of the addon
Request body
- (multiple options: anyOf)The provisioner type of the addon
- {object}Native Northflank addon
description
stringA description of the addon.max length200pattern^[a-zA-Z0-9.,?\s\\/'"()[\];`%^&*\-_:!]+$version
stringThe version of the addon type to use. If set to `latest`, the addon will be created with the most recent addon version. If set to a major version appended with `-latest`, e.g. `14-latest`, the addon will be created with the most recent minor version belonging to that major version.billing
{object}deploymentPlan
stringThe ID of the deployment plan to use.pattern^[A-Za-z0-9-]+$storageClass
stringThe type of storage. Only configurable if the relevant feature flag is enabled for you accountone ofssd, hddstorage
integerThe size of the addon storage, in megabytes.min4096replicas
integerThe number of addon replicas to run.min1tlsEnabled
booleanEnables access to the addon via TLS (if supported by the addon type).externalAccessEnabled
booleanEnables external access to the addon via TLS (if supported by the addon type).ipPolicies
[array]An array of IP address policies.- {object}
addresses
[array] requiredAn array of IP addresses used for this rule- stringAn IP address used by this rule
action
string requiredThe action for this rule.one ofALLOW, DENYtypeSpecificSettings
{object}redisMaxMemoryPolicy
stringRedis only: Key eviction policy at memory pressure.one ofnoeviction, allkeys-lru, allkeys-lfu, volatile-lru, volatile-lfu, allkeys-random, volatile-random, volatile-ttlredisSentinelEnabled
booleanRedis only: Deploy Redis with Sentinel high availability. Default: falsepostgresqlWalLevel
stringPostgreSQL only: Configure wal_level setting.one ofreplica, logicalpostgresqlConnectionPoolerEnabled
booleanPostgreSQL only: Run connection pooler in front of postgres instance.postgresqlConnectionPoolerReplicas
integerPostgreSQL only: Number of connection pooler instances in case connection pooler is enabled.min1max3postgresqlReadConnectionPoolerEnabled
booleanPostgreSQL only: Run connection pooler in front of read-only postgres instance.postgresqlReadConnectionPoolerReplicas
integerPostgreSQL only: Number of read-only connection pooler instances in case read-only connection pooler is enabled.min1max3backupSchedules
[array]- {object}
scheduling
{object} requiredSchedule for the backup.interval
string requiredThe interval between backups. Each addon can only have one backup schedule of each interval for each backup type.one ofhourly, daily, weeklyminute
[array] requiredAn array of minutes when the backup should be performed.- integerA minute when the backup should be performed.min0max59
hour
[array]An array of hours in 24 hour format when the backup should be performed. At these hours, a backup will be performed at each of the minutes provided in the `minute` field. Required for `daily` and `weekly` intervals and unavailable for `hourly` intervals.- integerAn hour when the backup should be performed, in 24 hour format.min0max23
day
[array]An array of days of the week when the backup should be performed, where `0` represents Monday and `6` represents Sunday. On these days, a backup will be performed at each of the minutes provided in the `minute` field whenever it is an hour from the `hour` field. Required for `weekly` intervals and unavailable for `hourly` and `daily` intervals.- integerA day of the week when the backup should be performed, where `0` represents Monday and `6` represents Sunday.min0max6
backupType
string requiredThe type of the backup to be performed.one ofdump, snapshotadditionalDestinations
[array]List of destinations for which a backup should be created of this backup. Only applicable for snapshot backups.- {object}
destinationId
string requiredmin length3max length100pattern^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$retentionTime
integerThe time the backup is retained for, in days. `hourly` backups have a maximum retention of 7 days, `daily` backups have a maximum retention of 60 days and `weekly` backups have a maximum retention of 120 days.min1max120type
string requiredone ofcustomcompressionType
stringThe compression algorithm of the backup. Only applicable for dump backups. Defaults to `gz`.one ofgz, zstdretentionTime
integer requiredThe time the backup is retained for, in days. `hourly` backups have a maximum retention of 7 days, `daily` backups have a maximum retention of 60 days and `weekly` backups have a maximum retention of 120 days.min1max120metadata
{object}Allow setting custom labels and annotations for workloads.labels
{object}Specify custom labels for the workload.annotations
{object}Specify custom annotations for the workload as string or object.- {object}Northflank bring your own addon with templating engine
description
stringA description of the addon.max length200pattern^[a-zA-Z0-9.,?\s\\/'"()[\];`%^&*\-_:!]+$templateValues
{object}The template values to be passed to the templating engine.
OR
Response body
- {object}Response object.
data
(multiple options: oneOf) requiredResult data.- {object}Native Northflank addons
name
string requiredThe name of the addon.min length3max length39pattern^[a-zA-Z]((-|\s)?[a-zA-Z0-9]+((-|\s)[a-zA-Z0-9]+)*)?$description
stringA description of the addon.max length200pattern^[a-zA-Z0-9.,?\s\\/'"()[\];`%^&*\-_:!]+$type
string requiredThe identifier for the type of addon. Addon types can be found at the Get Addon Types endpoint.version
string requiredThe version of the addon type to use. If set to `latest`, the addon will be created with the most recent addon version. If set to a major version appended with `-latest`, e.g. `14-latest`, the addon will be created with the most recent minor version belonging to that major version.billing
{object} requireddeploymentPlan
string requiredThe ID of the deployment plan to use.pattern^[A-Za-z0-9-]+$storageClass
stringThe type of storage. Only configurable if the relevant feature flag is enabled for you accountone ofssd, hddstorage
integer requiredThe size of the addon storage, in megabytes.min4096replicas
integer requiredThe number of addon replicas to run.min1zonalRedundancy
{object}type
stringDefines scheduling behaviour across different zones within the same region.one ofrequired, disabledminZones
integerDefines how many zones are required and will prevent containers from additional scheduling into existing zones. (Only relevant if type is set to "required")min1source
{object}Optional object containing data about an existing addon to fork. If provided, the addon will be created from that existing addon backup.addonId
string requiredID of the addon to fork.pattern^[A-Za-z0-9-]+$backupId
string requiredID of a backup belonging to that addon to use for the fork.pattern^[A-Za-z0-9-]+$tlsEnabled
booleanEnables access to the addon via TLS (if supported by the addon type).externalAccessEnabled
booleanEnables external access to the addon via TLS (if supported by the addon type).ipPolicies
[array]An array of IP address policies.- {object}
addresses
[array] requiredAn array of IP addresses used for this rule- stringAn IP address used by this rule
action
string requiredThe action for this rule.one ofALLOW, DENYpitrEnabled
booleanEnables point-in-time recovery (PITR) for the addon (if supported by the addon type).typeSpecificSettings
{object}redisMaxMemoryPolicy
stringRedis only: Key eviction policy at memory pressure.one ofnoeviction, allkeys-lru, allkeys-lfu, volatile-lru, volatile-lfu, allkeys-random, volatile-random, volatile-ttlredisSentinelEnabled
booleanRedis only: Deploy Redis with Sentinel high availability. Default: falsepostgresqlWalLevel
stringPostgreSQL only: Configure wal_level setting.one ofreplica, logicalpostgresqlConnectionPoolerEnabled
booleanPostgreSQL only: Run connection pooler in front of postgres instance.postgresqlConnectionPoolerReplicas
integerPostgreSQL only: Number of connection pooler instances in case connection pooler is enabled.min1max3postgresqlReadConnectionPoolerEnabled
booleanPostgreSQL only: Run connection pooler in front of read-only postgres instance.postgresqlReadConnectionPoolerReplicas
integerPostgreSQL only: Number of read-only connection pooler instances in case read-only connection pooler is enabled.min1max3customCredentials
{object}dbName
stringCustom database name. Not supported for all addon types.backupSchedules
[array]- {object}
scheduling
{object} requiredSchedule for the backup.interval
string requiredThe interval between backups. Each addon can only have one backup schedule of each interval for each backup type.one ofhourly, daily, weeklyminute
[array] requiredAn array of minutes when the backup should be performed.- integerA minute when the backup should be performed.min0max59
hour
[array]An array of hours in 24 hour format when the backup should be performed. At these hours, a backup will be performed at each of the minutes provided in the `minute` field. Required for `daily` and `weekly` intervals and unavailable for `hourly` intervals.- integerAn hour when the backup should be performed, in 24 hour format.min0max23
day
[array]An array of days of the week when the backup should be performed, where `0` represents Monday and `6` represents Sunday. On these days, a backup will be performed at each of the minutes provided in the `minute` field whenever it is an hour from the `hour` field. Required for `weekly` intervals and unavailable for `hourly` and `daily` intervals.- integerA day of the week when the backup should be performed, where `0` represents Monday and `6` represents Sunday.min0max6
backupType
string requiredThe type of the backup to be performed.one ofdump, snapshotadditionalDestinations
[array]List of destinations for which a backup should be created of this backup. Only applicable for snapshot backups.- {object}
destinationId
string requiredretentionTime
integerThe time the backup is retained for, in days. `hourly` backups have a maximum retention of 7 days, `daily` backups have a maximum retention of 60 days and `weekly` backups have a maximum retention of 120 days.min1max120type
string requiredone ofcustomcompressionType
stringThe compression algorithm of the backup. Only applicable for dump backups. Defaults to `gz`.one ofgz, zstdretentionTime
integer requiredThe time the backup is retained for, in days. `hourly` backups have a maximum retention of 7 days, `daily` backups have a maximum retention of 60 days and `weekly` backups have a maximum retention of 120 days.min1max120metadata
{object}Allow setting custom labels and annotations for workloads.labels
{object}Specify custom labels for the workload.annotations
{object}Specify custom annotations for the workload as string or object.id
string requiredIdentifier for the addon.appId
string requiredFull identifier used for deploymentstatus
string requiredThe current state of the addon.one ofpreDeployment, triggerAllocation, allocating, postDeployment, running, paused, scaling, upgrading, resetting, backup, restore, failed, error, errorAllocating, deleting, deletedcluster
{object} requiredCluster informationid
string requiredThe id of the cluster associated with this project.name
string requiredThe name of the cluster associated with this project.namespace
stringNamespace this resource is located within on the cluster.loadBalancers
[array]Load balancer DNS for the cluster.- string
createdAt
stringtime of creationupdatedAt
stringtime of update- {object}Northflank bring your own addon with templating engine
name
string requiredThe name of the addon.min length3max length39pattern^[a-zA-Z]((-|\s)?[a-zA-Z0-9]+((-|\s)[a-zA-Z0-9]+)*)?$description
stringA description of the addon.max length200pattern^[a-zA-Z0-9.,?\s\\/'"()[\];`%^&*\-_:!]+$type
string requiredThe identifier for the type of addon. Addon types can be found at the Get Addon Types endpoint.templateValues
{object}The template values to be passed to the templating engine.id
string requiredIdentifier for the addon.appId
string requiredFull identifier used for deploymentstatus
string requiredThe current state of the addon.one ofpreDeployment, triggerAllocation, allocating, postDeployment, running, paused, scaling, upgrading, resetting, backup, restore, failed, error, errorAllocating, deleting, deletedcluster
{object} requiredCluster informationid
string requiredThe id of the cluster associated with this project.name
string requiredThe name of the cluster associated with this project.namespace
stringNamespace this resource is located within on the cluster.loadBalancers
[array]Load balancer DNS for the cluster.- string
createdAt
stringtime of creationupdatedAt
stringtime of update
OR
PATCH /v1/projects/{projectId}/addons/{addonId}
Example request
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
--request PATCH \
--data '{"description":"An addon description","tags":["my-tag"],"version":"latest","billing":{"deploymentPlan":"nf-compute-20","storageClass":"ssd","storage":4096,"replicas":1},"ipPolicies":[{"addresses":["127.0.0.1"],"action":"DENY"}],"backupSchedules":[{"scheduling":{"interval":"weekly","minute":[30],"hour":[18],"day":[4]},"backupType":"snapshot","additionalDestinations":[{"retentionTime":7}],"compressionType":"gz","retentionTime":7}]}' \
https://api.northflank.com/v1/projects/{projectId}/addons/{addonId}
Example response
200 OK
JSON
{
"data": {
"name": "Example Addon",
"description": "An addon description",
"tags": [
"my-tag"
],
"type": "postgresql",
"version": "latest",
"billing": {
"deploymentPlan": "nf-compute-20",
"storageClass": "ssd",
"storage": 4096,
"replicas": 1
},
"source": {
"addonId": "existing-addon",
"backupId": "existing-backup"
},
"ipPolicies": [
{
"addresses": [
"127.0.0.1"
],
"action": "DENY"
}
],
"backupSchedules": [
{
"scheduling": {
"interval": "weekly",
"minute": [
30
],
"hour": [
18
],
"day": [
4
]
},
"backupType": "snapshot",
"additionalDestinations": [
{
"retentionTime": 7
}
],
"compressionType": "gz",
"retentionTime": 7
}
],
"id": "example-addon",
"appId": "/example-user/default-project/example-addon",
"status": "running",
"cluster": {
"id": "nf-europe-west",
"name": "nf-europe-west",
"namespace": "ns-8zy2mcjh9zn2",
"loadBalancers": [
"lb.659200800000000000000000.northflank.com"
]
}
}
}
OR
JSON
{
"data": {
"name": "Example Addon",
"description": "An addon description",
"tags": [
"my-tag"
],
"type": "postgresql",
"templateValues": "{\"replicas\": 2}",
"id": "example-addon",
"appId": "/example-user/default-project/example-addon",
"status": "running",
"cluster": {
"id": "nf-europe-west",
"name": "nf-europe-west",
"namespace": "ns-8zy2mcjh9zn2",
"loadBalancers": [
"lb.659200800000000000000000.northflank.com"
]
}
}
}