Required permission
Project > Services > General > Update
Path parameters
projectId
string requiredID of the projectserviceId
string requiredID of the service
Request body
- {object}The traffic split to apply to the active rollout.
canaryPercentage
integer requiredPercentage of traffic to route to the canary deployment. Must sum to 100 with stablePercentage.min0max100stablePercentage
integer requiredPercentage of traffic to route to the stable deployment. Must sum to 100 with canaryPercentage.min0max100
Response body
- {object}Response object.
data
{object} requiredResult data.strategyId
string | null requiredID of the gradual rollout strategy this rollout was created from. Null if the strategy has since been deleted.type
string requiredType of the gradual rollout strategy.one ofcanarypromoted
boolean requiredWhether the canary has been promoted to stable. A promoted rollout serves all traffic from the canary deployment and can no longer be reconfigured.createdAt
string requiredTime the rollout started.updatedAt
string requiredTime the rollout was last changed.options
{object}Options inherited from the gradual rollout strategy.triggers
{object}Conditions under which a new release automatically starts a gradual rollout.releaseFromTemplate
boolean | nullreleaseFromReleaseFlow
boolean | nullreleaseFromCD
boolean | nullreleaseFromUI
boolean | nullreleaseFromApi
boolean | nullblockDeploymentOnActiveRollout
boolean | nullWhether new deployments are blocked while this rollout is in progress.details
{object} requiredTraffic configuration of the rollout.canaryStrategy
string requiredHow traffic is split between the stable and canary deployments.one ofpercentage, headerconfig
(multiple options: oneOf) requiredConfiguration for the active canary strategy.- {object}
canaryPercentage
integer requiredPercentage of traffic to route to the canary deployment. Must sum to 100 with stablePercentage.min0max100stablePercentage
integer requiredPercentage of traffic to route to the stable deployment. Must sum to 100 with canaryPercentage.min0max100- {object}
canaryHeader
{object} requiredHeader that routes traffic to the canary deployment.headerName
string requiredheaderValue
string requiredstableHeader
{object} requiredHeader that routes traffic to the stable deployment.headerName
string requiredheaderValue
string requiredstableDeployment
{object} | null requiredThe deployment currently serving stable traffic.id
string requiredIdentifier of the deployment. Use this as the rollback target.name
string | nullDisplay name of the deployment. Null until the first pod of the deployment has been observed.createdAt
string requiredTime the deployment was created.active
booleanWhether the deployment is currently serving traffic. During a gradual rollout both the stable and the canary deployment are active.releaseType
stringCurrent role of the deployment in the gradual rollout. This is mutable: promoting a canary deployment changes its release type to `stable`, so it does not record how the deployment was originally created. Absent for services that do not use a gradual rollout strategy.one ofstable, canaryimage
{object}The image this deployment is running.imagePath
stringFull path of the deployed image.image
stringName of the deployed image.tag
stringTag of the deployed image.sha
stringDigest of the deployed image.commit
{object}The source commit this deployment was built from, for git backed services.sha
stringCommit the deployed image was built from.message
stringCommit message.date
(multiple options: anyOf)Time the commit was authored.- string
- string
instances
number | nullNumber of instances the deployment was created with.reason
{object}What triggered the deployment.id
string requiredWhy the deployment was created.user
{object}The user that caused the deployment, when it was user initiated.name
stringName of the acting user.email
stringEmail of the acting user.canaryDeployment
{object} | null requiredThe deployment currently serving canary traffic.id
string requiredIdentifier of the deployment. Use this as the rollback target.name
string | nullDisplay name of the deployment. Null until the first pod of the deployment has been observed.createdAt
string requiredTime the deployment was created.active
booleanWhether the deployment is currently serving traffic. During a gradual rollout both the stable and the canary deployment are active.releaseType
stringCurrent role of the deployment in the gradual rollout. This is mutable: promoting a canary deployment changes its release type to `stable`, so it does not record how the deployment was originally created. Absent for services that do not use a gradual rollout strategy.one ofstable, canaryimage
{object}The image this deployment is running.imagePath
stringFull path of the deployed image.image
stringName of the deployed image.tag
stringTag of the deployed image.sha
stringDigest of the deployed image.commit
{object}The source commit this deployment was built from, for git backed services.sha
stringCommit the deployed image was built from.message
stringCommit message.date
(multiple options: anyOf)Time the commit was authored.- string
- string
instances
number | nullNumber of instances the deployment was created with.reason
{object}What triggered the deployment.id
string requiredWhy the deployment was created.user
{object}The user that caused the deployment, when it was user initiated.name
stringName of the acting user.email
stringEmail of the acting user.history
[array] requiredPrevious traffic configurations of this rollout, oldest first.- {object}
config
(multiple options: anyOf) requiredThe traffic split or header configuration that was replaced.- {object}
canaryPercentage
integer requiredPercentage of traffic to route to the canary deployment. Must sum to 100 with stablePercentage.min0max100stablePercentage
integer requiredPercentage of traffic to route to the stable deployment. Must sum to 100 with canaryPercentage.min0max100- {object}
canaryHeader
{object} requiredHeader that routes traffic to the canary deployment.headerName
string requiredheaderValue
string requiredstableHeader
{object} requiredHeader that routes traffic to the stable deployment.headerName
string requiredheaderValue
string requiredupdatedAt
string requiredTime the split was applied.
OR
OR
OR
OR
POST /v1/projects/{projectId}/services/{serviceId}/rollout/configuration
POST /v1/teams/{teamId}/projects/{projectId}/services/{serviceId}/rollout/configuration
Example request
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
--request POST \
--data '{"canaryPercentage":20,"stablePercentage":80}' \
https://api.northflank.com/v1/projects/{projectId}/services/{serviceId}/rollout/configurationExample response
200 OK
JSON
{
"data": {
"strategyId": "example-gradual-rollout-strategy",
"type": "canary",
"promoted": false,
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T11:30:00.000Z",
"details": {
"canaryStrategy": "percentage",
"config": {
"canaryPercentage": 20,
"stablePercentage": 80
}
},
"stableDeployment": {
"id": "6560a1b2c3d4e5f6a7b8c9d0",
"name": "example-service-7d9f8b6c5d",
"createdAt": "2024-01-15T10:30:00.000Z",
"active": true,
"releaseType": "canary",
"image": {
"imagePath": "nginx:latest",
"image": "nginx",
"tag": "latest",
"sha": "sha256:9c8f8d"
},
"commit": {
"sha": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0",
"message": "fix: handle empty payload",
"author": "octocat"
},
"instances": 2,
"reason": {
"id": "service-updated",
"user": {
"name": "Jane Doe",
"email": "jane@example.com"
}
}
},
"canaryDeployment": {
"id": "6560a1b2c3d4e5f6a7b8c9d0",
"name": "example-service-7d9f8b6c5d",
"createdAt": "2024-01-15T10:30:00.000Z",
"active": true,
"releaseType": "canary",
"image": {
"imagePath": "nginx:latest",
"image": "nginx",
"tag": "latest",
"sha": "sha256:9c8f8d"
},
"commit": {
"sha": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0",
"message": "fix: handle empty payload",
"author": "octocat"
},
"instances": 2,
"reason": {
"id": "service-updated",
"user": {
"name": "Jane Doe",
"email": "jane@example.com"
}
}
},
"history": [
{
"config": {
"canaryPercentage": 20,
"stablePercentage": 80
},
"updatedAt": "2024-01-15T10:45:00.000Z"
}
]
}
}Example response
404 Not Found
Example response
409 Conflict