Skip to content

resources.create

POST
/resources
curl --request POST \
--url https://example.com/api/resources \
--header 'Content-Type: application/json' \
--data '{ "projectId": "example", "environmentId": "example", "destinationId": "example", "name": "example", "kind": "application", "description": "example", "services": [ { "name": "example", "kind": "web" } ], "source": { "kind": "local-folder", "locator": "./apps/web", "displayName": "Web console", "baseDirectory": ".", "metadata": { "framework": "sveltekit" } }, "runtimeProfile": { "strategy": "auto", "installCommand": "example", "buildCommand": "example", "startCommand": "example", "runtimeName": "example", "publishDirectory": "example", "dockerfilePath": "example", "dockerComposeFilePath": "example", "buildTarget": "example", "healthCheckPath": "example", "healthCheck": { "enabled": true, "type": "http", "intervalSeconds": 5, "timeoutSeconds": 5, "retries": 10, "startPeriodSeconds": 5, "http": { "method": "GET", "scheme": "http", "host": "localhost", "port": 1, "path": "/", "expectedStatusCode": 200, "expectedResponseText": "example" } } }, "networkProfile": { "internalPort": 1, "upstreamProtocol": "http", "exposureMode": "none", "targetServiceName": "example", "hostPort": 1 } }'
Media type application/json
object
projectId
required
string
>= 1 characters
environmentId
required
string
>= 1 characters
destinationId
string
>= 1 characters
name
required
string
>= 1 characters
kind
string
default: application
Allowed values: application service database cache compose-stack worker static-site external
description
string
>= 1 characters
services
Array<object>
object
name
required
string
>= 1 characters
kind
required
string
Allowed values: web api worker database cache service
source
object
kind
required
string
Allowed values: local-folder local-git remote-git git-public git-github-app git-deploy-key zip-artifact dockerfile-inline docker-compose-inline docker-image compose
locator
required
string
>= 1 characters
displayName
string
>= 1 characters
gitRef
string
>= 1 characters
commitSha
string
>= 1 characters
baseDirectory
string
>= 1 characters
originalLocator
string
>= 1 characters
repositoryId
string
>= 1 characters
repositoryFullName
string
>= 1 characters
defaultBranch
string
>= 1 characters
imageName
string
>= 1 characters
imageTag
string
>= 1 characters
imageDigest
string
>= 1 characters
metadata
object
key
additional properties
string
runtimeProfile
object
strategy
string
default: auto
Allowed values: auto dockerfile docker-compose prebuilt-image workspace-commands static
installCommand
string
>= 1 characters
buildCommand
string
>= 1 characters
startCommand
string
>= 1 characters
runtimeName
string
>= 1 characters
publishDirectory
string
>= 1 characters
dockerfilePath
string
>= 1 characters
dockerComposeFilePath
string
>= 1 characters
buildTarget
string
>= 1 characters
healthCheckPath
string
>= 1 characters
healthCheck
object
enabled
boolean
default: true
type
string
default: http
Allowed value: http
intervalSeconds
integer
default: 5 > 0 <= 9007199254740991
timeoutSeconds
integer
default: 5 > 0 <= 9007199254740991
retries
integer
default: 10 > 0 <= 9007199254740991
startPeriodSeconds
integer
default: 5 <= 9007199254740991
http
object
method
string
default: GET
Allowed values: GET HEAD POST OPTIONS
scheme
string
default: http
Allowed values: http https
host
string
default: localhost >= 1 characters
port
integer
> 0 <= 65535
path
string
default: / >= 1 characters
expectedStatusCode
integer
default: 200 >= 100 <= 599
expectedResponseText
string
>= 1 characters
networkProfile
object
internalPort
required
integer
> 0 <= 9007199254740991
upstreamProtocol
string
default: http
Allowed values: http tcp
exposureMode
string
default: reverse-proxy
Allowed values: none reverse-proxy direct-port
targetServiceName
string
>= 1 characters
hostPort
integer
> 0 <= 9007199254740991

OK

Media type application/json
object
id
required
string
Example generated
{
"id": "example"
}