API reference
Git deploys
Link a repository and deploy it to your server from code.
← API docs10 endpointsUpdated
Browse the docs
Git deploys
Deploy a GitHub or GitLab repository, or any public https Git URL, into a server's files, by hand or on every push. Connecting a GitHub account (installing the Silly Development GitHub App) or a GitLab account can only be done in the panel in a browser, under the server's GitHub tab or your account settings; the API can then use those connections but cannot make them. Only the server's owner can link, deploy or change anything, and only with an API key that is not limited to a set of permissions. Subusers with git.read can see what is linked and how deployments went.
Get the linked repository and deployments
GET/servers/{server}/git
Permission git.read
Returns the linked repository (or null), the state of its sillydev.conf, the last 15 deployments, the deployment rate limit, and, for the owner only, the GitHub App installations and GitLab account they have connected in the panel. can_manage says whether this key may link, deploy and change settings: it is true only for the server's owner using a key not limited to a set of permissions.
Parameters
| Name | Type | Description |
|---|---|---|
| serverrequired | string | The server's 8-character identifier, as shown in the panel, or its full UUID. |
Example
curl "https://sillydev.co.uk/panel/api/client/servers/1a7ce997/git" \ -H "Authorization: Bearer $SILLYDEV_API_KEY" \ -H "Accept: application/json"
Response 200The server's Git deploy set-up. This is plain JSON, not a resource envelope.
{
"can_manage": true,
"repository": {
"source": "github",
"repository": "you/my-discord-bot",
"url": "https://github.com/you/my-discord-bot",
"branch": "main",
"directory": "/",
"auto_deploy": true,
"restart_on_deploy": true,
"start_if_offline": false,
"apply_config": true,
"sync_startup": true,
"installation": {
"id": 7,
"account": "you",
"type": "User",
"suspended": false
},
"account": "you",
"disconnected": false,
"last_deployed_at": "2026-10-10T11:58:00+00:00"
},
"config": {
"filename": "sillydev.conf",
"version": 1,
"apply": true,
"can_write": true,
"checked_at": "2026-10-10T11:58:20+00:00",
"state": "current",
"missing": [],
"unsupported": [],
"invalid": [],
"version_outdated": false,
"problems": 0,
"differs": []
},
"deployments": [
{
"uuid": "3d6f1a2b-8c4e-4f7a-9b1d-2e3f4a5b6c7d",
"trigger": "push",
"status": "succeeded",
"branch": "main",
"commit": {
"sha": "9fceb02d0ae598e95dc970b74767f19372d61af8",
"message": "Add /ping command",
"author": "You",
"url": "https://github.com/you/my-discord-bot/commit/9fceb02d0ae598e95dc970b74767f19372d61af8"
},
"user": null,
"error": null,
"files": {
"written": 4,
"deleted": 0,
"unchanged": 37,
"kept": 2
},
"power_action": "restart",
"attempts": 0,
"config": {
"applied": [],
"warnings": []
},
"run_after": "2026-10-10T11:58:00+00:00",
"started_at": "2026-10-10T11:58:01+00:00",
"completed_at": "2026-10-10T11:58:20+00:00",
"created_at": "2026-10-10T11:58:00+00:00"
}
],
"limits": {
"interval": 900,
"paid": false,
"paid_interval": 60,
"next_deploy_at": "2026-10-10T12:13:00+00:00"
},
"github": {
"enabled": true,
"installations": [
{
"id": 7,
"account": "you",
"type": "User",
"suspended": false
}
]
},
"gitlab": {
"enabled": true,
"url": "https://gitlab.com",
"account": null
}
}Every field in the response
| Name | Type | Description |
|---|---|---|
| can_managerequired | boolean | Whether this key may link, deploy and change settings (the owner, with an unrestricted key). |
| repositoryrequired | any | |
| configrequired | any | |
| deploymentsrequired | array of object | The last 15 deployments, newest first. |
| deployments[].uuidrequired | string (uuid) | |
| deployments[].triggerrequired | one of 'manual', 'push' | |
| deployments[].statusrequired | one of 'queued', 'running', 'succeeded', 'failed', 'superseded', 'cancelled' | superseded means a newer deployment replaced it while it waited. |
| deployments[].branchrequired | string | |
| deployments[].commitrequired | object | Filled in once known; a manual deployment learns its commit when it runs. |
| deployments[].commit.sharequired | string | null | |
| deployments[].commit.messagerequired | string | null | |
| deployments[].commit.authorrequired | string | null | |
| deployments[].commit.urlrequired | string | null | |
| deployments[].userrequired | string | null | Username of whoever started it by hand; null for a push. |
| deployments[].errorrequired | string | null | |
| deployments[].filesrequired | any | File counts once the deployment has finished. |
| deployments[].power_actionrequired | one of 'start', 'restart', null | What was done to the server afterwards, if anything. |
| deployments[].attemptsrequired | integer | How many earlier tries failed for a passing reason. A deployment is tried up to 3 times. |
| deployments[].configrequired | any | What was applied from sillydev.conf, if anything. |
| deployments[].run_afterrequired | string (date-time) | null | The earliest the deployment may start under the rate limit. |
| deployments[].started_atrequired | string (date-time) | null | |
| deployments[].completed_atrequired | string (date-time) | null | |
| deployments[].created_atrequired | string (date-time) | |
| limitsrequired | object | |
| limits.intervalrequired | integer | Minimum seconds between two deployments of this server (900 free, 60 paid by default). |
| limits.paidrequired | boolean | Whether the server is on a live paid plan. |
| limits.paid_intervalrequired | integer | null | The interval a paid plan would give, shown for free servers when plans can be bought. |
| limits.next_deploy_atrequired | string (date-time) | null | |
| githubrequired | object | |
| github.enabledrequired | boolean | Whether GitHub deploys are available on this panel. |
| github.installationsrequired | array of object | Your connected GitHub App installations. Empty unless you can manage the server. |
| github.installations[].idrequired | integer | The panel's ID for the installation, sent as installation when linking. Not GitHub's own ID. |
| github.installations[].accountrequired | string | The GitHub user or organisation it is installed on. |
| github.installations[].typerequired | string | User or Organization. |
| github.installations[].suspendedrequired | boolean | |
| gitlabrequired | object | |
| gitlab.enabledrequired | boolean | |
| gitlab.urlrequired | string | The GitLab instance the panel uses. |
| gitlab.accountrequired | any | Your connected GitLab account. Null unless you can manage the server and have connected one. |
Errors
- 401 No API key was sent, or it is wrong, expired or deleted.
- 403 The key is valid but may not do this: it lacks the permission or account scope, it is limited to other servers or IP addresses, or the account may not do it at all.
- 404 There is no such resource, or the key cannot see it. Features that are switched off answer 404 too.
Link a repository or change its settings
PUT/servers/{server}/git
Links a repository to the server, or changes the linked one; every setting is replaced, so send them all. For github and gitlab the repository must be reachable through a GitHub App installation or GitLab account you have already connected in the panel in a browser (see listGitRepositories); for url, any public https clone URL works but auto_deploy is always off. Linking a repository, or changing the repository or branch, writes sillydev.conf to it (unless write_config is false) and queues a first deployment; notices says what happened. Owner only.
Parameters
| Name | Type | Description |
|---|---|---|
| serverrequired | string | The server's 8-character identifier, as shown in the panel, or its full UUID. |
Body
| Name | Type | Description |
|---|---|---|
| sourcerequired | one of 'github', 'gitlab', 'url' | |
| installation | integer | null | Required for github: the id of one of your connected installations (from getGitDeploys or listGitRepositories). |
| repositoryrequired | string | owner/name for GitHub, group/subgroup/name for GitLab, or for url an https clone URL with no credentials or query string, such as https://github.com/you/my-discord-bot.git. |
| branchrequired | string | The branch to deploy. No leading -, no .., // or trailing /, no spaces. |
| directory | string | null | Folder on the server to deploy into, relative to its root. Cannot contain ... Defaults to the root. |
| auto_deploy | boolean | Deploy on every push to the branch. Ignored for url. |
| restart_on_deploy | boolean | |
| start_if_offline | boolean | |
| apply_config | boolean | |
| sync_startup | boolean | |
| write_config | boolean | When linking or retargeting, add or update sillydev.conf in the repository where the panel can write to it. |
Example
curl -X PUT "https://sillydev.co.uk/panel/api/client/servers/1a7ce997/git" \
-H "Authorization: Bearer $SILLYDEV_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"source":"github","installation":7,"repository":"you/my-discord-bot","branch":"main","directory":"/","auto_deploy":true,"restart_on_deploy":true,"start_if_offline":false,"apply_config":true,"sync_startup":true,"write_config":true}'Response 200The linked repository and what was done.
{
"source": "github",
"repository": "you/my-discord-bot",
"url": "https://github.com/you/my-discord-bot",
"branch": "main",
"directory": "/",
"auto_deploy": true,
"restart_on_deploy": true,
"start_if_offline": false,
"apply_config": true,
"sync_startup": true,
"installation": {
"id": 7,
"account": "you",
"type": "User",
"suspended": false
},
"account": "you",
"disconnected": false,
"last_deployed_at": null,
"notices": [
"Added sillydev.conf to main.",
"A first deployment has been queued."
]
}Every field in the response
| Name | Type | Description |
|---|---|---|
| sourcerequired | one of 'github', 'gitlab', 'url' | |
| repositoryrequired | string | owner/name for GitHub, group/name for GitLab, or the https clone URL. |
| urlrequired | string | null | The repository's web page. |
| branchrequired | string | |
| directoryrequired | string | The folder on the server the repository is deployed into, / for the root. |
| auto_deployrequired | boolean | Deploy on every push to the branch. Always false for url. |
| restart_on_deployrequired | boolean | Restart the server after deploying if it is running. |
| start_if_offlinerequired | boolean | Start the server after deploying if it is offline. |
| apply_configrequired | boolean | Apply the repository's sillydev.conf to the server on each deployment. |
| sync_startuprequired | boolean | Write changes made in the panel's Startup tab back to sillydev.conf when the file sets that setting and the panel can write to the repository. |
| installationrequired | any | |
| accountrequired | string | null | The GitHub or GitLab account the repository is linked through. |
| disconnectedrequired | boolean | True when the GitHub installation or GitLab account it was linked through has been removed. Reconnect in the panel and link it again. |
| last_deployed_atrequired | string (date-time) | null | When the last deployment started. |
| noticesrequired | array of string | Plain-English notes on what was done, for showing to a person. |
Errors
- 401 No API key was sent, or it is wrong, expired or deleted.
- 403 You are not the server's owner, or the key is limited to a set of permissions.
- 404 There is no such resource, or the key cannot see it. Features that are switched off answer 404 too.
- 422 A field is invalid, or the repository could not be reached: no matching connected GitHub installation or GitLab account, the app or account cannot see the repository, GitHub or GitLab could not be reached, or GitHub is not set up on this panel.
Unlink the repository
DELETE/servers/{server}/git
Unlinks the repository and cancels any waiting deployment. Files already deployed stay on the server. By default the panel first removes sillydev.conf from the repository where it can write to it; send delete_config=false to leave it. Answers 200 with no notices if nothing was linked. Owner only.
Parameters
| Name | Type | Description |
|---|---|---|
| serverrequired | string | The server's 8-character identifier, as shown in the panel, or its full UUID. |
| delete_config | boolean | Whether to remove sillydev.conf from the repository first. May also be sent in a JSON body. |
Example
curl -X DELETE "https://sillydev.co.uk/panel/api/client/servers/1a7ce997/git" \ -H "Authorization: Bearer $SILLYDEV_API_KEY" \ -H "Accept: application/json"
Response 200Unlinked.
{
"notices": [
"Removed sillydev.conf from main."
]
}Every field in the response
| Name | Type | Description |
|---|---|---|
| noticesrequired | array of string | Plain-English notes on what was done, for showing to a person. |
Errors
- 401 No API key was sent, or it is wrong, expired or deleted.
- 403 You are not the server's owner, or the key is limited to a set of permissions.
- 404 There is no such resource, or the key cannot see it. Features that are switched off answer 404 too.
List repositories you can link
GET/servers/{server}/git/repositories
Limited to 30 per minute
Lists the repositories your connected GitHub App installations can reach, or with provider=gitlab the GitLab projects your connected account can push to (Developer role or above). The list is empty until you connect GitHub or GitLab in the panel in a browser; that cannot be done through the API. Accounts that could not be loaded are reported in errors while the rest are still listed. Owner only.
Parameters
| Name | Type | Description |
|---|---|---|
| serverrequired | string | The server's 8-character identifier, as shown in the panel, or its full UUID. |
| provider | one of 'github', 'gitlab' | gitlab for GitLab projects; anything else, or nothing, for GitHub. |
Example
curl "https://sillydev.co.uk/panel/api/client/servers/1a7ce997/git/repositories" \ -H "Authorization: Bearer $SILLYDEV_API_KEY" \ -H "Accept: application/json"
Response 200The repositories, sorted by name for GitHub.
{
"data": [
{
"id": 812345678,
"full_name": "you/my-discord-bot",
"private": true,
"default_branch": "main",
"installation": 7,
"account": "you"
}
],
"errors": []
}Every field in the response
| Name | Type | Description |
|---|---|---|
| datarequired | array of object | |
| data[].idrequired | integer | GitHub's or GitLab's own ID for the repository. |
| data[].full_namerequired | string | Send this as repository when linking. |
| data[].privaterequired | boolean | |
| data[].default_branchrequired | string | |
| data[].installationrequired | integer | null | For GitHub, the installation to send as installation when linking. Null for GitLab. |
| data[].accountrequired | string | |
| errorsrequired | array of string | Accounts whose repositories could not be loaded. |
Errors
- 401 No API key was sent, or it is wrong, expired or deleted.
- 403 You are not the server's owner, or the key is limited to a set of permissions.
- 404 There is no such resource, or the key cannot see it. Features that are switched off answer 404 too.
- 429 Too many requests. Wait for the number of seconds in the
Retry-Afterheader, then try again.
Deploy now
POST/servers/{server}/git/deploy
Limited to 10 per minute
Queues a deployment of the linked branch. It is never refused for coming too soon: each server starts at most one deployment every 15 minutes (1 minute on a paid plan), and a request inside that window waits until run_after. Only one deployment waits at a time, so this replaces any already waiting (marked superseded). Owner only.
Parameters
| Name | Type | Description |
|---|---|---|
| serverrequired | string | The server's 8-character identifier, as shown in the panel, or its full UUID. |
Example
curl -X POST "https://sillydev.co.uk/panel/api/client/servers/1a7ce997/git/deploy" \ -H "Authorization: Bearer $SILLYDEV_API_KEY" \ -H "Accept: application/json"
Response 202The queued deployment.
{
"uuid": "3d6f1a2b-8c4e-4f7a-9b1d-2e3f4a5b6c7d",
"trigger": "manual",
"status": "queued",
"branch": "main",
"commit": {
"sha": null,
"message": null,
"author": null,
"url": null
},
"user": "you",
"error": null,
"files": null,
"power_action": null,
"attempts": 0,
"config": null,
"run_after": "2026-10-10T12:13:00+00:00",
"started_at": null,
"completed_at": null,
"created_at": "2026-10-10T12:00:00+00:00"
}Every field in the response
| Name | Type | Description |
|---|---|---|
| uuidrequired | string (uuid) | |
| triggerrequired | one of 'manual', 'push' | |
| statusrequired | one of 'queued', 'running', 'succeeded', 'failed', 'superseded', 'cancelled' | superseded means a newer deployment replaced it while it waited. |
| branchrequired | string | |
| commitrequired | object | Filled in once known; a manual deployment learns its commit when it runs. |
| commit.sharequired | string | null | |
| commit.messagerequired | string | null | |
| commit.authorrequired | string | null | |
| commit.urlrequired | string | null | |
| userrequired | string | null | Username of whoever started it by hand; null for a push. |
| errorrequired | string | null | |
| filesrequired | any | File counts once the deployment has finished. |
| power_actionrequired | one of 'start', 'restart', null | What was done to the server afterwards, if anything. |
| attemptsrequired | integer | How many earlier tries failed for a passing reason. A deployment is tried up to 3 times. |
| configrequired | any | What was applied from sillydev.conf, if anything. |
| run_afterrequired | string (date-time) | null | The earliest the deployment may start under the rate limit. |
| started_atrequired | string (date-time) | null | |
| completed_atrequired | string (date-time) | null | |
| created_atrequired | string (date-time) |
Errors
- 401 No API key was sent, or it is wrong, expired or deleted.
- 403 You are not the server's owner, or the key is limited to a set of permissions.
- 404 No repository is linked to this server.
- 409 The resource is busy or in a state that does not allow this right now.
- 429 Too many requests. Wait for the number of seconds in the
Retry-Afterheader, then try again.
Cancel a deployment
POST/servers/{server}/git/deployments/{deployment}/cancel
Cancels a waiting deployment at once, or asks the node to stop a running one, which then finishes as failed. A deployment that has already finished is left alone and this still answers 204. Owner only.
Parameters
| Name | Type | Description |
|---|---|---|
| serverrequired | string | The server's 8-character identifier, as shown in the panel, or its full UUID. |
| deploymentrequired | string (uuid) | The deployment's UUID, from deployments[].uuid. |
Example
curl -X POST "https://sillydev.co.uk/panel/api/client/servers/1a7ce997/git/deployments/{deployment}/cancel" \
-H "Authorization: Bearer $SILLYDEV_API_KEY" \
-H "Accept: application/json"Response 204Done. There is no response body.
Errors
- 401 No API key was sent, or it is wrong, expired or deleted.
- 403 You are not the server's owner, or the key is limited to a set of permissions.
- 404 There is no such resource, or the key cannot see it. Features that are switched off answer 404 too.
Get the sillydev.conf for this server
GET/servers/{server}/git/config
Returns the sillydev.conf the panel would write for this server now, listing every setting the server lets you change and keeping the values from the repository's current file. Use it to copy the file into a repository linked by URL, which the panel cannot write to. Works with no repository linked. Owner only.
Parameters
| Name | Type | Description |
|---|---|---|
| serverrequired | string | The server's 8-character identifier, as shown in the panel, or its full UUID. |
Example
curl "https://sillydev.co.uk/panel/api/client/servers/1a7ce997/git/config" \ -H "Authorization: Bearer $SILLYDEV_API_KEY" \ -H "Accept: application/json"
Response 200The file.
{
"filename": "sillydev.conf",
"contents": "; sillydev.conf\n; Hosted on Silly Development: https://sillydev.co.uk\n;\n; Silly Development applies these settings to this server every time this\n; repository is deployed: change a value, push, and the next deployment uses it.\n; Comment a setting out (put ; in front of it) to leave it to the panel instead.\n;\n; Only the settings this server lets you change are listed. Never put a secret\n; (a token or password) here: anyone who can see the repository can read it.\n; Secrets belong in the Startup tab on the panel.\n\n[sillydev]\nversion = 1\n\n[docker]\n; One of: \"Python 3.12\", \"Python 3.13\"\nimage = \"Python 3.12\"\n\n[variables]\n\n; Main file: the file to run when the server starts.\nMAIN_FILE = \"bot.py\"\n"
}Every field in the response
| Name | Type | Description |
|---|---|---|
| filenamerequired | string | |
| contentsrequired | string |
Errors
- 401 No API key was sent, or it is wrong, expired or deleted.
- 403 You are not the server's owner, or the key is limited to a set of permissions.
- 404 There is no such resource, or the key cannot see it. Features that are switched off answer 404 too.
Write sillydev.conf to the repository
POST/servers/{server}/git/config
Limited to 10 per minute
Commits sillydev.conf to the linked branch, or brings the existing file up to date with the settings the server supports now. Only works for repositories linked through GitHub or GitLab. Owner only.
Parameters
| Name | Type | Description |
|---|---|---|
| serverrequired | string | The server's 8-character identifier, as shown in the panel, or its full UUID. |
Example
curl -X POST "https://sillydev.co.uk/panel/api/client/servers/1a7ce997/git/config" \ -H "Authorization: Bearer $SILLYDEV_API_KEY" \ -H "Accept: application/json"
Response 200What was done.
{
"result": "updated"
}Every field in the response
| Name | Type | Description |
|---|---|---|
| resultrequired | one of 'created', 'updated', 'unchanged' |
Errors
- 401 No API key was sent, or it is wrong, expired or deleted.
- 403 You are not the server's owner, or the key is limited to a set of permissions.
- 404 No repository is linked to this server.
- 422 The repository is linked by URL, so the panel cannot write to it, or GitHub or GitLab refused the commit.
- 429 Too many requests. Wait for the number of seconds in the
Retry-Afterheader, then try again.
Get the sillydev.conf editor state
GET/servers/{server}/git/config/editor
Limited to 30 per minute
Built for the panel's sillydev.conf editor, but usable from code. Returns every setting the file can hold with the value in the repository next to the value on the server, plus the raw file and its sha to send back when saving. The file is read live from GitHub or GitLab; for a repository linked by URL it is the copy the last deployment found. Owner only.
Parameters
| Name | Type | Description |
|---|---|---|
| serverrequired | string | The server's 8-character identifier, as shown in the panel, or its full UUID. |
Example
curl "https://sillydev.co.uk/panel/api/client/servers/1a7ce997/git/config/editor" \ -H "Authorization: Bearer $SILLYDEV_API_KEY" \ -H "Accept: application/json"
Response 200The editor state.
{
"filename": "sillydev.conf",
"can_write": true,
"exists": true,
"sha": "3b18e512dba79e4c8300dd08aeb37f8e728b8dad",
"raw": "[sillydev]\nversion = 1\n\n[variables]\nMAIN_FILE = \"bot.py\"\n",
"apply": true,
"sync": true,
"variables": [
{
"key": "MAIN_FILE",
"name": "Main file",
"description": "The file to run when the server starts.",
"rules": "required|string|max:64",
"secret": false,
"state": "set",
"file_value": "bot.py",
"server_value": "main.py",
"differs": true,
"error": null
},
{
"key": "BOT_TOKEN",
"name": "Bot token",
"description": "Your Discord bot token.",
"rules": "nullable|string",
"secret": true,
"state": "absent",
"file_value": null,
"server_value": "",
"differs": false,
"error": null
}
],
"image": {
"options": [
{
"name": "Python 3.12",
"image": "ghcr.io/sillydev/yolks:python_3.12"
},
{
"name": "Python 3.13",
"image": "ghcr.io/sillydev/yolks:python_3.13"
}
],
"state": "absent",
"file_value": null,
"server_value": "Python 3.12",
"differs": false,
"error": null
},
"unsupported": [],
"problems": []
}Every field in the response
| Name | Type | Description |
|---|---|---|
| filenamerequired | string | |
| can_writerequired | boolean | Whether saving will commit to the repository. False for repositories linked by URL. |
| existsrequired | boolean | Whether the repository has the file. |
| sharequired | string | null | The version of the file loaded; send it back when saving. Null if there is none or the panel cannot read the repository. |
| rawrequired | string | The file's text, or a freshly generated one if there is none. |
| applyrequired | boolean | |
| syncrequired | boolean | |
| variablesrequired | array of object | |
| variables[].keyrequired | string | The environment variable name, used as the key when saving. |
| variables[].namerequired | string | |
| variables[].descriptionrequired | string | null | |
| variables[].rulesrequired | string | Laravel validation rules the value must pass, joined with |. |
| variables[].secretrequired | boolean | Looks like a secret; the panel will not add it to the file. |
| variables[].staterequired | one of 'set', 'left', 'absent' | left means the file mentions it commented out, leaving it to the panel. |
| variables[].file_valuerequired | string | null | |
| variables[].server_valuerequired | string | |
| variables[].differsrequired | boolean | |
| variables[].errorrequired | string | null | Why the file's value is not allowed, if it is not. |
| imagerequired | any | The docker image setting, or null when the server has only one image. |
| unsupportedrequired | array of string | |
| problemsrequired | array of string | Lines of the file that could not be read. |
Errors
- 401 No API key was sent, or it is wrong, expired or deleted.
- 403 You are not the server's owner, or the key is limited to a set of permissions.
- 404 No repository is linked to this server.
- 422 GitHub or GitLab could not be reached, or refused to return the file.
- 429 Too many requests. Wait for the number of seconds in the
Retry-Afterheader, then try again.
Save sillydev.conf from the editor
PUT/servers/{server}/git/config/editor
Limited to 20 per minute
Saves the editor, either as a form (mode: form, changing only the settings sent and keeping the rest of the file) or as raw text (mode: raw). For a repository linked through GitHub or GitLab the file is committed and, if apply is on, applied to the server; send the sha you loaded, and a 409 means it changed since. For a repository linked by URL nothing is committed and the file comes back to copy in yourself. The panel refuses to write a new secret-looking variable into the file. Owner only.
Parameters
| Name | Type | Description |
|---|---|---|
| serverrequired | string | The server's 8-character identifier, as shown in the panel, or its full UUID. |
Body
| Name | Type | Description |
|---|---|---|
| moderequired | one of 'form', 'raw' | |
| sha | string | null | The sha from getGitConfigEditor, or null if the file did not exist. |
| raw | string | null | The whole file. Required when mode is raw. |
| variables | object | For mode: form, the variables to change, keyed by environment variable name. Variables not sent are left as they are in the file. |
| image | any | For mode: form, the docker image to set (by its name from image.options), or left. |
Example
curl -X PUT "https://sillydev.co.uk/panel/api/client/servers/1a7ce997/git/config/editor" \
-H "Authorization: Bearer $SILLYDEV_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"mode":"form","sha":"3b18e512dba79e4c8300dd08aeb37f8e728b8dad","variables":{"MAIN_FILE":{"mode":"set","value":"main.py"}},"image":{"mode":"left","value":null}}'Response 200What was saved.
{
"contents": "[sillydev]\nversion = 1\n\n[variables]\nMAIN_FILE = \"main.py\"\n",
"committed": true,
"applied": [
"MAIN_FILE"
],
"warnings": []
}Every field in the response
| Name | Type | Description |
|---|---|---|
| contentsrequired | string | The file as saved, or to copy in yourself when committed is false. |
| committedrequired | boolean | |
| appliedrequired | array of string | null | Settings applied to the server, or null if nothing was applied. |
| warningsrequired | array of string |
Errors
- 401 No API key was sent, or it is wrong, expired or deleted.
- 403 You are not the server's owner, or the key is limited to a set of permissions.
- 404 No repository is linked to this server.
- 409 The file changed in the repository since
shawas loaded. Load the editor again and redo the change. - 422 A field is invalid (for example an unknown variable, a value breaking the variable's rules, or a raw file that does not parse), or GitHub or GitLab could not be reached.
- 429 Too many requests. Wait for the number of seconds in the
Retry-Afterheader, then try again.