Required permission
Project > Harnesses > General > Create
Path parameters
projectId
string requiredID of the project
Query parameters
acknowledgeActiveSessions
boolean
Request body
- {object}
name
string requiredThe name of the harness.min length3max length54pattern^[a-zA-Z]((-|\s)?[a-zA-Z0-9]+((-|\s)[a-zA-Z0-9]+)*)?$description
stringA description of the harness.max length200pattern^[a-zA-Z0-9.,?\s\\/'"()[\];`%^&*\-_:!]+$billing
{object} requireddeploymentPlan
string requiredThe ID of the deployment plan to use.min length3max length100pattern^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$gpu
{object}enabled
booleanWhether GPUs are enabled for this workload.configuration
{object}gpuType
string requiredThe type of GPU to use.gpuCount
integerThe number of GPUs to allocate.timesliced
booleanWhether GPU timeslicing is enabled.deployment
{object} requiredgpu
{object}enabled
booleanWhether GPUs are enabled for this workload.configuration
{object}gpuType
string requiredThe type of GPU to use.gpuCount
integerThe number of GPUs to allocate.timesliced
booleanWhether GPU timeslicing is enabled.volumes
[array]Per-replica persistent volumes for a statefulSet service. Each replica receives its own instance of every volume. Only valid when `deployment.type` is `statefulSet`.- {object}
id
string requiredSlug identifying this volume within the service.min length3max length39pattern^[a-zA-Z](-?[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*)?$mounts
[array] requiredArray of mounts, containerMountPaths must be unique- {object}
volumeMountPath
stringOptionally specify the path inside this volume that should be mountedpattern^((?!\.\.).)*$containerMountPath
string requiredSpecify the path into which the volume should be mountedpattern^((?!:).)*$spec
{object} requiredPer-replica volume storage schemastorage
{object}Runtime storage settings. Ephemeral storage defaults to 10240 MiB.ephemeralStorage
{object}storageSize
integerEphemeral storage per container in MBmin1024workspaceSize
integerSize of the persistent workspace volume in MiB. Can only be grown after creation; shrinking is rejected because Kubernetes does not support shrinking persistent volume claims.min5120max102400ports
[array]- {object}
name
string requiredThe name used to identify the port.min length1max length8pattern^[a-zA-Z](-?[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*)?$internalPort
integer requiredThe port number.min1max65535public
booleanIf true, the port will be exposed publicly.security
{object}credentials
[array]An array of credentials to access the service.- {object}
username
string requiredThe username to access the servicemin length3max length39pattern^[a-zA-Z](-?[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*)?$password
string requiredThe password to access the service with this username.type
string requiredThe type of authentication usedone ofbasic-authip
[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, DENYpolicies
[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, DENYsso
{object}Configure port authentication via SSOorganizationId
stringID of the SSO organization that the user will have to be a member ofdirectoryGroupIds
[array]Array of directory groups that will have access- string
allowAnyOrgUsers
booleanAllow entire organization to access this servicevalidateInternalTraffic
booleanEnforce internal traffic through SSO authentication flowsetCookieOnRootDomain
booleanSet SSO authentication cookie on root domainallowInternalTrafficViaPublicDns
booleanAllow internal traffic from same or shared projects via public DNS to skip SSO authentication flowheaders
[array]List of header authentication settings, it checks the presence of all headers and compares it against the expected value. Wildcard (*) is supported.- (multiple options: anyOf)
- {object}Matches provided headers as strings.
regexMode
booleanname
string requiredpattern^[a-zA-Z0-9_\-%$+]+$value
string required- {object}Matches provided headers as regex.
regexMode
booleanname
string requiredvalue
string requiredverificationMode
stringMode used to verify multiple security features like ip policies and SSO authenticationone ofor, andsecurePathConfiguration
{object}enabled
booleanEnable security policies on a path-level styleskipSecurityPoliciesForInternalTrafficViaPublicDns
booleanAllow internal traffic from same or shared projects via public DNS to skip all security policiesrules
[array]- {object}
paths
[array] requiredArray of path objects which represent the paths and their priority for which the security policies will be enforced- (multiple options: oneOf)Data about how the path should be handled.
- {object}Route when the path starts with the provided prefix.
path
string requiredpattern^\/([_a-zA-Z0-9-&?=.]*)((\/[_a-zA-Z0-9-&?=.]+)*(\/)?)?$routingMode
string requiredMode of the path, determining how the URI will be interpreted.one ofprefixpriority
integer requiredmin0max100- {object}Route when the path is an exact match.
path
string requiredpattern^\/([_a-zA-Z0-9-&?=.]*)((\/[_a-zA-Z0-9-&?=.]+)*(\/)?)?$routingMode
string requiredMode of the path, determining how the URI will be interpreted.one ofexactpriority
integer requiredmin0max100- {object}Route when the path matches the provided regex.
path
string requiredroutingMode
string requiredMode of the path, determining how the URI will be interpreted.one ofregexpriority
integer requiredmin0max100accessMode
string requiredSpecify the way the path rule will behave when processing policies. This enables an allow-list/deny-list approach for access control on each pathone ofprotected, unprotectedsecurityPolicies
{object}orPolicies
{object}credentials
[array]An array of credentials to access the service.- {object}
username
string requiredThe username to access the servicemin length3max length39pattern^[a-zA-Z](-?[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*)?$password
string requiredThe password to access the service with this username.type
string requiredThe type of authentication usedone ofbasic-authip
[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, DENYpolicies
[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, DENYsso
{object}Configure port authentication via SSOorganizationId
stringID of the SSO organization that the user will have to be a member ofdirectoryGroupIds
[array]Array of directory groups that will have access- string
allowAnyOrgUsers
booleanAllow entire organization to access this servicevalidateInternalTraffic
booleanEnforce internal traffic through SSO authentication flowsetCookieOnRootDomain
booleanSet SSO authentication cookie on root domainallowInternalTrafficViaPublicDns
booleanAllow internal traffic from same or shared projects via public DNS to skip SSO authentication flowheaders
[array]List of header authentication settings, it checks the presence of all headers and compares it against the expected value. Wildcard (*) is supported.- (multiple options: anyOf)
- {object}Matches provided headers as strings.
regexMode
booleanname
string requiredpattern^[a-zA-Z0-9_\-%$+]+$value
string required- {object}Matches provided headers as regex.
regexMode
booleanname
string requiredvalue
string requiredrequiredPolicies
{object}credentials
[array]An array of credentials to access the service.- {object}
username
string requiredThe username to access the servicemin length3max length39pattern^[a-zA-Z](-?[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*)?$password
string requiredThe password to access the service with this username.type
string requiredThe type of authentication usedone ofbasic-authip
[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, DENYpolicies
[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, DENYsso
{object}Configure port authentication via SSOorganizationId
stringID of the SSO organization that the user will have to be a member ofdirectoryGroupIds
[array]Array of directory groups that will have access- string
allowAnyOrgUsers
booleanAllow entire organization to access this servicevalidateInternalTraffic
booleanEnforce internal traffic through SSO authentication flowsetCookieOnRootDomain
booleanSet SSO authentication cookie on root domainallowInternalTrafficViaPublicDns
booleanAllow internal traffic from same or shared projects via public DNS to skip SSO authentication flowheaders
[array]List of header authentication settings, it checks the presence of all headers and compares it against the expected value. Wildcard (*) is supported.- (multiple options: anyOf)
- {object}Matches provided headers as strings.
regexMode
booleanname
string requiredpattern^[a-zA-Z0-9_\-%$+]+$value
string required- {object}Matches provided headers as regex.
regexMode
booleanname
string requiredvalue
string requireddomains
[array]An array of domains to redirect to this port. Each domain must first be verified and registered to your account.- stringA domain to redirect to this port.
disableNfDomain
booleanDisable routing on the default code.run domain for public HTTP ports with custom domains.advancedOptions
{object}enableTlsPassthrough
booleanWhether this port should use pass through mode for TLSprotocol
string requiredThe protocol to use for the port.one ofHTTP, HTTP/2, TCP, UDPsource
{object}projectUrl
string requiredURL of the Git repo to build.pattern^(https:\/\/)?((www(\.[a-zA-Z0-9\-]{2,})+\.)?[a-zA-Z0-9\-]{2,})(\.([a-zA-Z0-9\-]{2,}))+(\/([a-zA-Z0-9\-._]{2,}))+?$projectType
string requiredThe VCS provider to use.one ofbitbucket, gitlab, github, self-hosted, azureselfHostedVcsId
stringIf projectType is self-hosted, the ID of the self-hosted vcs to use.accountLogin
stringBy default, if you have multiple version control accounts of the same provider linked, Northflank will pick a linked account that has access to the repository. If `accountLogin` is provided, Northflank will instead use your linked account with that login name.vcsLinkId
stringBy default, if you have multiple version control accounts of the same provider linked, Northflank will pick a linked account that has access to the repository. If `vcsLinkId` is provided, Northflank will instead use your linked account with that ID.min length24max length24projectBranch
string requiredThe name of the branch to pre-pull for the harness environment.publicRepo
booleanWhether the linked repository is public.repositoryData
{object}name
string requiredName of the new repository to create.min length3max length54pattern^[a-zA-Z]((-|\s)?[a-zA-Z0-9]+((-|\s)[a-zA-Z0-9]+)*)?$projectType
string requiredThe VCS provider to create the repository on.one ofbitbucket, gitlab, github, self-hosted, azurevcsLinkId
string requiredLinked account ID under which to create the repository.min length24max length24accountLogin
stringLinked account login to create the repository under.selfHostedVcsId
stringIf projectType is self-hosted, the ID of the self-hosted vcs to use.privateRepo
booleanWhether the new repository should be private.context
stringNamespace/owner the repository is created under (gitlab/bitbucket).folder
stringProject/folder the repository is created under (bitbucket).description
stringDescription for the new repository.max length200pattern^[a-zA-Z0-9.,?\s\\/'"()[\];`%^&*\-_:!]+$harness
{object} requiredtype
string requiredThe harness environment type to run.one ofclaude, codexauthMode
stringHow the harness authenticates: `apiKey` (a provider API key is supplied) or `account` (interactive/account login, no key stored). When omitted, defaults to `apiKey` if an apiKey is provided.one ofapiKey, accountapiKey
(multiple options: oneOf)API key used by the harness environment.cloneDirectory
stringAbsolute path the repo is cloned into in the harness container. Must be /home/harness or a directory inside it, the path backed by the harness's persistent workspace volume. Defaults to /home/harness. Can only be set when creating the harness.pattern^\/((?!\.\.?\/)[a-zA-Z0-9-._]+\/)*(?!\.\.?$)[a-zA-Z0-9-._]*$runtimeEnvironment
{object}An object containing the runtime environment to set for the harnessruntimeFiles
{object}Secret files as JSON object, encrypted at rest. File path must be absolute
OR
OR
OR
OR
OR
Response body
- {object}Response object.
data
{object} requiredResult data.name
string requiredThe name of the harness.min length3max length54pattern^[a-zA-Z]((-|\s)?[a-zA-Z0-9]+((-|\s)[a-zA-Z0-9]+)*)?$description
stringA description of the harness.max length200pattern^[a-zA-Z0-9.,?\s\\/'"()[\];`%^&*\-_:!]+$billing
{object} requireddeploymentPlan
string requiredThe ID of the deployment plan to use.min length3max length100pattern^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$gpu
{object}enabled
booleanWhether GPUs are enabled for this workload.configuration
{object}gpuType
string requiredThe type of GPU to use.gpuCount
integerThe number of GPUs to allocate.timesliced
booleanWhether GPU timeslicing is enabled.ports
[array]- {object}
name
string requiredThe name used to identify the port.min length1max length8pattern^[a-zA-Z](-?[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*)?$internalPort
integer requiredThe port number.min1max65535public
booleanIf true, the port will be exposed publicly.security
{object}credentials
[array]An array of credentials to access the service.- {object}
username
string requiredThe username to access the servicemin length3max length39pattern^[a-zA-Z](-?[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*)?$password
string requiredThe password to access the service with this username.type
string requiredThe type of authentication usedone ofbasic-authip
[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, DENYpolicies
[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, DENYsso
{object}Configure port authentication via SSOorganizationId
stringID of the SSO organization that the user will have to be a member ofdirectoryGroupIds
[array]Array of directory groups that will have access- string
allowAnyOrgUsers
booleanAllow entire organization to access this servicevalidateInternalTraffic
booleanEnforce internal traffic through SSO authentication flowsetCookieOnRootDomain
booleanSet SSO authentication cookie on root domainallowInternalTrafficViaPublicDns
booleanAllow internal traffic from same or shared projects via public DNS to skip SSO authentication flowheaders
[array]List of header authentication settings, it checks the presence of all headers and compares it against the expected value. Wildcard (*) is supported.- (multiple options: anyOf)
- {object}Matches provided headers as strings.
regexMode
booleanname
string requiredpattern^[a-zA-Z0-9_\-%$+]+$value
string required- {object}Matches provided headers as regex.
regexMode
booleanname
string requiredvalue
string requiredverificationMode
stringMode used to verify multiple security features like ip policies and SSO authenticationone ofor, andsecurePathConfiguration
{object}enabled
booleanEnable security policies on a path-level styleskipSecurityPoliciesForInternalTrafficViaPublicDns
booleanAllow internal traffic from same or shared projects via public DNS to skip all security policiesrules
[array]- {object}
paths
[array] requiredArray of path objects which represent the paths and their priority for which the security policies will be enforced- (multiple options: oneOf)Data about how the path should be handled.
- {object}Route when the path starts with the provided prefix.
path
string requiredpattern^\/([_a-zA-Z0-9-&?=.]*)((\/[_a-zA-Z0-9-&?=.]+)*(\/)?)?$routingMode
string requiredMode of the path, determining how the URI will be interpreted.one ofprefixpriority
integer requiredmin0max100- {object}Route when the path is an exact match.
path
string requiredpattern^\/([_a-zA-Z0-9-&?=.]*)((\/[_a-zA-Z0-9-&?=.]+)*(\/)?)?$routingMode
string requiredMode of the path, determining how the URI will be interpreted.one ofexactpriority
integer requiredmin0max100- {object}Route when the path matches the provided regex.
path
string requiredroutingMode
string requiredMode of the path, determining how the URI will be interpreted.one ofregexpriority
integer requiredmin0max100accessMode
string requiredSpecify the way the path rule will behave when processing policies. This enables an allow-list/deny-list approach for access control on each pathone ofprotected, unprotectedsecurityPolicies
{object}orPolicies
{object}credentials
[array]An array of credentials to access the service.- {object}
username
string requiredThe username to access the servicemin length3max length39pattern^[a-zA-Z](-?[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*)?$password
string requiredThe password to access the service with this username.type
string requiredThe type of authentication usedone ofbasic-authip
[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, DENYpolicies
[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, DENYsso
{object}Configure port authentication via SSOorganizationId
stringID of the SSO organization that the user will have to be a member ofdirectoryGroupIds
[array]Array of directory groups that will have access- string
allowAnyOrgUsers
booleanAllow entire organization to access this servicevalidateInternalTraffic
booleanEnforce internal traffic through SSO authentication flowsetCookieOnRootDomain
booleanSet SSO authentication cookie on root domainallowInternalTrafficViaPublicDns
booleanAllow internal traffic from same or shared projects via public DNS to skip SSO authentication flowheaders
[array]List of header authentication settings, it checks the presence of all headers and compares it against the expected value. Wildcard (*) is supported.- (multiple options: anyOf)
- {object}Matches provided headers as strings.
regexMode
booleanname
string requiredpattern^[a-zA-Z0-9_\-%$+]+$value
string required- {object}Matches provided headers as regex.
regexMode
booleanname
string requiredvalue
string requiredrequiredPolicies
{object}credentials
[array]An array of credentials to access the service.- {object}
username
string requiredThe username to access the servicemin length3max length39pattern^[a-zA-Z](-?[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*)?$password
string requiredThe password to access the service with this username.type
string requiredThe type of authentication usedone ofbasic-authip
[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, DENYpolicies
[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, DENYsso
{object}Configure port authentication via SSOorganizationId
stringID of the SSO organization that the user will have to be a member ofdirectoryGroupIds
[array]Array of directory groups that will have access- string
allowAnyOrgUsers
booleanAllow entire organization to access this servicevalidateInternalTraffic
booleanEnforce internal traffic through SSO authentication flowsetCookieOnRootDomain
booleanSet SSO authentication cookie on root domainallowInternalTrafficViaPublicDns
booleanAllow internal traffic from same or shared projects via public DNS to skip SSO authentication flowheaders
[array]List of header authentication settings, it checks the presence of all headers and compares it against the expected value. Wildcard (*) is supported.- (multiple options: anyOf)
- {object}Matches provided headers as strings.
regexMode
booleanname
string requiredpattern^[a-zA-Z0-9_\-%$+]+$value
string required- {object}Matches provided headers as regex.
regexMode
booleanname
string requiredvalue
string requireddomains
[array]An array of domains to redirect to this port. Each domain must first be verified and registered to your account.- stringA domain to redirect to this port.
disableNfDomain
booleanDisable routing on the default code.run domain for public HTTP ports with custom domains.advancedOptions
{object}enableTlsPassthrough
booleanWhether this port should use pass through mode for TLSprotocol
(multiple options: oneOf) requiredThe protocol to use for the port.- stringone ofHTTP, HTTP/2
- stringone ofHTTP, HTTP/2, TCP, UDP
source
{object}projectUrl
string requiredURL of the Git repo to build.pattern^(https:\/\/)?((www(\.[a-zA-Z0-9\-]{2,})+\.)?[a-zA-Z0-9\-]{2,})(\.([a-zA-Z0-9\-]{2,}))+(\/([a-zA-Z0-9\-._]{2,}))+?$projectType
string requiredThe VCS provider to use.one ofbitbucket, gitlab, github, self-hosted, azureselfHostedVcsId
stringIf projectType is self-hosted, the ID of the self-hosted vcs to use.accountLogin
stringBy default, if you have multiple version control accounts of the same provider linked, Northflank will pick a linked account that has access to the repository. If `accountLogin` is provided, Northflank will instead use your linked account with that login name.vcsLinkId
stringBy default, if you have multiple version control accounts of the same provider linked, Northflank will pick a linked account that has access to the repository. If `vcsLinkId` is provided, Northflank will instead use your linked account with that ID.min length24max length24projectBranch
string requiredThe name of the branch to pre-pull for the harness environment.publicRepo
booleanWhether the linked repository is public.repositoryData
{object}name
string requiredName of the new repository to create.min length3max length54pattern^[a-zA-Z]((-|\s)?[a-zA-Z0-9]+((-|\s)[a-zA-Z0-9]+)*)?$projectType
string requiredThe VCS provider to create the repository on.one ofbitbucket, gitlab, github, self-hosted, azurevcsLinkId
string requiredLinked account ID under which to create the repository.min length24max length24accountLogin
stringLinked account login to create the repository under.selfHostedVcsId
stringIf projectType is self-hosted, the ID of the self-hosted vcs to use.privateRepo
booleanWhether the new repository should be private.context
stringNamespace/owner the repository is created under (gitlab/bitbucket).folder
stringProject/folder the repository is created under (bitbucket).description
stringDescription for the new repository.max length200pattern^[a-zA-Z0-9.,?\s\\/'"()[\];`%^&*\-_:!]+$runtimeEnvironment
{object}An object containing the runtime environment to set for the harnessruntimeFiles
{object}Secret files as JSON object, encrypted at rest. File path must be absolutedeployment
{object} requiredgpu
{object}enabled
booleanWhether GPUs are enabled for this workload.configuration
{object}gpuType
string requiredThe type of GPU to use.gpuCount
integerThe number of GPUs to allocate.timesliced
booleanWhether GPU timeslicing is enabled.volumes
[array]Per-replica persistent volumes for a statefulSet service. Each replica receives its own instance of every volume. Only valid when `deployment.type` is `statefulSet`.- {object}
id
string requiredSlug identifying this volume within the service.min length3max length39pattern^[a-zA-Z](-?[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*)?$mounts
[array] requiredArray of mounts, containerMountPaths must be unique- {object}
volumeMountPath
stringOptionally specify the path inside this volume that should be mountedpattern^((?!\.\.).)*$containerMountPath
string requiredSpecify the path into which the volume should be mountedpattern^((?!:).)*$spec
{object} requiredPer-replica volume storage schemastorage
{object}Runtime storage settings. Ephemeral storage defaults to 10240 MiB.ephemeralStorage
{object}storageSize
integerEphemeral storage per container in MBmin1024workspaceSize
integerSize of the persistent workspace volume in MiB. Can only be grown after creation; shrinking is rejected because Kubernetes does not support shrinking persistent volume claims.min5120max102400harness
{object} requiredtype
string requiredThe harness environment type to run.one ofclaude, codexauthMode
stringHow the harness authenticates: `apiKey` (a provider key is stored) or `account` (interactive/account login, no key).one ofapiKey, accountapiKey
stringMasked API key used by the harness environment. Absent for `account` harnesses.cloneDirectory
stringAbsolute path the repo is cloned into in the harness container.id
string requiredIdentifier for the harnessappId
string requiredFull identifier used for harness deploymentcluster
{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 updateharnessPaused
booleanIs the harness paused?status
{object} requiredDetails about the current harness status.deployment
{object} requiredDetails about the current deployment status.status
string requiredThe current status of the deployment.one ofPENDING, IN_PROGRESS, COMPLETED, FAILEDreason
string requiredThe reason the current deployment was started.one ofSCALING, DEPLOYINGlastTransitionTime
stringThe timestamp of when the deployment reached this status.
OR
OR
OR
OR
OR
OR
PUT /v1/projects/{projectId}/harnesses
PUT /v1/teams/{teamId}/projects/{projectId}/harnesses
Example request
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
--request PUT \
--data '{"name":"Example Harness","description":"A harness description","billing":{"deploymentPlan":"nf-compute-20"},"deployment":{"volumes":[{"id":"data","mounts":[{"volumeMountPath":"","containerMountPath":"/container"}],"spec":{"storageClassName":"ssd","storageSize":6144}}],"storage":{"ephemeralStorage":{"storageSize":1024}},"workspaceSize":10240},"ports":[{"name":"p01","internalPort":8080,"public":true,"security":{"credentials":[{"username":"admin","password":"password123","type":"basic-auth"}],"ip":[{"addresses":["127.0.0.1"],"action":"DENY"}],"policies":[{"addresses":["127.0.0.1"],"action":"DENY"}],"headers":[{"regexMode":false,"name":"headerName","value":"headerValue"}],"securePathConfiguration":{"rules":[{"paths":[{"routingMode":"prefix","priority":80}],"accessMode":"protected","securityPolicies":{"orPolicies":{"credentials":[{"username":"admin","password":"password123","type":"basic-auth"}],"ip":[{"addresses":["127.0.0.1"],"action":"DENY"}],"policies":[{"addresses":["127.0.0.1"],"action":"DENY"}],"headers":[{"regexMode":false,"name":"headerName","value":"headerValue"}]},"requiredPolicies":{"credentials":[{"username":"admin","password":"password123","type":"basic-auth"}],"ip":[{"addresses":["127.0.0.1"],"action":"DENY"}],"policies":[{"addresses":["127.0.0.1"],"action":"DENY"}],"headers":[{"regexMode":false,"name":"headerName","value":"headerValue"}]}}}]}},"domains":["app.example.com"],"protocol":"HTTP"}],"source":{"projectUrl":"https://github.com/northflank/gatsby-with-northflank","projectType":"github","accountLogin":"github-user","projectBranch":"master"},"repositoryData":{"name":"my-harness-repo"},"harness":{"type":"claude","authMode":"apiKey","cloneDirectory":"/home/harness/repo"},"runtimeEnvironment":{"VARIABLE_1":"abcdef","VARIABLE_2":"12345"},"runtimeFiles":{"/dir/fileName":{"data":"VGhpcyBpcyBhbiBleGFtcGxlIHdpdGggYSB0ZW1wbGF0ZWQgJHtOT0RFX0VOVn0gdmFyaWFibGU=","encoding":"utf-8"}}}' \
https://api.northflank.com/v1/projects/{projectId}/harnessesExample response
200 OK
JSON
{
"data": {
"name": "Example Harness",
"description": "A harness description",
"billing": {
"deploymentPlan": "nf-compute-20"
},
"ports": [
{
"name": "p01",
"internalPort": 8080,
"public": true,
"security": {
"credentials": [
{
"username": "admin",
"password": "password123",
"type": "basic-auth"
}
],
"ip": [
{
"addresses": [
"127.0.0.1"
],
"action": "DENY"
}
],
"policies": [
{
"addresses": [
"127.0.0.1"
],
"action": "DENY"
}
],
"headers": [
{
"regexMode": false,
"name": "headerName",
"value": "headerValue"
}
],
"securePathConfiguration": {
"rules": [
{
"paths": [
{
"routingMode": "prefix",
"priority": 80
}
],
"accessMode": "protected",
"securityPolicies": {
"orPolicies": {
"credentials": [
{
"username": "admin",
"password": "password123",
"type": "basic-auth"
}
],
"ip": [
{
"addresses": [
"127.0.0.1"
],
"action": "DENY"
}
],
"policies": [
{
"addresses": [
"127.0.0.1"
],
"action": "DENY"
}
],
"headers": [
{
"regexMode": false,
"name": "headerName",
"value": "headerValue"
}
]
},
"requiredPolicies": {
"credentials": [
{
"username": "admin",
"password": "password123",
"type": "basic-auth"
}
],
"ip": [
{
"addresses": [
"127.0.0.1"
],
"action": "DENY"
}
],
"policies": [
{
"addresses": [
"127.0.0.1"
],
"action": "DENY"
}
],
"headers": [
{
"regexMode": false,
"name": "headerName",
"value": "headerValue"
}
]
}
}
}
]
}
},
"domains": [
"app.example.com"
]
}
],
"source": {
"projectUrl": "https://github.com/northflank/gatsby-with-northflank",
"projectType": "github",
"accountLogin": "github-user",
"projectBranch": "master"
},
"repositoryData": {
"name": "my-harness-repo"
},
"runtimeEnvironment": {
"VARIABLE_1": "abcdef",
"VARIABLE_2": "12345"
},
"runtimeFiles": {
"/dir/fileName": {
"data": "VGhpcyBpcyBhbiBleGFtcGxlIHdpdGggYSB0ZW1wbGF0ZWQgJHtOT0RFX0VOVn0gdmFyaWFibGU=",
"encoding": "utf-8"
}
},
"deployment": {
"volumes": [
{
"id": "data",
"mounts": [
{
"volumeMountPath": "",
"containerMountPath": "/container"
}
],
"spec": {
"storageClassName": "ssd",
"storageSize": 6144
}
}
],
"storage": {
"ephemeralStorage": {
"storageSize": 1024
}
},
"workspaceSize": 10240
},
"harness": {
"type": "claude",
"authMode": "apiKey",
"apiKey": "sk-...abcd"
},
"id": "example-harness",
"appId": "/example-user/default-project/example-harness",
"cluster": {
"id": "nf-europe-west",
"name": "nf-europe-west",
"namespace": "ns-8zy2mcjh9zn2",
"loadBalancers": [
"lb.659200800000000000000000.northflank.com"
]
},
"status": {
"deployment": {
"status": "COMPLETED",
"reason": "DEPLOYING",
"lastTransitionTime": "2021-11-29T11:47:16.624Z"
}
}
}
}