Compare commits

..

6 Commits
2.0.0 ... 1.x

Author SHA1 Message Date
dependabot[bot]
fb651ab5ce
Bump laravel/framework from 11.11.1 to 11.31.0 (#363)
Bumps [laravel/framework](https://github.com/laravel/framework) from 11.11.1 to 11.31.0.
- [Release notes](https://github.com/laravel/framework/releases)
- [Changelog](https://github.com/laravel/framework/blob/11.x/CHANGELOG.md)
- [Commits](https://github.com/laravel/framework/compare/v11.11.1...v11.31.0)

---
updated-dependencies:
- dependency-name: laravel/framework
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-14 21:51:08 +01:00
Eduardo Daniel Oseguera Mendoza
c2625a7352
added overflow to dropdown projects list (#315) 2024-11-08 21:31:07 +01:00
Bruno Bernard
b72a2ddb1c
feat: add missing ufw (#346) 2024-11-08 21:24:12 +01:00
dependabot[bot]
0e8e6ef56f
Bump symfony/process from 7.1.1 to 7.1.7 (#351)
Bumps [symfony/process](https://github.com/symfony/process) from 7.1.1 to 7.1.7.
- [Release notes](https://github.com/symfony/process/releases)
- [Changelog](https://github.com/symfony/process/blob/7.1/CHANGELOG.md)
- [Commits](https://github.com/symfony/process/compare/v7.1.1...v7.1.7)

---
updated-dependencies:
- dependency-name: symfony/process
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Saeed Vaziry <61919774+saeedvaziry@users.noreply.github.com>
2024-11-08 20:53:01 +01:00
dependabot[bot]
39fa25aee7
Bump symfony/http-foundation from 7.1.1 to 7.1.7 (#352) 2024-11-07 20:12:01 +01:00
Bernard Sarfo Twumasi
945c2e75c0
Fix Privileges for public Schema in PostgreSQL 15+ (#339) 2024-11-07 20:02:26 +01:00
936 changed files with 19965 additions and 54745 deletions

View File

@ -7,7 +7,6 @@ indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
ij_any_block_comment_at_first_column = false
[*.md]
trim_trailing_whitespace = false

View File

@ -14,7 +14,3 @@ MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS="noreply@${APP_NAME}"
MAIL_FROM_NAME="${APP_NAME}"
APP_PORT=8000
SCRIBE_AUTH_KEY="YOUR-API-KEY"

View File

@ -3,9 +3,7 @@ name: code-style
on:
push:
branches:
- main
- 1.x
- 2.x
pull_request:
jobs:
@ -15,8 +13,8 @@ jobs:
strategy:
fail-fast: true
matrix:
php: [ 8.2 ]
node-version: [ "20.x" ]
php: [8.2]
node-version: ["20.x"]
steps:
- uses: actions/checkout@v2

View File

@ -4,7 +4,6 @@ on:
push:
branches:
- 1.x
- 2.x
jobs:
build-and-push:
@ -29,7 +28,7 @@ jobs:
run: |
docker buildx build . \
-f docker/Dockerfile \
-t vitodeploy/vito:${{ github.head_ref || github.ref_name }} \
-t vitodeploy/vito:1.x \
--build-arg="RELEASE=0" \
--platform linux/amd64,linux/arm64 \
--no-cache \

View File

@ -2,7 +2,7 @@ name: Build and push Docker image
on:
release:
types: [ created ]
types: [created]
jobs:
build-and-push:
@ -28,17 +28,8 @@ jobs:
docker buildx build . \
-f docker/Dockerfile \
-t vitodeploy/vito:${{ github.event.release.tag_name }} \
-t vitodeploy/vito:latest \
--build-arg="RELEASE=0" \
--platform linux/amd64,linux/arm64 \
--no-cache \
--push
- name: Build and push latest tag
if: startsWith(github.event.release.target_commitish, '2.x')
run: |
docker buildx build . \
-f docker/Dockerfile \
-t vitodeploy/vito:latest \
--build-arg="RELEASE=0" \
--platform linux/amd64,linux/arm64 \
--push

View File

@ -1,77 +0,0 @@
name: manual release
on:
workflow_dispatch:
inputs:
version:
description: 'Version to release'
required: true
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-24.04
name: Release ${{ inputs.version }}
outputs:
version: ${{ steps.version.outputs.version }}
notes: ${{ steps.cleaned-notes.outputs.notes }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Remove optional "v" prefix
id: version
run: |
echo "version=${VERSION#v}" >> "$GITHUB_OUTPUT"
env:
VERSION: ${{ inputs.version }}
- name: Check if branch and version match
id: guard
run: |
MAJOR_VERSION="${NUMERIC_VERSION%%.*}"
BRANCH_MAJOR_VERSION="${BRANCH%%.*}"
if [ "$MAJOR_VERSION" != "$BRANCH_MAJOR_VERSION" ]; then
echo "Mismatched versions! Aborting."
VERSION_MISMATCH='true';
else
echo "Versions match! Proceeding."
VERSION_MISMATCH='false';
fi
echo "VERSION_MISMATCH=$(echo $VERSION_MISMATCH)" >> "$GITHUB_OUTPUT";
env:
BRANCH: ${{ github.ref_name }}
NUMERIC_VERSION: ${{ steps.version.outputs.version }}
- name: Fail if branch and release tag do not match
if: ${{ steps.guard.outputs.VERSION_MISMATCH == 'true' }}
uses: actions/github-script@v7
with:
script: |
core.setFailed('Workflow failed. Release version does not match with selected target branch. Did you select the correct branch?')
- name: Update config/app.php
run: sed -i "s/'version' => '[^']*'/'version' => '${{ steps.version.outputs.version }}'/" config/app.php
- name: Commit version change
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Update version to ${{ steps.version.outputs.version }}"
- name: Create release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.version.outputs.version }}
name: ${{ steps.version.outputs.version }}
body: ${{ steps.cleaned-notes.outputs.notes }}
target_commitish: ${{ github.ref_name }}
make_latest: "${{ github.ref_name == github.event.repository.default_branch }}"

View File

@ -3,9 +3,7 @@ name: tests
on:
push:
branches:
- main
- 1.x
- 2.x
pull_request:
jobs:
@ -15,7 +13,7 @@ jobs:
strategy:
fail-fast: true
matrix:
php: [ 8.2 ]
php: [8.2]
steps:
- uses: actions/checkout@v2

1
.gitignore vendored
View File

@ -21,4 +21,3 @@ yarn-error.log
/.fleet
/.idea
/.vscode
laradumps.yaml

View File

@ -1,14 +0,0 @@
.git/
.scribe/
node_modules/
public/
storage/
vendor/
composer.lock
.env
.env.example
sail
*.md
*.yml
!*.blade.php
!*.sh

View File

@ -1,9 +1,5 @@
{
"plugins": [
"prettier-plugin-blade",
"prettier-plugin-tailwindcss",
"prettier-plugin-sh"
],
"plugins": ["prettier-plugin-blade", "prettier-plugin-tailwindcss"],
"overrides": [
{
"files": ["*.blade.php"],
@ -15,12 +11,6 @@
"quoteProps": "consistent",
"trailingComma": "none"
}
},
{
"files": ["*.sh"],
"options": {
"parser": "sh"
}
}
]
}

View File

@ -1,4 +0,0 @@
# GENERATED. YOU SHOULDN'T MODIFY OR DELETE THIS FILE.
# Scribe uses this file to know when you change something manually in your docs.
.scribe/intro.md=98adb6862b118c06e02e4e22390feb6f
.scribe/auth.md=7fcc12b2e5a86fa9c49f509d348f3cc2

View File

@ -1,7 +0,0 @@
# Authenticating requests
To authenticate requests, include an **`Authorization`** header with the value **`"Bearer YOUR-API-KEY"`**.
All authenticated endpoints are marked with a `requires authentication` badge in the documentation below.
You can retrieve your token by visiting <a href="/settings/api-keys" target="_blank">here</a>

View File

@ -1,310 +0,0 @@
## Autogenerated by Scribe. DO NOT MODIFY.
name: cron-jobs
description: ''
endpoints:
-
httpMethods:
- GET
uri: 'api/projects/{project_id}/servers/{server_id}/cron-jobs'
metadata:
groupName: cron-jobs
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: list
description: 'Get all cron jobs.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"data":[{"id":null,"server_id":null,"command":"ls -la","user":"root","frequency":"* * * * *","status":"ready","created_at":null,"updated_at":null},{"id":null,"server_id":null,"command":"ls -la","user":"root","frequency":"* * * * *","status":"ready","created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"&laquo; Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next &raquo;","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6ed1gv5ak6hEPcaV8D3Z4bf'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/projects/{project_id}/servers/{server_id}/cron-jobs'
metadata:
groupName: cron-jobs
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: create
description: 'Create a new cron job.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
queryParameters: []
cleanQueryParameters: []
bodyParameters:
command:
name: command
description: ''
required: true
example: qui
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
user:
name: user
description: ''
required: true
example: root
type: string
enumValues:
- root
- vito
exampleWasSpecified: false
nullable: false
custom: []
frequency:
name: frequency
description: 'Frequency of the cron job.'
required: true
example: '* * * * *'
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanBodyParameters:
command: qui
user: root
frequency: '* * * * *'
fileParameters: []
responses:
-
status: 200
content: '{"id":null,"server_id":null,"command":"ls -la","user":"root","frequency":"* * * * *","status":"ready","created_at":null,"updated_at":null}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer VEfc5h3gva68PkZ46Deabd1'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/projects/{project_id}/servers/{server_id}/cron-jobs/{cronJob_id}'
metadata:
groupName: cron-jobs
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: show
description: 'Get a cron job by ID.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cronJob_id:
name: cronJob_id
description: 'The ID of the cronJob.'
required: true
example: 5
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
cronJob_id: 5
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"id":null,"server_id":null,"command":"ls -la","user":"root","frequency":"* * * * *","status":"ready","created_at":null,"updated_at":null}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 614DaP5vZ6edcaVEgfhk83b'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- DELETE
uri: 'api/projects/{project_id}/servers/{server_id}/cron-jobs/{cronJob_id}'
metadata:
groupName: cron-jobs
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: delete
description: 'Delete cron job.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cronJob_id:
name: cronJob_id
description: 'The ID of the cronJob.'
required: true
example: 5
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
cronJob_id: 5
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 204
content: 'null'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer gDV6bZ1dEckvf45P86eaha3'
controller: null
method: null
route: null
custom: []

View File

@ -1,286 +0,0 @@
## Autogenerated by Scribe. DO NOT MODIFY.
name: databases
description: ''
endpoints:
-
httpMethods:
- GET
uri: 'api/projects/{project_id}/servers/{server_id}/databases'
metadata:
groupName: databases
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: list
description: 'Get all databases.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"data":[{"id":null,"server_id":null,"name":"clockman","status":"ready","created_at":null,"updated_at":null},{"id":null,"server_id":null,"name":"wvonrueden","status":"ready","created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"&laquo; Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next &raquo;","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer efEV4g86bd5PZac6vak3Dh1'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/projects/{project_id}/servers/{server_id}/databases'
metadata:
groupName: databases
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: create
description: 'Create a new database.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
queryParameters: []
cleanQueryParameters: []
bodyParameters:
name:
name: name
description: ''
required: true
example: nesciunt
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanBodyParameters:
name: nesciunt
fileParameters: []
responses:
-
status: 200
content: '{"id":null,"server_id":null,"name":"johanna76","status":"ready","created_at":null,"updated_at":null}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 3E6VD14dvaekbaZfh6Pg8c5'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/projects/{project_id}/servers/{server_id}/databases/{id}'
metadata:
groupName: databases
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: show
description: 'Get a database by ID.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
id:
name: id
description: 'The ID of the database.'
required: true
example: 6
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
id: 6
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"id":null,"server_id":null,"name":"chloe.huel","status":"ready","created_at":null,"updated_at":null}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer fb5hVc38e1aDP6ZvkgEda46'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- DELETE
uri: 'api/projects/{project_id}/servers/{server_id}/databases/{database_id}'
metadata:
groupName: databases
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: delete
description: 'Delete database.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
database_id:
name: database_id
description: 'The ID of the database.'
required: true
example: 6
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
database_id: 6
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 204
content: 'null'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer cPVbhaZkfg5aEv46D183ed6'
controller: null
method: null
route: null
custom: []

View File

@ -1,392 +0,0 @@
## Autogenerated by Scribe. DO NOT MODIFY.
name: database-users
description: ''
endpoints:
-
httpMethods:
- GET
uri: 'api/projects/{project_id}/servers/{server_id}/database-users'
metadata:
groupName: database-users
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: list
description: 'Get all database users.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"data":[{"id":null,"server_id":null,"username":"nyasia68","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null},{"id":null,"server_id":null,"username":"madyson20","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"&laquo; Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next &raquo;","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer egc5VaDdvabfP6843k61hZE'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/projects/{project_id}/servers/{server_id}/database-users'
metadata:
groupName: database-users
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: create
description: 'Create a new database user.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
queryParameters: []
cleanQueryParameters: []
bodyParameters:
username:
name: username
description: ''
required: true
example: dignissimos
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
password:
name: password
description: ''
required: true
example: OK+XEG2)
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
host:
name: host
description: 'Host, if it is a remote user.'
required: true
example: '%'
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanBodyParameters:
username: dignissimos
password: OK+XEG2)
host: '%'
fileParameters: []
responses:
-
status: 200
content: '{"id":null,"server_id":null,"username":"amya.nitzsche","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 31hgfcvEb6Pkaa48D6dZ5Ve'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/projects/{project_id}/servers/{server_id}/database-users/{databaseUser_id}'
metadata:
groupName: database-users
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: show
description: 'Get a database user by ID.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
databaseUser_id:
name: databaseUser_id
description: 'The ID of the databaseUser.'
required: true
example: 4
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
databaseUser_id: 4
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"id":null,"server_id":null,"username":"bergstrom.ericka","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer aDv48631h5af6EdkcVbPZeg'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/projects/{project_id}/servers/{server_id}/database-users/{databaseUser_id}/link'
metadata:
groupName: database-users
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: link
description: 'Link to databases'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
databaseUser_id:
name: databaseUser_id
description: 'The ID of the databaseUser.'
required: true
example: 4
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
databaseUser_id: 4
queryParameters: []
cleanQueryParameters: []
bodyParameters:
databases:
name: databases
description: 'Array of database names to link to the user.'
required: true
example: accusantium
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanBodyParameters:
databases: accusantium
fileParameters: []
responses:
-
status: 200
content: '{"id":null,"server_id":null,"username":"fmurray","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer cf8ZPhV1k3d5DaEva46beg6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- DELETE
uri: 'api/projects/{project_id}/servers/{server_id}/database-users/{databaseUser_id}'
metadata:
groupName: database-users
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: delete
description: 'Delete database user.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
databaseUser_id:
name: databaseUser_id
description: 'The ID of the databaseUser.'
required: true
example: 4
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
databaseUser_id: 4
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 204
content: 'null'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer hdEvkbaPVf4cZ65a8631eDg'
controller: null
method: null
route: null
custom: []

View File

@ -1,334 +0,0 @@
## Autogenerated by Scribe. DO NOT MODIFY.
name: firewall-rules
description: ''
endpoints:
-
httpMethods:
- GET
uri: 'api/projects/{project_id}/servers/{server_id}/firewall-rules'
metadata:
groupName: firewall-rules
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: list
description: 'Get all firewall rules.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"data":[{"id":null,"server_id":null,"type":"allow","protocol":"tcp","port":18074,"source":"189.27.156.82","mask":24,"note":"test","status":null,"created_at":null,"updated_at":null},{"id":null,"server_id":null,"type":"allow","protocol":"tcp","port":41088,"source":"86.177.121.87","mask":24,"note":"test","status":null,"created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"&laquo; Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next &raquo;","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer vhkc4aPa6ZdeV8D3Ef156gb'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/projects/{project_id}/servers/{server_id}/firewall-rules'
metadata:
groupName: firewall-rules
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: create
description: 'Create a new firewall rule.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
queryParameters: []
cleanQueryParameters: []
bodyParameters:
type:
name: type
description: ''
required: true
example: allow
type: string
enumValues:
- allow
- deny
exampleWasSpecified: false
nullable: false
custom: []
protocol:
name: protocol
description: ''
required: true
example: udp
type: string
enumValues:
- tcp
- udp
exampleWasSpecified: false
nullable: false
custom: []
port:
name: port
description: ''
required: true
example: voluptates
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
source:
name: source
description: ''
required: true
example: saepe
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
mask:
name: mask
description: 'Mask for source IP.'
required: true
example: '0'
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanBodyParameters:
type: allow
protocol: udp
port: voluptates
source: saepe
mask: '0'
fileParameters: []
responses:
-
status: 200
content: '{"id":null,"server_id":null,"type":"allow","protocol":"tcp","port":61992,"source":"47.222.76.48","mask":24,"note":"test","status":null,"created_at":null,"updated_at":null}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 1cEb5P66VeDkf8aahg3Zdv4'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/projects/{project_id}/servers/{server_id}/firewall-rules/{firewallRule_id}'
metadata:
groupName: firewall-rules
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: show
description: 'Get a firewall rule by ID.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
firewallRule_id:
name: firewallRule_id
description: 'The ID of the firewallRule.'
required: true
example: 7
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
firewallRule_id: 7
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"id":null,"server_id":null,"type":"allow","protocol":"tcp","port":43107,"source":"135.73.216.16","mask":24,"note":"test","status":null,"created_at":null,"updated_at":null}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6VaPhkD5vd1Z8e6E3cba4gf'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- DELETE
uri: 'api/projects/{project_id}/servers/{server_id}/firewall-rules/{firewallRule_id}'
metadata:
groupName: firewall-rules
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: delete
description: 'Delete firewall rule.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
firewallRule_id:
name: firewallRule_id
description: 'The ID of the firewallRule.'
required: true
example: 7
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
firewallRule_id: 7
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 204
content: 'null'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer v81d5Efch636aVgZebaPkD4'
controller: null
method: null
route: null
custom: []

View File

@ -1,46 +0,0 @@
## Autogenerated by Scribe. DO NOT MODIFY.
name: general
description: ''
endpoints:
-
httpMethods:
- GET
uri: api/health
metadata:
groupName: general
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: health-check
description: ''
authenticated: false
custom: []
headers:
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"success":true,"version":"2.0.0"}'
headers:
cache-control: 'no-cache, private'
content-type: application/json
x-ratelimit-limit: '60'
x-ratelimit-remaining: '59'
access-control-allow-origin: '*'
description: null
custom: []
responseFields: []
auth: []
controller: null
method: null
route: null
custom: []

View File

@ -1,260 +0,0 @@
## Autogenerated by Scribe. DO NOT MODIFY.
name: projects
description: ''
endpoints:
-
httpMethods:
- GET
uri: api/projects
metadata:
groupName: projects
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: list
description: 'Get all projects.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"data":[{"id":29,"name":"Zachary Lueilwitz","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"},{"id":30,"name":"Mrs. Kiarra Heller IV","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"&laquo; Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next &raquo;","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer eb14DEPv6cdah65VfZgka38'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: api/projects
metadata:
groupName: projects
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: create
description: 'Create a new project.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters:
name:
name: name
description: 'The name of the project.'
required: true
example: quos
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanBodyParameters:
name: quos
fileParameters: []
responses:
-
status: 200
content: '{"id":29,"name":"Hershel Spinka","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer V1E3566Pf4gkvh8dDZabeca'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/projects/{id}'
metadata:
groupName: projects
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: show
description: 'Get a project by ID.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"id":29,"name":"Emery Kiehn","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer haD6e36VZbkf4P8aEcvd15g'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- PUT
uri: 'api/projects/{id}'
metadata:
groupName: projects
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: update
description: 'Update project.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters:
name:
name: name
description: 'The name of the project.'
required: true
example: ut
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanBodyParameters:
name: ut
fileParameters: []
responses:
-
status: 200
content: '{"id":29,"name":"Mable Prohaska","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer V14kPa5deva8Ebgc36f6hDZ'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- DELETE
uri: 'api/projects/{project_id}'
metadata:
groupName: projects
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: delete
description: 'Delete project.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 204
content: 'null'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer k1D68d5ePavVZag6h4fb3cE'
controller: null
method: null
route: null
custom: []

View File

@ -1,516 +0,0 @@
## Autogenerated by Scribe. DO NOT MODIFY.
name: servers
description: ''
endpoints:
-
httpMethods:
- GET
uri: 'api/projects/{project_id}/servers'
metadata:
groupName: servers
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: list
description: 'Get all servers in a project.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"data":[{"id":null,"project_id":null,"user_id":null,"provider_id":null,"name":"Dorthy Toy","ssh_user":"vito","ip":"172.132.95.155","local_ip":"118.57.197.65","port":22,"os":"ubuntu_22","type":"regular","type_data":null,"provider":"custom","provider_data":null,"public_key":"test","status":"ready","auto_update":null,"available_updates":0,"security_updates":null,"progress":100,"progress_step":null,"updates":null,"last_update_check":null,"created_at":null,"updated_at":null},{"id":null,"project_id":null,"user_id":null,"provider_id":null,"name":"Carrie Sporer","ssh_user":"vito","ip":"184.242.162.173","local_ip":"135.244.50.22","port":22,"os":"ubuntu_22","type":"regular","type_data":null,"provider":"custom","provider_data":null,"public_key":"test","status":"ready","auto_update":null,"available_updates":0,"security_updates":null,"progress":100,"progress_step":null,"updates":null,"last_update_check":null,"created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"&laquo; Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next &raquo;","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 8VE41PdZcvb6kgafD635ahe'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/projects/{project_id}/servers'
metadata:
groupName: servers
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: create
description: 'Create a new server.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters:
provider:
name: provider
description: 'The server provider type'
required: true
example: et
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_provider:
name: server_provider
description: 'If the provider is not custom, the ID of the server provider profile'
required: true
example: digitalocean
type: string
enumValues:
- custom
- hetzner
- digitalocean
- linode
- vultr
exampleWasSpecified: false
nullable: false
custom: []
region:
name: region
description: 'Provider region if the provider is not custom'
required: true
example: inventore
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
plan:
name: plan
description: 'Provider plan if the provider is not custom'
required: true
example: atque
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
ip:
name: ip
description: 'SSH IP address if the provider is custom'
required: true
example: quam
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
port:
name: port
description: 'SSH Port if the provider is custom'
required: true
example: nemo
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
name:
name: name
description: 'The name of the server.'
required: true
example: perspiciatis
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
os:
name: os
description: 'The os of the server'
required: true
example: similique
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
type:
name: type
description: 'Server type'
required: true
example: regular
type: string
enumValues:
- regular
- database
exampleWasSpecified: false
nullable: false
custom: []
webserver:
name: webserver
description: 'Web server'
required: true
example: none
type: string
enumValues:
- none
- nginx
exampleWasSpecified: false
nullable: false
custom: []
database:
name: database
description: Database
required: true
example: none
type: string
enumValues:
- none
- mysql57
- mysql80
- mariadb103
- mariadb104
- mariadb103
- postgresql12
- postgresql13
- postgresql14
- postgresql15
- postgresql16
exampleWasSpecified: false
nullable: false
custom: []
php:
name: php
description: 'PHP version'
required: true
example: '8.1'
type: string
enumValues:
- '7.0'
- '7.1'
- '7.2'
- '7.3'
- '7.4'
- '8.0'
- '8.1'
- '8.2'
- '8.3'
exampleWasSpecified: false
nullable: false
custom: []
cleanBodyParameters:
provider: et
server_provider: digitalocean
region: inventore
plan: atque
ip: quam
port: nemo
name: perspiciatis
os: similique
type: regular
webserver: none
database: none
php: '8.1'
fileParameters: []
responses:
-
status: 200
content: '{"id":null,"project_id":null,"user_id":null,"provider_id":null,"name":"Flo Beer PhD","ssh_user":"vito","ip":"168.238.14.230","local_ip":"40.232.73.41","port":22,"os":"ubuntu_22","type":"regular","type_data":null,"provider":"custom","provider_data":null,"public_key":"test","status":"ready","auto_update":null,"available_updates":0,"security_updates":null,"progress":100,"progress_step":null,"updates":null,"last_update_check":null,"created_at":null,"updated_at":null}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer Z8g36aaV4E1bdcPfehDv65k'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/projects/{project_id}/servers/{id}'
metadata:
groupName: servers
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: show
description: 'Get a server by ID.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
id:
name: id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
id: 3
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"id":null,"project_id":null,"user_id":null,"provider_id":null,"name":"Stephany Ankunding","ssh_user":"vito","ip":"145.28.94.46","local_ip":"69.133.44.100","port":22,"os":"ubuntu_22","type":"regular","type_data":null,"provider":"custom","provider_data":null,"public_key":"test","status":"ready","auto_update":null,"available_updates":0,"security_updates":null,"progress":100,"progress_step":null,"updates":null,"last_update_check":null,"created_at":null,"updated_at":null}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer adD3EfP5hZ4vgbkV861eca6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/projects/{project_id}/servers/{server_id}/reboot'
metadata:
groupName: servers
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: reboot
description: 'Reboot a server.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 204
content: 'null'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer P3ec6aagD4hbdV5fEk168vZ'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/projects/{project_id}/servers/{server_id}/upgrade'
metadata:
groupName: servers
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: upgrade
description: 'Upgrade server.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 204
content: 'null'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer P34ZV6D1bEegdvac8f5kh6a'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- DELETE
uri: 'api/projects/{project_id}/servers/{server_id}'
metadata:
groupName: servers
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: delete
description: 'Delete server.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 204
content: 'null'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer ha6v5V41afkdPgcZbDEe386'
controller: null
method: null
route: null
custom: []

View File

@ -1,372 +0,0 @@
## Autogenerated by Scribe. DO NOT MODIFY.
name: server-providers
description: ''
endpoints:
-
httpMethods:
- GET
uri: 'api/projects/{project_id}/server-providers'
metadata:
groupName: server-providers
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: list
description: ''
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"data":[{"id":2,"project_id":null,"global":true,"name":"dolor","provider":"digitalocean","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"},{"id":3,"project_id":null,"global":true,"name":"enim","provider":"digitalocean","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"&laquo; Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next &raquo;","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 1a6kb58vEP3fZdVhcea64gD'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/projects/{project_id}/server-providers'
metadata:
groupName: server-providers
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: create
description: ''
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters:
provider:
name: provider
description: 'The provider (aws, linode, hetzner, digitalocean, vultr, ...)'
required: true
example: autem
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
name:
name: name
description: 'The name of the server provider.'
required: true
example: enim
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
token:
name: token
description: 'The token if provider requires api token'
required: true
example: culpa
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
key:
name: key
description: 'The key if provider requires key'
required: true
example: sit
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
secret:
name: secret
description: 'The secret if provider requires key'
required: true
example: voluptates
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanBodyParameters:
provider: autem
name: enim
token: culpa
key: sit
secret: voluptates
fileParameters: []
responses:
-
status: 200
content: '{"id":2,"project_id":null,"global":true,"name":"eligendi","provider":"aws","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer PD3ZcaVdvgfa5k4be8E6h16'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/projects/{project_id}/server-providers/{serverProvider_id}'
metadata:
groupName: server-providers
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: show
description: ''
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
serverProvider_id:
name: serverProvider_id
description: 'The ID of the serverProvider.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
serverProvider_id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"id":2,"project_id":null,"global":true,"name":"architecto","provider":"digitalocean","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer DP45bg1aEadh8Z6Vke63fcv'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- PUT
uri: 'api/projects/{project_id}/server-providers/{serverProvider_id}'
metadata:
groupName: server-providers
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: update
description: ''
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
serverProvider_id:
name: serverProvider_id
description: 'The ID of the serverProvider.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
serverProvider_id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters:
name:
name: name
description: 'The name of the server provider.'
required: true
example: minus
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
global:
name: global
description: 'Accessible in all projects'
required: true
example: false
type: string
enumValues:
- true
- false
exampleWasSpecified: false
nullable: false
custom: []
cleanBodyParameters:
name: minus
global: false
fileParameters: []
responses:
-
status: 200
content: '{"id":2,"project_id":null,"global":true,"name":"reiciendis","provider":"hetzner","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer bv1kdegh6fP8V56ZE4acaD3'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- DELETE
uri: 'api/projects/{project_id}/server-providers/{serverProvider_id}'
metadata:
groupName: server-providers
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: delete
description: ''
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
serverProvider_id:
name: serverProvider_id
description: 'The ID of the serverProvider.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
serverProvider_id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 204
content: 'null'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer k6hb43Vf5Z1dv8aaeEDcg6P'
controller: null
method: null
route: null
custom: []

View File

@ -1,235 +0,0 @@
## Autogenerated by Scribe. DO NOT MODIFY.
name: ssh-keys
description: ''
endpoints:
-
httpMethods:
- GET
uri: 'api/projects/{project_id}/servers/{server_id}/ssh-keys'
metadata:
groupName: ssh-keys
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: list
description: 'Get all ssh keys.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"data":[{"id":null,"user":null,"name":"Dr. Reanna Braun","created_at":null,"updated_at":null},{"id":null,"user":null,"name":"Norene Fritsch","created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"&laquo; Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next &raquo;","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer dV1gcvfZ46Eh8ebaP5Da63k'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/projects/{project_id}/servers/{server_id}/ssh-keys'
metadata:
groupName: ssh-keys
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: create
description: 'Deploy ssh key to server.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
queryParameters: []
cleanQueryParameters: []
bodyParameters:
key_id:
name: key_id
description: 'The ID of the key.'
required: true
example: vero
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
name:
name: name
description: 'Key name, required if key_id is not provided.'
required: true
example: voluptates
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
public_key:
name: public_key
description: 'Public Key, required if key_id is not provided.'
required: true
example: dolor
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanBodyParameters:
key_id: vero
name: voluptates
public_key: dolor
fileParameters: []
responses:
-
status: 200
content: '{"id":null,"user":null,"name":"Sophia D''Amore","created_at":null,"updated_at":null}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer gkadV36a5f8E6vhb14ZceDP'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- DELETE
uri: 'api/projects/{project_id}/servers/{server_id}/ssh-keys/{sshKey_id}'
metadata:
groupName: ssh-keys
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: delete
description: 'Delete ssh key from server.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
sshKey_id:
name: sshKey_id
description: 'The ID of the sshKey.'
required: true
example: 4
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
sshKey_id: 4
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 204
content: 'null'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer PfchD4Zge386abadE5kV61v'
controller: null
method: null
route: null
custom: []

View File

@ -1,578 +0,0 @@
## Autogenerated by Scribe. DO NOT MODIFY.
name: services
description: ''
endpoints:
-
httpMethods:
- GET
uri: 'api/projects/{project_id}/servers/{server_id}/services'
metadata:
groupName: services
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: list
description: 'Get all services.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"data":[{"id":null,"server_id":null,"type":null,"type_data":null,"name":null,"version":null,"unit":null,"status":null,"is_default":null,"created_at":null,"updated_at":null},{"id":null,"server_id":null,"type":null,"type_data":null,"name":null,"version":null,"unit":null,"status":null,"is_default":null,"created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"&laquo; Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next &raquo;","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer h6bDec51ak84ZVafgv3PE6d'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/projects/{project_id}/servers/{server_id}/services/{id}'
metadata:
groupName: services
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: show
description: 'Get a service by ID.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
id:
name: id
description: 'The ID of the service.'
required: true
example: 27
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
id: 27
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"id":null,"server_id":null,"type":null,"type_data":null,"name":null,"version":null,"unit":null,"status":null,"is_default":null,"created_at":null,"updated_at":null}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer da4V3kfgZ6a86PchevED5b1'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/projects/{project_id}/servers/{server_id}/services/{service_id}/start'
metadata:
groupName: services
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: start
description: 'Start service.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
service_id:
name: service_id
description: 'The ID of the service.'
required: true
example: 27
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
service_id: 27
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 204
content: 'null'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 86fdV5D6gv1E3ekaPZac4hb'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/projects/{project_id}/servers/{server_id}/services/{service_id}/stop'
metadata:
groupName: services
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: stop
description: 'Stop service.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
service_id:
name: service_id
description: 'The ID of the service.'
required: true
example: 27
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
service_id: 27
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 204
content: 'null'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer kPZ563E1Vfgh4cbDad8vae6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/projects/{project_id}/servers/{server_id}/services/{service_id}/restart'
metadata:
groupName: services
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: restart
description: 'Restart service.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
service_id:
name: service_id
description: 'The ID of the service.'
required: true
example: 27
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
service_id: 27
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 204
content: 'null'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer fd14PaDb58gchv3ZVeaEk66'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/projects/{project_id}/servers/{server_id}/services/{service_id}/enable'
metadata:
groupName: services
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: enable
description: 'Enable service.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
service_id:
name: service_id
description: 'The ID of the service.'
required: true
example: 27
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
service_id: 27
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 204
content: 'null'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer Dv1aVe6hZfkagdE356b4cP8'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/projects/{project_id}/servers/{server_id}/services/{service_id}/disable'
metadata:
groupName: services
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: disable
description: 'Disable service.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
service_id:
name: service_id
description: 'The ID of the service.'
required: true
example: 27
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
service_id: 27
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 204
content: 'null'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6bdDc4Eah3ZV18kf6Pveag5'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- DELETE
uri: 'api/projects/{project_id}/servers/{server_id}/services/{service_id}'
metadata:
groupName: services
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: delete
description: 'Delete service.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
service_id:
name: service_id
description: 'The ID of the service.'
required: true
example: 27
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
service_id: 27
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 204
content: 'null'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 36kf84v6bVhE5gdPDeZ1caa'
controller: null
method: null
route: null
custom: []

View File

@ -1,392 +0,0 @@
## Autogenerated by Scribe. DO NOT MODIFY.
name: sites
description: ''
endpoints:
-
httpMethods:
- GET
uri: 'api/projects/{project_id}/servers/{server_id}/sites'
metadata:
groupName: sites
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: list
description: 'Get all sites.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"data":[{"id":null,"server_id":null,"source_control_id":null,"type":"laravel","type_data":null,"domain":"test.com","aliases":null,"web_directory":"\/","path":"\/home","php_version":"8.2","repository":null,"branch":"main","status":"ready","port":null,"progress":100,"created_at":null,"updated_at":null},{"id":null,"server_id":null,"source_control_id":null,"type":"laravel","type_data":null,"domain":"test.com","aliases":null,"web_directory":"\/","path":"\/home","php_version":"8.2","repository":null,"branch":"main","status":"ready","port":null,"progress":100,"created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"&laquo; Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next &raquo;","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer gaeE86fd1aZP53Vvc6Dhbk4'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/projects/{project_id}/servers/{server_id}/sites'
metadata:
groupName: sites
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: create
description: 'Create a new site.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
queryParameters: []
cleanQueryParameters: []
bodyParameters:
type:
name: type
description: ''
required: true
example: wordpress
type: string
enumValues:
- php
- php-blank
- phpmyadmin
- laravel
- wordpress
exampleWasSpecified: false
nullable: false
custom: []
domain:
name: domain
description: ''
required: true
example: quo
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
aliases:
name: aliases
description: ''
required: true
example:
- dolorum
type: 'string[]'
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
php_version:
name: php_version
description: 'One of the installed PHP Versions'
required: true
example: '7.4'
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
web_directory:
name: web_directory
description: 'Required for PHP and Laravel sites'
required: true
example: public
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
source_control:
name: source_control
description: 'Source control ID, Required for Sites which support source control'
required: true
example: explicabo
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
repository:
name: repository
description: 'Repository, Required for Sites which support source control'
required: true
example: organization/repository
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
branch:
name: branch
description: 'Branch, Required for Sites which support source control'
required: true
example: main
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
composer:
name: composer
description: 'Run composer if site supports composer'
required: true
example: true
type: boolean
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
version:
name: version
description: 'Version, if the site type requires a version like PHPMyAdmin'
required: true
example: 5.2.1
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanBodyParameters:
type: wordpress
domain: quo
aliases:
- dolorum
php_version: '7.4'
web_directory: public
source_control: explicabo
repository: organization/repository
branch: main
composer: true
version: 5.2.1
fileParameters: []
responses:
-
status: 200
content: '{"id":null,"server_id":null,"source_control_id":null,"type":"laravel","type_data":null,"domain":"test.com","aliases":null,"web_directory":"\/","path":"\/home","php_version":"8.2","repository":null,"branch":"main","status":"ready","port":null,"progress":100,"created_at":null,"updated_at":null}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer efDd36cab6vZEaV4hkP851g'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/projects/{project_id}/servers/{server_id}/sites/{id}'
metadata:
groupName: sites
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: show
description: 'Get a site by ID.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
id:
name: id
description: 'The ID of the site.'
required: true
example: 8
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
id: 8
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"id":null,"server_id":null,"source_control_id":null,"type":"laravel","type_data":null,"domain":"test.com","aliases":null,"web_directory":"\/","path":"\/home","php_version":"8.2","repository":null,"branch":"main","status":"ready","port":null,"progress":100,"created_at":null,"updated_at":null}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer bVkf841ava5gE6DPch36Zde'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- DELETE
uri: 'api/projects/{project_id}/servers/{server_id}/sites/{site_id}'
metadata:
groupName: sites
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: delete
description: 'Delete site.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
site_id:
name: site_id
description: 'The ID of the site.'
required: true
example: 8
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
site_id: 8
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 204
content: 'null'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer gfVZbEP5Ddah6k13ae6c8v4'
controller: null
method: null
route: null
custom: []

View File

@ -1,430 +0,0 @@
## Autogenerated by Scribe. DO NOT MODIFY.
name: source-controls
description: ''
endpoints:
-
httpMethods:
- GET
uri: 'api/projects/{project_id}/source-controls'
metadata:
groupName: source-controls
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: list
description: ''
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"data":[{"id":5,"project_id":null,"global":true,"name":"Jaiden Kling","provider":"github","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"},{"id":6,"project_id":null,"global":true,"name":"Ms. Brianne Bosco","provider":"github","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"&laquo; Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next &raquo;","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer PfaEg1eZh66cd5V4v8bD3ak'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/projects/{project_id}/source-controls'
metadata:
groupName: source-controls
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: create
description: ''
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters:
provider:
name: provider
description: 'The provider'
required: true
example: bitbucket
type: string
enumValues:
- gitlab
- github
- bitbucket
exampleWasSpecified: false
nullable: false
custom: []
name:
name: name
description: 'The name of the storage provider.'
required: true
example: eos
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
token:
name: token
description: 'The token if provider requires api token'
required: true
example: et
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
url:
name: url
description: 'The URL if the provider is Gitlab and it is self-hosted'
required: true
example: 'https://lueilwitz.com/nostrum-et-porro-atque-sint.html'
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
username:
name: username
description: 'The username if the provider is Bitbucket'
required: true
example: consectetur
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
password:
name: password
description: 'The password if the provider is Bitbucket'
required: true
example: 'PL.P?{06\ECi0'
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanBodyParameters:
provider: bitbucket
name: eos
token: et
url: 'https://lueilwitz.com/nostrum-et-porro-atque-sint.html'
username: consectetur
password: 'PL.P?{06\ECi0'
fileParameters: []
responses:
-
status: 200
content: '{"id":5,"project_id":null,"global":true,"name":"Toby Parker","provider":"github","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer V5Zf3a1ve6d6kP4cbgha8DE'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/projects/{project_id}/source-controls/{sourceControl_id}'
metadata:
groupName: source-controls
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: show
description: ''
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
sourceControl_id:
name: sourceControl_id
description: 'The ID of the sourceControl.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
sourceControl_id: 3
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"id":5,"project_id":null,"global":true,"name":"Prof. Bartholome Graham IV","provider":"github","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer k1b5hac6veZ36P8gDV4fadE'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- PUT
uri: 'api/projects/{project_id}/source-controls/{sourceControl_id}'
metadata:
groupName: source-controls
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: update
description: ''
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
sourceControl_id:
name: sourceControl_id
description: 'The ID of the sourceControl.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
sourceControl_id: 3
queryParameters: []
cleanQueryParameters: []
bodyParameters:
name:
name: name
description: 'The name of the storage provider.'
required: true
example: quaerat
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
token:
name: token
description: 'The token if provider requires api token'
required: true
example: consectetur
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
url:
name: url
description: 'The URL if the provider is Gitlab and it is self-hosted'
required: true
example: 'http://www.hudson.biz/rerum-voluptatem-debitis-accusamus'
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
username:
name: username
description: 'The username if the provider is Bitbucket'
required: true
example: voluptatem
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
password:
name: password
description: 'The password if the provider is Bitbucket'
required: true
example: '\p/el>)3#~E?kI'
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
global:
name: global
description: 'Accessible in all projects'
required: true
example: false
type: string
enumValues:
- true
- false
exampleWasSpecified: false
nullable: false
custom: []
cleanBodyParameters:
name: quaerat
token: consectetur
url: 'http://www.hudson.biz/rerum-voluptatem-debitis-accusamus'
username: voluptatem
password: '\p/el>)3#~E?kI'
global: false
fileParameters: []
responses:
-
status: 200
content: '{"id":5,"project_id":null,"global":true,"name":"Cicero Smitham","provider":"github","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6dkE6h8a5eg3f14acVvbPDZ'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- DELETE
uri: 'api/projects/{project_id}/source-controls/{sourceControl_id}'
metadata:
groupName: source-controls
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: delete
description: ''
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
sourceControl_id:
name: sourceControl_id
description: 'The ID of the sourceControl.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
sourceControl_id: 3
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 204
content: 'null'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer fb6Zk4EP318eva5hDdcV6ga'
controller: null
method: null
route: null
custom: []

View File

@ -1,372 +0,0 @@
## Autogenerated by Scribe. DO NOT MODIFY.
name: storage-providers
description: ''
endpoints:
-
httpMethods:
- GET
uri: 'api/projects/{project_id}/storage-providers'
metadata:
groupName: storage-providers
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: list
description: ''
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"data":[{"id":3,"project_id":null,"global":true,"name":"et","provider":"local","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"},{"id":4,"project_id":null,"global":true,"name":"sed","provider":"local","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"&laquo; Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next &raquo;","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 1dbV3vkh6EPD5g48cafeZ6a'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/projects/{project_id}/storage-providers'
metadata:
groupName: storage-providers
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: create
description: ''
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters:
provider:
name: provider
description: 'The provider (aws, linode, hetzner, digitalocean, vultr, ...)'
required: true
example: quod
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
name:
name: name
description: 'The name of the storage provider.'
required: true
example: commodi
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
token:
name: token
description: 'The token if provider requires api token'
required: true
example: ipsum
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
key:
name: key
description: 'The key if provider requires key'
required: true
example: ratione
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
secret:
name: secret
description: 'The secret if provider requires key'
required: true
example: iste
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanBodyParameters:
provider: quod
name: commodi
token: ipsum
key: ratione
secret: iste
fileParameters: []
responses:
-
status: 200
content: '{"id":3,"project_id":null,"global":true,"name":"est","provider":"dropbox","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer abehv36kP4D658VafgdZE1c'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/projects/{project_id}/storage-providers/{storageProvider_id}'
metadata:
groupName: storage-providers
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: show
description: ''
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
storageProvider_id:
name: storageProvider_id
description: 'The ID of the storageProvider.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
storageProvider_id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"id":3,"project_id":null,"global":true,"name":"officia","provider":"ftp","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer bda64P5c1gEDe8V3Z6vhkaf'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- PUT
uri: 'api/projects/{project_id}/storage-providers/{storageProvider_id}'
metadata:
groupName: storage-providers
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: update
description: ''
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
storageProvider_id:
name: storageProvider_id
description: 'The ID of the storageProvider.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
storageProvider_id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters:
name:
name: name
description: 'The name of the storage provider.'
required: true
example: iusto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
global:
name: global
description: 'Accessible in all projects'
required: true
example: true
type: string
enumValues:
- true
- false
exampleWasSpecified: false
nullable: false
custom: []
cleanBodyParameters:
name: iusto
global: true
fileParameters: []
responses:
-
status: 200
content: '{"id":3,"project_id":null,"global":true,"name":"rerum","provider":"ftp","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer aEP35hVakDdf814eZvg66cb'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- DELETE
uri: 'api/projects/{project_id}/storage-providers/{storageProvider_id}'
metadata:
groupName: storage-providers
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: delete
description: ''
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
storageProvider_id:
name: storageProvider_id
description: 'The ID of the storageProvider.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
storageProvider_id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 204
content: 'null'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer Dah3PgE5d64fcbe8a16VkvZ'
controller: null
method: null
route: null
custom: []

View File

@ -1,308 +0,0 @@
name: cron-jobs
description: ''
endpoints:
-
httpMethods:
- GET
uri: 'api/projects/{project_id}/servers/{server_id}/cron-jobs'
metadata:
groupName: cron-jobs
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: list
description: 'Get all cron jobs.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"data":[{"id":null,"server_id":null,"command":"ls -la","user":"root","frequency":"* * * * *","status":"ready","created_at":null,"updated_at":null},{"id":null,"server_id":null,"command":"ls -la","user":"root","frequency":"* * * * *","status":"ready","created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"&laquo; Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next &raquo;","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6ed1gv5ak6hEPcaV8D3Z4bf'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/projects/{project_id}/servers/{server_id}/cron-jobs'
metadata:
groupName: cron-jobs
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: create
description: 'Create a new cron job.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
queryParameters: []
cleanQueryParameters: []
bodyParameters:
command:
name: command
description: ''
required: true
example: qui
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
user:
name: user
description: ''
required: true
example: root
type: string
enumValues:
- root
- vito
exampleWasSpecified: false
nullable: false
custom: []
frequency:
name: frequency
description: 'Frequency of the cron job.'
required: true
example: '* * * * *'
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanBodyParameters:
command: qui
user: root
frequency: '* * * * *'
fileParameters: []
responses:
-
status: 200
content: '{"id":null,"server_id":null,"command":"ls -la","user":"root","frequency":"* * * * *","status":"ready","created_at":null,"updated_at":null}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer VEfc5h3gva68PkZ46Deabd1'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/projects/{project_id}/servers/{server_id}/cron-jobs/{cronJob_id}'
metadata:
groupName: cron-jobs
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: show
description: 'Get a cron job by ID.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cronJob_id:
name: cronJob_id
description: 'The ID of the cronJob.'
required: true
example: 5
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
cronJob_id: 5
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"id":null,"server_id":null,"command":"ls -la","user":"root","frequency":"* * * * *","status":"ready","created_at":null,"updated_at":null}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 614DaP5vZ6edcaVEgfhk83b'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- DELETE
uri: 'api/projects/{project_id}/servers/{server_id}/cron-jobs/{cronJob_id}'
metadata:
groupName: cron-jobs
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: delete
description: 'Delete cron job.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cronJob_id:
name: cronJob_id
description: 'The ID of the cronJob.'
required: true
example: 5
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
cronJob_id: 5
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 204
content: 'null'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer gDV6bZ1dEckvf45P86eaha3'
controller: null
method: null
route: null
custom: []

View File

@ -1,284 +0,0 @@
name: databases
description: ''
endpoints:
-
httpMethods:
- GET
uri: 'api/projects/{project_id}/servers/{server_id}/databases'
metadata:
groupName: databases
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: list
description: 'Get all databases.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"data":[{"id":null,"server_id":null,"name":"clockman","status":"ready","created_at":null,"updated_at":null},{"id":null,"server_id":null,"name":"wvonrueden","status":"ready","created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"&laquo; Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next &raquo;","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer efEV4g86bd5PZac6vak3Dh1'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/projects/{project_id}/servers/{server_id}/databases'
metadata:
groupName: databases
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: create
description: 'Create a new database.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
queryParameters: []
cleanQueryParameters: []
bodyParameters:
name:
name: name
description: ''
required: true
example: nesciunt
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanBodyParameters:
name: nesciunt
fileParameters: []
responses:
-
status: 200
content: '{"id":null,"server_id":null,"name":"johanna76","status":"ready","created_at":null,"updated_at":null}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 3E6VD14dvaekbaZfh6Pg8c5'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/projects/{project_id}/servers/{server_id}/databases/{id}'
metadata:
groupName: databases
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: show
description: 'Get a database by ID.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
id:
name: id
description: 'The ID of the database.'
required: true
example: 6
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
id: 6
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"id":null,"server_id":null,"name":"chloe.huel","status":"ready","created_at":null,"updated_at":null}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer fb5hVc38e1aDP6ZvkgEda46'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- DELETE
uri: 'api/projects/{project_id}/servers/{server_id}/databases/{database_id}'
metadata:
groupName: databases
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: delete
description: 'Delete database.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
database_id:
name: database_id
description: 'The ID of the database.'
required: true
example: 6
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
database_id: 6
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 204
content: 'null'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer cPVbhaZkfg5aEv46D183ed6'
controller: null
method: null
route: null
custom: []

View File

@ -1,390 +0,0 @@
name: database-users
description: ''
endpoints:
-
httpMethods:
- GET
uri: 'api/projects/{project_id}/servers/{server_id}/database-users'
metadata:
groupName: database-users
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: list
description: 'Get all database users.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"data":[{"id":null,"server_id":null,"username":"nyasia68","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null},{"id":null,"server_id":null,"username":"madyson20","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"&laquo; Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next &raquo;","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer egc5VaDdvabfP6843k61hZE'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/projects/{project_id}/servers/{server_id}/database-users'
metadata:
groupName: database-users
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: create
description: 'Create a new database user.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
queryParameters: []
cleanQueryParameters: []
bodyParameters:
username:
name: username
description: ''
required: true
example: dignissimos
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
password:
name: password
description: ''
required: true
example: OK+XEG2)
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
host:
name: host
description: 'Host, if it is a remote user.'
required: true
example: '%'
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanBodyParameters:
username: dignissimos
password: OK+XEG2)
host: '%'
fileParameters: []
responses:
-
status: 200
content: '{"id":null,"server_id":null,"username":"amya.nitzsche","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 31hgfcvEb6Pkaa48D6dZ5Ve'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/projects/{project_id}/servers/{server_id}/database-users/{databaseUser_id}'
metadata:
groupName: database-users
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: show
description: 'Get a database user by ID.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
databaseUser_id:
name: databaseUser_id
description: 'The ID of the databaseUser.'
required: true
example: 4
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
databaseUser_id: 4
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"id":null,"server_id":null,"username":"bergstrom.ericka","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer aDv48631h5af6EdkcVbPZeg'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/projects/{project_id}/servers/{server_id}/database-users/{databaseUser_id}/link'
metadata:
groupName: database-users
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: link
description: 'Link to databases'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
databaseUser_id:
name: databaseUser_id
description: 'The ID of the databaseUser.'
required: true
example: 4
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
databaseUser_id: 4
queryParameters: []
cleanQueryParameters: []
bodyParameters:
databases:
name: databases
description: 'Array of database names to link to the user.'
required: true
example: accusantium
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanBodyParameters:
databases: accusantium
fileParameters: []
responses:
-
status: 200
content: '{"id":null,"server_id":null,"username":"fmurray","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer cf8ZPhV1k3d5DaEva46beg6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- DELETE
uri: 'api/projects/{project_id}/servers/{server_id}/database-users/{databaseUser_id}'
metadata:
groupName: database-users
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: delete
description: 'Delete database user.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
databaseUser_id:
name: databaseUser_id
description: 'The ID of the databaseUser.'
required: true
example: 4
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
databaseUser_id: 4
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 204
content: 'null'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer hdEvkbaPVf4cZ65a8631eDg'
controller: null
method: null
route: null
custom: []

View File

@ -1,332 +0,0 @@
name: firewall-rules
description: ''
endpoints:
-
httpMethods:
- GET
uri: 'api/projects/{project_id}/servers/{server_id}/firewall-rules'
metadata:
groupName: firewall-rules
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: list
description: 'Get all firewall rules.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"data":[{"id":null,"server_id":null,"type":"allow","protocol":"tcp","port":18074,"source":"189.27.156.82","mask":24,"note":"test","status":null,"created_at":null,"updated_at":null},{"id":null,"server_id":null,"type":"allow","protocol":"tcp","port":41088,"source":"86.177.121.87","mask":24,"note":"test","status":null,"created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"&laquo; Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next &raquo;","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer vhkc4aPa6ZdeV8D3Ef156gb'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/projects/{project_id}/servers/{server_id}/firewall-rules'
metadata:
groupName: firewall-rules
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: create
description: 'Create a new firewall rule.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
queryParameters: []
cleanQueryParameters: []
bodyParameters:
type:
name: type
description: ''
required: true
example: allow
type: string
enumValues:
- allow
- deny
exampleWasSpecified: false
nullable: false
custom: []
protocol:
name: protocol
description: ''
required: true
example: udp
type: string
enumValues:
- tcp
- udp
exampleWasSpecified: false
nullable: false
custom: []
port:
name: port
description: ''
required: true
example: voluptates
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
source:
name: source
description: ''
required: true
example: saepe
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
mask:
name: mask
description: 'Mask for source IP.'
required: true
example: '0'
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanBodyParameters:
type: allow
protocol: udp
port: voluptates
source: saepe
mask: '0'
fileParameters: []
responses:
-
status: 200
content: '{"id":null,"server_id":null,"type":"allow","protocol":"tcp","port":61992,"source":"47.222.76.48","mask":24,"note":"test","status":null,"created_at":null,"updated_at":null}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 1cEb5P66VeDkf8aahg3Zdv4'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/projects/{project_id}/servers/{server_id}/firewall-rules/{firewallRule_id}'
metadata:
groupName: firewall-rules
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: show
description: 'Get a firewall rule by ID.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
firewallRule_id:
name: firewallRule_id
description: 'The ID of the firewallRule.'
required: true
example: 7
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
firewallRule_id: 7
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"id":null,"server_id":null,"type":"allow","protocol":"tcp","port":43107,"source":"135.73.216.16","mask":24,"note":"test","status":null,"created_at":null,"updated_at":null}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6VaPhkD5vd1Z8e6E3cba4gf'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- DELETE
uri: 'api/projects/{project_id}/servers/{server_id}/firewall-rules/{firewallRule_id}'
metadata:
groupName: firewall-rules
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: delete
description: 'Delete firewall rule.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
firewallRule_id:
name: firewallRule_id
description: 'The ID of the firewallRule.'
required: true
example: 7
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
firewallRule_id: 7
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 204
content: 'null'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer v81d5Efch636aVgZebaPkD4'
controller: null
method: null
route: null
custom: []

View File

@ -1,44 +0,0 @@
name: general
description: ''
endpoints:
-
httpMethods:
- GET
uri: api/health
metadata:
groupName: general
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: health-check
description: ''
authenticated: false
custom: []
headers:
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"success":true,"version":"2.0.0"}'
headers:
cache-control: 'no-cache, private'
content-type: application/json
x-ratelimit-limit: '60'
x-ratelimit-remaining: '59'
access-control-allow-origin: '*'
description: null
custom: []
responseFields: []
auth: []
controller: null
method: null
route: null
custom: []

View File

@ -1,258 +0,0 @@
name: projects
description: ''
endpoints:
-
httpMethods:
- GET
uri: api/projects
metadata:
groupName: projects
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: list
description: 'Get all projects.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"data":[{"id":29,"name":"Zachary Lueilwitz","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"},{"id":30,"name":"Mrs. Kiarra Heller IV","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"&laquo; Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next &raquo;","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer eb14DEPv6cdah65VfZgka38'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: api/projects
metadata:
groupName: projects
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: create
description: 'Create a new project.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters:
name:
name: name
description: 'The name of the project.'
required: true
example: quos
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanBodyParameters:
name: quos
fileParameters: []
responses:
-
status: 200
content: '{"id":29,"name":"Hershel Spinka","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer V1E3566Pf4gkvh8dDZabeca'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/projects/{id}'
metadata:
groupName: projects
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: show
description: 'Get a project by ID.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"id":29,"name":"Emery Kiehn","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer haD6e36VZbkf4P8aEcvd15g'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- PUT
uri: 'api/projects/{id}'
metadata:
groupName: projects
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: update
description: 'Update project.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters:
name:
name: name
description: 'The name of the project.'
required: true
example: ut
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanBodyParameters:
name: ut
fileParameters: []
responses:
-
status: 200
content: '{"id":29,"name":"Mable Prohaska","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer V14kPa5deva8Ebgc36f6hDZ'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- DELETE
uri: 'api/projects/{project_id}'
metadata:
groupName: projects
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: delete
description: 'Delete project.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 204
content: 'null'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer k1D68d5ePavVZag6h4fb3cE'
controller: null
method: null
route: null
custom: []

View File

@ -1,514 +0,0 @@
name: servers
description: ''
endpoints:
-
httpMethods:
- GET
uri: 'api/projects/{project_id}/servers'
metadata:
groupName: servers
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: list
description: 'Get all servers in a project.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"data":[{"id":null,"project_id":null,"user_id":null,"provider_id":null,"name":"Dorthy Toy","ssh_user":"vito","ip":"172.132.95.155","local_ip":"118.57.197.65","port":22,"os":"ubuntu_22","type":"regular","type_data":null,"provider":"custom","provider_data":null,"public_key":"test","status":"ready","auto_update":null,"available_updates":0,"security_updates":null,"progress":100,"progress_step":null,"updates":null,"last_update_check":null,"created_at":null,"updated_at":null},{"id":null,"project_id":null,"user_id":null,"provider_id":null,"name":"Carrie Sporer","ssh_user":"vito","ip":"184.242.162.173","local_ip":"135.244.50.22","port":22,"os":"ubuntu_22","type":"regular","type_data":null,"provider":"custom","provider_data":null,"public_key":"test","status":"ready","auto_update":null,"available_updates":0,"security_updates":null,"progress":100,"progress_step":null,"updates":null,"last_update_check":null,"created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"&laquo; Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next &raquo;","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 8VE41PdZcvb6kgafD635ahe'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/projects/{project_id}/servers'
metadata:
groupName: servers
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: create
description: 'Create a new server.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters:
provider:
name: provider
description: 'The server provider type'
required: true
example: et
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_provider:
name: server_provider
description: 'If the provider is not custom, the ID of the server provider profile'
required: true
example: digitalocean
type: string
enumValues:
- custom
- hetzner
- digitalocean
- linode
- vultr
exampleWasSpecified: false
nullable: false
custom: []
region:
name: region
description: 'Provider region if the provider is not custom'
required: true
example: inventore
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
plan:
name: plan
description: 'Provider plan if the provider is not custom'
required: true
example: atque
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
ip:
name: ip
description: 'SSH IP address if the provider is custom'
required: true
example: quam
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
port:
name: port
description: 'SSH Port if the provider is custom'
required: true
example: nemo
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
name:
name: name
description: 'The name of the server.'
required: true
example: perspiciatis
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
os:
name: os
description: 'The os of the server'
required: true
example: similique
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
type:
name: type
description: 'Server type'
required: true
example: regular
type: string
enumValues:
- regular
- database
exampleWasSpecified: false
nullable: false
custom: []
webserver:
name: webserver
description: 'Web server'
required: true
example: none
type: string
enumValues:
- none
- nginx
exampleWasSpecified: false
nullable: false
custom: []
database:
name: database
description: Database
required: true
example: none
type: string
enumValues:
- none
- mysql57
- mysql80
- mariadb103
- mariadb104
- mariadb103
- postgresql12
- postgresql13
- postgresql14
- postgresql15
- postgresql16
exampleWasSpecified: false
nullable: false
custom: []
php:
name: php
description: 'PHP version'
required: true
example: '8.1'
type: string
enumValues:
- '7.0'
- '7.1'
- '7.2'
- '7.3'
- '7.4'
- '8.0'
- '8.1'
- '8.2'
- '8.3'
exampleWasSpecified: false
nullable: false
custom: []
cleanBodyParameters:
provider: et
server_provider: digitalocean
region: inventore
plan: atque
ip: quam
port: nemo
name: perspiciatis
os: similique
type: regular
webserver: none
database: none
php: '8.1'
fileParameters: []
responses:
-
status: 200
content: '{"id":null,"project_id":null,"user_id":null,"provider_id":null,"name":"Flo Beer PhD","ssh_user":"vito","ip":"168.238.14.230","local_ip":"40.232.73.41","port":22,"os":"ubuntu_22","type":"regular","type_data":null,"provider":"custom","provider_data":null,"public_key":"test","status":"ready","auto_update":null,"available_updates":0,"security_updates":null,"progress":100,"progress_step":null,"updates":null,"last_update_check":null,"created_at":null,"updated_at":null}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer Z8g36aaV4E1bdcPfehDv65k'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/projects/{project_id}/servers/{id}'
metadata:
groupName: servers
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: show
description: 'Get a server by ID.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
id:
name: id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
id: 3
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"id":null,"project_id":null,"user_id":null,"provider_id":null,"name":"Stephany Ankunding","ssh_user":"vito","ip":"145.28.94.46","local_ip":"69.133.44.100","port":22,"os":"ubuntu_22","type":"regular","type_data":null,"provider":"custom","provider_data":null,"public_key":"test","status":"ready","auto_update":null,"available_updates":0,"security_updates":null,"progress":100,"progress_step":null,"updates":null,"last_update_check":null,"created_at":null,"updated_at":null}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer adD3EfP5hZ4vgbkV861eca6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/projects/{project_id}/servers/{server_id}/reboot'
metadata:
groupName: servers
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: reboot
description: 'Reboot a server.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 204
content: 'null'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer P3ec6aagD4hbdV5fEk168vZ'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/projects/{project_id}/servers/{server_id}/upgrade'
metadata:
groupName: servers
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: upgrade
description: 'Upgrade server.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 204
content: 'null'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer P34ZV6D1bEegdvac8f5kh6a'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- DELETE
uri: 'api/projects/{project_id}/servers/{server_id}'
metadata:
groupName: servers
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: delete
description: 'Delete server.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 204
content: 'null'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer ha6v5V41afkdPgcZbDEe386'
controller: null
method: null
route: null
custom: []

View File

@ -1,370 +0,0 @@
name: server-providers
description: ''
endpoints:
-
httpMethods:
- GET
uri: 'api/projects/{project_id}/server-providers'
metadata:
groupName: server-providers
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: list
description: ''
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"data":[{"id":2,"project_id":null,"global":true,"name":"dolor","provider":"digitalocean","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"},{"id":3,"project_id":null,"global":true,"name":"enim","provider":"digitalocean","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"&laquo; Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next &raquo;","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 1a6kb58vEP3fZdVhcea64gD'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/projects/{project_id}/server-providers'
metadata:
groupName: server-providers
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: create
description: ''
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters:
provider:
name: provider
description: 'The provider (aws, linode, hetzner, digitalocean, vultr, ...)'
required: true
example: autem
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
name:
name: name
description: 'The name of the server provider.'
required: true
example: enim
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
token:
name: token
description: 'The token if provider requires api token'
required: true
example: culpa
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
key:
name: key
description: 'The key if provider requires key'
required: true
example: sit
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
secret:
name: secret
description: 'The secret if provider requires key'
required: true
example: voluptates
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanBodyParameters:
provider: autem
name: enim
token: culpa
key: sit
secret: voluptates
fileParameters: []
responses:
-
status: 200
content: '{"id":2,"project_id":null,"global":true,"name":"eligendi","provider":"aws","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer PD3ZcaVdvgfa5k4be8E6h16'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/projects/{project_id}/server-providers/{serverProvider_id}'
metadata:
groupName: server-providers
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: show
description: ''
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
serverProvider_id:
name: serverProvider_id
description: 'The ID of the serverProvider.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
serverProvider_id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"id":2,"project_id":null,"global":true,"name":"architecto","provider":"digitalocean","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer DP45bg1aEadh8Z6Vke63fcv'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- PUT
uri: 'api/projects/{project_id}/server-providers/{serverProvider_id}'
metadata:
groupName: server-providers
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: update
description: ''
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
serverProvider_id:
name: serverProvider_id
description: 'The ID of the serverProvider.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
serverProvider_id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters:
name:
name: name
description: 'The name of the server provider.'
required: true
example: minus
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
global:
name: global
description: 'Accessible in all projects'
required: true
example: false
type: string
enumValues:
- true
- false
exampleWasSpecified: false
nullable: false
custom: []
cleanBodyParameters:
name: minus
global: false
fileParameters: []
responses:
-
status: 200
content: '{"id":2,"project_id":null,"global":true,"name":"reiciendis","provider":"hetzner","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer bv1kdegh6fP8V56ZE4acaD3'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- DELETE
uri: 'api/projects/{project_id}/server-providers/{serverProvider_id}'
metadata:
groupName: server-providers
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: delete
description: ''
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
serverProvider_id:
name: serverProvider_id
description: 'The ID of the serverProvider.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
serverProvider_id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 204
content: 'null'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer k6hb43Vf5Z1dv8aaeEDcg6P'
controller: null
method: null
route: null
custom: []

View File

@ -1,233 +0,0 @@
name: ssh-keys
description: ''
endpoints:
-
httpMethods:
- GET
uri: 'api/projects/{project_id}/servers/{server_id}/ssh-keys'
metadata:
groupName: ssh-keys
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: list
description: 'Get all ssh keys.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"data":[{"id":null,"user":null,"name":"Dr. Reanna Braun","created_at":null,"updated_at":null},{"id":null,"user":null,"name":"Norene Fritsch","created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"&laquo; Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next &raquo;","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer dV1gcvfZ46Eh8ebaP5Da63k'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/projects/{project_id}/servers/{server_id}/ssh-keys'
metadata:
groupName: ssh-keys
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: create
description: 'Deploy ssh key to server.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
queryParameters: []
cleanQueryParameters: []
bodyParameters:
key_id:
name: key_id
description: 'The ID of the key.'
required: true
example: vero
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
name:
name: name
description: 'Key name, required if key_id is not provided.'
required: true
example: voluptates
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
public_key:
name: public_key
description: 'Public Key, required if key_id is not provided.'
required: true
example: dolor
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanBodyParameters:
key_id: vero
name: voluptates
public_key: dolor
fileParameters: []
responses:
-
status: 200
content: '{"id":null,"user":null,"name":"Sophia D''Amore","created_at":null,"updated_at":null}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer gkadV36a5f8E6vhb14ZceDP'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- DELETE
uri: 'api/projects/{project_id}/servers/{server_id}/ssh-keys/{sshKey_id}'
metadata:
groupName: ssh-keys
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: delete
description: 'Delete ssh key from server.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
sshKey_id:
name: sshKey_id
description: 'The ID of the sshKey.'
required: true
example: 4
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
sshKey_id: 4
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 204
content: 'null'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer PfchD4Zge386abadE5kV61v'
controller: null
method: null
route: null
custom: []

View File

@ -1,576 +0,0 @@
name: services
description: ''
endpoints:
-
httpMethods:
- GET
uri: 'api/projects/{project_id}/servers/{server_id}/services'
metadata:
groupName: services
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: list
description: 'Get all services.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"data":[{"id":null,"server_id":null,"type":null,"type_data":null,"name":null,"version":null,"unit":null,"status":null,"is_default":null,"created_at":null,"updated_at":null},{"id":null,"server_id":null,"type":null,"type_data":null,"name":null,"version":null,"unit":null,"status":null,"is_default":null,"created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"&laquo; Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next &raquo;","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer h6bDec51ak84ZVafgv3PE6d'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/projects/{project_id}/servers/{server_id}/services/{id}'
metadata:
groupName: services
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: show
description: 'Get a service by ID.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
id:
name: id
description: 'The ID of the service.'
required: true
example: 27
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
id: 27
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"id":null,"server_id":null,"type":null,"type_data":null,"name":null,"version":null,"unit":null,"status":null,"is_default":null,"created_at":null,"updated_at":null}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer da4V3kfgZ6a86PchevED5b1'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/projects/{project_id}/servers/{server_id}/services/{service_id}/start'
metadata:
groupName: services
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: start
description: 'Start service.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
service_id:
name: service_id
description: 'The ID of the service.'
required: true
example: 27
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
service_id: 27
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 204
content: 'null'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 86fdV5D6gv1E3ekaPZac4hb'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/projects/{project_id}/servers/{server_id}/services/{service_id}/stop'
metadata:
groupName: services
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: stop
description: 'Stop service.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
service_id:
name: service_id
description: 'The ID of the service.'
required: true
example: 27
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
service_id: 27
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 204
content: 'null'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer kPZ563E1Vfgh4cbDad8vae6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/projects/{project_id}/servers/{server_id}/services/{service_id}/restart'
metadata:
groupName: services
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: restart
description: 'Restart service.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
service_id:
name: service_id
description: 'The ID of the service.'
required: true
example: 27
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
service_id: 27
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 204
content: 'null'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer fd14PaDb58gchv3ZVeaEk66'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/projects/{project_id}/servers/{server_id}/services/{service_id}/enable'
metadata:
groupName: services
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: enable
description: 'Enable service.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
service_id:
name: service_id
description: 'The ID of the service.'
required: true
example: 27
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
service_id: 27
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 204
content: 'null'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer Dv1aVe6hZfkagdE356b4cP8'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/projects/{project_id}/servers/{server_id}/services/{service_id}/disable'
metadata:
groupName: services
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: disable
description: 'Disable service.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
service_id:
name: service_id
description: 'The ID of the service.'
required: true
example: 27
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
service_id: 27
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 204
content: 'null'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6bdDc4Eah3ZV18kf6Pveag5'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- DELETE
uri: 'api/projects/{project_id}/servers/{server_id}/services/{service_id}'
metadata:
groupName: services
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: delete
description: 'Delete service.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
service_id:
name: service_id
description: 'The ID of the service.'
required: true
example: 27
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
service_id: 27
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 204
content: 'null'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 36kf84v6bVhE5gdPDeZ1caa'
controller: null
method: null
route: null
custom: []

View File

@ -1,390 +0,0 @@
name: sites
description: ''
endpoints:
-
httpMethods:
- GET
uri: 'api/projects/{project_id}/servers/{server_id}/sites'
metadata:
groupName: sites
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: list
description: 'Get all sites.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"data":[{"id":null,"server_id":null,"source_control_id":null,"type":"laravel","type_data":null,"domain":"test.com","aliases":null,"web_directory":"\/","path":"\/home","php_version":"8.2","repository":null,"branch":"main","status":"ready","port":null,"progress":100,"created_at":null,"updated_at":null},{"id":null,"server_id":null,"source_control_id":null,"type":"laravel","type_data":null,"domain":"test.com","aliases":null,"web_directory":"\/","path":"\/home","php_version":"8.2","repository":null,"branch":"main","status":"ready","port":null,"progress":100,"created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"&laquo; Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next &raquo;","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer gaeE86fd1aZP53Vvc6Dhbk4'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/projects/{project_id}/servers/{server_id}/sites'
metadata:
groupName: sites
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: create
description: 'Create a new site.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
queryParameters: []
cleanQueryParameters: []
bodyParameters:
type:
name: type
description: ''
required: true
example: wordpress
type: string
enumValues:
- php
- php-blank
- phpmyadmin
- laravel
- wordpress
exampleWasSpecified: false
nullable: false
custom: []
domain:
name: domain
description: ''
required: true
example: quo
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
aliases:
name: aliases
description: ''
required: true
example:
- dolorum
type: 'string[]'
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
php_version:
name: php_version
description: 'One of the installed PHP Versions'
required: true
example: '7.4'
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
web_directory:
name: web_directory
description: 'Required for PHP and Laravel sites'
required: true
example: public
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
source_control:
name: source_control
description: 'Source control ID, Required for Sites which support source control'
required: true
example: explicabo
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
repository:
name: repository
description: 'Repository, Required for Sites which support source control'
required: true
example: organization/repository
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
branch:
name: branch
description: 'Branch, Required for Sites which support source control'
required: true
example: main
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
composer:
name: composer
description: 'Run composer if site supports composer'
required: true
example: true
type: boolean
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
version:
name: version
description: 'Version, if the site type requires a version like PHPMyAdmin'
required: true
example: 5.2.1
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanBodyParameters:
type: wordpress
domain: quo
aliases:
- dolorum
php_version: '7.4'
web_directory: public
source_control: explicabo
repository: organization/repository
branch: main
composer: true
version: 5.2.1
fileParameters: []
responses:
-
status: 200
content: '{"id":null,"server_id":null,"source_control_id":null,"type":"laravel","type_data":null,"domain":"test.com","aliases":null,"web_directory":"\/","path":"\/home","php_version":"8.2","repository":null,"branch":"main","status":"ready","port":null,"progress":100,"created_at":null,"updated_at":null}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer efDd36cab6vZEaV4hkP851g'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/projects/{project_id}/servers/{server_id}/sites/{id}'
metadata:
groupName: sites
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: show
description: 'Get a site by ID.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
id:
name: id
description: 'The ID of the site.'
required: true
example: 8
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
id: 8
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"id":null,"server_id":null,"source_control_id":null,"type":"laravel","type_data":null,"domain":"test.com","aliases":null,"web_directory":"\/","path":"\/home","php_version":"8.2","repository":null,"branch":"main","status":"ready","port":null,"progress":100,"created_at":null,"updated_at":null}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer bVkf841ava5gE6DPch36Zde'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- DELETE
uri: 'api/projects/{project_id}/servers/{server_id}/sites/{site_id}'
metadata:
groupName: sites
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: delete
description: 'Delete site.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
site_id:
name: site_id
description: 'The ID of the site.'
required: true
example: 8
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 3
site_id: 8
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 204
content: 'null'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer gfVZbEP5Ddah6k13ae6c8v4'
controller: null
method: null
route: null
custom: []

View File

@ -1,428 +0,0 @@
name: source-controls
description: ''
endpoints:
-
httpMethods:
- GET
uri: 'api/projects/{project_id}/source-controls'
metadata:
groupName: source-controls
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: list
description: ''
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"data":[{"id":5,"project_id":null,"global":true,"name":"Jaiden Kling","provider":"github","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"},{"id":6,"project_id":null,"global":true,"name":"Ms. Brianne Bosco","provider":"github","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"&laquo; Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next &raquo;","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer PfaEg1eZh66cd5V4v8bD3ak'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/projects/{project_id}/source-controls'
metadata:
groupName: source-controls
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: create
description: ''
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters:
provider:
name: provider
description: 'The provider'
required: true
example: bitbucket
type: string
enumValues:
- gitlab
- github
- bitbucket
exampleWasSpecified: false
nullable: false
custom: []
name:
name: name
description: 'The name of the storage provider.'
required: true
example: eos
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
token:
name: token
description: 'The token if provider requires api token'
required: true
example: et
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
url:
name: url
description: 'The URL if the provider is Gitlab and it is self-hosted'
required: true
example: 'https://lueilwitz.com/nostrum-et-porro-atque-sint.html'
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
username:
name: username
description: 'The username if the provider is Bitbucket'
required: true
example: consectetur
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
password:
name: password
description: 'The password if the provider is Bitbucket'
required: true
example: 'PL.P?{06\ECi0'
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanBodyParameters:
provider: bitbucket
name: eos
token: et
url: 'https://lueilwitz.com/nostrum-et-porro-atque-sint.html'
username: consectetur
password: 'PL.P?{06\ECi0'
fileParameters: []
responses:
-
status: 200
content: '{"id":5,"project_id":null,"global":true,"name":"Toby Parker","provider":"github","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer V5Zf3a1ve6d6kP4cbgha8DE'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/projects/{project_id}/source-controls/{sourceControl_id}'
metadata:
groupName: source-controls
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: show
description: ''
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
sourceControl_id:
name: sourceControl_id
description: 'The ID of the sourceControl.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
sourceControl_id: 3
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"id":5,"project_id":null,"global":true,"name":"Prof. Bartholome Graham IV","provider":"github","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer k1b5hac6veZ36P8gDV4fadE'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- PUT
uri: 'api/projects/{project_id}/source-controls/{sourceControl_id}'
metadata:
groupName: source-controls
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: update
description: ''
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
sourceControl_id:
name: sourceControl_id
description: 'The ID of the sourceControl.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
sourceControl_id: 3
queryParameters: []
cleanQueryParameters: []
bodyParameters:
name:
name: name
description: 'The name of the storage provider.'
required: true
example: quaerat
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
token:
name: token
description: 'The token if provider requires api token'
required: true
example: consectetur
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
url:
name: url
description: 'The URL if the provider is Gitlab and it is self-hosted'
required: true
example: 'http://www.hudson.biz/rerum-voluptatem-debitis-accusamus'
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
username:
name: username
description: 'The username if the provider is Bitbucket'
required: true
example: voluptatem
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
password:
name: password
description: 'The password if the provider is Bitbucket'
required: true
example: '\p/el>)3#~E?kI'
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
global:
name: global
description: 'Accessible in all projects'
required: true
example: false
type: string
enumValues:
- true
- false
exampleWasSpecified: false
nullable: false
custom: []
cleanBodyParameters:
name: quaerat
token: consectetur
url: 'http://www.hudson.biz/rerum-voluptatem-debitis-accusamus'
username: voluptatem
password: '\p/el>)3#~E?kI'
global: false
fileParameters: []
responses:
-
status: 200
content: '{"id":5,"project_id":null,"global":true,"name":"Cicero Smitham","provider":"github","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6dkE6h8a5eg3f14acVvbPDZ'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- DELETE
uri: 'api/projects/{project_id}/source-controls/{sourceControl_id}'
metadata:
groupName: source-controls
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: delete
description: ''
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
sourceControl_id:
name: sourceControl_id
description: 'The ID of the sourceControl.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
sourceControl_id: 3
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 204
content: 'null'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer fb6Zk4EP318eva5hDdcV6ga'
controller: null
method: null
route: null
custom: []

View File

@ -1,370 +0,0 @@
name: storage-providers
description: ''
endpoints:
-
httpMethods:
- GET
uri: 'api/projects/{project_id}/storage-providers'
metadata:
groupName: storage-providers
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: list
description: ''
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"data":[{"id":3,"project_id":null,"global":true,"name":"et","provider":"local","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"},{"id":4,"project_id":null,"global":true,"name":"sed","provider":"local","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"&laquo; Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next &raquo;","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 1dbV3vkh6EPD5g48cafeZ6a'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/projects/{project_id}/storage-providers'
metadata:
groupName: storage-providers
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: create
description: ''
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters:
provider:
name: provider
description: 'The provider (aws, linode, hetzner, digitalocean, vultr, ...)'
required: true
example: quod
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
name:
name: name
description: 'The name of the storage provider.'
required: true
example: commodi
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
token:
name: token
description: 'The token if provider requires api token'
required: true
example: ipsum
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
key:
name: key
description: 'The key if provider requires key'
required: true
example: ratione
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
secret:
name: secret
description: 'The secret if provider requires key'
required: true
example: iste
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanBodyParameters:
provider: quod
name: commodi
token: ipsum
key: ratione
secret: iste
fileParameters: []
responses:
-
status: 200
content: '{"id":3,"project_id":null,"global":true,"name":"est","provider":"dropbox","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer abehv36kP4D658VafgdZE1c'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/projects/{project_id}/storage-providers/{storageProvider_id}'
metadata:
groupName: storage-providers
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: show
description: ''
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
storageProvider_id:
name: storageProvider_id
description: 'The ID of the storageProvider.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
storageProvider_id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"id":3,"project_id":null,"global":true,"name":"officia","provider":"ftp","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer bda64P5c1gEDe8V3Z6vhkaf'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- PUT
uri: 'api/projects/{project_id}/storage-providers/{storageProvider_id}'
metadata:
groupName: storage-providers
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: update
description: ''
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
storageProvider_id:
name: storageProvider_id
description: 'The ID of the storageProvider.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
storageProvider_id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters:
name:
name: name
description: 'The name of the storage provider.'
required: true
example: iusto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
global:
name: global
description: 'Accessible in all projects'
required: true
example: true
type: string
enumValues:
- true
- false
exampleWasSpecified: false
nullable: false
custom: []
cleanBodyParameters:
name: iusto
global: true
fileParameters: []
responses:
-
status: 200
content: '{"id":3,"project_id":null,"global":true,"name":"rerum","provider":"ftp","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer aEP35hVakDdf814eZvg66cb'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- DELETE
uri: 'api/projects/{project_id}/storage-providers/{storageProvider_id}'
metadata:
groupName: storage-providers
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: delete
description: ''
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
storageProvider_id:
name: storageProvider_id
description: 'The ID of the storageProvider.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
storageProvider_id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 204
content: 'null'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer Dah3PgE5d64fcbe8a16VkvZ'
controller: null
method: null
route: null
custom: []

View File

@ -1,53 +0,0 @@
# To include an endpoint that isn't a part of your Laravel app (or belongs to a vendor package),
# you can define it in a custom.*.yaml file, like this one.
# Each custom file should contain an array of endpoints. Here's an example:
# See https://scribe.knuckles.wtf/laravel/documenting/custom-endpoints#extra-sorting-groups-in-custom-endpoint-files for more options
#- httpMethods:
# - POST
# uri: api/doSomething/{param}
# metadata:
# groupName: The group the endpoint belongs to. Can be a new group or an existing group.
# groupDescription: A description for the group. You don't need to set this for every endpoint; once is enough.
# subgroup: You can add a subgroup, too.
# title: Do something
# description: 'This endpoint allows you to do something.'
# authenticated: false
# headers:
# Content-Type: application/json
# Accept: application/json
# urlParameters:
# param:
# name: param
# description: A URL param for no reason.
# required: true
# example: 2
# type: integer
# queryParameters:
# speed:
# name: speed
# description: How fast the thing should be done. Can be `slow` or `fast`.
# required: false
# example: fast
# type: string
# bodyParameters:
# something:
# name: something
# description: The things we should do.
# required: true
# example:
# - string 1
# - string 2
# type: 'string[]'
# responses:
# - status: 200
# description: 'When the thing was done smoothly.'
# content: # Your response content can be an object, an array, a string or empty.
# {
# "hey": "ho ho ho"
# }
# responseFields:
# hey:
# name: hey
# description: Who knows?
# type: string # This is optional

View File

@ -1,13 +0,0 @@
# Introduction
VitoDeploy's API documentation.
<aside>
<strong>Base URL</strong>: <code>https://your-vito-url</code>
</aside>
This documentation aims to provide all the information you need to work with our API.
<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>

View File

@ -2,4 +2,4 @@ # Contributing
Please read the contribution guide on the website
https://vitodeploy.com/prologue/contribution-guide.html
https://vitodeploy.com/introduction/contribution-guide.html

View File

@ -1,21 +1,20 @@
<p align="center">
<img src="https://github.com/user-attachments/assets/57f77bd5-bd3f-4367-84c0-aff6ecd392b4" alt="VitoDeploy>
<img src="https://github.com/vitodeploy/vito/assets/61919774/8060fded-58e3-4d58-b58b-5b717b0718e9" alt="VitoDeploy>
<p align="center">
<a href="https://github.com/vitodeploy/vito/actions"><img alt="GitHub Workflow Status" src="https://github.com/vitodeploy/vito/workflows/tests/badge.svg"></a>
</p>
</p>
------
## About Vito
Vito is a self-hosted web application that helps you manage your servers and deploy your PHP applications into
production servers without a hassle.
Vito is a self-hosted web application that helps you manage your servers and deploy your PHP applications into production servers without a hassle.
## Quick Start
```sh
bash <(curl -Ls https://raw.githubusercontent.com/vitodeploy/vito/2.x/scripts/install.sh)
bash <(curl -Ls https://raw.githubusercontent.com/vitodeploy/vito/1.x/scripts/install.sh)
```
## Features
@ -29,17 +28,16 @@ ## Features
- Manages server's services
- Deploy your SSH Keys to the server
- Create and Manage cron jobs on the server
- API
## Useful Links
- [Documentation](https://vitodeploy.com)
- [Demo Website](https://demo.vitodeploy.com)
- [Install on Server](https://vitodeploy.com/getting-started/installation.html#install-on-vps)
- [Install via Docker](https://vitodeploy.com/getting-started/installation.html#install-via-docker)
- [Install on Server](https://vitodeploy.com/introduction/installation.html#install-on-vps-recommended)
- [Install via Docker](https://vitodeploy.com/introduction/installation.html#install-via-docker)
- [Roadmap](https://github.com/orgs/vitodeploy/projects/5)
- [Video Demo](https://youtu.be/AbmUOBDOc28)
- [Discord](https://discord.gg/uZeeHZZnm5)
- [Contribution](https://vitodeploy.com/prologue/contribution-guide.html)
- [Contribution](/CONTRIBUTING.md)
- [Security](/SECURITY.md)
## Credits
@ -49,10 +47,8 @@ ## Credits
- PHPUnit
- Tailwindcss
- Alpinejs
- Livewire
- HTMX
- Vite
- Prettier
- Postcss
- FilamentPHP
- Mobiledetect
- Spatie
- Flowbite

View File

@ -2,11 +2,10 @@ # Security Policy
## Supported Versions
| Version | New Features | Bug Fixes | Security Fixes |
|---------|--------------|-----------|----------------------|
| 0.x | ❌ | ❌ | ❌ |
| 1.x | ❌ | ❌ | ✅ (Until March 2025) |
| 2.x | ✅ | ✅ | ✅ |
| Version | Supported |
| ------- | ----------|
| 0.x | ❌ |
| 1.x | ✅ |
## Reporting a Vulnerability

View File

@ -6,11 +6,15 @@
use App\Models\CronJob;
use App\Models\Server;
use App\ValidationRules\CronRule;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\ValidationException;
class CreateCronJob
{
public function create(Server $server, array $input): CronJob
public function create(Server $server, array $input): void
{
$this->validate($input);
$cronJob = new CronJob([
'server_id' => $server->id,
'user' => $input['user'],
@ -23,13 +27,14 @@ public function create(Server $server, array $input): CronJob
$server->cron()->update($cronJob->user, CronJob::crontab($server, $cronJob->user));
$cronJob->status = CronjobStatus::READY;
$cronJob->save();
return $cronJob;
}
public static function rules(array $input): array
/**
* @throws ValidationException
*/
private function validate(array $input): void
{
$rules = [
Validator::make($input, [
'command' => [
'required',
],
@ -41,15 +46,15 @@ public static function rules(array $input): array
'required',
new CronRule(acceptCustom: true),
],
];
])->validate();
if (isset($input['frequency']) && $input['frequency'] == 'custom') {
$rules['custom'] = [
if ($input['frequency'] == 'custom') {
Validator::make($input, [
'custom' => [
'required',
new CronRule,
];
new CronRule(),
],
])->validate();
}
return $rules;
}
}

View File

@ -7,6 +7,7 @@
use App\Models\Backup;
use App\Models\Server;
use Illuminate\Auth\Access\AuthorizationException;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\Rule;
use Illuminate\Validation\ValidationException;
@ -16,15 +17,17 @@ class CreateBackup
* @throws AuthorizationException
* @throws ValidationException
*/
public function create(Server $server, array $input): Backup
public function create($type, Server $server, array $input): Backup
{
$this->validate($type, $server, $input);
$backup = new Backup([
'type' => 'database',
'type' => $type,
'server_id' => $server->id,
'database_id' => $input['database'] ?? null,
'storage_id' => $input['storage'],
'interval' => $input['interval'] == 'custom' ? $input['custom_interval'] : $input['interval'],
'keep_backups' => $input['keep'],
'database_id' => $input['backup_database'] ?? null,
'storage_id' => $input['backup_storage'],
'interval' => $input['backup_interval'] == 'custom' ? $input['backup_custom'] : $input['backup_interval'],
'keep_backups' => $input['backup_keep'],
'status' => BackupStatus::RUNNING,
]);
$backup->save();
@ -34,35 +37,45 @@ public function create(Server $server, array $input): Backup
return $backup;
}
public static function rules(Server $server, array $input): array
/**
* @throws ValidationException
*/
private function validate($type, Server $server, array $input): void
{
$rules = [
'storage' => [
'backup_storage' => [
'required',
Rule::exists('storage_providers', 'id'),
],
'keep' => [
'backup_keep' => [
'required',
'numeric',
'min:1',
],
'interval' => [
'backup_interval' => [
'required',
Rule::in(array_keys(config('core.cronjob_intervals'))),
Rule::in([
'0 * * * *',
'0 0 * * *',
'0 0 * * 0',
'0 0 1 * *',
'custom',
]),
],
'database' => [
];
if ($input['backup_interval'] == 'custom') {
$rules['backup_custom'] = [
'required',
];
}
if ($type === 'database') {
$rules['backup_database'] = [
'required',
Rule::exists('databases', 'id')
->where('server_id', $server->id)
->where('status', DatabaseStatus::READY),
],
];
if ($input['interval'] == 'custom') {
$rules['custom_interval'] = [
'required',
];
}
return $rules;
Validator::make($input, $rules)->validate();
}
}

View File

@ -5,36 +5,36 @@
use App\Enums\DatabaseStatus;
use App\Models\Database;
use App\Models\Server;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\Rule;
use Illuminate\Validation\ValidationException;
class CreateDatabase
{
/**
* @throws ValidationException
*/
public function create(Server $server, array $input): Database
{
$this->validate($server, $input);
$database = new Database([
'server_id' => $server->id,
'name' => $input['name'],
]);
/** @var \App\SSH\Services\Database\Database $databaseHandler */
/** @var \App\SSH\Services\Database\Database */
$databaseHandler = $server->database()->handler();
$databaseHandler->create($database->name);
$database->status = DatabaseStatus::READY;
$database->save();
if (isset($input['user']) && $input['user']) {
$databaseUser = app(CreateDatabaseUser::class)->create($server, $input, [$database->name]);
app(LinkUser::class)->link($databaseUser, ['databases' => [$database->name]]);
}
return $database;
}
/**
* @throws ValidationException
*/
public static function rules(Server $server, array $input): array
private function validate(Server $server, array $input): void
{
$rules = [
'name' => [
@ -57,7 +57,6 @@ public static function rules(Server $server, array $input): array
if (isset($input['remote']) && $input['remote']) {
$rules['host'] = 'required';
}
return $rules;
Validator::make($input, $rules)->validate();
}
}

View File

@ -5,7 +5,7 @@
use App\Enums\DatabaseUserStatus;
use App\Models\DatabaseUser;
use App\Models\Server;
use App\SSH\Services\Database\Database;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\Rule;
use Illuminate\Validation\ValidationException;
@ -16,16 +16,16 @@ class CreateDatabaseUser
*/
public function create(Server $server, array $input, array $links = []): DatabaseUser
{
$this->validate($server, $input);
$databaseUser = new DatabaseUser([
'server_id' => $server->id,
'username' => $input['username'],
'password' => $input['password'],
'host' => (isset($input['remote']) && $input['remote']) || isset($input['host']) ? $input['host'] : 'localhost',
'host' => isset($input['remote']) && $input['remote'] ? $input['host'] : 'localhost',
'databases' => $links,
]);
/** @var Database $databaseHandler */
$databaseHandler = $server->database()->handler();
$databaseHandler->createUser(
$server->database()->handler()->createUser(
$databaseUser->username,
$databaseUser->password,
$databaseUser->host
@ -43,7 +43,7 @@ public function create(Server $server, array $input, array $links = []): Databas
/**
* @throws ValidationException
*/
public static function rules(Server $server, array $input): array
private function validate(Server $server, array $input): void
{
$rules = [
'username' => [
@ -59,7 +59,6 @@ public static function rules(Server $server, array $input): array
if (isset($input['remote']) && $input['remote']) {
$rules['host'] = 'required';
}
return $rules;
Validator::make($input, $rules)->validate();
}
}

View File

@ -5,6 +5,7 @@
use App\Models\Database;
use App\Models\DatabaseUser;
use App\Models\Server;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\Rule;
use Illuminate\Validation\ValidationException;
@ -13,12 +14,14 @@ class LinkUser
/**
* @throws ValidationException
*/
public function link(DatabaseUser $databaseUser, array $input): DatabaseUser
public function link(DatabaseUser $databaseUser, array $input): void
{
if (! isset($input['databases']) || ! is_array($input['databases'])) {
$input['databases'] = [];
}
$this->validate($databaseUser->server, $input);
$dbs = Database::query()
->where('server_id', $databaseUser->server_id)
->whereIn('name', $input['databases'])
@ -43,19 +46,17 @@ public function link(DatabaseUser $databaseUser, array $input): DatabaseUser
);
$databaseUser->save();
$databaseUser->refresh();
return $databaseUser;
}
public static function rules(Server $server, array $input): array
private function validate(Server $server, array $input): void
{
return [
$rules = [
'databases.*' => [
'nullable',
'required',
Rule::exists('databases', 'name')->where('server_id', $server->id),
],
];
Validator::make($input, $rules)->validate();
}
}

View File

@ -5,11 +5,14 @@
use App\Enums\BackupFileStatus;
use App\Models\BackupFile;
use App\Models\Database;
use Illuminate\Support\Facades\Validator;
class RestoreBackup
{
public function restore(BackupFile $backupFile, array $input): void
{
$this->validate($input);
/** @var Database $database */
$database = Database::query()->findOrFail($input['database']);
$backupFile->status = BackupFileStatus::RESTORING;
@ -17,9 +20,7 @@ public function restore(BackupFile $backupFile, array $input): void
$backupFile->save();
dispatch(function () use ($backupFile, $database) {
/** @var \App\SSH\Services\Database\Database $databaseHandler */
$databaseHandler = $database->server->database()->handler();
$databaseHandler->restoreBackup($backupFile, $database->name);
$database->server->database()->handler()->restoreBackup($backupFile, $database->name);
$backupFile->status = BackupFileStatus::RESTORED;
$backupFile->restored_at = now();
$backupFile->save();
@ -29,13 +30,10 @@ public function restore(BackupFile $backupFile, array $input): void
})->onConnection('ssh');
}
public static function rules(): array
private function validate(array $input): void
{
return [
'database' => [
'required',
'exists:databases,id',
],
];
Validator::make($input, [
'database' => 'required|exists:databases,id',
])->validate();
}
}

View File

@ -3,10 +3,8 @@
namespace App\Actions\Database;
use App\Enums\BackupFileStatus;
use App\Enums\BackupStatus;
use App\Models\Backup;
use App\Models\BackupFile;
use App\SSH\Services\Database\Database;
use Illuminate\Support\Str;
class RunBackup
@ -20,20 +18,11 @@ public function run(Backup $backup): BackupFile
]);
$file->save();
dispatch(function () use ($file, $backup) {
/** @var Database $databaseHandler */
$databaseHandler = $file->backup->server->database()->handler();
$databaseHandler->runBackup($file);
dispatch(function () use ($file) {
$file->backup->server->database()->handler()->runBackup($file);
$file->status = BackupFileStatus::CREATED;
$file->save();
if ($backup->status !== BackupStatus::RUNNING) {
$backup->status = BackupStatus::RUNNING;
$backup->save();
}
})->catch(function () use ($file, $backup) {
$backup->status = BackupStatus::FAILED;
$backup->save();
})->catch(function () use ($file) {
$file->status = BackupFileStatus::FAILED;
$file->save();
})->onConnection('ssh');

View File

@ -5,13 +5,15 @@
use App\Enums\FirewallRuleStatus;
use App\Models\FirewallRule;
use App\Models\Server;
use App\SSH\Services\Firewall\Firewall;
use Illuminate\Validation\Rule;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\ValidationException;
class CreateRule
{
public function create(Server $server, array $input): FirewallRule
{
$this->validate($server, $input);
$rule = new FirewallRule([
'server_id' => $server->id,
'type' => $input['type'],
@ -21,9 +23,9 @@ public function create(Server $server, array $input): FirewallRule
'mask' => $input['mask'] ?? null,
]);
/** @var Firewall $firewallHandler */
$firewallHandler = $server->firewall()->handler();
$firewallHandler->addRule(
$server->firewall()
->handler()
->addRule(
$rule->type,
$rule->getRealProtocol(),
$rule->port,
@ -37,16 +39,19 @@ public function create(Server $server, array $input): FirewallRule
return $rule;
}
public static function rules(): array
/**
* @throws ValidationException
*/
private function validate(Server $server, array $input): void
{
return [
Validator::make($input, [
'type' => [
'required',
'in:allow,deny',
],
'protocol' => [
'required',
Rule::in(array_keys(config('core.firewall_protocols_port'))),
'in:'.implode(',', array_keys(config('core.firewall_protocols_port'))),
],
'port' => [
'required',
@ -59,9 +64,8 @@ public static function rules(): array
'ip',
],
'mask' => [
'required',
'numeric',
],
];
])->validate();
}
}

View File

@ -5,13 +5,13 @@
use App\Models\Server;
use Carbon\Carbon;
use Illuminate\Contracts\Database\Query\Expression;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\Rule;
class GetMetrics
{
public function filter(Server $server, array $input): Collection
public function filter(Server $server, array $input): array
{
if (isset($input['from']) && isset($input['to']) && $input['from'] === $input['to']) {
$input['from'] = Carbon::parse($input['from'])->format('Y-m-d').' 00:00:00';
@ -24,6 +24,8 @@ public function filter(Server $server, array $input): Collection
$input = array_merge($defaultInput, $input);
$this->validate($input);
return $this->metrics(
server: $server,
fromDate: $this->getFromDate($input),
@ -37,8 +39,8 @@ private function metrics(
Carbon $fromDate,
Carbon $toDate,
?Expression $interval = null
): Collection {
return DB::table('metrics')
): array {
$metrics = DB::table('metrics')
->where('server_id', $server->id)
->whereBetween('created_at', [$fromDate->format('Y-m-d H:i:s'), $toDate->format('Y-m-d H:i:s')])
->select(
@ -62,6 +64,10 @@ private function metrics(
return $item;
});
return [
'metrics' => $metrics,
];
}
private function getFromDate(array $input): Carbon
@ -104,12 +110,14 @@ private function getInterval(array $input): Expression
return DB::raw("strftime('%Y-%m-%d %H:00:00', created_at) as date_interval");
}
if ($periodInHours > 24) {
return DB::raw("strftime('%Y-%m-%d 00:00:00', created_at) as date_interval");
}
}
public static function rules(array $input): array
private function validate(array $input): void
{
$rules = [
Validator::make($input, [
'period' => [
'required',
Rule::in([
@ -122,13 +130,21 @@ public static function rules(array $input): array
'custom',
]),
],
];
])->validate();
if (isset($input['period']) && $input['period'] === 'custom') {
$rules['from'] = ['required', 'date', 'before:to'];
$rules['to'] = ['required', 'date', 'after:from'];
if ($input['period'] === 'custom') {
Validator::make($input, [
'from' => [
'required',
'date',
'before:to',
],
'to' => [
'required',
'date',
'after:from',
],
])->validate();
}
return $rules;
}
}

View File

@ -3,11 +3,15 @@
namespace App\Actions\Monitoring;
use App\Models\Server;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\Rule;
class UpdateMetricSettings
{
public function update(Server $server, array $input): void
{
$this->validate($input);
$service = $server->monitoring();
$data = $service->handler()->data();
@ -16,14 +20,13 @@ public function update(Server $server, array $input): void
$service->save();
}
public static function rules(): array
private function validate(array $input): void
{
return [
Validator::make($input, [
'data_retention' => [
'required',
'numeric',
'min:1',
Rule::in(config('core.metrics_data_retention')),
],
];
])->validate();
}
}

View File

@ -4,28 +4,27 @@
use App\Models\NotificationChannel;
use App\Models\User;
use Exception;
use Illuminate\Validation\Rule;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\ValidationException;
class AddChannel
{
/**
* @throws ValidationException
* @throws Exception
*/
public function add(User $user, array $input): void
{
$this->validate($input);
$channel = new NotificationChannel([
'user_id' => $user->id,
'provider' => $input['provider'],
'label' => $input['label'],
'project_id' => isset($input['global']) && $input['global'] ? null : $user->current_project_id,
]);
$this->validateType($channel, $input);
$channel->data = $channel->provider()->createData($input);
$channel->save();
try {
if (! $channel->provider()->connect()) {
$channel->delete();
@ -39,39 +38,28 @@ public function add(User $user, array $input): void
'provider' => __('Could not connect'),
]);
}
} catch (Exception $e) {
$channel->delete();
throw $e;
}
$channel->connected = true;
$channel->save();
}
public static function rules(array $input): array
/**
* @throws ValidationException
*/
protected function validate(array $input): void
{
$rules = [
'provider' => [
'required',
Rule::in(config('core.notification_channels_providers')),
],
Validator::make($input, [
'provider' => 'required|in:'.implode(',', config('core.notification_channels_providers')),
'label' => 'required',
];
return array_merge($rules, static::providerRules($input));
])->validate();
}
private static function providerRules(array $input): array
/**
* @throws ValidationException
*/
protected function validateType(NotificationChannel $channel, array $input): void
{
if (! isset($input['provider'])) {
return [];
}
$notificationChannel = new NotificationChannel([
'provider' => $input['provider'],
]);
return $notificationChannel->provider()->createRules($input);
Validator::make($input, $channel->provider()->createRules($input))
->validate();
}
}

View File

@ -4,22 +4,31 @@
use App\Models\NotificationChannel;
use App\Models\User;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\ValidationException;
class EditChannel
{
public function edit(NotificationChannel $notificationChannel, User $user, array $input): void
{
$notificationChannel->fill([
'label' => $input['label'],
'project_id' => isset($input['global']) && $input['global'] ? null : $user->current_project_id,
]);
$this->validate($input);
$notificationChannel->label = $input['label'];
$notificationChannel->project_id = isset($input['global']) && $input['global'] ? null : $user->current_project_id;
$notificationChannel->save();
}
public static function rules(array $input): array
/**
* @throws ValidationException
*/
private function validate(array $input): void
{
return [
'label' => 'required',
$rules = [
'label' => [
'required',
],
];
Validator::make($input, $rules)->validate();
}
}

View File

@ -2,16 +2,19 @@
namespace App\Actions\PHP;
use App\Enums\PHP;
use App\Enums\ServiceStatus;
use App\Models\Server;
use App\Models\Service;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\Rule;
use Illuminate\Validation\ValidationException;
class InstallNewPHP
{
public function install(Server $server, array $input): void
{
$this->validate($server, $input);
$php = new Service([
'server_id' => $server->id,
'type' => 'php',
@ -35,14 +38,22 @@ public function install(Server $server, array $input): void
})->onConnection('ssh');
}
public static function rules(Server $server): array
/**
* @throws ValidationException
*/
private function validate(Server $server, array $input): void
{
return [
Validator::make($input, [
'version' => [
'required',
Rule::in(config('core.php_versions')),
Rule::notIn(array_merge($server->installedPHPVersions(), [PHP::NONE])),
],
];
])->validate();
if (in_array($input['version'], $server->installedPHPVersions())) {
throw ValidationException::withMessages(
['version' => __('This version is already installed')]
);
}
}
}

View File

@ -2,10 +2,10 @@
namespace App\Actions\PHP;
use App\Exceptions\SSHCommandError;
use App\Models\Server;
use App\Models\Service;
use App\SSH\Services\PHP\PHP;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\Rule;
use Illuminate\Validation\ValidationException;
@ -13,26 +13,17 @@ class InstallPHPExtension
{
public function install(Server $server, array $input): Service
{
$this->validate($server, $input);
/** @var Service $service */
$service = $server->php($input['version']);
if (in_array($input['extension'], $service->type_data['extensions'] ?? [])) {
throw ValidationException::withMessages([
'extension' => 'The extension is already installed.',
]);
}
$typeData = $service->type_data;
$typeData['extensions'] = $typeData['extensions'] ?? [];
$typeData['extensions'][] = $input['extension'];
$service->type_data = $typeData;
$service->save();
dispatch(
/**
* @throws SSHCommandError
*/
function () use ($service, $input) {
dispatch(function () use ($service, $input) {
/** @var PHP $handler */
$handler = $service->handler();
$handler->installExtension($input['extension']);
@ -47,19 +38,29 @@ function () use ($service, $input) {
return $service;
}
public static function rules(Server $server): array
/**
* @throws ValidationException
*/
private function validate(Server $server, array $input): void
{
return [
Validator::make($input, [
'extension' => [
'required',
Rule::in(config('core.php_extensions')),
'in:'.implode(',', config('core.php_extensions')),
],
'version' => [
'required',
Rule::exists('services', 'version')
->where('server_id', $server->id)
->where('type', 'php'),
Rule::in($server->installedPHPVersions()),
],
];
])->validate();
/** @var Service $service */
$service = $server->php($input['version']);
if (in_array($input['extension'], $service->type_data['extensions'])) {
throw ValidationException::withMessages(
['extension' => __('This extension already installed')]
)->errorBag('installPHPExtension');
}
}
}

View File

@ -6,6 +6,7 @@
use App\Models\Server;
use Illuminate\Filesystem\FilesystemAdapter;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\Str;
use Illuminate\Validation\Rule;
use Illuminate\Validation\ValidationException;
@ -18,6 +19,8 @@ class UpdatePHPIni
*/
public function update(Server $server, array $input): void
{
$this->validate($server, $input);
$service = $server->php($input['version']);
$tmpName = Str::random(10).strtotime('now');
@ -48,23 +51,24 @@ private function deleteTempFile(string $name): void
}
}
public static function rules(Server $server): array
public function validate(Server $server, array $input): void
{
return [
Validator::make($input, [
'ini' => [
'required',
'string',
],
'version' => [
'required',
Rule::exists('services', 'version')
->where('server_id', $server->id)
->where('type', 'php'),
],
'version' => 'required|string',
'type' => [
'required',
Rule::in([PHPIniType::CLI, PHPIniType::FPM]),
],
];
])->validate();
if (! in_array($input['version'], $server->installedPHPVersions())) {
throw ValidationException::withMessages(
['version' => __('This version is not installed')]
);
}
}
}

View File

@ -1,33 +0,0 @@
<?php
namespace App\Actions\Projects;
use App\Models\Project;
use App\Models\User;
use Illuminate\Database\Query\Builder;
use Illuminate\Validation\Rule;
class AddUser
{
public function add(Project $project, array $input): void
{
/** @var User $user */
$user = User::query()->findOrFail($input['user']);
$project->users()->detach($user);
$project->users()->attach($user);
}
public static function rules(Project $project): array
{
return [
'user' => [
'required',
Rule::exists('users', 'id'),
Rule::unique('user_project', 'user_id')->where(function (Builder $query) use ($project) {
$query->where('project_id', $project->id);
}),
],
];
}
}

View File

@ -27,21 +27,15 @@ public function create(User $user, array $input): Project
return $project;
}
public static function rules(): array
private function validate(array $input): void
{
return [
Validator::make($input, [
'name' => [
'required',
'string',
'max:255',
'unique:projects,name',
'lowercase:projects,name',
],
];
}
private function validate(array $input): void
{
Validator::make($input, self::rules())->validate();
])->validate();
}
}

View File

@ -23,21 +23,15 @@ public function update(Project $project, array $input): Project
return $project;
}
public static function rules(Project $project): array
private function validate(Project $project, array $input): void
{
return [
Validator::make($input, [
'name' => [
'required',
'string',
'max:255',
Rule::unique('projects', 'name')->ignore($project->id),
'lowercase:projects,name',
Rule::unique('projects')->where('user_id', $project->user_id)->ignore($project->id),
],
];
}
private function validate(Project $project, array $input): void
{
Validator::make($input, self::rules($project))->validate();
])->validate();
}
}

View File

@ -6,7 +6,7 @@
use App\Models\Queue;
use App\Models\Server;
use App\Models\Site;
use Illuminate\Validation\Rule;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\ValidationException;
class CreateQueue
@ -16,13 +16,15 @@ class CreateQueue
*/
public function create(mixed $queueable, array $input): void
{
$this->validate($input);
$queue = new Queue([
'server_id' => $queueable instanceof Server ? $queueable->id : $queueable->server_id,
'site_id' => $queueable instanceof Site ? $queueable->id : null,
'command' => $input['command'],
'user' => $input['user'],
'auto_start' => $input['auto_start'] ? 1 : 0,
'auto_restart' => $input['auto_restart'] ? 1 : 0,
'auto_start' => $input['auto_start'],
'auto_restart' => $input['auto_restart'],
'numprocs' => $input['numprocs'],
'status' => QueueStatus::CREATING,
]);
@ -46,18 +48,26 @@ public function create(mixed $queueable, array $input): void
})->onConnection('ssh');
}
public static function rules(Server $server): array
/**
* @throws ValidationException
*/
protected function validate(array $input): void
{
return [
$rules = [
'command' => [
'required',
],
'user' => [
'required',
Rule::in([
'root',
$server->ssh_user,
]),
'in:root,'.config('core.ssh_user'),
],
'auto_start' => [
'required',
'in:0,1',
],
'auto_restart' => [
'required',
'in:0,1',
],
'numprocs' => [
'required',
@ -65,5 +75,7 @@ public static function rules(Server $server): array
'min:1',
],
];
Validator::make($input, $rules)->validate();
}
}

View File

@ -3,15 +3,12 @@
namespace App\Actions\Queue;
use App\Models\Queue;
use App\SSH\Services\ProcessManager\ProcessManager;
class DeleteQueue
{
public function delete(Queue $queue): void
{
/** @var ProcessManager $processManager */
$processManager = $queue->server->processManager()->handler();
$processManager->delete($queue->id, $queue->site_id);
$queue->server->processManager()->handler()->delete($queue->id, $queue->site_id);
$queue->delete();
}
}

View File

@ -1,72 +0,0 @@
<?php
namespace App\Actions\Queue;
use App\Enums\QueueStatus;
use App\Models\Queue;
use App\Models\Server;
use App\SSH\Services\ProcessManager\ProcessManager;
use Illuminate\Validation\Rule;
use Illuminate\Validation\ValidationException;
class EditQueue
{
/**
* @throws ValidationException
*/
public function edit(Queue $queue, array $input): void
{
$queue->fill([
'command' => $input['command'],
'user' => $input['user'],
'auto_start' => $input['auto_start'] ? 1 : 0,
'auto_restart' => $input['auto_restart'] ? 1 : 0,
'numprocs' => $input['numprocs'],
'status' => QueueStatus::RESTARTING,
]);
$queue->save();
dispatch(function () use ($queue) {
/** @var ProcessManager $processManager */
$processManager = $queue->server->processManager()->handler();
$processManager->delete($queue->id, $queue->site_id);
$processManager->create(
$queue->id,
$queue->command,
$queue->user,
$queue->auto_start,
$queue->auto_restart,
$queue->numprocs,
$queue->getLogFile(),
$queue->site_id
);
$queue->status = QueueStatus::RUNNING;
$queue->save();
})->catch(function () use ($queue) {
$queue->status = QueueStatus::FAILED;
$queue->save();
})->onConnection('ssh');
}
public static function rules(Server $server): array
{
return [
'command' => [
'required',
],
'user' => [
'required',
Rule::in([
'root',
$server->ssh_user,
]),
],
'numprocs' => [
'required',
'numeric',
'min:1',
],
];
}
}

View File

@ -4,10 +4,10 @@
use App\Enums\SslStatus;
use App\Enums\SslType;
use App\Models\ServerLog;
use App\Models\Site;
use App\Models\Ssl;
use App\SSH\Services\Webserver\Webserver;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\Rule;
use Illuminate\Validation\ValidationException;
@ -18,10 +18,7 @@ class CreateSSL
*/
public function create(Site $site, array $input): void
{
$site->ssls()
->where('type', $input['type'])
->where('status', SslStatus::FAILED)
->delete();
$this->validate($input);
$ssl = new Ssl([
'site_id' => $site->id,
@ -35,7 +32,6 @@ public function create(Site $site, array $input): void
if (isset($input['aliases']) && $input['aliases']) {
$ssl->domains = array_merge($ssl->domains, $site->aliases);
}
$ssl->log_id = ServerLog::log($site->server, 'create-ssl', '', $site)->id;
$ssl->save();
dispatch(function () use ($site, $ssl) {
@ -51,7 +47,10 @@ public function create(Site $site, array $input): void
})->onConnection('ssh');
}
public static function rules(array $input): array
/**
* @throws ValidationException
*/
protected function validate(array $input): void
{
$rules = [
'type' => [
@ -62,13 +61,9 @@ public static function rules(array $input): array
if (isset($input['type']) && $input['type'] == SslType::CUSTOM) {
$rules['certificate'] = 'required';
$rules['private'] = 'required';
$rules['expires_at'] = [
'required',
'date_format:Y-m-d',
'after_or_equal:'.now(),
];
$rules['expires_at'] = 'required|date_format:Y-m-d|after_or_equal:'.now();
}
return $rules;
Validator::make($input, $rules)->validate();
}
}

View File

@ -3,15 +3,12 @@
namespace App\Actions\SSL;
use App\Models\Ssl;
use App\SSH\Services\Webserver\Webserver;
class DeleteSSL
{
public function delete(Ssl $ssl): void
{
/** @var Webserver $webserver */
$webserver = $ssl->site->server->webserver()->handler();
$webserver->removeSSL($ssl);
$ssl->site->server->webserver()->handler()->removeSSL($ssl);
$ssl->delete();
}
}

View File

@ -4,27 +4,29 @@
use App\Models\Script;
use App\Models\User;
use Illuminate\Support\Facades\Validator;
class CreateScript
{
public function create(User $user, array $input): Script
{
$this->validate($input);
$script = new Script([
'user_id' => $user->id,
'name' => $input['name'],
'content' => $input['content'],
'project_id' => isset($input['global']) && $input['global'] ? null : $user->current_project_id,
]);
$script->save();
return $script;
}
public static function rules(): array
private function validate(array $input): void
{
return [
Validator::make($input, [
'name' => ['required', 'string', 'max:255'],
'content' => ['required', 'string'],
];
])->validate();
}
}

View File

@ -3,26 +3,26 @@
namespace App\Actions\Script;
use App\Models\Script;
use App\Models\User;
use Illuminate\Support\Facades\Validator;
class EditScript
{
public function edit(Script $script, User $user, array $input): Script
public function edit(Script $script, array $input): Script
{
$this->validate($input);
$script->name = $input['name'];
$script->content = $input['content'];
$script->project_id = isset($input['global']) && $input['global'] ? null : $user->current_project_id;
$script->save();
return $script;
}
public static function rules(): array
private function validate(array $input): void
{
return [
Validator::make($input, [
'name' => ['required', 'string', 'max:255'],
'content' => ['required', 'string'],
];
])->validate();
}
}

View File

@ -7,28 +7,30 @@
use App\Models\ScriptExecution;
use App\Models\Server;
use App\Models\ServerLog;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\Rule;
class ExecuteScript
{
public function execute(Script $script, array $input): ScriptExecution
public function execute(Script $script, Server $server, array $input): ScriptExecution
{
$this->validate($server, $input);
$execution = new ScriptExecution([
'script_id' => $script->id,
'server_id' => $input['server'],
'user' => $input['user'],
'variables' => $input['variables'] ?? [],
'status' => ScriptExecutionStatus::EXECUTING,
]);
$execution->save();
dispatch(function () use ($execution, $script) {
dispatch(function () use ($execution, $server, $script) {
$content = $execution->getContent();
$log = ServerLog::make($execution->server, 'script-'.$script->id.'-'.strtotime('now'));
$log = ServerLog::make($server, 'script-'.$script->id.'-'.strtotime('now'));
$log->save();
$execution->server_log_id = $log->id;
$execution->save();
$execution->server->os()->runScript('~/', $content, $log, $execution->user);
$server->os()->runScript('~/', $content, $log, $execution->user);
$execution->status = ScriptExecutionStatus::COMPLETED;
$execution->save();
})->catch(function () use ($execution) {
@ -39,23 +41,14 @@ public function execute(Script $script, array $input): ScriptExecution
return $execution;
}
public static function rules(array $input): array
private function validate(Server $server, array $input): void
{
if (isset($input['server'])) {
/** @var ?Server $server */
$server = Server::query()->find($input['server']);
}
return [
'server' => [
'required',
Rule::exists('servers', 'id'),
],
Validator::make($input, [
'user' => [
'required',
Rule::in([
'root',
isset($server) ? $server?->ssh_user : null,
$server->ssh_user,
]),
],
'variables' => 'array',
@ -64,6 +57,6 @@ public static function rules(array $input): array
'string',
'max:255',
],
];
])->validate();
}
}

View File

@ -5,18 +5,18 @@
use App\Enums\FirewallRuleStatus;
use App\Enums\ServerProvider;
use App\Enums\ServerStatus;
use App\Enums\ServerType;
use App\Exceptions\ServerProviderError;
use App\Facades\Notifier;
use App\Models\Project;
use App\Models\Server;
use App\Models\User;
use App\Notifications\ServerInstallationFailed;
use App\Notifications\ServerInstallationSucceed;
use App\ValidationRules\RestrictedIPAddressesRule;
use Exception;
use Illuminate\Database\Query\Builder;
use Illuminate\Support\Facades\Bus;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\Str;
use Illuminate\Validation\Rule;
use Illuminate\Validation\ValidationException;
@ -24,17 +24,22 @@
class CreateServer
{
public function create(User $creator, Project $project, array $input): Server
/**
* @throws Throwable
*/
public function create(User $creator, array $input): Server
{
$this->validateInputs($input);
$server = new Server([
'project_id' => $project->id,
'project_id' => $creator->currentProject->id,
'user_id' => $creator->id,
'name' => $input['name'],
'ssh_user' => config('core.server_providers_default_user')[$input['provider']][$input['os']],
'ip' => $input['ip'] ?? '',
'port' => $input['port'] ?? 22,
'os' => $input['os'],
'type' => ServerType::REGULAR,
'type' => $input['type'],
'provider' => $input['provider'],
'authentication' => [
'user' => config('core.ssh_user'),
@ -45,13 +50,18 @@ public function create(User $creator, Project $project, array $input): Server
'progress_step' => 'Initializing',
]);
DB::beginTransaction();
try {
if ($server->provider != 'custom') {
$server->provider_id = $input['server_provider'];
}
// validate type
$this->validateType($server, $input);
$server->type_data = $server->type()->data($input);
// validate provider
$this->validateProvider($server, $input);
$server->provider_data = $server->provider()->data($input);
// save
@ -69,14 +79,19 @@ public function create(User $creator, Project $project, array $input): Server
// install server
$this->install($server);
DB::commit();
return $server;
} catch (Exception $e) {
$server->delete();
$server->provider()->delete();
DB::rollBack();
if ($e instanceof ServerProviderError) {
throw ValidationException::withMessages([
'provider' => $e->getMessage(),
'provider' => __('Provider Error: ').$e->getMessage(),
]);
}
throw $e;
}
}
private function install(Server $server): void
@ -111,85 +126,62 @@ function () use ($server) {
$bus->onConnection('ssh')->dispatch();
}
public static function rules(Project $project, array $input): array
/**
* @throws ValidationException
*/
private function validateInputs(array $input): void
{
$rules = [
'provider' => [
'provider' => 'required|in:'.implode(',', config('core.server_providers')),
'name' => 'required',
'os' => 'required|in:'.implode(',', config('core.operating_systems')),
'type' => [
'required',
Rule::in(config('core.server_providers')),
Rule::in(config('core.server_types')),
],
'name' => [
];
Validator::make($input, $rules)->validate();
if ($input['provider'] != 'custom') {
$rules['server_provider'] = 'required|exists:server_providers,id,user_id,'.auth()->user()->id;
}
if ($input['provider'] == 'custom') {
$rules['ip'] = [
'required',
],
'os' => [
'required',
Rule::in(config('core.operating_systems')),
],
'server_provider' => [
Rule::when(function () use ($input) {
return isset($input['provider']) && $input['provider'] != ServerProvider::CUSTOM;
}, [
'required',
Rule::exists('server_providers', 'id')->where(function (Builder $query) use ($project) {
$query->where('project_id', $project->id)
->orWhereNull('project_id');
}),
]),
],
'ip' => [
Rule::when(function () use ($input) {
return isset($input['provider']) && $input['provider'] == ServerProvider::CUSTOM;
}, [
'required',
new RestrictedIPAddressesRule,
]),
],
'port' => [
Rule::when(function () use ($input) {
return isset($input['provider']) && $input['provider'] == ServerProvider::CUSTOM;
}, [
new RestrictedIPAddressesRule(),
];
$rules['port'] = [
'required',
'numeric',
'min:1',
'max:65535',
]),
],
];
return array_merge($rules, self::typeRules($input), self::providerRules($input));
}
private static function typeRules(array $input): array
Validator::make($input, $rules)->validate();
}
/**
* @throws ValidationException
*/
private function validateType(Server $server, array $input): void
{
if (! isset($input['type']) || ! in_array($input['type'], config('core.server_types'))) {
return [];
Validator::make($input, $server->type()->createRules($input))
->validate();
}
$server = new Server(['type' => $input['type']]);
return $server->type()->createRules($input);
}
private static function providerRules(array $input): array
/**
* @throws ValidationException
*/
private function validateProvider(Server $server, array $input): void
{
if (
! isset($input['provider']) ||
! isset($input['server_provider']) ||
! in_array($input['provider'], config('core.server_providers')) ||
$input['provider'] == ServerProvider::CUSTOM
) {
return [];
Validator::make($input, $server->provider()->createRules($input))
->validate();
}
$server = new Server([
'provider' => $input['provider'],
'provider_id' => $input['server_provider'],
]);
return $server->provider()->createRules($input);
}
public function createFirewallRules(Server $server): void
private function createFirewallRules(Server $server): void
{
$server->firewallRules()->createMany([
[

View File

@ -3,6 +3,7 @@
namespace App\Actions\Server;
use App\Models\Server;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\ValidationException;
class CreateServerLog
@ -12,6 +13,8 @@ class CreateServerLog
*/
public function create(Server $server, array $input): void
{
$this->validate($input);
$server->logs()->create([
'is_remote' => true,
'name' => $input['path'],
@ -20,10 +23,13 @@ public function create(Server $server, array $input): void
]);
}
public static function rules(): array
/**
* @throws ValidationException
*/
protected function validate(array $input): void
{
return [
Validator::make($input, [
'path' => 'required',
];
])->validate();
}
}

View File

@ -4,7 +4,7 @@
use App\Models\Server;
use App\ValidationRules\RestrictedIPAddressesRule;
use Illuminate\Validation\Rule;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\ValidationException;
class EditServer
@ -14,6 +14,8 @@ class EditServer
*/
public function edit(Server $server, array $input): Server
{
$this->validate($input);
$checkConnection = false;
if (isset($input['name'])) {
$server->name = $input['name'];
@ -39,24 +41,15 @@ public function edit(Server $server, array $input): Server
return $server;
}
public static function rules(Server $server): array
/**
* @throws ValidationException
*/
protected function validate(array $input): void
{
return [
'name' => [
'required',
'max:255',
Rule::unique('servers')->where('project_id', $server->project_id)->ignore($server->id),
],
Validator::make($input, [
'ip' => [
'string',
new RestrictedIPAddressesRule,
Rule::unique('servers')->where('project_id', $server->project_id)->ignore($server->id),
new RestrictedIPAddressesRule(),
],
'port' => [
'integer',
'min:1',
'max:65535',
],
];
])->validateWithBag('editServer');
}
}

View File

@ -2,11 +2,11 @@
namespace App\Actions\ServerProvider;
use App\Models\Project;
use App\Models\ServerProvider;
use App\Models\User;
use App\ServerProviders\ServerProvider as ServerProviderContract;
use Exception;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\Rule;
use Illuminate\Validation\ValidationException;
@ -15,9 +15,13 @@ class CreateServerProvider
/**
* @throws ValidationException
*/
public function create(User $user, Project $project, array $input): ServerProvider
public function create(User $user, array $input): ServerProvider
{
$provider = static::getProvider($input['provider']);
$this->validateInput($input);
$provider = $this->getProvider($input['provider']);
$this->validateProvider($provider, $input);
try {
$provider->connect($input);
@ -29,27 +33,30 @@ public function create(User $user, Project $project, array $input): ServerProvid
]);
}
$serverProvider = new ServerProvider;
$serverProvider = new ServerProvider();
$serverProvider->user_id = $user->id;
$serverProvider->profile = $input['name'];
$serverProvider->provider = $input['provider'];
$serverProvider->credentials = $provider->credentialData($input);
$serverProvider->project_id = isset($input['global']) && $input['global'] ? null : $project->id;
$serverProvider->project_id = isset($input['global']) && $input['global'] ? null : $user->current_project_id;
$serverProvider->save();
return $serverProvider;
}
private static function getProvider($name): ServerProviderContract
private function getProvider($name): ServerProviderContract
{
$providerClass = config('core.server_providers_class.'.$name);
return new $providerClass;
return new $providerClass();
}
public static function rules(array $input): array
/**
* @throws ValidationException
*/
private function validateInput(array $input): void
{
$rules = [
Validator::make($input, [
'name' => [
'required',
],
@ -58,17 +65,14 @@ public static function rules(array $input): array
Rule::in(config('core.server_providers')),
Rule::notIn('custom'),
],
];
return array_merge($rules, static::providerRules($input));
])->validate();
}
private static function providerRules(array $input): array
/**
* @throws ValidationException
*/
private function validateProvider(ServerProviderContract $provider, array $input): void
{
if (! isset($input['provider'])) {
return [];
}
return static::getProvider($input['provider'])->credentialValidationRules($input);
Validator::make($input, $provider->credentialValidationRules($input))->validate();
}
}

View File

@ -3,16 +3,17 @@
namespace App\Actions\ServerProvider;
use App\Models\ServerProvider;
use Illuminate\Validation\ValidationException;
use Exception;
class DeleteServerProvider
{
/**
* @throws Exception
*/
public function delete(ServerProvider $serverProvider): void
{
if ($serverProvider->servers()->exists()) {
throw ValidationException::withMessages([
'provider' => 'This server provider is being used by a server.',
]);
throw new Exception('This server provider is being used by a server.');
}
$serverProvider->delete();

View File

@ -2,27 +2,33 @@
namespace App\Actions\ServerProvider;
use App\Models\Project;
use App\Models\ServerProvider;
use App\Models\User;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\ValidationException;
class EditServerProvider
{
public function edit(ServerProvider $serverProvider, Project $project, array $input): ServerProvider
public function edit(ServerProvider $serverProvider, User $user, array $input): void
{
$this->validate($input);
$serverProvider->profile = $input['name'];
$serverProvider->project_id = isset($input['global']) && $input['global'] ? null : $project->id;
$serverProvider->project_id = isset($input['global']) && $input['global'] ? null : $user->current_project_id;
$serverProvider->save();
return $serverProvider;
}
public static function rules(): array
/**
* @throws ValidationException
*/
private function validate(array $input): void
{
return [
$rules = [
'name' => [
'required',
],
];
Validator::make($input, $rules)->validate();
}
}

View File

@ -12,7 +12,7 @@ class Install
{
public function install(Server $server, array $input): Service
{
$input['type'] = config('core.service_types')[$input['name']];
$this->validate($server, $input);
$service = new Service([
'server_id' => $server->id,
@ -40,21 +40,18 @@ public function install(Server $server, array $input): Service
return $service;
}
public static function rules(array $input): array
private function validate(Server $server, array $input): void
{
$rules = [
Validator::make($input, [
'type' => [
'required',
Rule::in(config('core.service_types')),
],
'name' => [
'required',
Rule::in(array_keys(config('core.service_types'))),
],
'version' => [
'required',
],
];
if (isset($input['name'])) {
$rules['version'][] = Rule::in(config("core.service_versions.{$input['name']}"));
}
return $rules;
'version' => 'required',
])->validate();
}
}

View File

@ -8,9 +8,6 @@
class Uninstall
{
/*
* @TODO: Implement the uninstaller for all service handlers
*/
public function uninstall(Service $service): void
{
Validator::make([

View File

@ -14,13 +14,19 @@
use App\ValidationRules\DomainRule;
use Exception;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\Rule;
use Illuminate\Validation\ValidationException;
class CreateSite
{
/**
* @throws SourceControlIsNotConnected
*/
public function create(Server $server, array $input): Site
{
$this->validateInputs($server, $input);
DB::beginTransaction();
try {
$site = new Site([
@ -37,8 +43,8 @@ public function create(Server $server, array $input): Site
// check has access to repository
try {
if ($site->sourceControl) {
$site->sourceControl?->getRepo($site->repository);
if ($site->sourceControl()) {
$site->sourceControl()->getRepo($site->repository);
}
} catch (SourceControlIsNotConnected) {
throw ValidationException::withMessages([
@ -54,6 +60,9 @@ public function create(Server $server, array $input): Site
]);
}
// validate type
$this->validateType($site, $input);
// set type data
$site->type_data = $site->type()->data($input);
@ -85,13 +94,14 @@ public function create(Server $server, array $input): Site
return $site;
} catch (Exception $e) {
DB::rollBack();
throw ValidationException::withMessages([
'type' => $e->getMessage(),
]);
throw $e;
}
}
public static function rules(Server $server, array $input): array
/**
* @throws ValidationException
*/
private function validateInputs(Server $server, array $input): void
{
$rules = [
'type' => [
@ -100,30 +110,26 @@ public static function rules(Server $server, array $input): array
],
'domain' => [
'required',
new DomainRule,
new DomainRule(),
Rule::unique('sites', 'domain')->where(function ($query) use ($server) {
return $query->where('server_id', $server->id);
}),
],
'aliases.*' => [
new DomainRule,
new DomainRule(),
],
];
return array_merge($rules, self::typeRules($server, $input));
Validator::make($input, $rules)->validate();
}
private static function typeRules(Server $server, array $input): array
/**
* @throws ValidationException
*/
private function validateType(Site $site, array $input): void
{
if (! isset($input['type']) || ! in_array($input['type'], config('core.site_types'))) {
return [];
}
$rules = $site->type()->createRules($input);
$site = new Site([
'server_id' => $server->id,
'type' => $input['type']]
);
return $site->type()->createRules($input);
Validator::make($input, $rules)->validate();
}
}

View File

@ -3,15 +3,12 @@
namespace App\Actions\Site;
use App\Models\Site;
use App\SSH\Services\Webserver\Webserver;
class DeleteSite
{
public function delete(Site $site): void
{
/** @var Webserver $webserverHandler */
$webserverHandler = $site->server->webserver()->handler();
$webserverHandler->deleteSite($site);
$site->server->webserver()->handler()->deleteSite($site);
$site->delete();
}
}

View File

@ -17,12 +17,12 @@ class Deploy
*/
public function run(Site $site): Deployment
{
if ($site->sourceControl) {
$site->sourceControl->getRepo($site->repository);
if ($site->sourceControl()) {
$site->sourceControl()->getRepo($site->repository);
}
if (! $site->deploymentScript?->content) {
throw new DeploymentScriptIsEmptyException;
throw new DeploymentScriptIsEmptyException();
}
$deployment = new Deployment([
@ -30,7 +30,7 @@ public function run(Site $site): Deployment
'deployment_script_id' => $site->deploymentScript->id,
'status' => DeploymentStatus::DEPLOYING,
]);
$lastCommit = $site->sourceControl?->provider()?->getLastCommit($site->repository, $site->branch);
$lastCommit = $site->sourceControl()?->provider()?->getLastCommit($site->repository, $site->branch);
if ($lastCommit) {
$deployment->commit_id = $lastCommit['commit_id'];
$deployment->commit_data = $lastCommit['commit_data'];

View File

@ -5,11 +5,14 @@
use App\Models\Site;
use App\SSH\Services\Webserver\Webserver;
use App\ValidationRules\DomainRule;
use Illuminate\Support\Facades\Validator;
class UpdateAliases
{
public function update(Site $site, array $input): void
{
$this->validate($input);
$site->aliases = $input['aliases'] ?? [];
/** @var Webserver $webserver */
@ -19,12 +22,12 @@ public function update(Site $site, array $input): void
$site->save();
}
public static function rules(): array
private function validate(array $input): void
{
return [
Validator::make($input, [
'aliases.*' => [
new DomainRule,
new DomainRule(),
],
];
])->validate();
}
}

View File

@ -4,6 +4,7 @@
use App\Models\Site;
use App\SSH\Git\Git;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\ValidationException;
class UpdateBranch
@ -13,6 +14,7 @@ class UpdateBranch
*/
public function update(Site $site, array $input): void
{
$this->validate($input);
$site->branch = $input['branch'];
app(Git::class)->checkout($site);
$site->save();
@ -21,10 +23,10 @@ public function update(Site $site, array $input): void
/**
* @throws ValidationException
*/
public static function rules(): array
protected function validate(array $input): void
{
return [
Validator::make($input, [
'branch' => 'required',
];
]);
}
}

View File

@ -3,6 +3,7 @@
namespace App\Actions\Site;
use App\Models\Site;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\ValidationException;
class UpdateDeploymentScript
@ -12,6 +13,8 @@ class UpdateDeploymentScript
*/
public function update(Site $site, array $input): void
{
$this->validate($input);
$site->deploymentScript()->update([
'content' => $input['script'],
]);
@ -20,10 +23,10 @@ public function update(Site $site, array $input): void
/**
* @throws ValidationException
*/
public static function rules(): array
protected function validate(array $input): void
{
return [
'script' => ['required', 'string'],
];
Validator::make($input, [
'script' => 'required',
]);
}
}

View File

@ -1,26 +0,0 @@
<?php
namespace App\Actions\Site;
use App\Models\Site;
use Illuminate\Validation\Rule;
class UpdatePHPVersion
{
public static function rules(Site $site): array
{
return [
'version' => [
'required',
Rule::exists('services', 'version')
->where('server_id', $site->server_id)
->where('type', 'php'),
],
];
}
public function update(Site $site, array $input): void
{
$site->changePHPVersion($input['version']);
}
}

View File

@ -6,6 +6,7 @@
use App\Exceptions\RepositoryPermissionDenied;
use App\Exceptions\SourceControlIsNotConnected;
use App\Models\Site;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\Rule;
use Illuminate\Validation\ValidationException;
@ -13,10 +14,12 @@ class UpdateSourceControl
{
public function update(Site $site, array $input): void
{
$this->validate($input);
$site->source_control_id = $input['source_control'];
try {
if ($site->sourceControl) {
$site->sourceControl?->getRepo($site->repository);
if ($site->sourceControl()) {
$site->sourceControl()->getRepo($site->repository);
}
} catch (SourceControlIsNotConnected) {
throw ValidationException::withMessages([
@ -34,13 +37,13 @@ public function update(Site $site, array $input): void
$site->save();
}
public static function rules(): array
private function validate(array $input): void
{
return [
Validator::make($input, [
'source_control' => [
'required',
Rule::exists('source_controls', 'id'),
],
];
])->validate();
}
}

View File

@ -2,24 +2,28 @@
namespace App\Actions\SourceControl;
use App\Models\Project;
use App\Models\SourceControl;
use App\Models\User;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\Rule;
use Illuminate\Validation\ValidationException;
class ConnectSourceControl
{
public function connect(User $user, Project $project, array $input): SourceControl
public function connect(User $user, array $input): void
{
$this->validate($input);
$sourceControl = new SourceControl([
'provider' => $input['provider'],
'profile' => $input['name'],
'url' => Arr::has($input, 'url') ? $input['url'] : null,
'project_id' => isset($input['global']) && $input['global'] ? null : $project->id,
'project_id' => isset($input['global']) && $input['global'] ? null : $user->current_project_id,
]);
$this->validateProvider($sourceControl, $input);
$sourceControl->provider_data = $sourceControl->provider()->createData($input);
if (! $sourceControl->provider()->connect()) {
@ -30,38 +34,30 @@ public function connect(User $user, Project $project, array $input): SourceContr
}
$sourceControl->save();
return $sourceControl;
}
public static function rules(array $input): array
{
$rules = [
'name' => [
'required',
],
'provider' => [
'required',
Rule::in(config('core.source_control_providers')),
],
];
return array_merge($rules, static::providerRules($input));
}
/**
* @throws ValidationException
*/
private static function providerRules(array $input): array
private function validate(array $input): void
{
if (! isset($input['provider'])) {
return [];
$rules = [
'provider' => [
'required',
Rule::in(config('core.source_control_providers')),
],
'name' => [
'required',
],
];
Validator::make($input, $rules)->validate();
}
$sourceControl = new SourceControl([
'provider' => $input['provider'],
]);
return $sourceControl->provider()->createRules($input);
/**
* @throws ValidationException
*/
private function validateProvider(SourceControl $sourceControl, array $input): void
{
Validator::make($input, $sourceControl->provider()->createRules($input))->validate();
}
}

View File

@ -3,16 +3,13 @@
namespace App\Actions\SourceControl;
use App\Models\SourceControl;
use Illuminate\Validation\ValidationException;
class DeleteSourceControl
{
public function delete(SourceControl $sourceControl): void
{
if ($sourceControl->sites()->exists()) {
throw ValidationException::withMessages([
'source_control' => __('This source control is being used by a site.'),
]);
throw new \Exception('This source control is being used by a site.');
}
$sourceControl->delete();

View File

@ -2,47 +2,53 @@
namespace App\Actions\SourceControl;
use App\Models\Project;
use App\Models\SourceControl;
use App\Models\User;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\ValidationException;
class EditSourceControl
{
public function edit(SourceControl $sourceControl, Project $project, array $input): SourceControl
public function edit(SourceControl $sourceControl, User $user, array $input): void
{
$this->validate($input);
$sourceControl->profile = $input['name'];
$sourceControl->url = $input['url'] ?? null;
$sourceControl->project_id = isset($input['global']) && $input['global'] ? null : $project->id;
$sourceControl->project_id = isset($input['global']) && $input['global'] ? null : $user->current_project_id;
$sourceControl->provider_data = $sourceControl->provider()->editData($input);
$this->validateProvider($sourceControl, $input);
$sourceControl->provider_data = $sourceControl->provider()->createData($input);
if (! $sourceControl->provider()->connect()) {
throw ValidationException::withMessages([
'token' => __('Cannot connect to :provider or invalid token!', ['provider' => $sourceControl->provider]),
'token' => __('Cannot connect to :provider or invalid token!', ['provider' => $sourceControl->provider]
),
]);
}
$sourceControl->save();
return $sourceControl;
}
public static function rules(SourceControl $sourceControl, array $input): array
/**
* @throws ValidationException
*/
private function validate(array $input): void
{
$rules = [
'name' => [
'required',
],
];
return array_merge($rules, static::providerRules($sourceControl, $input));
Validator::make($input, $rules)->validate();
}
/**
* @throws ValidationException
*/
private static function providerRules(SourceControl $sourceControl, array $input): array
private function validateProvider(SourceControl $sourceControl, array $input): void
{
return $sourceControl->provider()->editRules($input);
Validator::make($input, $sourceControl->provider()->createRules($input))->validate();
}
}

View File

@ -5,6 +5,7 @@
use App\Models\SshKey;
use App\Models\User;
use App\ValidationRules\SshKeyRule;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\ValidationException;
class CreateSshKey
@ -14,6 +15,8 @@ class CreateSshKey
*/
public function create(User $user, array $input): SshKey
{
$this->validate($input);
$key = new SshKey([
'user_id' => $user->id,
'name' => $input['name'],
@ -27,14 +30,14 @@ public function create(User $user, array $input): SshKey
/**
* @throws ValidationException
*/
public static function rules(): array
private function validate(array $input): void
{
return [
Validator::make($input, [
'name' => 'required',
'public_key' => [
'required',
new SshKeyRule,
new SshKeyRule(),
],
];
])->validate();
}
}

View File

@ -6,14 +6,17 @@
use App\Models\Server;
use App\Models\SshKey;
use App\Models\User;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\Rule;
class DeployKeyToServer
{
public function deploy(Server $server, array $input): void
public function deploy(User $user, Server $server, array $input): void
{
$this->validate($user, $input);
/** @var SshKey $sshKey */
$sshKey = SshKey::query()->findOrFail($input['key_id']);
$sshKey = SshKey::findOrFail($input['key_id']);
$server->sshKeys()->attach($sshKey, [
'status' => SshKeyStatus::ADDING,
]);
@ -23,14 +26,13 @@ public function deploy(Server $server, array $input): void
]);
}
public static function rules(User $user, Server $server): array
private function validate(User $user, array $input): void
{
return [
Validator::make($input, [
'key_id' => [
'required',
Rule::exists('ssh_keys', 'id')->where('user_id', $user->id),
Rule::unique('server_ssh_keys', 'ssh_key_id')->where('server_id', $server->id),
],
];
])->validate();
}
}

View File

@ -2,9 +2,9 @@
namespace App\Actions\StorageProvider;
use App\Models\Project;
use App\Models\StorageProvider;
use App\Models\User;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\Rule;
use Illuminate\Validation\ValidationException;
@ -13,15 +13,19 @@ class CreateStorageProvider
/**
* @throws ValidationException
*/
public function create(User $user, Project $project, array $input): StorageProvider
public function create(User $user, array $input): void
{
$this->validate($user, $input);
$storageProvider = new StorageProvider([
'user_id' => $user->id,
'provider' => $input['provider'],
'profile' => $input['name'],
'project_id' => isset($input['global']) && $input['global'] ? null : $project->id,
'project_id' => isset($input['global']) && $input['global'] ? null : $user->current_project_id,
]);
$this->validateProvider($input, $storageProvider->provider()->validationRules());
$storageProvider->credentials = $storageProvider->provider()->credentialData($input);
try {
@ -37,27 +41,24 @@ public function create(User $user, Project $project, array $input): StorageProvi
}
$storageProvider->save();
return $storageProvider;
}
public static function rules(array $input): array
private function validate(User $user, array $input): void
{
$rules = [
Validator::make($input, [
'provider' => [
'required',
Rule::in(config('core.storage_providers')),
],
'name' => [
'required',
Rule::unique('storage_providers', 'profile')->where('user_id', $user->id),
],
];
if (isset($input['provider'])) {
$provider = (new StorageProvider(['provider' => $input['provider']]))->provider();
$rules = array_merge($rules, $provider->validationRules());
])->validate();
}
return $rules;
private function validateProvider(array $input, array $rules): void
{
Validator::make($input, $rules)->validate();
}
}

View File

@ -3,16 +3,17 @@
namespace App\Actions\StorageProvider;
use App\Models\StorageProvider;
use Illuminate\Validation\ValidationException;
use Exception;
class DeleteStorageProvider
{
/**
* @throws Exception
*/
public function delete(StorageProvider $storageProvider): void
{
if ($storageProvider->backups()->exists()) {
throw ValidationException::withMessages([
'provider' => __('This storage provider is being used by a backup.'),
]);
throw new Exception('This storage provider is being used by a backup.');
}
$storageProvider->delete();

View File

@ -2,31 +2,33 @@
namespace App\Actions\StorageProvider;
use App\Models\Project;
use App\Models\StorageProvider;
use App\Models\User;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\ValidationException;
class EditStorageProvider
{
public function edit(StorageProvider $storageProvider, Project $project, array $input): StorageProvider
public function edit(StorageProvider $storageProvider, User $user, array $input): void
{
$this->validate($input);
$storageProvider->profile = $input['name'];
$storageProvider->project_id = isset($input['global']) && $input['global'] ? null : $project->id;
$storageProvider->project_id = isset($input['global']) && $input['global'] ? null : $user->current_project_id;
$storageProvider->save();
return $storageProvider;
}
/**
* @throws ValidationException
*/
public static function rules(): array
private function validate(array $input): void
{
return [
$rules = [
'name' => [
'required',
],
];
Validator::make($input, $rules)->validate();
}
}

View File

@ -0,0 +1,58 @@
<?php
namespace App\Actions\Tag;
use App\Models\Server;
use App\Models\Site;
use App\Models\Tag;
use App\Models\User;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\Rule;
class AttachTag
{
public function attach(User $user, array $input): Tag
{
$this->validate($input);
/** @var Server|Site $taggable */
$taggable = $input['taggable_type']::findOrFail($input['taggable_id']);
$tag = Tag::query()->where('name', $input['name'])->first();
if ($tag) {
if (! $taggable->tags->contains($tag->id)) {
$taggable->tags()->attach($tag->id);
}
return $tag;
}
$tag = new Tag([
'project_id' => $user->currentProject->id,
'name' => $input['name'],
'color' => config('core.tag_colors')[array_rand(config('core.tag_colors'))],
]);
$tag->save();
$taggable->tags()->attach($tag->id);
return $tag;
}
private function validate(array $input): void
{
Validator::make($input, [
'name' => [
'required',
],
'taggable_id' => [
'required',
'integer',
],
'taggable_type' => [
'required',
Rule::in(config('core.taggable_types')),
],
])->validate();
}
}

View File

@ -4,6 +4,7 @@
use App\Models\Tag;
use App\Models\User;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\Rule;
use Illuminate\Validation\ValidationException;
@ -11,6 +12,8 @@ class CreateTag
{
public function create(User $user, array $input): Tag
{
$this->validate($input);
$tag = Tag::query()
->where('project_id', $user->current_project_id)
->where('name', $input['name'])
@ -31,9 +34,9 @@ public function create(User $user, array $input): Tag
return $tag;
}
public static function rules(): array
private function validate(array $input): void
{
return [
Validator::make($input, [
'name' => [
'required',
],
@ -41,6 +44,6 @@ public static function rules(): array
'required',
Rule::in(config('core.tag_colors')),
],
];
])->validate();
}
}

View File

@ -5,28 +5,24 @@
use App\Models\Server;
use App\Models\Site;
use App\Models\Tag;
use App\Models\User;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\Rule;
class SyncTags
class DetachTag
{
public function sync(User $user, array $input): void
public function detach(Tag $tag, array $input): void
{
$this->validate($input);
/** @var Server|Site $taggable */
$taggable = $input['taggable_type']::findOrFail($input['taggable_id']);
$tags = Tag::query()->whereIn('id', $input['tags'])->get();
$taggable->tags()->sync($tags->pluck('id'));
$taggable->tags()->detach($tag->id);
}
public static function rules(int $projectId): array
private function validate(array $input): void
{
return [
'tags.*' => [
'required',
Rule::exists('tags', 'id')->where('project_id', $projectId),
],
Validator::make($input, [
'taggable_id' => [
'required',
'integer',
@ -35,6 +31,6 @@ public static function rules(int $projectId): array
'required',
Rule::in(config('core.taggable_types')),
],
];
])->validate();
}
}

View File

@ -3,21 +3,28 @@
namespace App\Actions\Tag;
use App\Models\Tag;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\Rule;
use Illuminate\Validation\ValidationException;
class EditTag
{
public function edit(Tag $tag, array $input): void
{
$this->validate($input);
$tag->name = $input['name'];
$tag->color = $input['color'];
$tag->save();
}
public static function rules(): array
/**
* @throws ValidationException
*/
private function validate(array $input): void
{
return [
$rules = [
'name' => [
'required',
],
@ -26,5 +33,6 @@ public static function rules(): array
Rule::in(config('core.tag_colors')),
],
];
Validator::make($input, $rules)->validate();
}
}

View File

@ -27,12 +27,7 @@ public function create(array $input): User
private function validate(array $input): void
{
Validator::make($input, self::rules())->validate();
}
public static function rules(): array
{
return [
Validator::make($input, [
'name' => 'required|string|max:255',
'email' => 'required|email|unique:users,email',
'password' => 'required|string|min:8',
@ -40,6 +35,6 @@ public static function rules(): array
'required',
Rule::in([UserRole::ADMIN, UserRole::USER]),
],
];
])->validate();
}
}

View File

@ -1,45 +0,0 @@
<?php
namespace App\Actions\User;
use App\Models\Project;
use App\Models\User;
use Illuminate\Validation\Rule;
class UpdateProjects
{
public function update(User $user, array $input): void
{
$this->validate($input);
$user->projects()->sync($input['projects']);
if ($user->currentProject && ! $user->projects->contains($user->currentProject)) {
$user->current_project_id = null;
$user->save();
}
$user->refresh();
/** @var Project $firstProject */
$firstProject = $user->projects->first();
if (! $user->currentProject && $firstProject) {
$user->current_project_id = $firstProject->id;
$user->save();
}
}
private function validate(array $input): void
{
validator($input, self::rules())->validate();
}
public static function rules(): array
{
return [
'projects.*' => [
'required',
Rule::exists('projects', 'id'),
],
];
}
}

View File

@ -9,7 +9,7 @@
class UpdateUser
{
public function update(User $user, array $input): User
public function update(User $user, array $input): void
{
$this->validate($user, $input);
@ -18,29 +18,18 @@ public function update(User $user, array $input): User
$user->timezone = $input['timezone'];
$user->role = $input['role'];
if (isset($input['password'])) {
if (isset($input['password']) && $input['password'] !== null) {
$user->password = bcrypt($input['password']);
}
$user->save();
return $user;
}
private function validate(User $user, array $input): void
{
Validator::make($input, self::rules($user))->validate();
}
public static function rules(User $user): array
{
return [
Validator::make($input, [
'name' => ['required', 'string', 'max:255'],
'email' => [
'required',
'email', 'max:255',
Rule::unique('users', 'email')->ignore($user->id),
],
'email' => ['required', 'email', 'max:255', Rule::unique('users')->ignore($user->id)],
'timezone' => [
'required',
Rule::in(timezone_identifiers_list()),
@ -48,7 +37,12 @@ public static function rules(User $user): array
'role' => [
'required',
Rule::in([UserRole::ADMIN, UserRole::USER]),
function ($attribute, $value, $fail) use ($user) {
if ($user->is(auth()->user()) && $value !== $user->role) {
$fail('You cannot change your own role');
}
},
],
];
])->validate();
}
}

Some files were not shown because too many files have changed in this diff Show More