Skip to content

/api/v1/templates/{templateId} (PUT)

PUT
/api/v1/templates/{templateId}
curl --request PUT \
--url https://example.com/api/v1/templates/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Content-Type: application/json' \
--data '{ "definition": { "id": "example", "name": "example", "description": "example", "version": 1, "images": [ { "label": "example", "image": "example" } ], "startup": "example", "startupMode": "image", "stop": { "command": "example", "signal": "example", "timeoutSeconds": 1 }, "readyPattern": "example", "ports": [ { "role": "example", "protocol": "tcp", "default": 1, "variable": "example", "offset": 1, "offsetFrom": "example" } ], "customPorts": true, "resources": { "memoryMb": 1, "cpuPercent": 1, "diskMb": 1, "memoryPerPlayerMb": 1, "playersVariable": "example" }, "variables": [ { "key": "example", "name": "example", "description": "example", "default": "example", "visibility": "user", "rules": "example", "jobOnly": true } ], "install": { "image": "example", "entrypoint": "example", "script": "example", "onUpdate": true }, "steam": { "appId": "example", "beta": "example", "betaPassword": "example", "account": "none", "validateOnInstall": true, "workshop": { "appId": "example", "items": "example" } }, "configFiles": [ { "path": "example", "parser": "properties", "values": [ { "key": "example", "value": "example" } ] } ], "prompts": [ { "id": "example", "when": "example", "title": "example", "message": "example", "link": { "label": "example", "url": "example" }, "action": "example", "writeFiles": [ { "path": "example", "content": "example" } ], "command": "example", "then": "none" } ], "architectures": [ "example" ], "query": { "protocol": "a2s", "port": "example" }, "rcon": { "protocol": "source", "port": "example", "password": "example", "console": true } } }'
templateId
required
string format: uuid
Media typeapplication/json
object
definition
required
object
id
required
string
name
required
string
description
null | string
version
integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
images
required
Array<object>
object
label
required
string
image
required
string
startup
required
string
startupMode
Allowed values: image shell
stop
object
command
null | string
signal
null | string
timeoutSeconds
integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
readyPattern
null | string
ports
Array<object>
object
role
required
string
protocol
default: both
Allowed values: tcp udp both
default
null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
variable
null | string
offset
null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
offsetFrom
null | string
customPorts
boolean
resources
One of:
null
variables
Array<object>
object
key
required
string
name
required
string
description
null | string
default
string
visibility
Allowed values: user admin secret readOnly
rules
string
jobOnly
boolean
install
One of:
null
steam
One of:
null
configFiles
Array<object>
object
path
required
string
parser
Allowed values: properties ini json yaml file
values
required
Array<object>
object
key
required
string
value
required
string
prompts
Array<object>
object
id
required
string
when
required
string
title
required
string
message
null | string
link
One of:
null
action
required
string
writeFiles
Array<object>
object
path
required
string
content
required
string
command
null | string
then
Allowed values: none start restart
architectures
Array<string>
query
One of:
null
rcon
One of:
null

OK