Double column
curl
API
CLI

Services /

Update service deployment

Updates the deployment settings of the given service.

URL parameters

    • project

      string required

      ID of the project

    • service

      string required

      ID of the service

Request attributes

  • object

    An external deployment

    • external

      object

      • registryProvider

        string required

        Registry provider hosting the external image

        one of: dockerhub, gcr-eu, gcr-us, gitlab, github

      • privateImage

        boolean

        Does the image require authentication

      • imagePath

        string required

        Path of the external image excluding the hostname

      • credentials

        object

        Authentication credentials for the private image. Required if privateImage is `true`.

    OR

    • object

      An internal deployment

      • internal

        object

        • internalId

          string

          Internal ID of the build service to deploy

          pattern: [A-Za-z0-9-]

        • branch

          string

          Branch to deploy

        • buildSHA

          Commit SHA to deploy, or 'latest' to deploy the most recent commit

    API
    CLI

    POST /v1beta/projects/{project}/services/{service}/deployment

    Example request

    request body

    internal

    curl

    curl --header "Content-Type: application/json" \
      --header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
      --request POST \
      --data '{"internal":{"nfObjectId":"5f3bd676b84798d54472d1cc","nfObjectType":"service","branch":"master","buildSHA":"latest"}}' \
      https://api.northflank.com/v1beta/projects/{project}/services/{service}/deployment

    external

    curl

    curl --header "Content-Type: application/json" \
      --header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
      --request POST \
      --data '{"external":{"imagePath":"nginx:latest","registryProvider":"dockerhub","privateImage":true,"credentials":{"auths":{"https://index.docker.io/v1/":{"auth":"[YOUR AUTH KEY HERE]"}}}}}' \
      https://api.northflank.com/v1beta/projects/{project}/services/{service}/deployment

    Example response

    200 OK

    success

    © 2020 Northflank Ltd. All rights reserved.

    TermsPrivacy

    contact@northflank.com