mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-01 05:56:16 +00:00
Compare commits
283 Commits
Author | SHA1 | Date | |
---|---|---|---|
262c5e040d | |||
ea396786e4 | |||
6966f06b1a | |||
53e20cbc2a | |||
270928af13 | |||
1e4a944acb | |||
d702b95e0c | |||
7b723bcba5 | |||
8b58834a31 | |||
cdbde063f0 | |||
a73476c1dd | |||
465951fd1e | |||
b63ddfc568 | |||
bfdf3533fd | |||
c1ae58772c | |||
5947ae80bb | |||
93a7bf9c3a | |||
a0940d4581 | |||
e976709522 | |||
5aa100519e | |||
ab43dfb2a6 | |||
a320e52dbf | |||
20c6b58866 | |||
f5c9d6701b | |||
ba069a2db0 | |||
8b86ff23c9 | |||
dfdd50beb7 | |||
924920e6e8 | |||
da1043185a | |||
ea3d64607a | |||
db81583884 | |||
1490f6b707 | |||
544e31c562 | |||
572d1df010 | |||
0d12dd0c69 | |||
d91fa4061c | |||
3f7284f771 | |||
e0b3c7fec7 | |||
d9dd861313 | |||
1f95cb3854 | |||
1b741070b3 | |||
d4ec4c66ed | |||
acdbfa70f5 | |||
d77ceb1472 | |||
b7184dcfc4 | |||
c926ce4271 | |||
bc2e421128 | |||
5aac48b942 | |||
9c63b96a42 | |||
20944421de | |||
57b2771c7e | |||
34c5750950 | |||
cc79aa9fbf | |||
deb0b328e3 | |||
1ca72d7ddd | |||
1dfd13583a | |||
e8ac6eb5ae | |||
07c51ab122 | |||
2c49e2712c | |||
0f810f4077 | |||
113607aae3 | |||
23eee5a91e | |||
6639fac9c0 | |||
f743611b22 | |||
37a4b6af51 | |||
417bf73e44 | |||
da7b24640e | |||
a11f221619 | |||
54dc6cfb9a | |||
321465d3e2 | |||
37f502d6dd | |||
d7dc54ef5d | |||
224e0ac2b0 | |||
386d8e73a7 | |||
7086e84c3c | |||
93cee92568 | |||
0007e6f00a | |||
eaecafc9b0 | |||
0da21f40bd | |||
974af959f1 | |||
8bf1cc141e | |||
a94d1d42d2 | |||
06d690138d | |||
8b2338cb41 | |||
c24b4b7333 | |||
3c50e2c947 | |||
d1f2add699 | |||
ecdba02bc9 | |||
82933e29ff | |||
f57e81f12e | |||
63e7cfd8f7 | |||
82c1f36ef6 | |||
e06d23b31a | |||
f0e7faa0e7 | |||
906ddc38de | |||
2e9620409b | |||
e4fed24498 | |||
32993025de | |||
f6bc04763b | |||
319fdb44e7 | |||
b62c40c97d | |||
e39e8c17a2 | |||
1391eb32d8 | |||
7f5e68e131 | |||
431da1b728 | |||
8c487a64fa | |||
a67e586a5d | |||
960db714b7 | |||
7da0221ccb | |||
9ac5f9ebb3 | |||
ed8965b92b | |||
9473d198e1 | |||
55269dbcde | |||
3d67153912 | |||
11e3b167cc | |||
ad027eb033 | |||
e031bafba5 | |||
b5c8d99ef8 | |||
109d644ad8 | |||
5ccbab74b1 | |||
7d367465ff | |||
eec83f577c | |||
fd77368cf3 | |||
a862a603f2 | |||
3b42f93654 | |||
661292df5e | |||
0cfb938320 | |||
dd4a3d30c0 | |||
2b849c888e | |||
d9a791755e | |||
e3ea8f975f | |||
de468ae1ba | |||
30ef8ad5eb | |||
88223a61f9 | |||
1067a5fd33 | |||
4361305206 | |||
fe331fd2b3 | |||
bbe3ca802d | |||
765ac21916 | |||
016886f307 | |||
179aefefac | |||
e704a13d6b | |||
9936958259 | |||
f81d928c66 | |||
3c4435701d | |||
ebbd81348a | |||
5debbd4f5d | |||
d846acaa8d | |||
35f896eab1 | |||
25977d2ead | |||
f0da1c6d8c | |||
e2dd9177f7 | |||
5a9e8d6799 | |||
868b70f530 | |||
d07e9bcad2 | |||
0cd815cce6 | |||
5ab6617b5d | |||
72b37c56fd | |||
8a4ef66946 | |||
4517ca7d2a | |||
75aed62d75 | |||
aaef73d89d | |||
f03a029e36 | |||
52d195710b | |||
ddacc32e64 | |||
2ae9a14d02 | |||
3019c3d213 | |||
c43869d255 | |||
18748f77ac | |||
052e28d2e3 | |||
87ec0af697 | |||
e9016737d4 | |||
f34d5eb82b | |||
12c500e125 | |||
2d566b853f | |||
ca93b521ec | |||
bce05d3171 | |||
929dd1dbaa | |||
2bcd145bea | |||
c0f903d4ca | |||
cca4ab7ae3 | |||
51e7325d3d | |||
ce085879c1 | |||
8a49003e9e | |||
dcc4276f09 | |||
f089779045 | |||
f1efb9a6c8 | |||
a7d472fb45 | |||
d01d406d3d | |||
c66c50835a | |||
b6179d6693 | |||
9244e69fd8 | |||
a7ba095919 | |||
807ae01646 | |||
cc896d82e9 | |||
d16d3c1385 | |||
3946cf6b34 | |||
165212fed2 | |||
f6b36dfefc | |||
33594f2dba | |||
f68d6c7ca2 | |||
d504588f95 | |||
a0af4e3e9d | |||
ca0e33be2f | |||
4d051330d6 | |||
ab2d6f64f3 | |||
d9a56f95dd | |||
7fc7944354 | |||
9ef7bf1bc9 | |||
35e5e16df9 | |||
369bf1b965 | |||
ee2b53f824 | |||
46845fb41f | |||
c78462b173 | |||
5f192d69de | |||
884f18db63 | |||
3afb6b7eb4 | |||
6529c349b1 | |||
6389e592a4 | |||
9f577ef2d0 | |||
77a09cec48 | |||
7b0a71fb57 | |||
d5a567cc11 | |||
536df65fc6 | |||
3575a6d469 | |||
4137e2003f | |||
d4f1a2d4da | |||
d3aaf2a6fa | |||
7949165648 | |||
3dc38bf56b | |||
4f252caaf3 | |||
839e7f496c | |||
b07ae470f9 | |||
f0c4fc4812 | |||
46d320561e | |||
1333acf1ef | |||
77d6914cd9 | |||
7a6dcb5654 | |||
fd93f3dd47 | |||
d8056441c0 | |||
287c9c2a8a | |||
a406491160 | |||
4f12de9586 | |||
f907bacdd0 | |||
428140b931 | |||
cee4a70c3c | |||
60e2dc0807 | |||
9d705592da | |||
cfc0645002 | |||
b2083fc6b2 | |||
5b2c419e91 | |||
470274279b | |||
44d8364a52 | |||
d321fd5a1e | |||
5a60f3b15f | |||
d1f424aa47 | |||
debcd002f1 | |||
59e8c82e5c | |||
682da0d6d5 | |||
9db310a06b | |||
f70963d6bb | |||
b75df8e1c5 | |||
a22e9cb946 | |||
b2b9bea0b1 | |||
3f4a2bce3a | |||
8bffefabef | |||
3da1f4fe4c | |||
2214a76e09 | |||
55bf8b8ecf | |||
0420babdef | |||
1c3d78a5ed | |||
8665435bc4 | |||
0ec6a9dea2 | |||
bdfda05398 | |||
919cdc6892 | |||
902548e463 | |||
2462b31f3b | |||
e997d0deea | |||
f06b8f7d20 | |||
f120a570e8 | |||
2d7f225ff2 | |||
31bd146239 | |||
10a6bb57a8 |
@ -7,6 +7,7 @@ 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
|
||||
|
32
.env.example
32
.env.example
@ -2,37 +2,19 @@ APP_NAME=Vito
|
||||
APP_ENV=local
|
||||
APP_KEY=
|
||||
APP_DEBUG=true
|
||||
APP_URL=http://vito.test
|
||||
APP_URL=
|
||||
|
||||
LOG_CHANNEL=stack
|
||||
LOG_LEVEL=debug
|
||||
|
||||
DB_CONNECTION=mysql
|
||||
DB_HOST=127.0.0.1
|
||||
DB_PORT=3306
|
||||
DB_DATABASE=vito
|
||||
DB_USERNAME=root
|
||||
DB_PASSWORD=
|
||||
|
||||
BROADCAST_DRIVER=null
|
||||
CACHE_DRIVER=file
|
||||
FILESYSTEM_DRIVER=local
|
||||
QUEUE_CONNECTION=default
|
||||
SESSION_DRIVER=database
|
||||
SESSION_LIFETIME=120
|
||||
|
||||
REDIS_HOST=127.0.0.1
|
||||
REDIS_PASSWORD=null
|
||||
REDIS_PORT=6379
|
||||
|
||||
MAIL_MAILER=smtp
|
||||
MAIL_HOST=mailhog
|
||||
MAIL_PORT=1025
|
||||
MAIL_HOST=
|
||||
MAIL_PORT=
|
||||
MAIL_USERNAME=null
|
||||
MAIL_PASSWORD=null
|
||||
MAIL_ENCRYPTION=null
|
||||
MAIL_FROM_ADDRESS=null
|
||||
MAIL_FROM_ADDRESS="noreply@${APP_NAME}"
|
||||
MAIL_FROM_NAME="${APP_NAME}"
|
||||
|
||||
SSH_PUBLIC_KEY_NAME=ssh-public.key
|
||||
SSH_PRIVATE_KEY_NAME=ssh-private.pem
|
||||
APP_PORT=8000
|
||||
|
||||
SCRIBE_AUTH_KEY="YOUR-API-KEY"
|
||||
|
28
.env.prod
28
.env.prod
@ -4,35 +4,13 @@ APP_KEY=
|
||||
APP_DEBUG=false
|
||||
APP_URL=
|
||||
|
||||
LOG_CHANNEL=stack
|
||||
LOG_LEVEL=debug
|
||||
|
||||
DB_CONNECTION=mysql
|
||||
DB_HOST=127.0.0.1
|
||||
DB_PORT=3306
|
||||
DB_DATABASE=
|
||||
DB_USERNAME=
|
||||
DB_PASSWORD=
|
||||
|
||||
BROADCAST_DRIVER=null
|
||||
CACHE_DRIVER=file
|
||||
FILESYSTEM_DRIVER=local
|
||||
QUEUE_CONNECTION=default
|
||||
SESSION_DRIVER=database
|
||||
SESSION_LIFETIME=120
|
||||
|
||||
REDIS_HOST=127.0.0.1
|
||||
REDIS_PASSWORD=null
|
||||
REDIS_PORT=6379
|
||||
|
||||
MAIL_MAILER=smtp
|
||||
MAIL_HOST=mailhog
|
||||
MAIL_PORT=1025
|
||||
MAIL_HOST=
|
||||
MAIL_PORT=
|
||||
MAIL_USERNAME=null
|
||||
MAIL_PASSWORD=null
|
||||
MAIL_ENCRYPTION=null
|
||||
MAIL_FROM_ADDRESS=null
|
||||
MAIL_FROM_ADDRESS="noreply@${APP_NAME}"
|
||||
MAIL_FROM_NAME="${APP_NAME}"
|
||||
|
||||
SSH_PUBLIC_KEY_NAME=ssh-public.key
|
||||
SSH_PRIVATE_KEY_NAME=ssh-private.pem
|
||||
|
38
.env.sail
38
.env.sail
@ -2,44 +2,16 @@ APP_NAME=Vito
|
||||
APP_ENV=local
|
||||
APP_KEY=
|
||||
APP_DEBUG=true
|
||||
APP_URL=http://vito.test
|
||||
APP_URL=
|
||||
APP_PORT=8000
|
||||
|
||||
LOG_CHANNEL=stack
|
||||
LOG_LEVEL=debug
|
||||
|
||||
DB_CONNECTION=mysql
|
||||
DB_HOST=mysql
|
||||
DB_PORT=3306
|
||||
DB_DATABASE=vito
|
||||
DB_USERNAME=sail
|
||||
DB_PASSWORD=password
|
||||
|
||||
BROADCAST_DRIVER=null
|
||||
CACHE_DRIVER=redis
|
||||
FILESYSTEM_DRIVER=local
|
||||
QUEUE_CONNECTION=default
|
||||
SESSION_DRIVER=database
|
||||
SESSION_LIFETIME=120
|
||||
|
||||
REDIS_HOST=redis
|
||||
REDIS_PASSWORD=null
|
||||
REDIS_PORT=6379
|
||||
|
||||
MAIL_MAILER=smtp
|
||||
MAIL_HOST=mailhog
|
||||
MAIL_PORT=1025
|
||||
MAIL_HOST=
|
||||
MAIL_PORT=
|
||||
MAIL_USERNAME=null
|
||||
MAIL_PASSWORD=null
|
||||
MAIL_ENCRYPTION=null
|
||||
MAIL_FROM_ADDRESS=null
|
||||
MAIL_FROM_ADDRESS="noreply@${APP_NAME}"
|
||||
MAIL_FROM_NAME="${APP_NAME}"
|
||||
|
||||
SSH_PUBLIC_KEY_NAME=ssh-public.key
|
||||
SSH_PRIVATE_KEY_NAME=ssh-private.pem
|
||||
|
||||
APP_SERVICE=vito
|
||||
|
||||
FORWARD_REDIS_PORT=2060
|
||||
FORWARD_DB_PORT=2070
|
||||
APP_PORT=2080
|
||||
HMR_PORT=2090
|
||||
|
27
.env.testing
27
.env.testing
@ -1,27 +0,0 @@
|
||||
APP_NAME=Vito
|
||||
APP_ENV=local
|
||||
APP_KEY=base64:d9kZW60V4lFEw2SPn6UiJ0cfi04v80EWP0GZ6kzoxNg=
|
||||
APP_DEBUG=true
|
||||
APP_URL=http://localhost:2080
|
||||
|
||||
LOG_CHANNEL=stack
|
||||
LOG_LEVEL=debug
|
||||
|
||||
DB_CONNECTION=mysql
|
||||
DB_HOST=127.0.0.1
|
||||
DB_PORT=3306
|
||||
DB_DATABASE=vito_test
|
||||
DB_USERNAME=root
|
||||
DB_PASSWORD=
|
||||
|
||||
BROADCAST_DRIVER=null
|
||||
CACHE_DRIVER=array
|
||||
FILESYSTEM_DRIVER=local
|
||||
QUEUE_CONNECTION=database
|
||||
SESSION_DRIVER=array
|
||||
SESSION_LIFETIME=120
|
||||
|
||||
MAIL_MAILER=array
|
||||
|
||||
SSH_PUBLIC_KEY_NAME=ssh-public.key
|
||||
SSH_PRIVATE_KEY_NAME=ssh-private.pem
|
27
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
27
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
11
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
11
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Feature request
|
||||
url: https://github.com/vitodeploy/vito/discussions/new?category=ideas
|
||||
about: Share ideas for new features
|
||||
- name: Support
|
||||
url: https://github.com/vitodeploy/vito/discussions/new?category=q-a
|
||||
about: Ask the community for help
|
||||
- name: Discord
|
||||
url: https://discord.gg/uZeeHZZnm5
|
||||
about: Join the community
|
21
.github/workflows/code-style.yml
vendored
21
.github/workflows/code-style.yml
vendored
@ -2,9 +2,11 @@ name: code-style
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- 1.x
|
||||
- 2.x
|
||||
pull_request:
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
|
||||
jobs:
|
||||
code-style:
|
||||
@ -13,7 +15,8 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
php: [ 8.1 ]
|
||||
php: [ 8.2 ]
|
||||
node-version: [ "20.x" ]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@ -31,9 +34,21 @@ jobs:
|
||||
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-php-
|
||||
|
||||
- name: Install dependencies
|
||||
if: steps.composer-cache.outputs.cache-hit != 'true'
|
||||
run: composer install --prefer-dist --no-progress --no-suggest
|
||||
|
||||
- name: Run pint
|
||||
run: ./vendor/bin/pint --test
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: "20.x"
|
||||
|
||||
- name: Install NPM Dependencies
|
||||
run: npm install
|
||||
|
||||
- name: Run lint
|
||||
run: npm run lint
|
||||
|
35
.github/workflows/docker-latest.yml
vendored
Normal file
35
.github/workflows/docker-latest.yml
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
name: Docker Latest
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- 2.x
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Build and push to the latest tag
|
||||
run: |
|
||||
docker buildx build . \
|
||||
-f docker/Dockerfile \
|
||||
-t vitodeploy/vito:latest \
|
||||
--platform linux/amd64,linux/arm64 \
|
||||
--no-cache \
|
||||
--push
|
52
.github/workflows/docker-release.yml
vendored
Normal file
52
.github/workflows/docker-release.yml
vendored
Normal file
@ -0,0 +1,52 @@
|
||||
name: Docker Release
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
release:
|
||||
types: [ created ]
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Build and push to the release tag
|
||||
run: |
|
||||
docker buildx build . \
|
||||
-f docker/Dockerfile \
|
||||
-t vitodeploy/vito:${{ github.event.release.tag_name }} \
|
||||
--platform linux/amd64,linux/arm64 \
|
||||
--no-cache \
|
||||
--push
|
||||
|
||||
- name: Build and push to the 1.x tag
|
||||
if: startsWith(github.event.release.target_commitish, '1.x')
|
||||
run: |
|
||||
docker buildx build . \
|
||||
-f docker/Dockerfile \
|
||||
-t vitodeploy/vito:1.x \
|
||||
--platform linux/amd64,linux/arm64 \
|
||||
--push
|
||||
|
||||
- name: Build and push to the 2.x tag
|
||||
if: startsWith(github.event.release.target_commitish, '2.x')
|
||||
run: |
|
||||
docker buildx build . \
|
||||
-f docker/Dockerfile \
|
||||
-t vitodeploy/vito:2.x \
|
||||
--platform linux/amd64,linux/arm64 \
|
||||
--push
|
77
.github/workflows/releases.yml
vendored
Normal file
77
.github/workflows/releases.yml
vendored
Normal file
@ -0,0 +1,77 @@
|
||||
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 }}"
|
28
.github/workflows/tests.yml
vendored
28
.github/workflows/tests.yml
vendored
@ -2,30 +2,20 @@ name: tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- 1.x
|
||||
- 2.x
|
||||
pull_request:
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
services:
|
||||
mysql:
|
||||
image: mysql
|
||||
env:
|
||||
MYSQL_DATABASE: test_db
|
||||
MYSQL_USER: user
|
||||
MYSQL_PASSWORD: password
|
||||
MYSQL_ROOT_PASSWORD: rootpassword
|
||||
ports:
|
||||
- 3306:3306
|
||||
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
||||
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
php: [ 8.1 ]
|
||||
php: [ 8.2 ]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@ -47,10 +37,8 @@ jobs:
|
||||
if: steps.composer-cache.outputs.cache-hit != 'true'
|
||||
run: composer install --prefer-dist --no-progress --no-suggest
|
||||
|
||||
- name: Create sqlite database
|
||||
run: touch storage/database-test.sqlite
|
||||
|
||||
- name: Run test suite
|
||||
run: php artisan test
|
||||
env:
|
||||
DB_HOST: 127.0.0.1
|
||||
DB_DATABASE: test_db
|
||||
DB_USERNAME: user
|
||||
DB_PASSWORD: password
|
||||
|
5
.gitignore
vendored
5
.gitignore
vendored
@ -4,7 +4,11 @@
|
||||
/public/storage
|
||||
/storage/*.key
|
||||
/storage/*.pem
|
||||
/storage/test-key
|
||||
/storage/test-key.pub
|
||||
/vendor
|
||||
/storage/database.sqlite
|
||||
/storage/database-test.sqlite
|
||||
.env
|
||||
.env.backup
|
||||
.env.production
|
||||
@ -17,3 +21,4 @@ yarn-error.log
|
||||
/.fleet
|
||||
/.idea
|
||||
/.vscode
|
||||
laradumps.yaml
|
||||
|
15
.prettierignore
Normal file
15
.prettierignore
Normal file
@ -0,0 +1,15 @@
|
||||
.git/
|
||||
.scribe/
|
||||
node_modules/
|
||||
public/
|
||||
storage/
|
||||
vendor/
|
||||
composer.lock
|
||||
.env
|
||||
.env.example
|
||||
sail
|
||||
*.md
|
||||
*.yml
|
||||
!*.blade.php
|
||||
!*.sh
|
||||
resources/views/ssh/
|
26
.prettierrc
Normal file
26
.prettierrc
Normal file
@ -0,0 +1,26 @@
|
||||
{
|
||||
"plugins": [
|
||||
"prettier-plugin-blade",
|
||||
"prettier-plugin-tailwindcss",
|
||||
"prettier-plugin-sh"
|
||||
],
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.blade.php"],
|
||||
"options": {
|
||||
"parser": "blade",
|
||||
"printWidth": 120,
|
||||
"htmlWhitespaceSensitivity": "ignore",
|
||||
"tabWidth": 4,
|
||||
"quoteProps": "consistent",
|
||||
"trailingComma": "none"
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": ["*.sh"],
|
||||
"options": {
|
||||
"parser": "sh"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
4
.scribe/.filehashes
Normal file
4
.scribe/.filehashes
Normal file
@ -0,0 +1,4 @@
|
||||
# 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
|
7
.scribe/auth.md
Normal file
7
.scribe/auth.md
Normal file
@ -0,0 +1,7 @@
|
||||
# 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>
|
310
.scribe/endpoints.cache/00.yaml
Normal file
310
.scribe/endpoints.cache/00.yaml
Normal file
@ -0,0 +1,310 @@
|
||||
## 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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
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":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer ge6ZVa4kfD86hdv5a31EcbP'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
command:
|
||||
name: command
|
||||
description: ''
|
||||
required: true
|
||||
example: itaque
|
||||
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: itaque
|
||||
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 cdh5bD8gVPkf34e1ZEva6a6'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cronJob_id:
|
||||
name: cronJob_id
|
||||
description: 'The ID of the cronJob.'
|
||||
required: true
|
||||
example: 18
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
cronJob_id: 18
|
||||
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 fa5VgdkaD8cZ6vh34Pb16eE'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cronJob_id:
|
||||
name: cronJob_id
|
||||
description: 'The ID of the cronJob.'
|
||||
required: true
|
||||
example: 10
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
cronJob_id: 10
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer P8hkva3ZD4fgb166adEVce5'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
286
.scribe/endpoints.cache/01.yaml
Normal file
286
.scribe/endpoints.cache/01.yaml
Normal file
@ -0,0 +1,286 @@
|
||||
## 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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":null,"server_id":null,"name":"amalia38","status":"ready","created_at":null,"updated_at":null},{"id":null,"server_id":null,"name":"troy.rippin","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":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer Z641ebPacDV6f38kEgdah5v'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
name:
|
||||
name: name
|
||||
description: ''
|
||||
required: true
|
||||
example: et
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
name: et
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"name":"harvey.haskell","status":"ready","created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer d4gbv56caV3aZ8D1h6kfEPe'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the database.'
|
||||
required: true
|
||||
example: 19
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
id: 19
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"name":"ruthie.koepp","status":"ready","created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer P68VgDcaEZvk63f4b5aed1h'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
database_id:
|
||||
name: database_id
|
||||
description: 'The ID of the database.'
|
||||
required: true
|
||||
example: 15
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
database_id: 15
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer DkPc6d1heEv5a8fb4V63agZ'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
392
.scribe/endpoints.cache/02.yaml
Normal file
392
.scribe/endpoints.cache/02.yaml
Normal file
@ -0,0 +1,392 @@
|
||||
## 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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":null,"server_id":null,"username":"xgaylord","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null},{"id":null,"server_id":null,"username":"una37","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":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer P4gD36fZeckvVh5ab86Ead1'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
username:
|
||||
name: username
|
||||
description: ''
|
||||
required: true
|
||||
example: consequuntur
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
password:
|
||||
name: password
|
||||
description: ''
|
||||
required: true
|
||||
example: 'fI/i2.O4u&dla?eXvR2'
|
||||
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: consequuntur
|
||||
password: 'fI/i2.O4u&dla?eXvR2'
|
||||
host: '%'
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"username":"kari.farrell","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 5k8Vced1baaE6f4ZvDPgh36'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
databaseUser_id:
|
||||
name: databaseUser_id
|
||||
description: 'The ID of the databaseUser.'
|
||||
required: true
|
||||
example: 18
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
databaseUser_id: 18
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"username":"caterina.mosciski","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 3kDveP5V8a6dghfa4E16cbZ'
|
||||
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: 8
|
||||
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: 8
|
||||
databaseUser_id: 4
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
databases:
|
||||
name: databases
|
||||
description: 'Array of database names to link to the user.'
|
||||
required: true
|
||||
example: non
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
databases: non
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"username":"kurtis05","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer DgPea43EvV51a866dfbZckh'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
databaseUser_id:
|
||||
name: databaseUser_id
|
||||
description: 'The ID of the databaseUser.'
|
||||
required: true
|
||||
example: 6
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
databaseUser_id: 6
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6ackVP8hEZd3164gD5evafb'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
334
.scribe/endpoints.cache/03.yaml
Normal file
334
.scribe/endpoints.cache/03.yaml
Normal file
@ -0,0 +1,334 @@
|
||||
## 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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":null,"server_id":null,"type":"allow","protocol":"tcp","port":38781,"source":"79.116.255.150","mask":24,"note":"test","status":null,"created_at":null,"updated_at":null},{"id":null,"server_id":null,"type":"allow","protocol":"tcp","port":32141,"source":"52.174.114.251","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":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer h3P5gD8E4dkeZ6abac6vfV1'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
type:
|
||||
name: type
|
||||
description: ''
|
||||
required: true
|
||||
example: deny
|
||||
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: et
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
source:
|
||||
name: source
|
||||
description: ''
|
||||
required: true
|
||||
example: voluptates
|
||||
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: deny
|
||||
protocol: udp
|
||||
port: et
|
||||
source: voluptates
|
||||
mask: '0'
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"type":"allow","protocol":"tcp","port":47148,"source":"119.182.8.45","mask":24,"note":"test","status":null,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6a8DVv5k3gZfEe6hb1daPc4'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
firewallRule_id:
|
||||
name: firewallRule_id
|
||||
description: 'The ID of the firewallRule.'
|
||||
required: true
|
||||
example: 29
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
firewallRule_id: 29
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"type":"allow","protocol":"tcp","port":2317,"source":"44.161.134.114","mask":24,"note":"test","status":null,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer P4bZdV1geED3kfh568aa6cv'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
firewallRule_id:
|
||||
name: firewallRule_id
|
||||
description: 'The ID of the firewallRule.'
|
||||
required: true
|
||||
example: 29
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
firewallRule_id: 29
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer Dh3kcaafdg6E5ZvV46ePb81'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
46
.scribe/endpoints.cache/04.yaml
Normal file
46
.scribe/endpoints.cache/04.yaml
Normal file
@ -0,0 +1,46 @@
|
||||
## 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.1.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: []
|
260
.scribe/endpoints.cache/05.yaml
Normal file
260
.scribe/endpoints.cache/05.yaml
Normal file
@ -0,0 +1,260 @@
|
||||
## 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":3,"name":"Jeffry Dickinson","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"},{"id":4,"name":"Miss Tianna Dietrich PhD","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.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":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 5DaveP3d6b6khEZVcg4fa18'
|
||||
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":3,"name":"Isidro Franecki","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer a6P53EvkcZV6D4ghad1efb8'
|
||||
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":3,"name":"Rhoda Parisian","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer v48Ve5ZghdcbE1akP66fD3a'
|
||||
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: ullam
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
name: ullam
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":3,"name":"Mr. Dashawn Jacobson Sr.","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer fvEdh3Vgbk56Z4a61eP8caD'
|
||||
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 eg4c3vZ1Dhaa68d6PEfk5bV'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
503
.scribe/endpoints.cache/06.yaml
Normal file
503
.scribe/endpoints.cache/06.yaml
Normal file
@ -0,0 +1,503 @@
|
||||
## 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":"Amina DuBuque","ssh_user":"vito","ip":"163.77.69.73","local_ip":"137.139.200.70","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":"Floy Cummerata","ssh_user":"vito","ip":"62.53.140.25","local_ip":"34.59.35.195","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":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer E81avahec6365dbZfgD4kPV'
|
||||
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: iste
|
||||
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: custom
|
||||
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: libero
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
plan:
|
||||
name: plan
|
||||
description: 'Provider plan if the provider is not custom'
|
||||
required: true
|
||||
example: ut
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
ip:
|
||||
name: ip
|
||||
description: 'SSH IP address if the provider is custom'
|
||||
required: true
|
||||
example: molestias
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
port:
|
||||
name: port
|
||||
description: 'SSH Port if the provider is custom'
|
||||
required: true
|
||||
example: laudantium
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
name:
|
||||
name: name
|
||||
description: 'The name of the server.'
|
||||
required: true
|
||||
example: illum
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
os:
|
||||
name: os
|
||||
description: 'The os of the server'
|
||||
required: true
|
||||
example: autem
|
||||
type: string
|
||||
enumValues: []
|
||||
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: postgresql12
|
||||
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: '7.4'
|
||||
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: iste
|
||||
server_provider: custom
|
||||
region: libero
|
||||
plan: ut
|
||||
ip: molestias
|
||||
port: laudantium
|
||||
name: illum
|
||||
os: autem
|
||||
webserver: none
|
||||
database: postgresql12
|
||||
php: '7.4'
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"project_id":null,"user_id":null,"provider_id":null,"name":"Archibald Nolan","ssh_user":"vito","ip":"226.168.13.177","local_ip":"143.14.43.182","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 aad3Pvc4e65DghZVEk8f1b6'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"project_id":null,"user_id":null,"provider_id":null,"name":"Tevin Sipes","ssh_user":"vito","ip":"61.41.183.152","local_ip":"197.160.239.147","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 5EhD3v6Z8Vdakfg46eP1cab'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer Pc5Da6Vhdk1vag6fE84e3Zb'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer a61v48DfkeEbcg3a6hd5PZV'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer haE8D6Z6gePk1vadVb53c4f'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
372
.scribe/endpoints.cache/07.yaml
Normal file
372
.scribe/endpoints.cache/07.yaml
Normal file
@ -0,0 +1,372 @@
|
||||
## 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":"laudantium","provider":"vultr","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"},{"id":3,"project_id":null,"global":true,"name":"aut","provider":"aws","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.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":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer Df16eda8Pa345EkgbZ6cvhV'
|
||||
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: voluptatem
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
name:
|
||||
name: name
|
||||
description: 'The name of the server provider.'
|
||||
required: true
|
||||
example: repellat
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
token:
|
||||
name: token
|
||||
description: 'The token if provider requires api token'
|
||||
required: true
|
||||
example: omnis
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
key:
|
||||
name: key
|
||||
description: 'The key if provider requires key'
|
||||
required: true
|
||||
example: recusandae
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
secret:
|
||||
name: secret
|
||||
description: 'The secret if provider requires key'
|
||||
required: true
|
||||
example: in
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
provider: voluptatem
|
||||
name: repellat
|
||||
token: omnis
|
||||
key: recusandae
|
||||
secret: in
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":2,"project_id":null,"global":true,"name":"quia","provider":"vultr","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 8fbgDV6vdhakE1c64e3P5aZ'
|
||||
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":"ab","provider":"hetzner","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer eVE816Pc4ak3bdfahDZv6g5'
|
||||
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: est
|
||||
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: est
|
||||
global: true
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":2,"project_id":null,"global":true,"name":"nesciunt","provider":"linode","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer va86keaPDdh3b16Z54EgfcV'
|
||||
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 abv13ag8h5fZ4EPVDe6dc6k'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
235
.scribe/endpoints.cache/08.yaml
Normal file
235
.scribe/endpoints.cache/08.yaml
Normal file
@ -0,0 +1,235 @@
|
||||
## 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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":null,"user":null,"name":"Godfrey Mills","created_at":null,"updated_at":null},{"id":null,"user":null,"name":"Donato Streich","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":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 1gEva8Z6e6abPDhk453fdVc'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
key_id:
|
||||
name: key_id
|
||||
description: 'The ID of the key.'
|
||||
required: true
|
||||
example: numquam
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
name:
|
||||
name: name
|
||||
description: 'Key name, required if key_id is not provided.'
|
||||
required: true
|
||||
example: alias
|
||||
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: voluptate
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
key_id: numquam
|
||||
name: alias
|
||||
public_key: voluptate
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"user":null,"name":"Mr. Stanton Bergnaum","created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer V64Z86fEdbavh1PgackDe53'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
sshKey_id:
|
||||
name: sshKey_id
|
||||
description: 'The ID of the sshKey.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
sshKey_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 3deg1vc65k8D6abahfZVPE4'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
578
.scribe/endpoints.cache/09.yaml
Normal file
578
.scribe/endpoints.cache/09.yaml
Normal file
@ -0,0 +1,578 @@
|
||||
## 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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
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":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer cdhb5VevgkZ6DafP6184a3E'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the service.'
|
||||
required: true
|
||||
example: 53
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
id: 53
|
||||
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 3vDaE6Pc51Zg8kbheadVf64'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
service_id:
|
||||
name: service_id
|
||||
description: 'The ID of the service.'
|
||||
required: true
|
||||
example: 53
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
service_id: 53
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer a6e6Db5VcP314EgZdka8vhf'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
service_id:
|
||||
name: service_id
|
||||
description: 'The ID of the service.'
|
||||
required: true
|
||||
example: 53
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
service_id: 53
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer kefg56PEc4a18aDdvVZb3h6'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
service_id:
|
||||
name: service_id
|
||||
description: 'The ID of the service.'
|
||||
required: true
|
||||
example: 53
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
service_id: 53
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer edhaE164avZ6gbVDPf3k8c5'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
service_id:
|
||||
name: service_id
|
||||
description: 'The ID of the service.'
|
||||
required: true
|
||||
example: 53
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
service_id: 53
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer D4c1hbfV6Pad68v3gEkaeZ5'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
service_id:
|
||||
name: service_id
|
||||
description: 'The ID of the service.'
|
||||
required: true
|
||||
example: 53
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
service_id: 53
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer be41fvh6a8d5PkDVEgZ36ca'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
service_id:
|
||||
name: service_id
|
||||
description: 'The ID of the service.'
|
||||
required: true
|
||||
example: 53
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
service_id: 53
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer dcb68hg634P1DaZvef5VakE'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
518
.scribe/endpoints.cache/10.yaml
Normal file
518
.scribe/endpoints.cache/10.yaml
Normal file
@ -0,0 +1,518 @@
|
||||
## 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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
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,"user":"vito","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,"user":"vito","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":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 3gE54ahkea166PfvbVD8Zdc'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
type:
|
||||
name: type
|
||||
description: ''
|
||||
required: true
|
||||
example: php
|
||||
type: string
|
||||
enumValues:
|
||||
- php
|
||||
- php-blank
|
||||
- phpmyadmin
|
||||
- laravel
|
||||
- wordpress
|
||||
- load-balancer
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
domain:
|
||||
name: domain
|
||||
description: ''
|
||||
required: true
|
||||
example: rem
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
aliases:
|
||||
name: aliases
|
||||
description: ''
|
||||
required: true
|
||||
example:
|
||||
- libero
|
||||
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: dolor
|
||||
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: []
|
||||
user:
|
||||
name: user
|
||||
description: 'user, to isolate the website under a new user'
|
||||
required: true
|
||||
example: vitae
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
method:
|
||||
name: method
|
||||
description: 'Load balancer method, Required if the site type is Load balancer'
|
||||
required: true
|
||||
example: ip-hash
|
||||
type: string
|
||||
enumValues:
|
||||
- round-robin
|
||||
- least-connections
|
||||
- ip-hash
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
type: php
|
||||
domain: rem
|
||||
aliases:
|
||||
- libero
|
||||
php_version: '7.4'
|
||||
web_directory: public
|
||||
source_control: dolor
|
||||
repository: organization/repository
|
||||
branch: main
|
||||
composer: true
|
||||
version: 5.2.1
|
||||
user: vitae
|
||||
method: ip-hash
|
||||
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,"user":"vito","progress":100,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer e1V4ga3Pavk6ch6b5E8fZdD'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the site.'
|
||||
required: true
|
||||
example: 26
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
id: 26
|
||||
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,"user":"vito","progress":100,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 8gZkEaehfd4v3bac615DVP6'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
site_id:
|
||||
name: site_id
|
||||
description: 'The ID of the site.'
|
||||
required: true
|
||||
example: 26
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
site_id: 26
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer aadb1h6f6kD4V8vePZgcE35'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/sites/{site_id}/load-balancer'
|
||||
metadata:
|
||||
groupName: sites
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: load-balancer
|
||||
description: 'Update load balancer.'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
site_id:
|
||||
name: site_id
|
||||
description: 'The ID of the site.'
|
||||
required: true
|
||||
example: 26
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
site_id: 26
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
method:
|
||||
name: method
|
||||
description: 'Load balancer method, Required if the site type is Load balancer'
|
||||
required: true
|
||||
example: least-connections
|
||||
type: string
|
||||
enumValues:
|
||||
- round-robin
|
||||
- least-connections
|
||||
- ip-hash
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
servers:
|
||||
name: servers
|
||||
description: 'Array of servers including server, port, weight, backup. (server is the local IP of the server)'
|
||||
required: true
|
||||
example:
|
||||
- deleniti
|
||||
type: 'string[]'
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
method: least-connections
|
||||
servers:
|
||||
- deleniti
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 5E6hZa64bka1cV3Pdvf8Deg'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
430
.scribe/endpoints.cache/11.yaml
Normal file
430
.scribe/endpoints.cache/11.yaml
Normal file
@ -0,0 +1,430 @@
|
||||
## 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":"Mr. Reuben Schimmel","provider":"github","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"},{"id":6,"project_id":null,"global":true,"name":"Ms. Brandy Mraz V","provider":"github","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.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":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer g4kDa1vV6cdfPe3baZ8h5E6'
|
||||
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: dignissimos
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
token:
|
||||
name: token
|
||||
description: 'The token if provider requires api token'
|
||||
required: true
|
||||
example: voluptates
|
||||
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://www.hamill.net/culpa-non-qui-suscipit-dolores-id-aliquam'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
username:
|
||||
name: username
|
||||
description: 'The username if the provider is Bitbucket'
|
||||
required: true
|
||||
example: nisi
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
password:
|
||||
name: password
|
||||
description: 'The password if the provider is Bitbucket'
|
||||
required: true
|
||||
example: W~19Z0
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
provider: bitbucket
|
||||
name: dignissimos
|
||||
token: voluptates
|
||||
url: 'https://www.hamill.net/culpa-non-qui-suscipit-dolores-id-aliquam'
|
||||
username: nisi
|
||||
password: W~19Z0
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":5,"project_id":null,"global":true,"name":"Harmony Koss DVM","provider":"github","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer fhEkg836V6cbd5ZPva4Dae1'
|
||||
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: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
sourceControl_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":5,"project_id":null,"global":true,"name":"Martin Welch","provider":"github","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 458gPbv6deEfkcZ13ahaD6V'
|
||||
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: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
sourceControl_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
name:
|
||||
name: name
|
||||
description: 'The name of the storage provider.'
|
||||
required: true
|
||||
example: aut
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
token:
|
||||
name: token
|
||||
description: 'The token if provider requires api token'
|
||||
required: true
|
||||
example: repudiandae
|
||||
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://howe.net/eaque-assumenda-voluptatem-quo-libero-eius.html'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
username:
|
||||
name: username
|
||||
description: 'The username if the provider is Bitbucket'
|
||||
required: true
|
||||
example: consequatur
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
password:
|
||||
name: password
|
||||
description: 'The password if the provider is Bitbucket'
|
||||
required: true
|
||||
example: 'oX/H"pAIt7R2"'
|
||||
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: aut
|
||||
token: repudiandae
|
||||
url: 'http://howe.net/eaque-assumenda-voluptatem-quo-libero-eius.html'
|
||||
username: consequatur
|
||||
password: 'oX/H"pAIt7R2"'
|
||||
global: false
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":5,"project_id":null,"global":true,"name":"Miss Dulce Nicolas III","provider":"github","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer De1a4dEaV5v3Zgh8fPk66bc'
|
||||
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: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
sourceControl_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer EZhd63eafgcV4a651PvkDb8'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
372
.scribe/endpoints.cache/12.yaml
Normal file
372
.scribe/endpoints.cache/12.yaml
Normal file
@ -0,0 +1,372 @@
|
||||
## 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":5,"project_id":null,"global":true,"name":"dolorem","provider":"s3","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"},{"id":6,"project_id":null,"global":true,"name":"itaque","provider":"s3","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.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":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer D16Vg58E6Pfkh3Zveab4dca'
|
||||
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: alias
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
name:
|
||||
name: name
|
||||
description: 'The name of the storage provider.'
|
||||
required: true
|
||||
example: explicabo
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
token:
|
||||
name: token
|
||||
description: 'The token if provider requires api token'
|
||||
required: true
|
||||
example: ut
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
key:
|
||||
name: key
|
||||
description: 'The key if provider requires key'
|
||||
required: true
|
||||
example: libero
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
secret:
|
||||
name: secret
|
||||
description: 'The secret if provider requires key'
|
||||
required: true
|
||||
example: consequatur
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
provider: alias
|
||||
name: explicabo
|
||||
token: ut
|
||||
key: libero
|
||||
secret: consequatur
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":5,"project_id":null,"global":true,"name":"quos","provider":"s3","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer DaZ6d6Eck1bhVe3g4aP85vf'
|
||||
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: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
storageProvider_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":5,"project_id":null,"global":true,"name":"id","provider":"s3","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 1dekD4gva56bc683VPEhZfa'
|
||||
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: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
storageProvider_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
name:
|
||||
name: name
|
||||
description: 'The name of the storage provider.'
|
||||
required: true
|
||||
example: sequi
|
||||
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: sequi
|
||||
global: false
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":5,"project_id":null,"global":true,"name":"velit","provider":"s3","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer V65g18Pca4v3hDEkbZfe6da'
|
||||
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: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
storageProvider_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 1v6a6efgch3DbZ4aVE5d8kP'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
308
.scribe/endpoints/00.yaml
Normal file
308
.scribe/endpoints/00.yaml
Normal file
@ -0,0 +1,308 @@
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
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":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer ge6ZVa4kfD86hdv5a31EcbP'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
command:
|
||||
name: command
|
||||
description: ''
|
||||
required: true
|
||||
example: itaque
|
||||
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: itaque
|
||||
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 cdh5bD8gVPkf34e1ZEva6a6'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cronJob_id:
|
||||
name: cronJob_id
|
||||
description: 'The ID of the cronJob.'
|
||||
required: true
|
||||
example: 18
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
cronJob_id: 18
|
||||
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 fa5VgdkaD8cZ6vh34Pb16eE'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cronJob_id:
|
||||
name: cronJob_id
|
||||
description: 'The ID of the cronJob.'
|
||||
required: true
|
||||
example: 10
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
cronJob_id: 10
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer P8hkva3ZD4fgb166adEVce5'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
284
.scribe/endpoints/01.yaml
Normal file
284
.scribe/endpoints/01.yaml
Normal file
@ -0,0 +1,284 @@
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":null,"server_id":null,"name":"amalia38","status":"ready","created_at":null,"updated_at":null},{"id":null,"server_id":null,"name":"troy.rippin","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":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer Z641ebPacDV6f38kEgdah5v'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
name:
|
||||
name: name
|
||||
description: ''
|
||||
required: true
|
||||
example: et
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
name: et
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"name":"harvey.haskell","status":"ready","created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer d4gbv56caV3aZ8D1h6kfEPe'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the database.'
|
||||
required: true
|
||||
example: 19
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
id: 19
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"name":"ruthie.koepp","status":"ready","created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer P68VgDcaEZvk63f4b5aed1h'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
database_id:
|
||||
name: database_id
|
||||
description: 'The ID of the database.'
|
||||
required: true
|
||||
example: 15
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
database_id: 15
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer DkPc6d1heEv5a8fb4V63agZ'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
390
.scribe/endpoints/02.yaml
Normal file
390
.scribe/endpoints/02.yaml
Normal file
@ -0,0 +1,390 @@
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":null,"server_id":null,"username":"xgaylord","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null},{"id":null,"server_id":null,"username":"una37","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":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer P4gD36fZeckvVh5ab86Ead1'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
username:
|
||||
name: username
|
||||
description: ''
|
||||
required: true
|
||||
example: consequuntur
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
password:
|
||||
name: password
|
||||
description: ''
|
||||
required: true
|
||||
example: 'fI/i2.O4u&dla?eXvR2'
|
||||
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: consequuntur
|
||||
password: 'fI/i2.O4u&dla?eXvR2'
|
||||
host: '%'
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"username":"kari.farrell","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 5k8Vced1baaE6f4ZvDPgh36'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
databaseUser_id:
|
||||
name: databaseUser_id
|
||||
description: 'The ID of the databaseUser.'
|
||||
required: true
|
||||
example: 18
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
databaseUser_id: 18
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"username":"caterina.mosciski","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 3kDveP5V8a6dghfa4E16cbZ'
|
||||
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: 8
|
||||
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: 8
|
||||
databaseUser_id: 4
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
databases:
|
||||
name: databases
|
||||
description: 'Array of database names to link to the user.'
|
||||
required: true
|
||||
example: non
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
databases: non
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"username":"kurtis05","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer DgPea43EvV51a866dfbZckh'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
databaseUser_id:
|
||||
name: databaseUser_id
|
||||
description: 'The ID of the databaseUser.'
|
||||
required: true
|
||||
example: 6
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
databaseUser_id: 6
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6ackVP8hEZd3164gD5evafb'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
332
.scribe/endpoints/03.yaml
Normal file
332
.scribe/endpoints/03.yaml
Normal file
@ -0,0 +1,332 @@
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":null,"server_id":null,"type":"allow","protocol":"tcp","port":38781,"source":"79.116.255.150","mask":24,"note":"test","status":null,"created_at":null,"updated_at":null},{"id":null,"server_id":null,"type":"allow","protocol":"tcp","port":32141,"source":"52.174.114.251","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":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer h3P5gD8E4dkeZ6abac6vfV1'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
type:
|
||||
name: type
|
||||
description: ''
|
||||
required: true
|
||||
example: deny
|
||||
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: et
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
source:
|
||||
name: source
|
||||
description: ''
|
||||
required: true
|
||||
example: voluptates
|
||||
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: deny
|
||||
protocol: udp
|
||||
port: et
|
||||
source: voluptates
|
||||
mask: '0'
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"type":"allow","protocol":"tcp","port":47148,"source":"119.182.8.45","mask":24,"note":"test","status":null,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6a8DVv5k3gZfEe6hb1daPc4'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
firewallRule_id:
|
||||
name: firewallRule_id
|
||||
description: 'The ID of the firewallRule.'
|
||||
required: true
|
||||
example: 29
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
firewallRule_id: 29
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"type":"allow","protocol":"tcp","port":2317,"source":"44.161.134.114","mask":24,"note":"test","status":null,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer P4bZdV1geED3kfh568aa6cv'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
firewallRule_id:
|
||||
name: firewallRule_id
|
||||
description: 'The ID of the firewallRule.'
|
||||
required: true
|
||||
example: 29
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
firewallRule_id: 29
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer Dh3kcaafdg6E5ZvV46ePb81'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
44
.scribe/endpoints/04.yaml
Normal file
44
.scribe/endpoints/04.yaml
Normal file
@ -0,0 +1,44 @@
|
||||
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.1.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: []
|
258
.scribe/endpoints/05.yaml
Normal file
258
.scribe/endpoints/05.yaml
Normal file
@ -0,0 +1,258 @@
|
||||
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":3,"name":"Jeffry Dickinson","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"},{"id":4,"name":"Miss Tianna Dietrich PhD","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.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":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 5DaveP3d6b6khEZVcg4fa18'
|
||||
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":3,"name":"Isidro Franecki","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer a6P53EvkcZV6D4ghad1efb8'
|
||||
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":3,"name":"Rhoda Parisian","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer v48Ve5ZghdcbE1akP66fD3a'
|
||||
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: ullam
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
name: ullam
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":3,"name":"Mr. Dashawn Jacobson Sr.","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer fvEdh3Vgbk56Z4a61eP8caD'
|
||||
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 eg4c3vZ1Dhaa68d6PEfk5bV'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
501
.scribe/endpoints/06.yaml
Normal file
501
.scribe/endpoints/06.yaml
Normal file
@ -0,0 +1,501 @@
|
||||
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":"Amina DuBuque","ssh_user":"vito","ip":"163.77.69.73","local_ip":"137.139.200.70","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":"Floy Cummerata","ssh_user":"vito","ip":"62.53.140.25","local_ip":"34.59.35.195","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":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer E81avahec6365dbZfgD4kPV'
|
||||
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: iste
|
||||
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: custom
|
||||
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: libero
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
plan:
|
||||
name: plan
|
||||
description: 'Provider plan if the provider is not custom'
|
||||
required: true
|
||||
example: ut
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
ip:
|
||||
name: ip
|
||||
description: 'SSH IP address if the provider is custom'
|
||||
required: true
|
||||
example: molestias
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
port:
|
||||
name: port
|
||||
description: 'SSH Port if the provider is custom'
|
||||
required: true
|
||||
example: laudantium
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
name:
|
||||
name: name
|
||||
description: 'The name of the server.'
|
||||
required: true
|
||||
example: illum
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
os:
|
||||
name: os
|
||||
description: 'The os of the server'
|
||||
required: true
|
||||
example: autem
|
||||
type: string
|
||||
enumValues: []
|
||||
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: postgresql12
|
||||
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: '7.4'
|
||||
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: iste
|
||||
server_provider: custom
|
||||
region: libero
|
||||
plan: ut
|
||||
ip: molestias
|
||||
port: laudantium
|
||||
name: illum
|
||||
os: autem
|
||||
webserver: none
|
||||
database: postgresql12
|
||||
php: '7.4'
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"project_id":null,"user_id":null,"provider_id":null,"name":"Archibald Nolan","ssh_user":"vito","ip":"226.168.13.177","local_ip":"143.14.43.182","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 aad3Pvc4e65DghZVEk8f1b6'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"project_id":null,"user_id":null,"provider_id":null,"name":"Tevin Sipes","ssh_user":"vito","ip":"61.41.183.152","local_ip":"197.160.239.147","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 5EhD3v6Z8Vdakfg46eP1cab'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer Pc5Da6Vhdk1vag6fE84e3Zb'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer a61v48DfkeEbcg3a6hd5PZV'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer haE8D6Z6gePk1vadVb53c4f'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
370
.scribe/endpoints/07.yaml
Normal file
370
.scribe/endpoints/07.yaml
Normal file
@ -0,0 +1,370 @@
|
||||
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":"laudantium","provider":"vultr","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"},{"id":3,"project_id":null,"global":true,"name":"aut","provider":"aws","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.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":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer Df16eda8Pa345EkgbZ6cvhV'
|
||||
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: voluptatem
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
name:
|
||||
name: name
|
||||
description: 'The name of the server provider.'
|
||||
required: true
|
||||
example: repellat
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
token:
|
||||
name: token
|
||||
description: 'The token if provider requires api token'
|
||||
required: true
|
||||
example: omnis
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
key:
|
||||
name: key
|
||||
description: 'The key if provider requires key'
|
||||
required: true
|
||||
example: recusandae
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
secret:
|
||||
name: secret
|
||||
description: 'The secret if provider requires key'
|
||||
required: true
|
||||
example: in
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
provider: voluptatem
|
||||
name: repellat
|
||||
token: omnis
|
||||
key: recusandae
|
||||
secret: in
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":2,"project_id":null,"global":true,"name":"quia","provider":"vultr","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 8fbgDV6vdhakE1c64e3P5aZ'
|
||||
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":"ab","provider":"hetzner","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer eVE816Pc4ak3bdfahDZv6g5'
|
||||
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: est
|
||||
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: est
|
||||
global: true
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":2,"project_id":null,"global":true,"name":"nesciunt","provider":"linode","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer va86keaPDdh3b16Z54EgfcV'
|
||||
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 abv13ag8h5fZ4EPVDe6dc6k'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
233
.scribe/endpoints/08.yaml
Normal file
233
.scribe/endpoints/08.yaml
Normal file
@ -0,0 +1,233 @@
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":null,"user":null,"name":"Godfrey Mills","created_at":null,"updated_at":null},{"id":null,"user":null,"name":"Donato Streich","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":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 1gEva8Z6e6abPDhk453fdVc'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
key_id:
|
||||
name: key_id
|
||||
description: 'The ID of the key.'
|
||||
required: true
|
||||
example: numquam
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
name:
|
||||
name: name
|
||||
description: 'Key name, required if key_id is not provided.'
|
||||
required: true
|
||||
example: alias
|
||||
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: voluptate
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
key_id: numquam
|
||||
name: alias
|
||||
public_key: voluptate
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"user":null,"name":"Mr. Stanton Bergnaum","created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer V64Z86fEdbavh1PgackDe53'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
sshKey_id:
|
||||
name: sshKey_id
|
||||
description: 'The ID of the sshKey.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
sshKey_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 3deg1vc65k8D6abahfZVPE4'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
576
.scribe/endpoints/09.yaml
Normal file
576
.scribe/endpoints/09.yaml
Normal file
@ -0,0 +1,576 @@
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
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":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer cdhb5VevgkZ6DafP6184a3E'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the service.'
|
||||
required: true
|
||||
example: 53
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
id: 53
|
||||
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 3vDaE6Pc51Zg8kbheadVf64'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
service_id:
|
||||
name: service_id
|
||||
description: 'The ID of the service.'
|
||||
required: true
|
||||
example: 53
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
service_id: 53
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer a6e6Db5VcP314EgZdka8vhf'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
service_id:
|
||||
name: service_id
|
||||
description: 'The ID of the service.'
|
||||
required: true
|
||||
example: 53
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
service_id: 53
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer kefg56PEc4a18aDdvVZb3h6'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
service_id:
|
||||
name: service_id
|
||||
description: 'The ID of the service.'
|
||||
required: true
|
||||
example: 53
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
service_id: 53
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer edhaE164avZ6gbVDPf3k8c5'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
service_id:
|
||||
name: service_id
|
||||
description: 'The ID of the service.'
|
||||
required: true
|
||||
example: 53
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
service_id: 53
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer D4c1hbfV6Pad68v3gEkaeZ5'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
service_id:
|
||||
name: service_id
|
||||
description: 'The ID of the service.'
|
||||
required: true
|
||||
example: 53
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
service_id: 53
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer be41fvh6a8d5PkDVEgZ36ca'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
service_id:
|
||||
name: service_id
|
||||
description: 'The ID of the service.'
|
||||
required: true
|
||||
example: 53
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
service_id: 53
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer dcb68hg634P1DaZvef5VakE'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
516
.scribe/endpoints/10.yaml
Normal file
516
.scribe/endpoints/10.yaml
Normal file
@ -0,0 +1,516 @@
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
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,"user":"vito","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,"user":"vito","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":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 3gE54ahkea166PfvbVD8Zdc'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
type:
|
||||
name: type
|
||||
description: ''
|
||||
required: true
|
||||
example: php
|
||||
type: string
|
||||
enumValues:
|
||||
- php
|
||||
- php-blank
|
||||
- phpmyadmin
|
||||
- laravel
|
||||
- wordpress
|
||||
- load-balancer
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
domain:
|
||||
name: domain
|
||||
description: ''
|
||||
required: true
|
||||
example: rem
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
aliases:
|
||||
name: aliases
|
||||
description: ''
|
||||
required: true
|
||||
example:
|
||||
- libero
|
||||
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: dolor
|
||||
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: []
|
||||
user:
|
||||
name: user
|
||||
description: 'user, to isolate the website under a new user'
|
||||
required: true
|
||||
example: vitae
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
method:
|
||||
name: method
|
||||
description: 'Load balancer method, Required if the site type is Load balancer'
|
||||
required: true
|
||||
example: ip-hash
|
||||
type: string
|
||||
enumValues:
|
||||
- round-robin
|
||||
- least-connections
|
||||
- ip-hash
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
type: php
|
||||
domain: rem
|
||||
aliases:
|
||||
- libero
|
||||
php_version: '7.4'
|
||||
web_directory: public
|
||||
source_control: dolor
|
||||
repository: organization/repository
|
||||
branch: main
|
||||
composer: true
|
||||
version: 5.2.1
|
||||
user: vitae
|
||||
method: ip-hash
|
||||
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,"user":"vito","progress":100,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer e1V4ga3Pavk6ch6b5E8fZdD'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the site.'
|
||||
required: true
|
||||
example: 26
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
id: 26
|
||||
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,"user":"vito","progress":100,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 8gZkEaehfd4v3bac615DVP6'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
site_id:
|
||||
name: site_id
|
||||
description: 'The ID of the site.'
|
||||
required: true
|
||||
example: 26
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
site_id: 26
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer aadb1h6f6kD4V8vePZgcE35'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/sites/{site_id}/load-balancer'
|
||||
metadata:
|
||||
groupName: sites
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: load-balancer
|
||||
description: 'Update load balancer.'
|
||||
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: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
site_id:
|
||||
name: site_id
|
||||
description: 'The ID of the site.'
|
||||
required: true
|
||||
example: 26
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
site_id: 26
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
method:
|
||||
name: method
|
||||
description: 'Load balancer method, Required if the site type is Load balancer'
|
||||
required: true
|
||||
example: least-connections
|
||||
type: string
|
||||
enumValues:
|
||||
- round-robin
|
||||
- least-connections
|
||||
- ip-hash
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
servers:
|
||||
name: servers
|
||||
description: 'Array of servers including server, port, weight, backup. (server is the local IP of the server)'
|
||||
required: true
|
||||
example:
|
||||
- deleniti
|
||||
type: 'string[]'
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
method: least-connections
|
||||
servers:
|
||||
- deleniti
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 5E6hZa64bka1cV3Pdvf8Deg'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
428
.scribe/endpoints/11.yaml
Normal file
428
.scribe/endpoints/11.yaml
Normal file
@ -0,0 +1,428 @@
|
||||
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":"Mr. Reuben Schimmel","provider":"github","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"},{"id":6,"project_id":null,"global":true,"name":"Ms. Brandy Mraz V","provider":"github","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.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":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer g4kDa1vV6cdfPe3baZ8h5E6'
|
||||
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: dignissimos
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
token:
|
||||
name: token
|
||||
description: 'The token if provider requires api token'
|
||||
required: true
|
||||
example: voluptates
|
||||
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://www.hamill.net/culpa-non-qui-suscipit-dolores-id-aliquam'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
username:
|
||||
name: username
|
||||
description: 'The username if the provider is Bitbucket'
|
||||
required: true
|
||||
example: nisi
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
password:
|
||||
name: password
|
||||
description: 'The password if the provider is Bitbucket'
|
||||
required: true
|
||||
example: W~19Z0
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
provider: bitbucket
|
||||
name: dignissimos
|
||||
token: voluptates
|
||||
url: 'https://www.hamill.net/culpa-non-qui-suscipit-dolores-id-aliquam'
|
||||
username: nisi
|
||||
password: W~19Z0
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":5,"project_id":null,"global":true,"name":"Harmony Koss DVM","provider":"github","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer fhEkg836V6cbd5ZPva4Dae1'
|
||||
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: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
sourceControl_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":5,"project_id":null,"global":true,"name":"Martin Welch","provider":"github","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 458gPbv6deEfkcZ13ahaD6V'
|
||||
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: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
sourceControl_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
name:
|
||||
name: name
|
||||
description: 'The name of the storage provider.'
|
||||
required: true
|
||||
example: aut
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
token:
|
||||
name: token
|
||||
description: 'The token if provider requires api token'
|
||||
required: true
|
||||
example: repudiandae
|
||||
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://howe.net/eaque-assumenda-voluptatem-quo-libero-eius.html'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
username:
|
||||
name: username
|
||||
description: 'The username if the provider is Bitbucket'
|
||||
required: true
|
||||
example: consequatur
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
password:
|
||||
name: password
|
||||
description: 'The password if the provider is Bitbucket'
|
||||
required: true
|
||||
example: 'oX/H"pAIt7R2"'
|
||||
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: aut
|
||||
token: repudiandae
|
||||
url: 'http://howe.net/eaque-assumenda-voluptatem-quo-libero-eius.html'
|
||||
username: consequatur
|
||||
password: 'oX/H"pAIt7R2"'
|
||||
global: false
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":5,"project_id":null,"global":true,"name":"Miss Dulce Nicolas III","provider":"github","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer De1a4dEaV5v3Zgh8fPk66bc'
|
||||
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: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
sourceControl_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer EZhd63eafgcV4a651PvkDb8'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
370
.scribe/endpoints/12.yaml
Normal file
370
.scribe/endpoints/12.yaml
Normal file
@ -0,0 +1,370 @@
|
||||
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":5,"project_id":null,"global":true,"name":"dolorem","provider":"s3","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"},{"id":6,"project_id":null,"global":true,"name":"itaque","provider":"s3","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.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":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer D16Vg58E6Pfkh3Zveab4dca'
|
||||
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: alias
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
name:
|
||||
name: name
|
||||
description: 'The name of the storage provider.'
|
||||
required: true
|
||||
example: explicabo
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
token:
|
||||
name: token
|
||||
description: 'The token if provider requires api token'
|
||||
required: true
|
||||
example: ut
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
key:
|
||||
name: key
|
||||
description: 'The key if provider requires key'
|
||||
required: true
|
||||
example: libero
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
secret:
|
||||
name: secret
|
||||
description: 'The secret if provider requires key'
|
||||
required: true
|
||||
example: consequatur
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
provider: alias
|
||||
name: explicabo
|
||||
token: ut
|
||||
key: libero
|
||||
secret: consequatur
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":5,"project_id":null,"global":true,"name":"quos","provider":"s3","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer DaZ6d6Eck1bhVe3g4aP85vf'
|
||||
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: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
storageProvider_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":5,"project_id":null,"global":true,"name":"id","provider":"s3","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 1dekD4gva56bc683VPEhZfa'
|
||||
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: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
storageProvider_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
name:
|
||||
name: name
|
||||
description: 'The name of the storage provider.'
|
||||
required: true
|
||||
example: sequi
|
||||
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: sequi
|
||||
global: false
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":5,"project_id":null,"global":true,"name":"velit","provider":"s3","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer V65g18Pca4v3hDEkbZfe6da'
|
||||
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: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
storageProvider_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 1v6a6efgch3DbZ4aVE5d8kP'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
53
.scribe/endpoints/custom.0.yaml
Normal file
53
.scribe/endpoints/custom.0.yaml
Normal file
@ -0,0 +1,53 @@
|
||||
# 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
|
13
.scribe/intro.md
Normal file
13
.scribe/intro.md
Normal file
@ -0,0 +1,13 @@
|
||||
# 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>
|
||||
|
@ -1,23 +1,5 @@
|
||||
# Contributing
|
||||
Thank you for your interest in contributing! There are a couple of contribution guidelines that make it easier to apply the incoming suggestions.
|
||||
|
||||
If you want to contribute please start with the issues. Issues labeled with "Bug" are the higher priorities.
|
||||
Please read the contribution guide on the website
|
||||
|
||||
## Issues
|
||||
1. Issues are the best place to propose a new feature.
|
||||
2. If you are adding a feature that there is no issue for yet, please first open an issue and label it as "feature" and lets discuss it before you implement it.
|
||||
3. Search the issues before proposing a feature to see if it is already under discussion. Referencing existing issues is a good way to increase the priority of your own.
|
||||
4. We don't have an issue template yet, but the more detailed your explanation, the more quickly we'll be able to evaluate it.
|
||||
5. Search for the issue that you also have. Give it a reaction (and comment, if you have something to add). We note that!
|
||||
|
||||
## Pull Requests
|
||||
1. Open PRs represent issues that we're actively thinking about merging (at a pace we can manage). If we think a proposal needs more discussion, or that the existing code would require a lot of back-and-forth to merge, we might close it and suggest you make an issue.
|
||||
2. All PRs should be made against the `main` branch. This can be changed in the future.
|
||||
3. If you are making changes to the front-end layer, Please build the assets via `npm run build` and push it with the other changes.
|
||||
4. Write tests for your code. Tests can be Unit or Feature.
|
||||
5. Code refactors will be closed. For the architectural refactors open an issue first.
|
||||
6. Use `./vendor/bin/pint` to style your code before opening a PR otherwise the actions will fail.
|
||||
7. Typo fixes in documentation are welcome, but if it's at all debatable we might just close it.
|
||||
|
||||
## Misc
|
||||
1. If you think we closed something incorrectly, feel free to (politely) tell us why! We're human and make mistakes.
|
||||
https://vitodeploy.com/prologue/contribution-guide.html
|
||||
|
673
LICENSE
673
LICENSE
@ -1,22 +1,661 @@
|
||||
The MIT License (MIT)
|
||||
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
Version 3, 19 November 2007
|
||||
|
||||
Copyright (c) Saeed Vaziry <sa.vaziry@gmail.com>
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
Preamble
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
The GNU Affero General Public License is a free, copyleft license for
|
||||
software and other kinds of works, specifically designed to ensure
|
||||
cooperation with the community in the case of network server software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
our General Public Licenses are intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
Developers that use our General Public Licenses protect your rights
|
||||
with two steps: (1) assert copyright on the software, and (2) offer
|
||||
you this License which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
|
||||
A secondary benefit of defending all users' freedom is that
|
||||
improvements made in alternate versions of the program, if they
|
||||
receive widespread use, become available for other developers to
|
||||
incorporate. Many developers of free software are heartened and
|
||||
encouraged by the resulting cooperation. However, in the case of
|
||||
software used on network servers, this result may fail to come about.
|
||||
The GNU General Public License permits making a modified version and
|
||||
letting the public access it on a server without ever releasing its
|
||||
source code to the public.
|
||||
|
||||
The GNU Affero General Public License is designed specifically to
|
||||
ensure that, in such cases, the modified source code becomes available
|
||||
to the community. It requires the operator of a network server to
|
||||
provide the source code of the modified version running there to the
|
||||
users of that server. Therefore, public use of a modified version, on
|
||||
a publicly accessible server, gives the public access to the source
|
||||
code of the modified version.
|
||||
|
||||
An older license, called the Affero General Public License and
|
||||
published by Affero, was designed to accomplish similar goals. This is
|
||||
a different license, not a version of the Affero GPL, but Affero has
|
||||
released a new version of the Affero GPL which permits relicensing under
|
||||
this license.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Remote Network Interaction; Use with the GNU General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, if you modify the
|
||||
Program, your modified version must prominently offer all users
|
||||
interacting with it remotely through a computer network (if your version
|
||||
supports such interaction) an opportunity to receive the Corresponding
|
||||
Source of your version by providing access to the Corresponding Source
|
||||
from a network server at no charge, through some standard or customary
|
||||
means of facilitating copying of software. This Corresponding Source
|
||||
shall include the Corresponding Source for any work covered by version 3
|
||||
of the GNU General Public License that is incorporated pursuant to the
|
||||
following paragraph.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the work with which it is combined will remain governed by version
|
||||
3 of the GNU General Public License.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU Affero General Public License from time to time. Such new versions
|
||||
will be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU Affero General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU Affero General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU Affero General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If your software can interact with users remotely through a computer
|
||||
network, you should also make sure that it provides a way for users to
|
||||
get its source. For example, if your program is a web application, its
|
||||
interface could display a "Source" link that leads users to an archive
|
||||
of the code. There are many ways you could offer source, and different
|
||||
solutions will be better for different programs; see section 13 for the
|
||||
specific requirements.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU AGPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
64
README.md
64
README.md
@ -1,36 +1,58 @@
|
||||
# Vito
|
||||
<p align="center">
|
||||
<img src="https://github.com/user-attachments/assets/57f77bd5-bd3f-4367-84c0-aff6ecd392b4" 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
|
||||
|
||||
Better Readme will come soon... :)
|
||||
Vito is a self-hosted web application that helps you manage your servers and deploy your PHP applications into
|
||||
production servers without a hassle.
|
||||
|
||||
## Documentation
|
||||
## Quick Start
|
||||
|
||||
https://vitodeploy.com
|
||||
```sh
|
||||
bash <(curl -Ls https://raw.githubusercontent.com/vitodeploy/vito/2.x/scripts/install.sh)
|
||||
```
|
||||
|
||||
## Feedbacks
|
||||
## Features
|
||||
|
||||
https://features.vitodeploy.com
|
||||
- Provisions and Manages the server
|
||||
- Easy database management, Supports Mysql and MariaDB
|
||||
- Deploy your PHP applications such as Laravel
|
||||
- Manage your server's firewall
|
||||
- Supports Custom and Letsencrypt SSL
|
||||
- Uses supervisor to handle queues
|
||||
- Manages server's services
|
||||
- Deploy your SSH Keys to the server
|
||||
- Create and Manage cron jobs on the server
|
||||
- API
|
||||
|
||||
## Roadmap
|
||||
## Useful Links
|
||||
|
||||
https://https://features.vitodeploy.com/roadmap
|
||||
|
||||
## Contribution
|
||||
|
||||
Please read the contribution guide [Here](/CONTRIBUTING.md)
|
||||
|
||||
## Security
|
||||
|
||||
Please read the security policy [Here](/SECURITY.md)
|
||||
- [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)
|
||||
- [Roadmap](https://github.com/orgs/vitodeploy/projects/5)
|
||||
- [Discord](https://discord.gg/uZeeHZZnm5)
|
||||
- [Contribution](https://vitodeploy.com/prologue/contribution-guide.html)
|
||||
- [Security](/SECURITY.md)
|
||||
|
||||
## Credits
|
||||
|
||||
- Laravel
|
||||
- Tailwind
|
||||
- Livewire
|
||||
- PHPSecLib
|
||||
- PHPUnit
|
||||
- Tailwindcss
|
||||
- Alpinejs
|
||||
- Livewire
|
||||
- Vite
|
||||
- Laravel Enum by BenSampo
|
||||
- Prettier
|
||||
- Postcss
|
||||
- FilamentPHP
|
||||
- Mobiledetect
|
||||
- Spatie
|
||||
|
@ -2,9 +2,11 @@ # Security Policy
|
||||
|
||||
## Supported Versions
|
||||
|
||||
| Version | Supported |
|
||||
| ------- | ------------------ |
|
||||
| 0.x | :white_check_mark: |
|
||||
| Version | New Features | Bug Fixes | Security Fixes |
|
||||
|---------|--------------|-----------|----------------------|
|
||||
| 0.x | ❌ | ❌ | ❌ |
|
||||
| 1.x | ❌ | ❌ | ✅ (Until March 2025) |
|
||||
| 2.x | ✅ | ✅ | ✅ |
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
|
@ -6,43 +6,51 @@
|
||||
use App\Models\CronJob;
|
||||
use App\Models\Server;
|
||||
use App\ValidationRules\CronRule;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class CreateCronJob
|
||||
{
|
||||
public function create(Server $server, array $input): void
|
||||
public function create(Server $server, array $input): CronJob
|
||||
{
|
||||
$this->validate($input);
|
||||
|
||||
$cronJob = new CronJob([
|
||||
'server_id' => $server->id,
|
||||
'user' => $input['user'],
|
||||
'command' => $input['command'],
|
||||
'frequency' => $input['frequency'],
|
||||
'frequency' => $input['frequency'] == 'custom' ? $input['custom'] : $input['frequency'],
|
||||
'status' => CronjobStatus::CREATING,
|
||||
]);
|
||||
$cronJob->save();
|
||||
$cronJob->addToServer();
|
||||
|
||||
$server->cron()->update($cronJob->user, CronJob::crontab($server, $cronJob->user));
|
||||
$cronJob->status = CronjobStatus::READY;
|
||||
$cronJob->save();
|
||||
|
||||
return $cronJob;
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
private function validate(array $input): void
|
||||
public static function rules(array $input, Server $server): array
|
||||
{
|
||||
Validator::make($input, [
|
||||
$rules = [
|
||||
'command' => [
|
||||
'required',
|
||||
],
|
||||
'user' => [
|
||||
'required',
|
||||
'in:root,'.config('core.ssh_user'),
|
||||
Rule::in($server->getSshUsers()),
|
||||
],
|
||||
'frequency' => [
|
||||
'required',
|
||||
new CronRule(),
|
||||
new CronRule(acceptCustom: true),
|
||||
],
|
||||
])->validateWithBag('createCronJob');
|
||||
];
|
||||
|
||||
if (isset($input['frequency']) && $input['frequency'] == 'custom') {
|
||||
$rules['custom'] = [
|
||||
'required',
|
||||
new CronRule,
|
||||
];
|
||||
}
|
||||
|
||||
return $rules;
|
||||
}
|
||||
}
|
||||
|
19
app/Actions/CronJob/DeleteCronJob.php
Executable file
19
app/Actions/CronJob/DeleteCronJob.php
Executable file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\CronJob;
|
||||
|
||||
use App\Enums\CronjobStatus;
|
||||
use App\Models\CronJob;
|
||||
use App\Models\Server;
|
||||
|
||||
class DeleteCronJob
|
||||
{
|
||||
public function delete(Server $server, CronJob $cronJob): void
|
||||
{
|
||||
$user = $cronJob->user;
|
||||
$cronJob->status = CronjobStatus::DELETING;
|
||||
$cronJob->save();
|
||||
$server->cron()->update($cronJob->user, CronJob::crontab($server, $user));
|
||||
$cronJob->delete();
|
||||
}
|
||||
}
|
20
app/Actions/CronJob/DisableCronJob.php
Executable file
20
app/Actions/CronJob/DisableCronJob.php
Executable file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\CronJob;
|
||||
|
||||
use App\Enums\CronjobStatus;
|
||||
use App\Models\CronJob;
|
||||
use App\Models\Server;
|
||||
|
||||
class DisableCronJob
|
||||
{
|
||||
public function disable(Server $server, CronJob $cronJob): void
|
||||
{
|
||||
$cronJob->status = CronjobStatus::DISABLING;
|
||||
$cronJob->save();
|
||||
|
||||
$server->cron()->update($cronJob->user, CronJob::crontab($server, $cronJob->user));
|
||||
$cronJob->status = CronjobStatus::DISABLED;
|
||||
$cronJob->save();
|
||||
}
|
||||
}
|
20
app/Actions/CronJob/EnableCronJob.php
Executable file
20
app/Actions/CronJob/EnableCronJob.php
Executable file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\CronJob;
|
||||
|
||||
use App\Enums\CronjobStatus;
|
||||
use App\Models\CronJob;
|
||||
use App\Models\Server;
|
||||
|
||||
class EnableCronJob
|
||||
{
|
||||
public function enable(Server $server, CronJob $cronJob): void
|
||||
{
|
||||
$cronJob->status = CronjobStatus::ENABLING;
|
||||
$cronJob->save();
|
||||
|
||||
$server->cron()->update($cronJob->user, CronJob::crontab($server, $cronJob->user));
|
||||
$cronJob->status = CronjobStatus::READY;
|
||||
$cronJob->save();
|
||||
}
|
||||
}
|
@ -2,27 +2,31 @@
|
||||
|
||||
namespace App\Actions\Database;
|
||||
|
||||
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 */
|
||||
$databaseHandler = $server->database()->handler();
|
||||
$databaseHandler->create($database->name);
|
||||
$database->status = DatabaseStatus::READY;
|
||||
$database->save();
|
||||
$database->createOnServer();
|
||||
|
||||
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;
|
||||
}
|
||||
@ -30,7 +34,7 @@ public function create(Server $server, array $input): Database
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
private function validate(Server $server, array $input): void
|
||||
public static function rules(Server $server, array $input): array
|
||||
{
|
||||
$rules = [
|
||||
'name' => [
|
||||
@ -53,6 +57,7 @@ private function validate(Server $server, array $input): void
|
||||
if (isset($input['remote']) && $input['remote']) {
|
||||
$rules['host'] = 'required';
|
||||
}
|
||||
Validator::make($input, $rules)->validate();
|
||||
|
||||
return $rules;
|
||||
}
|
||||
}
|
||||
|
@ -2,9 +2,10 @@
|
||||
|
||||
namespace App\Actions\Database;
|
||||
|
||||
use App\Enums\DatabaseUserStatus;
|
||||
use App\Models\DatabaseUser;
|
||||
use App\Models\Server;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use App\SSH\Services\Database\Database;
|
||||
use Illuminate\Validation\Rule;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
@ -15,17 +16,26 @@ 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'] ? $input['host'] : 'localhost',
|
||||
'host' => (isset($input['remote']) && $input['remote']) || isset($input['host']) ? $input['host'] : 'localhost',
|
||||
'databases' => $links,
|
||||
]);
|
||||
/** @var Database $databaseHandler */
|
||||
$databaseHandler = $server->database()->handler();
|
||||
$databaseHandler->createUser(
|
||||
$databaseUser->username,
|
||||
$databaseUser->password,
|
||||
$databaseUser->host
|
||||
);
|
||||
$databaseUser->status = DatabaseUserStatus::READY;
|
||||
$databaseUser->save();
|
||||
$databaseUser->createOnServer();
|
||||
|
||||
if (count($links) > 0) {
|
||||
app(LinkUser::class)->link($databaseUser, ['databases' => $links]);
|
||||
}
|
||||
|
||||
return $databaseUser;
|
||||
}
|
||||
@ -33,7 +43,7 @@ public function create(Server $server, array $input, array $links = []): Databas
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
private function validate(Server $server, array $input): void
|
||||
public static function rules(Server $server, array $input): array
|
||||
{
|
||||
$rules = [
|
||||
'username' => [
|
||||
@ -49,6 +59,7 @@ private function validate(Server $server, array $input): void
|
||||
if (isset($input['remote']) && $input['remote']) {
|
||||
$rules['host'] = 'required';
|
||||
}
|
||||
Validator::make($input, $rules)->validate();
|
||||
|
||||
return $rules;
|
||||
}
|
||||
}
|
||||
|
15
app/Actions/Database/DeleteDatabase.php
Executable file
15
app/Actions/Database/DeleteDatabase.php
Executable file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\Database;
|
||||
|
||||
use App\Models\Database;
|
||||
use App\Models\Server;
|
||||
|
||||
class DeleteDatabase
|
||||
{
|
||||
public function delete(Server $server, Database $database): void
|
||||
{
|
||||
$server->database()->handler()->delete($database->name);
|
||||
$database->delete();
|
||||
}
|
||||
}
|
15
app/Actions/Database/DeleteDatabaseUser.php
Executable file
15
app/Actions/Database/DeleteDatabaseUser.php
Executable file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\Database;
|
||||
|
||||
use App\Models\DatabaseUser;
|
||||
use App\Models\Server;
|
||||
|
||||
class DeleteDatabaseUser
|
||||
{
|
||||
public function delete(Server $server, DatabaseUser $databaseUser): void
|
||||
{
|
||||
$server->database()->handler()->deleteUser($databaseUser->username, $databaseUser->host);
|
||||
$databaseUser->delete();
|
||||
}
|
||||
}
|
@ -4,6 +4,8 @@
|
||||
|
||||
use App\Models\Database;
|
||||
use App\Models\DatabaseUser;
|
||||
use App\Models\Server;
|
||||
use Illuminate\Validation\Rule;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
class LinkUser
|
||||
@ -11,20 +13,49 @@ class LinkUser
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
public function link(DatabaseUser $databaseUser, array $databases): void
|
||||
public function link(DatabaseUser $databaseUser, array $input): DatabaseUser
|
||||
{
|
||||
$dbs = Database::query()
|
||||
->where('server_id', $databaseUser->server_id)
|
||||
->whereIn('name', $databases)
|
||||
->count();
|
||||
if (count($databases) !== $dbs) {
|
||||
throw ValidationException::withMessages(['databases' => __('Databases not found!')])
|
||||
->errorBag('linkUser');
|
||||
if (! isset($input['databases']) || ! is_array($input['databases'])) {
|
||||
$input['databases'] = [];
|
||||
}
|
||||
|
||||
$databaseUser->databases = $databases;
|
||||
$databaseUser->unlinkUser();
|
||||
$databaseUser->linkUser();
|
||||
$dbs = Database::query()
|
||||
->where('server_id', $databaseUser->server_id)
|
||||
->whereIn('name', $input['databases'])
|
||||
->count();
|
||||
if (count($input['databases']) !== $dbs) {
|
||||
throw ValidationException::withMessages(['databases' => __('Databases not found!')]);
|
||||
}
|
||||
|
||||
$databaseUser->databases = $input['databases'];
|
||||
|
||||
// Unlink the user from all databases
|
||||
$databaseUser->server->database()->handler()->unlink(
|
||||
$databaseUser->username,
|
||||
$databaseUser->host
|
||||
);
|
||||
|
||||
// Link the user to the selected databases
|
||||
$databaseUser->server->database()->handler()->link(
|
||||
$databaseUser->username,
|
||||
$databaseUser->host,
|
||||
$databaseUser->databases
|
||||
);
|
||||
|
||||
$databaseUser->save();
|
||||
|
||||
$databaseUser->refresh();
|
||||
|
||||
return $databaseUser;
|
||||
}
|
||||
|
||||
public static function rules(Server $server, array $input): array
|
||||
{
|
||||
return [
|
||||
'databases.*' => [
|
||||
'nullable',
|
||||
Rule::exists('databases', 'name')->where('server_id', $server->id),
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -2,45 +2,65 @@
|
||||
|
||||
namespace App\Actions\Database;
|
||||
|
||||
use App\Enums\BackupFileStatus;
|
||||
use App\Enums\BackupStatus;
|
||||
use App\Enums\DatabaseStatus;
|
||||
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;
|
||||
|
||||
class CreateBackup
|
||||
class ManageBackup
|
||||
{
|
||||
/**
|
||||
* @throws AuthorizationException
|
||||
* @throws ValidationException
|
||||
*/
|
||||
public function create($type, Server $server, array $input): Backup
|
||||
public function create(Server $server, array $input): Backup
|
||||
{
|
||||
$this->validate($type, $server, $input);
|
||||
|
||||
$backup = new Backup([
|
||||
'type' => $type,
|
||||
'type' => 'database',
|
||||
'server_id' => $server->id,
|
||||
'database_id' => $input['database'] ?? null,
|
||||
'storage_id' => $input['storage'],
|
||||
'interval' => $input['interval'] == 'custom' ? $input['custom'] : $input['interval'],
|
||||
'interval' => $input['interval'] == 'custom' ? $input['custom_interval'] : $input['interval'],
|
||||
'keep_backups' => $input['keep'],
|
||||
'status' => BackupStatus::RUNNING,
|
||||
]);
|
||||
$backup->save();
|
||||
|
||||
$backup->run();
|
||||
app(RunBackup::class)->run($backup);
|
||||
|
||||
return $backup;
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
private function validate($type, Server $server, array $input): void
|
||||
public function update(Backup $backup, array $input): void
|
||||
{
|
||||
$backup->interval = $input['interval'] == 'custom' ? $input['custom_interval'] : $input['interval'];
|
||||
$backup->keep_backups = $input['keep'];
|
||||
$backup->save();
|
||||
}
|
||||
|
||||
public function delete(Backup $backup): void
|
||||
{
|
||||
$backup->status = BackupStatus::DELETING;
|
||||
$backup->save();
|
||||
|
||||
dispatch(function () use ($backup) {
|
||||
$files = $backup->files;
|
||||
foreach ($files as $file) {
|
||||
$file->status = BackupFileStatus::DELETING;
|
||||
$file->save();
|
||||
|
||||
$file->deleteFile();
|
||||
}
|
||||
|
||||
$backup->delete();
|
||||
});
|
||||
}
|
||||
|
||||
public static function rules(Server $server, array $input): array
|
||||
{
|
||||
$rules = [
|
||||
'storage' => [
|
||||
@ -54,28 +74,21 @@ private function validate($type, Server $server, array $input): void
|
||||
],
|
||||
'interval' => [
|
||||
'required',
|
||||
Rule::in([
|
||||
'0 * * * *',
|
||||
'0 0 * * *',
|
||||
'0 0 * * 0',
|
||||
'0 0 1 * *',
|
||||
'custom',
|
||||
]),
|
||||
Rule::in(array_keys(config('core.cronjob_intervals'))),
|
||||
],
|
||||
];
|
||||
if ($input['interval'] == 'custom') {
|
||||
$rules['custom'] = [
|
||||
'required',
|
||||
];
|
||||
}
|
||||
if ($type === 'database') {
|
||||
$rules['database'] = [
|
||||
'database' => [
|
||||
'required',
|
||||
Rule::exists('databases', 'id')
|
||||
->where('server_id', $server->id)
|
||||
->where('status', DatabaseStatus::READY),
|
||||
],
|
||||
];
|
||||
if ($input['interval'] == 'custom') {
|
||||
$rules['custom_interval'] = [
|
||||
'required',
|
||||
];
|
||||
}
|
||||
Validator::make($input, $rules)->validate();
|
||||
|
||||
return $rules;
|
||||
}
|
||||
}
|
39
app/Actions/Database/ManageBackupFile.php
Normal file
39
app/Actions/Database/ManageBackupFile.php
Normal file
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\Database;
|
||||
|
||||
use App\Enums\BackupFileStatus;
|
||||
use App\Models\BackupFile;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Symfony\Component\HttpFoundation\StreamedResponse;
|
||||
use Throwable;
|
||||
|
||||
class ManageBackupFile
|
||||
{
|
||||
/**
|
||||
* @throws Throwable
|
||||
*/
|
||||
public function download(BackupFile $file): StreamedResponse
|
||||
{
|
||||
$localFilename = "backup_{$file->id}_{$file->name}.zip";
|
||||
|
||||
if (! Storage::disk('backups')->exists($localFilename)) {
|
||||
$file->backup->server->ssh()->download(
|
||||
Storage::disk('backups')->path($localFilename),
|
||||
$file->path()
|
||||
);
|
||||
}
|
||||
|
||||
return Storage::disk('backups')->download($localFilename, $file->name.'.zip');
|
||||
}
|
||||
|
||||
public function delete(BackupFile $file): void
|
||||
{
|
||||
$file->status = BackupFileStatus::DELETING;
|
||||
$file->save();
|
||||
|
||||
dispatch(function () use ($file) {
|
||||
$file->deleteFile();
|
||||
});
|
||||
}
|
||||
}
|
41
app/Actions/Database/RestoreBackup.php
Normal file
41
app/Actions/Database/RestoreBackup.php
Normal file
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\Database;
|
||||
|
||||
use App\Enums\BackupFileStatus;
|
||||
use App\Models\BackupFile;
|
||||
use App\Models\Database;
|
||||
|
||||
class RestoreBackup
|
||||
{
|
||||
public function restore(BackupFile $backupFile, array $input): void
|
||||
{
|
||||
/** @var Database $database */
|
||||
$database = Database::query()->findOrFail($input['database']);
|
||||
$backupFile->status = BackupFileStatus::RESTORING;
|
||||
$backupFile->restored_to = $database->name;
|
||||
$backupFile->save();
|
||||
|
||||
dispatch(function () use ($backupFile, $database) {
|
||||
/** @var \App\SSH\Services\Database\Database $databaseHandler */
|
||||
$databaseHandler = $database->server->database()->handler();
|
||||
$databaseHandler->restoreBackup($backupFile, $database->name);
|
||||
$backupFile->status = BackupFileStatus::RESTORED;
|
||||
$backupFile->restored_at = now();
|
||||
$backupFile->save();
|
||||
})->catch(function () use ($backupFile) {
|
||||
$backupFile->status = BackupFileStatus::RESTORE_FAILED;
|
||||
$backupFile->save();
|
||||
})->onConnection('ssh');
|
||||
}
|
||||
|
||||
public static function rules(): array
|
||||
{
|
||||
return [
|
||||
'database' => [
|
||||
'required',
|
||||
'exists:databases,id',
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
43
app/Actions/Database/RunBackup.php
Normal file
43
app/Actions/Database/RunBackup.php
Normal file
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
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
|
||||
{
|
||||
public function run(Backup $backup): BackupFile
|
||||
{
|
||||
$file = new BackupFile([
|
||||
'backup_id' => $backup->id,
|
||||
'name' => Str::of($backup->database->name)->slug().'-'.now()->format('YmdHis'),
|
||||
'status' => BackupFileStatus::CREATING,
|
||||
]);
|
||||
$file->save();
|
||||
|
||||
dispatch(function () use ($file, $backup) {
|
||||
/** @var Database $databaseHandler */
|
||||
$databaseHandler = $file->backup->server->database()->handler();
|
||||
$databaseHandler->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();
|
||||
$file->status = BackupFileStatus::FAILED;
|
||||
$file->save();
|
||||
})->onConnection('ssh');
|
||||
|
||||
return $file;
|
||||
}
|
||||
}
|
@ -5,15 +5,13 @@
|
||||
use App\Enums\FirewallRuleStatus;
|
||||
use App\Models\FirewallRule;
|
||||
use App\Models\Server;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
use App\SSH\Services\Firewall\Firewall;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
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,27 +19,34 @@ public function create(Server $server, array $input): FirewallRule
|
||||
'port' => $input['port'],
|
||||
'source' => $input['source'],
|
||||
'mask' => $input['mask'] ?? null,
|
||||
'status' => FirewallRuleStatus::CREATING,
|
||||
]);
|
||||
|
||||
/** @var Firewall $firewallHandler */
|
||||
$firewallHandler = $server->firewall()->handler();
|
||||
$firewallHandler->addRule(
|
||||
$rule->type,
|
||||
$rule->getRealProtocol(),
|
||||
$rule->port,
|
||||
$rule->source,
|
||||
$rule->mask
|
||||
);
|
||||
|
||||
$rule->status = FirewallRuleStatus::READY;
|
||||
$rule->save();
|
||||
$rule->addToServer();
|
||||
|
||||
return $rule;
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
private function validate(Server $server, array $input): void
|
||||
public static function rules(): array
|
||||
{
|
||||
Validator::make($input, [
|
||||
return [
|
||||
'type' => [
|
||||
'required',
|
||||
'in:allow,deny',
|
||||
],
|
||||
'protocol' => [
|
||||
'required',
|
||||
'in:'.implode(',', array_keys(config('core.firewall_protocols_port'))),
|
||||
Rule::in(array_keys(config('core.firewall_protocols_port'))),
|
||||
],
|
||||
'port' => [
|
||||
'required',
|
||||
@ -54,8 +59,9 @@ private function validate(Server $server, array $input): void
|
||||
'ip',
|
||||
],
|
||||
'mask' => [
|
||||
'nullable',
|
||||
'numeric',
|
||||
],
|
||||
])->validateWithBag('createRule');
|
||||
];
|
||||
}
|
||||
}
|
||||
|
28
app/Actions/FirewallRule/DeleteRule.php
Executable file
28
app/Actions/FirewallRule/DeleteRule.php
Executable file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\FirewallRule;
|
||||
|
||||
use App\Enums\FirewallRuleStatus;
|
||||
use App\Models\FirewallRule;
|
||||
use App\Models\Server;
|
||||
|
||||
class DeleteRule
|
||||
{
|
||||
public function delete(Server $server, FirewallRule $rule): void
|
||||
{
|
||||
$rule->status = FirewallRuleStatus::DELETING;
|
||||
$rule->save();
|
||||
|
||||
$server->firewall()
|
||||
->handler()
|
||||
->removeRule(
|
||||
$rule->type,
|
||||
$rule->getRealProtocol(),
|
||||
$rule->port,
|
||||
$rule->source,
|
||||
$rule->mask
|
||||
);
|
||||
|
||||
$rule->delete();
|
||||
}
|
||||
}
|
134
app/Actions/Monitoring/GetMetrics.php
Normal file
134
app/Actions/Monitoring/GetMetrics.php
Normal file
@ -0,0 +1,134 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\Monitoring;
|
||||
|
||||
use App\Models\Server;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Contracts\Database\Query\Expression;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class GetMetrics
|
||||
{
|
||||
public function filter(Server $server, array $input): Collection
|
||||
{
|
||||
if (isset($input['from']) && isset($input['to']) && $input['from'] === $input['to']) {
|
||||
$input['from'] = Carbon::parse($input['from'])->format('Y-m-d').' 00:00:00';
|
||||
$input['to'] = Carbon::parse($input['to'])->format('Y-m-d').' 23:59:59';
|
||||
}
|
||||
|
||||
$defaultInput = [
|
||||
'period' => '10m',
|
||||
];
|
||||
|
||||
$input = array_merge($defaultInput, $input);
|
||||
|
||||
return $this->metrics(
|
||||
server: $server,
|
||||
fromDate: $this->getFromDate($input),
|
||||
toDate: $this->getToDate($input),
|
||||
interval: $this->getInterval($input)
|
||||
);
|
||||
}
|
||||
|
||||
private function metrics(
|
||||
Server $server,
|
||||
Carbon $fromDate,
|
||||
Carbon $toDate,
|
||||
?Expression $interval = null
|
||||
): Collection {
|
||||
return 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(
|
||||
[
|
||||
DB::raw('created_at as date'),
|
||||
DB::raw('ROUND(AVG(load), 2) as load'),
|
||||
DB::raw('ROUND(AVG(memory_total), 2) as memory_total'),
|
||||
DB::raw('ROUND(AVG(memory_used), 2) as memory_used'),
|
||||
DB::raw('ROUND(AVG(memory_free), 2) as memory_free'),
|
||||
DB::raw('ROUND(AVG(disk_total), 2) as disk_total'),
|
||||
DB::raw('ROUND(AVG(disk_used), 2) as disk_used'),
|
||||
DB::raw('ROUND(AVG(disk_free), 2) as disk_free'),
|
||||
$interval,
|
||||
],
|
||||
)
|
||||
->groupByRaw('date_interval')
|
||||
->orderBy('date_interval')
|
||||
->get()
|
||||
->map(function ($item) {
|
||||
$item->date = Carbon::parse($item->date)->format('Y-m-d H:i');
|
||||
|
||||
return $item;
|
||||
});
|
||||
}
|
||||
|
||||
private function getFromDate(array $input): Carbon
|
||||
{
|
||||
if ($input['period'] === 'custom') {
|
||||
return new Carbon($input['from']);
|
||||
}
|
||||
|
||||
return Carbon::parse('-'.convert_time_format($input['period']));
|
||||
}
|
||||
|
||||
private function getToDate(array $input): Carbon
|
||||
{
|
||||
if ($input['period'] === 'custom') {
|
||||
return new Carbon($input['to']);
|
||||
}
|
||||
|
||||
return Carbon::now();
|
||||
}
|
||||
|
||||
private function getInterval(array $input): Expression
|
||||
{
|
||||
if ($input['period'] === 'custom') {
|
||||
$from = new Carbon($input['from']);
|
||||
$to = new Carbon($input['to']);
|
||||
$periodInHours = $from->diffInHours($to);
|
||||
}
|
||||
|
||||
if (! isset($periodInHours)) {
|
||||
$periodInHours = Carbon::parse(
|
||||
convert_time_format($input['period'])
|
||||
)->diffInHours();
|
||||
}
|
||||
|
||||
if (abs($periodInHours) <= 1) {
|
||||
return DB::raw("strftime('%Y-%m-%d %H:%M:00', created_at) as date_interval");
|
||||
}
|
||||
|
||||
if ($periodInHours <= 24) {
|
||||
return DB::raw("strftime('%Y-%m-%d %H:00:00', created_at) as date_interval");
|
||||
}
|
||||
|
||||
return DB::raw("strftime('%Y-%m-%d 00:00:00', created_at) as date_interval");
|
||||
}
|
||||
|
||||
public static function rules(array $input): array
|
||||
{
|
||||
$rules = [
|
||||
'period' => [
|
||||
'required',
|
||||
Rule::in([
|
||||
'10m',
|
||||
'30m',
|
||||
'1h',
|
||||
'12h',
|
||||
'1d',
|
||||
'7d',
|
||||
'custom',
|
||||
]),
|
||||
],
|
||||
];
|
||||
|
||||
if (isset($input['period']) && $input['period'] === 'custom') {
|
||||
$rules['from'] = ['required', 'date', 'before:to'];
|
||||
$rules['to'] = ['required', 'date', 'after:from'];
|
||||
}
|
||||
|
||||
return $rules;
|
||||
}
|
||||
}
|
29
app/Actions/Monitoring/UpdateMetricSettings.php
Normal file
29
app/Actions/Monitoring/UpdateMetricSettings.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\Monitoring;
|
||||
|
||||
use App\Models\Server;
|
||||
|
||||
class UpdateMetricSettings
|
||||
{
|
||||
public function update(Server $server, array $input): void
|
||||
{
|
||||
$service = $server->monitoring();
|
||||
|
||||
$data = $service->handler()->data();
|
||||
$data['data_retention'] = $input['data_retention'];
|
||||
$service->type_data = $data;
|
||||
$service->save();
|
||||
}
|
||||
|
||||
public static function rules(): array
|
||||
{
|
||||
return [
|
||||
'data_retention' => [
|
||||
'required',
|
||||
'numeric',
|
||||
'min:1',
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
32
app/Actions/NodeJS/ChangeDefaultCli.php
Normal file
32
app/Actions/NodeJS/ChangeDefaultCli.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\NodeJS;
|
||||
|
||||
use App\Enums\ServiceStatus;
|
||||
use App\Models\Server;
|
||||
use App\SSH\Services\NodeJS\NodeJS;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
class ChangeDefaultCli
|
||||
{
|
||||
public function change(Server $server, array $input): void
|
||||
{
|
||||
$this->validate($server, $input);
|
||||
$service = $server->nodejs($input['version']);
|
||||
/** @var NodeJS $handler */
|
||||
$handler = $service->handler();
|
||||
$handler->setDefaultCli();
|
||||
$server->defaultService('nodejs')->update(['is_default' => 0]);
|
||||
$service->update(['is_default' => 1]);
|
||||
$service->update(['status' => ServiceStatus::READY]);
|
||||
}
|
||||
|
||||
public function validate(Server $server, array $input): void
|
||||
{
|
||||
if (! isset($input['version']) || ! in_array($input['version'], $server->installedNodejsVersions())) {
|
||||
throw ValidationException::withMessages(
|
||||
['version' => __('This version is not installed')]
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
45
app/Actions/NodeJS/InstallNewNodeJsVersion.php
Executable file
45
app/Actions/NodeJS/InstallNewNodeJsVersion.php
Executable file
@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\NodeJS;
|
||||
|
||||
use App\Enums\NodeJS;
|
||||
use App\Enums\ServiceStatus;
|
||||
use App\Models\Server;
|
||||
use App\Models\Service;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class InstallNewNodeJsVersion
|
||||
{
|
||||
public function install(Server $server, array $input): void
|
||||
{
|
||||
$nodejs = new Service([
|
||||
'server_id' => $server->id,
|
||||
'type' => 'nodejs',
|
||||
'type_data' => [],
|
||||
'name' => 'nodejs',
|
||||
'version' => $input['version'],
|
||||
'status' => ServiceStatus::INSTALLING,
|
||||
'is_default' => false,
|
||||
]);
|
||||
$nodejs->save();
|
||||
|
||||
dispatch(function () use ($nodejs) {
|
||||
$nodejs->handler()->install();
|
||||
$nodejs->status = ServiceStatus::READY;
|
||||
$nodejs->save();
|
||||
})->catch(function () use ($nodejs) {
|
||||
$nodejs->delete();
|
||||
})->onConnection('ssh');
|
||||
}
|
||||
|
||||
public static function rules(Server $server): array
|
||||
{
|
||||
return [
|
||||
'version' => [
|
||||
'required',
|
||||
Rule::in(config('core.nodejs_versions')),
|
||||
Rule::notIn(array_merge($server->installedNodejsVersions(), [NodeJS::NONE])),
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
53
app/Actions/NodeJS/UninstallNodeJS.php
Executable file
53
app/Actions/NodeJS/UninstallNodeJS.php
Executable file
@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\NodeJS;
|
||||
|
||||
use App\Enums\ServiceStatus;
|
||||
use App\Models\Server;
|
||||
use App\Models\Service;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
class UninstallNodeJS
|
||||
{
|
||||
public function uninstall(Server $server, array $input): void
|
||||
{
|
||||
$this->validate($server, $input);
|
||||
|
||||
/** @var Service $nodejs */
|
||||
$nodejs = $server->nodejs($input['version']);
|
||||
$nodejs->status = ServiceStatus::UNINSTALLING;
|
||||
$nodejs->save();
|
||||
|
||||
dispatch(function () use ($nodejs) {
|
||||
$nodejs->handler()->uninstall();
|
||||
$nodejs->delete();
|
||||
})->catch(function () use ($nodejs) {
|
||||
$nodejs->status = ServiceStatus::FAILED;
|
||||
$nodejs->save();
|
||||
})->onConnection('ssh');
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
private function validate(Server $server, array $input): void
|
||||
{
|
||||
Validator::make($input, [
|
||||
'version' => 'required|string',
|
||||
])->validate();
|
||||
|
||||
if (! in_array($input['version'], $server->installedNodejsVersions())) {
|
||||
throw ValidationException::withMessages(
|
||||
['version' => __('This version is not installed')]
|
||||
);
|
||||
}
|
||||
|
||||
$hasSite = $server->sites()->where('nodejs_version', $input['version'])->first();
|
||||
if ($hasSite) {
|
||||
throw ValidationException::withMessages(
|
||||
['version' => __('Cannot uninstall this version because some sites are using it!')]
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
@ -4,52 +4,74 @@
|
||||
|
||||
use App\Models\NotificationChannel;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Exception;
|
||||
use Illuminate\Validation\Rule;
|
||||
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()->data($input);
|
||||
$channel->data = $channel->provider()->createData($input);
|
||||
$channel->save();
|
||||
|
||||
try {
|
||||
if (! $channel->provider()->connect()) {
|
||||
$channel->delete();
|
||||
|
||||
if ($channel->provider === \App\Enums\NotificationChannel::EMAIL) {
|
||||
throw ValidationException::withMessages([
|
||||
'email' => __('Could not connect! Make sure you configured `.env` file correctly.'),
|
||||
]);
|
||||
}
|
||||
|
||||
throw ValidationException::withMessages([
|
||||
'provider' => __('Could not connect'),
|
||||
]);
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
$channel->delete();
|
||||
|
||||
throw $e;
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
protected function validate(array $input): void
|
||||
$channel->connected = true;
|
||||
$channel->save();
|
||||
}
|
||||
|
||||
public static function rules(array $input): array
|
||||
{
|
||||
Validator::make($input, [
|
||||
'provider' => 'required|in:'.implode(',', config('core.notification_channels_providers')),
|
||||
$rules = [
|
||||
'provider' => [
|
||||
'required',
|
||||
Rule::in(config('core.notification_channels_providers')),
|
||||
],
|
||||
'label' => 'required',
|
||||
])->validate();
|
||||
];
|
||||
|
||||
return array_merge($rules, static::providerRules($input));
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
protected function validateType(NotificationChannel $channel, array $input): void
|
||||
private static function providerRules(array $input): array
|
||||
{
|
||||
Validator::make($input, $channel->provider()->validationRules())
|
||||
->validate();
|
||||
if (! isset($input['provider'])) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$notificationChannel = new NotificationChannel([
|
||||
'provider' => $input['provider'],
|
||||
]);
|
||||
|
||||
return $notificationChannel->provider()->createRules($input);
|
||||
}
|
||||
}
|
||||
|
25
app/Actions/NotificationChannels/EditChannel.php
Normal file
25
app/Actions/NotificationChannels/EditChannel.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\NotificationChannels;
|
||||
|
||||
use App\Models\NotificationChannel;
|
||||
use App\Models\User;
|
||||
|
||||
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,
|
||||
]);
|
||||
$notificationChannel->save();
|
||||
}
|
||||
|
||||
public static function rules(array $input): array
|
||||
{
|
||||
return [
|
||||
'label' => 'required',
|
||||
];
|
||||
}
|
||||
}
|
32
app/Actions/PHP/ChangeDefaultCli.php
Normal file
32
app/Actions/PHP/ChangeDefaultCli.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\PHP;
|
||||
|
||||
use App\Enums\ServiceStatus;
|
||||
use App\Models\Server;
|
||||
use App\SSH\Services\PHP\PHP;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
class ChangeDefaultCli
|
||||
{
|
||||
public function change(Server $server, array $input): void
|
||||
{
|
||||
$this->validate($server, $input);
|
||||
$service = $server->php($input['version']);
|
||||
/** @var PHP $handler */
|
||||
$handler = $service->handler();
|
||||
$handler->setDefaultCli();
|
||||
$server->defaultService('php')->update(['is_default' => 0]);
|
||||
$service->update(['is_default' => 1]);
|
||||
$service->update(['status' => ServiceStatus::READY]);
|
||||
}
|
||||
|
||||
public function validate(Server $server, array $input): void
|
||||
{
|
||||
if (! isset($input['version']) || ! in_array($input['version'], $server->installedPHPVersions())) {
|
||||
throw ValidationException::withMessages(
|
||||
['version' => __('This version is not installed')]
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
47
app/Actions/PHP/GetPHPIni.php
Normal file
47
app/Actions/PHP/GetPHPIni.php
Normal file
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\PHP;
|
||||
|
||||
use App\Enums\PHPIniType;
|
||||
use App\Models\Server;
|
||||
use App\SSH\Services\PHP\PHP;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Validation\Rule;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
class GetPHPIni
|
||||
{
|
||||
public function getIni(Server $server, array $input): string
|
||||
{
|
||||
$this->validate($server, $input);
|
||||
|
||||
$php = $server->php($input['version']);
|
||||
|
||||
try {
|
||||
/** @var PHP $handler */
|
||||
$handler = $php->handler();
|
||||
|
||||
return $handler->getPHPIni($input['type']);
|
||||
} catch (\Throwable $e) {
|
||||
throw ValidationException::withMessages(
|
||||
['ini' => $e->getMessage()]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function validate(Server $server, array $input): void
|
||||
{
|
||||
Validator::make($input, [
|
||||
'type' => [
|
||||
'required',
|
||||
Rule::in([PHPIniType::CLI, PHPIniType::FPM]),
|
||||
],
|
||||
])->validate();
|
||||
|
||||
if (! isset($input['version']) || ! in_array($input['version'], $server->installedPHPVersions())) {
|
||||
throw ValidationException::withMessages(
|
||||
['version' => __('This version is not installed')]
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
@ -2,19 +2,16 @@
|
||||
|
||||
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',
|
||||
@ -28,25 +25,24 @@ public function install(Server $server, array $input): void
|
||||
'is_default' => false,
|
||||
]);
|
||||
$php->save();
|
||||
$php->install();
|
||||
|
||||
dispatch(function () use ($php) {
|
||||
$php->handler()->install();
|
||||
$php->status = ServiceStatus::READY;
|
||||
$php->save();
|
||||
})->catch(function () use ($php) {
|
||||
$php->delete();
|
||||
})->onConnection('ssh');
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
private function validate(Server $server, array $input): void
|
||||
public static function rules(Server $server): array
|
||||
{
|
||||
Validator::make($input, [
|
||||
return [
|
||||
'version' => [
|
||||
'required',
|
||||
Rule::in(config('core.php_versions')),
|
||||
Rule::notIn(array_merge($server->installedPHPVersions(), [PHP::NONE])),
|
||||
],
|
||||
])->validateWithBag('installPHP');
|
||||
|
||||
if (in_array($input['version'], $server->installedPHPVersions())) {
|
||||
throw ValidationException::withMessages(
|
||||
['version' => __('This version is already installed')]
|
||||
)->errorBag('installPHP');
|
||||
}
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -2,45 +2,64 @@
|
||||
|
||||
namespace App\Actions\PHP;
|
||||
|
||||
use App\Exceptions\SSHCommandError;
|
||||
use App\Models\Server;
|
||||
use App\Models\Service;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use App\SSH\Services\PHP\PHP;
|
||||
use Illuminate\Validation\Rule;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
class InstallPHPExtension
|
||||
{
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
public function handle(Service $service, array $input): Service
|
||||
public function install(Server $server, array $input): Service
|
||||
{
|
||||
/** @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();
|
||||
|
||||
$this->validate($service, $input);
|
||||
|
||||
$service->handler()->installExtension($input['name']);
|
||||
dispatch(
|
||||
/**
|
||||
* @throws SSHCommandError
|
||||
*/
|
||||
function () use ($service, $input) {
|
||||
/** @var PHP $handler */
|
||||
$handler = $service->handler();
|
||||
$handler->installExtension($input['extension']);
|
||||
})->catch(function () use ($service, $input) {
|
||||
$service->refresh();
|
||||
$typeData = $service->type_data;
|
||||
$typeData['extensions'] = array_values(array_diff($typeData['extensions'], [$input['extension']]));
|
||||
$service->type_data = $typeData;
|
||||
$service->save();
|
||||
})->onConnection('ssh');
|
||||
|
||||
return $service;
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
private function validate(Service $service, array $input): void
|
||||
public static function rules(Server $server): array
|
||||
{
|
||||
Validator::make($input, [
|
||||
'name' => [
|
||||
return [
|
||||
'extension' => [
|
||||
'required',
|
||||
'in:'.implode(',', config('core.php_extensions')),
|
||||
Rule::in(config('core.php_extensions')),
|
||||
],
|
||||
])->validateWithBag('installPHPExtension');
|
||||
|
||||
if (in_array($input['name'], $service->type_data['extensions'])) {
|
||||
throw ValidationException::withMessages(
|
||||
['name' => __('This extension already installed')]
|
||||
)->errorBag('installPHPExtension');
|
||||
}
|
||||
'version' => [
|
||||
'required',
|
||||
Rule::exists('services', 'version')
|
||||
->where('server_id', $server->id)
|
||||
->where('type', 'php'),
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -2,36 +2,48 @@
|
||||
|
||||
namespace App\Actions\PHP;
|
||||
|
||||
use App\Enums\ServiceStatus;
|
||||
use App\Models\Server;
|
||||
use App\Models\Service;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
class UninstallPHP
|
||||
{
|
||||
public function uninstall(Server $server, string $version): void
|
||||
public function uninstall(Server $server, array $input): void
|
||||
{
|
||||
$this->validate($server, $version);
|
||||
$this->validate($server, $input);
|
||||
|
||||
/** @var Service $php */
|
||||
$php = $server->services()->where('type', 'php')->where('version', $version)->first();
|
||||
$php = $server->php($input['version']);
|
||||
$php->status = ServiceStatus::UNINSTALLING;
|
||||
$php->save();
|
||||
|
||||
$php->uninstall();
|
||||
dispatch(function () use ($php) {
|
||||
$php->handler()->uninstall();
|
||||
$php->delete();
|
||||
})->catch(function () use ($php) {
|
||||
$php->status = ServiceStatus::FAILED;
|
||||
$php->save();
|
||||
})->onConnection('ssh');
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
private function validate(Server $server, string $version): void
|
||||
private function validate(Server $server, array $input): void
|
||||
{
|
||||
$php = $server->services()->where('type', 'php')->where('version', $version)->first();
|
||||
Validator::make($input, [
|
||||
'version' => 'required|string',
|
||||
])->validate();
|
||||
|
||||
if (! $php) {
|
||||
if (! in_array($input['version'], $server->installedPHPVersions())) {
|
||||
throw ValidationException::withMessages(
|
||||
['version' => __('This version has not been installed yet!')]
|
||||
['version' => __('This version is not installed')]
|
||||
);
|
||||
}
|
||||
|
||||
$hasSite = $server->sites()->where('php_version', $version)->first();
|
||||
$hasSite = $server->sites()->where('php_version', $input['version'])->first();
|
||||
if ($hasSite) {
|
||||
throw ValidationException::withMessages(
|
||||
['version' => __('Cannot uninstall this version because some sites are using it!')]
|
||||
|
@ -2,9 +2,12 @@
|
||||
|
||||
namespace App\Actions\PHP;
|
||||
|
||||
use App\Models\Service;
|
||||
use App\Enums\PHPIniType;
|
||||
use App\Models\Server;
|
||||
use Illuminate\Filesystem\FilesystemAdapter;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Validation\Rule;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
use Throwable;
|
||||
|
||||
@ -13,20 +16,25 @@ class UpdatePHPIni
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
public function update(Service $service, string $ini): void
|
||||
public function update(Server $server, array $input): void
|
||||
{
|
||||
$service = $server->php($input['version']);
|
||||
|
||||
$tmpName = Str::random(10).strtotime('now');
|
||||
try {
|
||||
Storage::disk('local')->put($tmpName, $ini);
|
||||
/** @var FilesystemAdapter $storageDisk */
|
||||
$storageDisk = Storage::disk('local');
|
||||
|
||||
$storageDisk->put($tmpName, $input['ini']);
|
||||
$service->server->ssh('root')->upload(
|
||||
Storage::disk('local')->path($tmpName),
|
||||
"/etc/php/$service->version/cli/php.ini"
|
||||
$storageDisk->path($tmpName),
|
||||
sprintf('/etc/php/%s/%s/php.ini', $service->version, $input['type'])
|
||||
);
|
||||
$this->deleteTempFile($tmpName);
|
||||
} catch (Throwable) {
|
||||
$this->deleteTempFile($tmpName);
|
||||
throw ValidationException::withMessages([
|
||||
'ini' => __("Couldn't update php.ini file!"),
|
||||
'ini' => __("Couldn't update php.ini (:type) file!", ['type' => $input['type']]),
|
||||
]);
|
||||
}
|
||||
|
||||
@ -39,4 +47,24 @@ private function deleteTempFile(string $name): void
|
||||
Storage::disk('local')->delete($name);
|
||||
}
|
||||
}
|
||||
|
||||
public static function rules(Server $server): array
|
||||
{
|
||||
return [
|
||||
'ini' => [
|
||||
'required',
|
||||
'string',
|
||||
],
|
||||
'version' => [
|
||||
'required',
|
||||
Rule::exists('services', 'version')
|
||||
->where('server_id', $server->id)
|
||||
->where('type', 'php'),
|
||||
],
|
||||
'type' => [
|
||||
'required',
|
||||
Rule::in([PHPIniType::CLI, PHPIniType::FPM]),
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
33
app/Actions/Projects/AddUser.php
Normal file
33
app/Actions/Projects/AddUser.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?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);
|
||||
}),
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
47
app/Actions/Projects/CreateProject.php
Normal file
47
app/Actions/Projects/CreateProject.php
Normal file
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\Projects;
|
||||
|
||||
use App\Models\Project;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
|
||||
class CreateProject
|
||||
{
|
||||
public function create(User $user, array $input): Project
|
||||
{
|
||||
if (isset($input['name'])) {
|
||||
$input['name'] = strtolower($input['name']);
|
||||
}
|
||||
|
||||
$this->validate($input);
|
||||
|
||||
$project = new Project([
|
||||
'name' => $input['name'],
|
||||
]);
|
||||
|
||||
$project->save();
|
||||
|
||||
$project->users()->attach($user);
|
||||
|
||||
return $project;
|
||||
}
|
||||
|
||||
public static function rules(): array
|
||||
{
|
||||
return [
|
||||
'name' => [
|
||||
'required',
|
||||
'string',
|
||||
'max:255',
|
||||
'unique:projects,name',
|
||||
'lowercase:projects,name',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
private function validate(array $input): void
|
||||
{
|
||||
Validator::make($input, self::rules())->validate();
|
||||
}
|
||||
}
|
32
app/Actions/Projects/DeleteProject.php
Normal file
32
app/Actions/Projects/DeleteProject.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\Projects;
|
||||
|
||||
use App\Models\Project;
|
||||
use App\Models\User;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
class DeleteProject
|
||||
{
|
||||
public function delete(User $user, Project $project): void
|
||||
{
|
||||
if ($user->projects()->count() === 1) {
|
||||
throw ValidationException::withMessages([
|
||||
'project' => __('Cannot delete the last project.'),
|
||||
]);
|
||||
}
|
||||
|
||||
if ($user->current_project_id == $project->id) {
|
||||
throw ValidationException::withMessages([
|
||||
'project' => __('Cannot delete your current project.'),
|
||||
]);
|
||||
}
|
||||
|
||||
/** @var Project $randomProject */
|
||||
$randomProject = $user->projects()->where('project_id', '!=', $project->id)->first();
|
||||
$user->current_project_id = $randomProject->id;
|
||||
$user->save();
|
||||
|
||||
$project->delete();
|
||||
}
|
||||
}
|
43
app/Actions/Projects/UpdateProject.php
Normal file
43
app/Actions/Projects/UpdateProject.php
Normal file
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\Projects;
|
||||
|
||||
use App\Models\Project;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class UpdateProject
|
||||
{
|
||||
public function update(Project $project, array $input): Project
|
||||
{
|
||||
if (isset($input['name'])) {
|
||||
$input['name'] = strtolower($input['name']);
|
||||
}
|
||||
|
||||
$this->validate($project, $input);
|
||||
|
||||
$project->name = $input['name'];
|
||||
|
||||
$project->save();
|
||||
|
||||
return $project;
|
||||
}
|
||||
|
||||
public static function rules(Project $project): array
|
||||
{
|
||||
return [
|
||||
'name' => [
|
||||
'required',
|
||||
'string',
|
||||
'max:255',
|
||||
Rule::unique('projects', 'name')->ignore($project->id),
|
||||
'lowercase:projects,name',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
private function validate(Project $project, array $input): void
|
||||
{
|
||||
Validator::make($input, self::rules($project))->validate();
|
||||
}
|
||||
}
|
@ -6,7 +6,8 @@
|
||||
use App\Models\Queue;
|
||||
use App\Models\Server;
|
||||
use App\Models\Site;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use App\SSH\Services\ProcessManager\ProcessManager;
|
||||
use Illuminate\Validation\Rule;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
class CreateQueue
|
||||
@ -16,42 +17,50 @@ 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'],
|
||||
'auto_restart' => $input['auto_restart'],
|
||||
'auto_start' => $input['auto_start'] ? 1 : 0,
|
||||
'auto_restart' => $input['auto_restart'] ? 1 : 0,
|
||||
'numprocs' => $input['numprocs'],
|
||||
'status' => QueueStatus::CREATING,
|
||||
]);
|
||||
$queue->save();
|
||||
$queue->deploy();
|
||||
|
||||
dispatch(function () use ($queue) {
|
||||
/** @var ProcessManager $processManager */
|
||||
$processManager = $queue->server->processManager()->handler();
|
||||
$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->delete();
|
||||
})->onConnection('ssh');
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
protected function validate(array $input): void
|
||||
public static function rules(Site $site): array
|
||||
{
|
||||
$rules = [
|
||||
return [
|
||||
'command' => [
|
||||
'required',
|
||||
],
|
||||
'user' => [
|
||||
'required',
|
||||
'in:root,'.config('core.ssh_user'),
|
||||
],
|
||||
'auto_start' => [
|
||||
'required',
|
||||
'in:0,1',
|
||||
],
|
||||
'auto_restart' => [
|
||||
'required',
|
||||
'in:0,1',
|
||||
Rule::in([
|
||||
'root',
|
||||
$site->user,
|
||||
]),
|
||||
],
|
||||
'numprocs' => [
|
||||
'required',
|
||||
@ -59,7 +68,5 @@ protected function validate(array $input): void
|
||||
'min:1',
|
||||
],
|
||||
];
|
||||
|
||||
Validator::make($input, $rules)->validateWithBag('createQueue');
|
||||
}
|
||||
}
|
||||
|
13
app/Actions/Queue/DeleteQueue.php
Normal file
13
app/Actions/Queue/DeleteQueue.php
Normal file
@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\Queue;
|
||||
|
||||
use App\Models\Queue;
|
||||
|
||||
class DeleteQueue
|
||||
{
|
||||
public function delete(Queue $queue): void
|
||||
{
|
||||
$queue->delete();
|
||||
}
|
||||
}
|
72
app/Actions/Queue/EditQueue.php
Normal file
72
app/Actions/Queue/EditQueue.php
Normal file
@ -0,0 +1,72 @@
|
||||
<?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',
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
13
app/Actions/Queue/GetQueueLogs.php
Normal file
13
app/Actions/Queue/GetQueueLogs.php
Normal file
@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\Queue;
|
||||
|
||||
use App\Models\Queue;
|
||||
|
||||
class GetQueueLogs
|
||||
{
|
||||
public function getLogs(Queue $queue): string
|
||||
{
|
||||
return $queue->server->processManager()->handler()->getLogs($queue->user, $queue->getLogFile());
|
||||
}
|
||||
}
|
42
app/Actions/Queue/ManageQueue.php
Normal file
42
app/Actions/Queue/ManageQueue.php
Normal file
@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\Queue;
|
||||
|
||||
use App\Enums\QueueStatus;
|
||||
use App\Models\Queue;
|
||||
|
||||
class ManageQueue
|
||||
{
|
||||
public function start(Queue $queue): void
|
||||
{
|
||||
$queue->status = QueueStatus::STARTING;
|
||||
$queue->save();
|
||||
dispatch(function () use ($queue) {
|
||||
$queue->server->processManager()->handler()->start($queue->id, $queue->site_id);
|
||||
$queue->status = QueueStatus::RUNNING;
|
||||
$queue->save();
|
||||
})->onConnection('ssh');
|
||||
}
|
||||
|
||||
public function stop(Queue $queue): void
|
||||
{
|
||||
$queue->status = QueueStatus::STOPPING;
|
||||
$queue->save();
|
||||
dispatch(function () use ($queue) {
|
||||
$queue->server->processManager()->handler()->stop($queue->id, $queue->site_id);
|
||||
$queue->status = QueueStatus::STOPPED;
|
||||
$queue->save();
|
||||
})->onConnection('ssh');
|
||||
}
|
||||
|
||||
public function restart(Queue $queue): void
|
||||
{
|
||||
$queue->status = QueueStatus::RESTARTING;
|
||||
$queue->save();
|
||||
dispatch(function () use ($queue) {
|
||||
$queue->server->processManager()->handler()->restart($queue->id, $queue->site_id);
|
||||
$queue->status = QueueStatus::RUNNING;
|
||||
$queue->save();
|
||||
})->onConnection('ssh');
|
||||
}
|
||||
}
|
16
app/Actions/SSL/ActivateSSL.php
Normal file
16
app/Actions/SSL/ActivateSSL.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\SSL;
|
||||
|
||||
use App\Models\Ssl;
|
||||
|
||||
class ActivateSSL
|
||||
{
|
||||
public function activate(Ssl $ssl): void
|
||||
{
|
||||
$ssl->site->ssls()->update(['is_active' => false]);
|
||||
$ssl->is_active = true;
|
||||
$ssl->save();
|
||||
$ssl->site->webserver()->updateVHost($ssl->site);
|
||||
}
|
||||
}
|
@ -2,9 +2,12 @@
|
||||
|
||||
namespace App\Actions\SSL;
|
||||
|
||||
use App\Enums\SslStatus;
|
||||
use App\Enums\SslType;
|
||||
use App\Models\ServerLog;
|
||||
use App\Models\Site;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use App\Models\Ssl;
|
||||
use App\SSH\Services\Webserver\Webserver;
|
||||
use Illuminate\Validation\Rule;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
@ -15,33 +18,65 @@ class CreateSSL
|
||||
*/
|
||||
public function create(Site $site, array $input): void
|
||||
{
|
||||
$this->validate($input);
|
||||
$site->ssls()
|
||||
->where('type', $input['type'])
|
||||
->where('status', SslStatus::FAILED)
|
||||
->delete();
|
||||
|
||||
if ($input['type'] == SslType::LETSENCRYPT) {
|
||||
$site->createFreeSsl();
|
||||
$ssl = new Ssl([
|
||||
'site_id' => $site->id,
|
||||
'type' => $input['type'],
|
||||
'certificate' => $input['certificate'] ?? null,
|
||||
'pk' => $input['private'] ?? null,
|
||||
'expires_at' => $input['type'] === SslType::LETSENCRYPT ? now()->addMonths(3) : $input['expires_at'],
|
||||
'status' => SslStatus::CREATING,
|
||||
'email' => $input['email'] ?? null,
|
||||
'is_active' => ! $site->activeSsl,
|
||||
]);
|
||||
$ssl->domains = [$site->domain];
|
||||
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) {
|
||||
/** @var Webserver $webserver */
|
||||
$webserver = $site->server->webserver()->handler();
|
||||
$webserver->setupSSL($ssl);
|
||||
$ssl->status = SslStatus::CREATED;
|
||||
$ssl->save();
|
||||
$webserver->updateVHost($site);
|
||||
})->catch(function () use ($ssl) {
|
||||
$ssl->status = SslStatus::FAILED;
|
||||
$ssl->save();
|
||||
})->onConnection('ssh');
|
||||
}
|
||||
|
||||
if ($input['type'] == SslType::CUSTOM) {
|
||||
$site->createCustomSsl($input['certificate'], $input['private']);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
protected function validate(array $input): void
|
||||
public static function rules(array $input): array
|
||||
{
|
||||
$rules = [
|
||||
'type' => [
|
||||
'required',
|
||||
Rule::in(SslType::getValues()),
|
||||
Rule::in(config('core.ssl_types')),
|
||||
],
|
||||
];
|
||||
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(),
|
||||
];
|
||||
}
|
||||
if (isset($input['type']) && $input['type'] == SslType::LETSENCRYPT) {
|
||||
$rules['email'] = [
|
||||
'required',
|
||||
'email',
|
||||
];
|
||||
}
|
||||
|
||||
Validator::make($input, $rules)->validateWithBag('createSSL');
|
||||
return $rules;
|
||||
}
|
||||
}
|
||||
|
20
app/Actions/SSL/DeleteSSL.php
Normal file
20
app/Actions/SSL/DeleteSSL.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\SSL;
|
||||
|
||||
use App\Enums\SslStatus;
|
||||
use App\Models\Ssl;
|
||||
use App\SSH\Services\Webserver\Webserver;
|
||||
|
||||
class DeleteSSL
|
||||
{
|
||||
public function delete(Ssl $ssl): void
|
||||
{
|
||||
$ssl->status = SslStatus::DELETING;
|
||||
$ssl->save();
|
||||
/** @var Webserver $webserver */
|
||||
$webserver = $ssl->site->server->webserver()->handler();
|
||||
$webserver->removeSSL($ssl);
|
||||
$ssl->delete();
|
||||
}
|
||||
}
|
@ -4,38 +4,27 @@
|
||||
|
||||
use App\Models\Script;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
class CreateScript
|
||||
{
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
public function handle(User $creator, array $input): Script
|
||||
public function create(User $user, array $input): Script
|
||||
{
|
||||
$this->validateInputs($input);
|
||||
|
||||
$script = new Script([
|
||||
'user_id' => $creator->id,
|
||||
'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;
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
private function validateInputs(array $input): void
|
||||
public static function rules(): array
|
||||
{
|
||||
$rules = [
|
||||
'name' => 'required',
|
||||
'content' => 'required',
|
||||
return [
|
||||
'name' => ['required', 'string', 'max:255'],
|
||||
'content' => ['required', 'string'],
|
||||
];
|
||||
|
||||
Validator::make($input, $rules)->validateWithBag('createScript');
|
||||
}
|
||||
}
|
||||
|
28
app/Actions/Script/EditScript.php
Normal file
28
app/Actions/Script/EditScript.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\Script;
|
||||
|
||||
use App\Models\Script;
|
||||
use App\Models\User;
|
||||
|
||||
class EditScript
|
||||
{
|
||||
public function edit(Script $script, User $user, array $input): Script
|
||||
{
|
||||
$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
|
||||
{
|
||||
return [
|
||||
'name' => ['required', 'string', 'max:255'],
|
||||
'content' => ['required', 'string'],
|
||||
];
|
||||
}
|
||||
}
|
68
app/Actions/Script/ExecuteScript.php
Normal file
68
app/Actions/Script/ExecuteScript.php
Normal file
@ -0,0 +1,68 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\Script;
|
||||
|
||||
use App\Enums\ScriptExecutionStatus;
|
||||
use App\Models\Script;
|
||||
use App\Models\ScriptExecution;
|
||||
use App\Models\Server;
|
||||
use App\Models\ServerLog;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class ExecuteScript
|
||||
{
|
||||
public function execute(Script $script, array $input): ScriptExecution
|
||||
{
|
||||
$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) {
|
||||
$content = $execution->getContent();
|
||||
$log = ServerLog::make($execution->server, 'script-'.$script->id.'-'.strtotime('now'));
|
||||
$log->save();
|
||||
$execution->server_log_id = $log->id;
|
||||
$execution->save();
|
||||
$execution->server->os()->runScript('~/', $content, $log, $execution->user);
|
||||
$execution->status = ScriptExecutionStatus::COMPLETED;
|
||||
$execution->save();
|
||||
})->catch(function () use ($execution) {
|
||||
$execution->status = ScriptExecutionStatus::FAILED;
|
||||
$execution->save();
|
||||
})->onConnection('ssh');
|
||||
|
||||
return $execution;
|
||||
}
|
||||
|
||||
public static function rules(array $input): array
|
||||
{
|
||||
$users = ['root'];
|
||||
if (isset($input['server'])) {
|
||||
/** @var ?Server $server */
|
||||
$server = Server::query()->find($input['server']);
|
||||
$users = $server->getSshUsers();
|
||||
}
|
||||
|
||||
return [
|
||||
'server' => [
|
||||
'required',
|
||||
Rule::exists('servers', 'id'),
|
||||
],
|
||||
'user' => [
|
||||
'required',
|
||||
Rule::in($users),
|
||||
],
|
||||
'variables' => 'array',
|
||||
'variables.*' => [
|
||||
'required',
|
||||
'string',
|
||||
'max:255',
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\Script;
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
|
||||
|
||||
class GetScripts
|
||||
{
|
||||
public function handle(User $user): LengthAwarePaginator
|
||||
{
|
||||
return $user->scripts()
|
||||
->orderBy('id', 'desc')
|
||||
->paginate(6)
|
||||
->onEachSide(1);
|
||||
}
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\Script;
|
||||
|
||||
use App\Models\Script;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
class UpdateScript
|
||||
{
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
public function handle(Script $script, array $input): Script
|
||||
{
|
||||
$this->validateInputs($input);
|
||||
|
||||
$script->name = $input['name'];
|
||||
$script->content = $input['content'];
|
||||
$script->save();
|
||||
|
||||
return $script;
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
private function validateInputs(array $input): void
|
||||
{
|
||||
$rules = [
|
||||
'name' => 'required',
|
||||
'content' => 'required',
|
||||
];
|
||||
|
||||
Validator::make($input, $rules)->validateWithBag('updateScript');
|
||||
}
|
||||
}
|
31
app/Actions/Server/CheckConnection.php
Normal file
31
app/Actions/Server/CheckConnection.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\Server;
|
||||
|
||||
use App\Enums\ServerStatus;
|
||||
use App\Facades\Notifier;
|
||||
use App\Models\Server;
|
||||
use App\Notifications\ServerDisconnected;
|
||||
use Throwable;
|
||||
|
||||
class CheckConnection
|
||||
{
|
||||
public function check(Server $server): Server
|
||||
{
|
||||
$status = $server->status;
|
||||
try {
|
||||
$server->ssh()->connect();
|
||||
$server->refresh();
|
||||
if (in_array($status, [ServerStatus::DISCONNECTED, ServerStatus::UPDATING])) {
|
||||
$server->status = ServerStatus::READY;
|
||||
$server->save();
|
||||
}
|
||||
} catch (Throwable) {
|
||||
$server->status = ServerStatus::DISCONNECTED;
|
||||
$server->save();
|
||||
Notifier::send($server, new ServerDisconnected($server));
|
||||
}
|
||||
|
||||
return $server;
|
||||
}
|
||||
}
|
@ -3,14 +3,20 @@
|
||||
namespace App\Actions\Server;
|
||||
|
||||
use App\Enums\FirewallRuleStatus;
|
||||
use App\Exceptions\ServerProviderError;
|
||||
use App\Jobs\Installation\ContinueInstallation;
|
||||
use App\Enums\ServerProvider;
|
||||
use App\Enums\ServerStatus;
|
||||
use App\Enums\ServerType;
|
||||
use App\Exceptions\SSHConnectionError;
|
||||
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\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Database\Query\Builder;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Validation\Rule;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
@ -18,21 +24,17 @@
|
||||
|
||||
class CreateServer
|
||||
{
|
||||
/**
|
||||
* @throws Throwable
|
||||
*/
|
||||
public function create(User $creator, array $input): Server
|
||||
public function create(User $creator, Project $project, array $input): Server
|
||||
{
|
||||
$this->validateInputs($input);
|
||||
|
||||
$server = new Server([
|
||||
'project_id' => $project->id,
|
||||
'user_id' => $creator->id,
|
||||
'name' => $input['name'],
|
||||
'ssh_user' => config('core.server_providers_default_user')[$input['provider']][$input['os']],
|
||||
'ip' => $input['ip'],
|
||||
'ip' => $input['ip'] ?? '',
|
||||
'port' => $input['port'] ?? 22,
|
||||
'os' => $input['os'],
|
||||
'type' => $input['type'],
|
||||
'type' => ServerType::REGULAR,
|
||||
'provider' => $input['provider'],
|
||||
'authentication' => [
|
||||
'user' => config('core.ssh_user'),
|
||||
@ -44,18 +46,12 @@ public function create(User $creator, array $input): Server
|
||||
]);
|
||||
|
||||
try {
|
||||
DB::beginTransaction();
|
||||
|
||||
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
|
||||
@ -71,86 +67,129 @@ public function create(User $creator, array $input): Server
|
||||
$server->type()->createServices($input);
|
||||
|
||||
// install server
|
||||
if ($server->provider == 'custom') {
|
||||
$server->install();
|
||||
} else {
|
||||
$server->progress_step = __('Installation will begin in 3 minutes!');
|
||||
$server->save();
|
||||
dispatch(new ContinueInstallation($server))
|
||||
->delay(now()->addMinutes(2));
|
||||
}
|
||||
DB::commit();
|
||||
$this->install($server);
|
||||
|
||||
return $server;
|
||||
} catch (Exception $e) {
|
||||
$server->provider()->delete();
|
||||
DB::rollBack();
|
||||
if ($e instanceof ServerProviderError) {
|
||||
$server->delete();
|
||||
|
||||
throw ValidationException::withMessages([
|
||||
'provider' => __('Provider Error: ').$e->getMessage(),
|
||||
])->errorBag('createServer');
|
||||
}
|
||||
throw $e;
|
||||
'provider' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
private function validateInputs(array $input): void
|
||||
private function install(Server $server): void
|
||||
{
|
||||
dispatch(function () use ($server) {
|
||||
$maxWait = 180;
|
||||
while ($maxWait > 0) {
|
||||
sleep(10);
|
||||
$maxWait -= 10;
|
||||
try {
|
||||
$server->ssh()->connect();
|
||||
break;
|
||||
} catch (SSHConnectionError) {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
$server->type()->install();
|
||||
$server->update([
|
||||
'status' => ServerStatus::READY,
|
||||
]);
|
||||
Notifier::send($server, new ServerInstallationSucceed($server));
|
||||
})
|
||||
->catch(function (Throwable $e) use ($server) {
|
||||
$server->update([
|
||||
'status' => ServerStatus::INSTALLATION_FAILED,
|
||||
]);
|
||||
Notifier::send($server, new ServerInstallationFailed($server));
|
||||
Log::error('server-installation-error', [
|
||||
'error' => (string) $e,
|
||||
]);
|
||||
})
|
||||
->onConnection('ssh');
|
||||
}
|
||||
|
||||
public static function rules(Project $project, array $input): array
|
||||
{
|
||||
$rules = [
|
||||
'provider' => 'required|in:'.implode(',', config('core.server_providers')),
|
||||
'name' => 'required',
|
||||
'os' => 'required|in:'.implode(',', config('core.operating_systems')),
|
||||
'type' => [
|
||||
'provider' => [
|
||||
'required',
|
||||
Rule::in(config('core.server_types')),
|
||||
Rule::in(config('core.server_providers')),
|
||||
],
|
||||
];
|
||||
|
||||
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'] = [
|
||||
'name' => [
|
||||
'required',
|
||||
'ip',
|
||||
new RestrictedIPAddressesRule(),
|
||||
];
|
||||
$rules['port'] = [
|
||||
],
|
||||
'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;
|
||||
}, [
|
||||
'required',
|
||||
'numeric',
|
||||
'min:1',
|
||||
'max:65535',
|
||||
]),
|
||||
],
|
||||
];
|
||||
|
||||
return array_merge($rules, self::typeRules($input), self::providerRules($input));
|
||||
}
|
||||
|
||||
Validator::make($input, $rules)->validate();
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
private function validateType(Server $server, array $input): void
|
||||
private static function typeRules(array $input): array
|
||||
{
|
||||
Validator::make($input, $server->type()->createValidationRules($input))
|
||||
->validate();
|
||||
if (! isset($input['type']) || ! in_array($input['type'], config('core.server_types'))) {
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
private function validateProvider(Server $server, array $input): void
|
||||
$server = new Server(['type' => $input['type']]);
|
||||
|
||||
return $server->type()->createRules($input);
|
||||
}
|
||||
|
||||
private static function providerRules(array $input): array
|
||||
{
|
||||
Validator::make($input, $server->provider()->createValidationRules($input))
|
||||
->validate();
|
||||
if (
|
||||
! isset($input['provider']) ||
|
||||
! isset($input['server_provider']) ||
|
||||
! in_array($input['provider'], config('core.server_providers')) ||
|
||||
$input['provider'] == ServerProvider::CUSTOM
|
||||
) {
|
||||
return [];
|
||||
}
|
||||
|
||||
private function createFirewallRules(Server $server): void
|
||||
$server = new Server([
|
||||
'provider' => $input['provider'],
|
||||
'provider_id' => $input['server_provider'],
|
||||
]);
|
||||
|
||||
return $server->provider()->createRules($input);
|
||||
}
|
||||
|
||||
public function createFirewallRules(Server $server): void
|
||||
{
|
||||
$server->firewallRules()->createMany([
|
||||
[
|
||||
|
29
app/Actions/Server/CreateServerLog.php
Executable file
29
app/Actions/Server/CreateServerLog.php
Executable file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\Server;
|
||||
|
||||
use App\Models\Server;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
class CreateServerLog
|
||||
{
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
public function create(Server $server, array $input): void
|
||||
{
|
||||
$server->logs()->create([
|
||||
'is_remote' => true,
|
||||
'name' => $input['path'],
|
||||
'type' => 'remote',
|
||||
'disk' => 'ssh',
|
||||
]);
|
||||
}
|
||||
|
||||
public static function rules(): array
|
||||
{
|
||||
return [
|
||||
'path' => 'required',
|
||||
];
|
||||
}
|
||||
}
|
@ -4,7 +4,7 @@
|
||||
|
||||
use App\Models\Server;
|
||||
use App\ValidationRules\RestrictedIPAddressesRule;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Validation\Rule;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
class EditServer
|
||||
@ -14,8 +14,6 @@ class EditServer
|
||||
*/
|
||||
public function edit(Server $server, array $input): Server
|
||||
{
|
||||
$this->validate($input);
|
||||
|
||||
$checkConnection = false;
|
||||
if (isset($input['name'])) {
|
||||
$server->name = $input['name'];
|
||||
@ -26,6 +24,9 @@ public function edit(Server $server, array $input): Server
|
||||
}
|
||||
$server->ip = $input['ip'];
|
||||
}
|
||||
if (isset($input['local_ip'])) {
|
||||
$server->local_ip = $input['local_ip'];
|
||||
}
|
||||
if (isset($input['port'])) {
|
||||
if ($server->port !== $input['port']) {
|
||||
$checkConnection = true;
|
||||
@ -35,21 +36,34 @@ public function edit(Server $server, array $input): Server
|
||||
$server->save();
|
||||
|
||||
if ($checkConnection) {
|
||||
$server->checkConnection();
|
||||
return $server->checkConnection();
|
||||
}
|
||||
|
||||
return $server;
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
protected function validate(array $input): void
|
||||
public static function rules(Server $server): array
|
||||
{
|
||||
Validator::make($input, [
|
||||
'ip' => [
|
||||
new RestrictedIPAddressesRule(),
|
||||
return [
|
||||
'name' => [
|
||||
'required',
|
||||
'max:255',
|
||||
Rule::unique('servers')->where('project_id', $server->project_id)->ignore($server->id),
|
||||
],
|
||||
])->validateWithBag('editServer');
|
||||
'ip' => [
|
||||
'string',
|
||||
new RestrictedIPAddressesRule,
|
||||
Rule::unique('servers')->where('project_id', $server->project_id)->ignore($server->id),
|
||||
],
|
||||
'local_ip' => [
|
||||
'string',
|
||||
Rule::unique('servers')->where('project_id', $server->project_id)->ignore($server->id),
|
||||
],
|
||||
'port' => [
|
||||
'integer',
|
||||
'min:1',
|
||||
'max:65535',
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -1,14 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\Server;
|
||||
|
||||
use App\Models\Server;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
|
||||
class GetServers
|
||||
{
|
||||
public function handle(): Collection
|
||||
{
|
||||
return Server::query()->latest()->get();
|
||||
}
|
||||
}
|
23
app/Actions/Server/RebootServer.php
Normal file
23
app/Actions/Server/RebootServer.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\Server;
|
||||
|
||||
use App\Enums\ServerStatus;
|
||||
use App\Models\Server;
|
||||
use Throwable;
|
||||
|
||||
class RebootServer
|
||||
{
|
||||
public function reboot(Server $server): Server
|
||||
{
|
||||
try {
|
||||
$server->os()->reboot();
|
||||
$server->status = ServerStatus::DISCONNECTED;
|
||||
$server->save();
|
||||
} catch (Throwable) {
|
||||
$server = $server->checkConnection();
|
||||
}
|
||||
|
||||
return $server;
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user