mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-01 05:56:16 +00:00
Compare commits
178 Commits
Author | SHA1 | Date | |
---|---|---|---|
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 | |||
884f18db63 | |||
536df65fc6 |
@ -7,6 +7,7 @@ indent_size = 4
|
|||||||
indent_style = space
|
indent_style = space
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
|
ij_any_block_comment_at_first_column = false
|
||||||
|
|
||||||
[*.md]
|
[*.md]
|
||||||
trim_trailing_whitespace = false
|
trim_trailing_whitespace = false
|
||||||
|
@ -12,5 +12,9 @@ MAIL_PORT=
|
|||||||
MAIL_USERNAME=null
|
MAIL_USERNAME=null
|
||||||
MAIL_PASSWORD=null
|
MAIL_PASSWORD=null
|
||||||
MAIL_ENCRYPTION=null
|
MAIL_ENCRYPTION=null
|
||||||
MAIL_FROM_ADDRESS=null
|
MAIL_FROM_ADDRESS="noreply@${APP_NAME}"
|
||||||
MAIL_FROM_NAME="${APP_NAME}"
|
MAIL_FROM_NAME="${APP_NAME}"
|
||||||
|
|
||||||
|
APP_PORT=8000
|
||||||
|
|
||||||
|
SCRIBE_AUTH_KEY="YOUR-API-KEY"
|
||||||
|
@ -12,5 +12,5 @@ MAIL_PORT=
|
|||||||
MAIL_USERNAME=null
|
MAIL_USERNAME=null
|
||||||
MAIL_PASSWORD=null
|
MAIL_PASSWORD=null
|
||||||
MAIL_ENCRYPTION=null
|
MAIL_ENCRYPTION=null
|
||||||
MAIL_FROM_ADDRESS=null
|
MAIL_FROM_ADDRESS="noreply@${APP_NAME}"
|
||||||
MAIL_FROM_NAME="${APP_NAME}"
|
MAIL_FROM_NAME="${APP_NAME}"
|
||||||
|
@ -13,5 +13,5 @@ MAIL_PORT=
|
|||||||
MAIL_USERNAME=null
|
MAIL_USERNAME=null
|
||||||
MAIL_PASSWORD=null
|
MAIL_PASSWORD=null
|
||||||
MAIL_ENCRYPTION=null
|
MAIL_ENCRYPTION=null
|
||||||
MAIL_FROM_ADDRESS=null
|
MAIL_FROM_ADDRESS="noreply@${APP_NAME}"
|
||||||
MAIL_FROM_NAME="${APP_NAME}"
|
MAIL_FROM_NAME="${APP_NAME}"
|
||||||
|
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
|
12
.github/ISSUE_TEMPLATE/feature_request.md
vendored
12
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@ -1,12 +0,0 @@
|
|||||||
---
|
|
||||||
name: Feature request
|
|
||||||
about: Suggest an idea for this project
|
|
||||||
title: ''
|
|
||||||
labels: feature
|
|
||||||
assignees: ''
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
To request a feature or suggest an idea please add it to the feedback boards
|
|
||||||
|
|
||||||
https://features.vitodeploy.com/
|
|
6
.github/workflows/code-style.yml
vendored
6
.github/workflows/code-style.yml
vendored
@ -3,7 +3,9 @@ name: code-style
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
|
- main
|
||||||
- 1.x
|
- 1.x
|
||||||
|
- 2.x
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@ -13,8 +15,8 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: true
|
fail-fast: true
|
||||||
matrix:
|
matrix:
|
||||||
php: [8.2]
|
php: [ 8.2 ]
|
||||||
node-version: ["20.x"]
|
node-version: [ "20.x" ]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
44
.github/workflows/docker-release.yml
vendored
Normal file
44
.github/workflows/docker-release.yml
vendored
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
name: Build and push Docker image
|
||||||
|
|
||||||
|
on:
|
||||||
|
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 Docker image
|
||||||
|
run: |
|
||||||
|
docker buildx build . \
|
||||||
|
-f docker/Dockerfile \
|
||||||
|
-t vitodeploy/vito:${{ github.event.release.tag_name }} \
|
||||||
|
--build-arg="RELEASE=0" \
|
||||||
|
--platform linux/amd64,linux/arm64 \
|
||||||
|
--no-cache \
|
||||||
|
--push
|
||||||
|
|
||||||
|
- name: Build and push latest tag
|
||||||
|
if: startsWith(github.event.release.target_commitish, '2.x')
|
||||||
|
run: |
|
||||||
|
docker buildx build . \
|
||||||
|
-f docker/Dockerfile \
|
||||||
|
-t vitodeploy/vito:latest \
|
||||||
|
--build-arg="RELEASE=0" \
|
||||||
|
--platform linux/amd64,linux/arm64 \
|
||||||
|
--push
|
36
.github/workflows/docker.yml
vendored
Normal file
36
.github/workflows/docker.yml
vendored
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
name: Build and push Docker image
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 1.x
|
||||||
|
- 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 Docker image
|
||||||
|
run: |
|
||||||
|
docker buildx build . \
|
||||||
|
-f docker/Dockerfile \
|
||||||
|
-t vitodeploy/vito:${{ github.head_ref || github.ref_name }} \
|
||||||
|
--build-arg="RELEASE=0" \
|
||||||
|
--platform linux/amd64,linux/arm64 \
|
||||||
|
--no-cache \
|
||||||
|
--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 }}"
|
4
.github/workflows/tests.yml
vendored
4
.github/workflows/tests.yml
vendored
@ -3,7 +3,9 @@ name: tests
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
|
- main
|
||||||
- 1.x
|
- 1.x
|
||||||
|
- 2.x
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@ -13,7 +15,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: true
|
fail-fast: true
|
||||||
matrix:
|
matrix:
|
||||||
php: [8.2]
|
php: [ 8.2 ]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -7,6 +7,8 @@
|
|||||||
/storage/test-key
|
/storage/test-key
|
||||||
/storage/test-key.pub
|
/storage/test-key.pub
|
||||||
/vendor
|
/vendor
|
||||||
|
/storage/database.sqlite
|
||||||
|
/storage/database-test.sqlite
|
||||||
.env
|
.env
|
||||||
.env.backup
|
.env.backup
|
||||||
.env.production
|
.env.production
|
||||||
@ -19,3 +21,4 @@ yarn-error.log
|
|||||||
/.fleet
|
/.fleet
|
||||||
/.idea
|
/.idea
|
||||||
/.vscode
|
/.vscode
|
||||||
|
laradumps.yaml
|
||||||
|
14
.prettierignore
Normal file
14
.prettierignore
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
.git/
|
||||||
|
.scribe/
|
||||||
|
node_modules/
|
||||||
|
public/
|
||||||
|
storage/
|
||||||
|
vendor/
|
||||||
|
composer.lock
|
||||||
|
.env
|
||||||
|
.env.example
|
||||||
|
sail
|
||||||
|
*.md
|
||||||
|
*.yml
|
||||||
|
!*.blade.php
|
||||||
|
!*.sh
|
12
.prettierrc
12
.prettierrc
@ -1,5 +1,9 @@
|
|||||||
{
|
{
|
||||||
"plugins": ["prettier-plugin-blade", "prettier-plugin-tailwindcss"],
|
"plugins": [
|
||||||
|
"prettier-plugin-blade",
|
||||||
|
"prettier-plugin-tailwindcss",
|
||||||
|
"prettier-plugin-sh"
|
||||||
|
],
|
||||||
"overrides": [
|
"overrides": [
|
||||||
{
|
{
|
||||||
"files": ["*.blade.php"],
|
"files": ["*.blade.php"],
|
||||||
@ -11,6 +15,12 @@
|
|||||||
"quoteProps": "consistent",
|
"quoteProps": "consistent",
|
||||||
"trailingComma": "none"
|
"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: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"data":[{"id":null,"server_id":null,"command":"ls -la","user":"root","frequency":"* * * * *","status":"ready","created_at":null,"updated_at":null},{"id":null,"server_id":null,"command":"ls -la","user":"root","frequency":"* * * * *","status":"ready","created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« 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 6ed1gv5ak6hEPcaV8D3Z4bf'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- POST
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/cron-jobs'
|
||||||
|
metadata:
|
||||||
|
groupName: cron-jobs
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: create
|
||||||
|
description: 'Create a new cron job.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters:
|
||||||
|
command:
|
||||||
|
name: command
|
||||||
|
description: ''
|
||||||
|
required: true
|
||||||
|
example: qui
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
user:
|
||||||
|
name: user
|
||||||
|
description: ''
|
||||||
|
required: true
|
||||||
|
example: root
|
||||||
|
type: string
|
||||||
|
enumValues:
|
||||||
|
- root
|
||||||
|
- vito
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
frequency:
|
||||||
|
name: frequency
|
||||||
|
description: 'Frequency of the cron job.'
|
||||||
|
required: true
|
||||||
|
example: '* * * * *'
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanBodyParameters:
|
||||||
|
command: qui
|
||||||
|
user: root
|
||||||
|
frequency: '* * * * *'
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":null,"server_id":null,"command":"ls -la","user":"root","frequency":"* * * * *","status":"ready","created_at":null,"updated_at":null}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer VEfc5h3gva68PkZ46Deabd1'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- GET
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/cron-jobs/{cronJob_id}'
|
||||||
|
metadata:
|
||||||
|
groupName: cron-jobs
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: show
|
||||||
|
description: 'Get a cron job by ID.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cronJob_id:
|
||||||
|
name: cronJob_id
|
||||||
|
description: 'The ID of the cronJob.'
|
||||||
|
required: true
|
||||||
|
example: 5
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
cronJob_id: 5
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":null,"server_id":null,"command":"ls -la","user":"root","frequency":"* * * * *","status":"ready","created_at":null,"updated_at":null}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer 614DaP5vZ6edcaVEgfhk83b'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- DELETE
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/cron-jobs/{cronJob_id}'
|
||||||
|
metadata:
|
||||||
|
groupName: cron-jobs
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: delete
|
||||||
|
description: 'Delete cron job.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cronJob_id:
|
||||||
|
name: cronJob_id
|
||||||
|
description: 'The ID of the cronJob.'
|
||||||
|
required: true
|
||||||
|
example: 5
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
cronJob_id: 5
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 204
|
||||||
|
content: 'null'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer gDV6bZ1dEckvf45P86eaha3'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
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: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"data":[{"id":null,"server_id":null,"name":"clockman","status":"ready","created_at":null,"updated_at":null},{"id":null,"server_id":null,"name":"wvonrueden","status":"ready","created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« 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 efEV4g86bd5PZac6vak3Dh1'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- POST
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/databases'
|
||||||
|
metadata:
|
||||||
|
groupName: databases
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: create
|
||||||
|
description: 'Create a new database.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
description: ''
|
||||||
|
required: true
|
||||||
|
example: nesciunt
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanBodyParameters:
|
||||||
|
name: nesciunt
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":null,"server_id":null,"name":"johanna76","status":"ready","created_at":null,"updated_at":null}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer 3E6VD14dvaekbaZfh6Pg8c5'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- GET
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/databases/{id}'
|
||||||
|
metadata:
|
||||||
|
groupName: databases
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: show
|
||||||
|
description: 'Get a database by ID.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
id:
|
||||||
|
name: id
|
||||||
|
description: 'The ID of the database.'
|
||||||
|
required: true
|
||||||
|
example: 6
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
id: 6
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":null,"server_id":null,"name":"chloe.huel","status":"ready","created_at":null,"updated_at":null}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer fb5hVc38e1aDP6ZvkgEda46'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- DELETE
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/databases/{database_id}'
|
||||||
|
metadata:
|
||||||
|
groupName: databases
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: delete
|
||||||
|
description: 'Delete database.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
database_id:
|
||||||
|
name: database_id
|
||||||
|
description: 'The ID of the database.'
|
||||||
|
required: true
|
||||||
|
example: 6
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
database_id: 6
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 204
|
||||||
|
content: 'null'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer cPVbhaZkfg5aEv46D183ed6'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
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: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"data":[{"id":null,"server_id":null,"username":"nyasia68","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null},{"id":null,"server_id":null,"username":"madyson20","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« 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 egc5VaDdvabfP6843k61hZE'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- POST
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/database-users'
|
||||||
|
metadata:
|
||||||
|
groupName: database-users
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: create
|
||||||
|
description: 'Create a new database user.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters:
|
||||||
|
username:
|
||||||
|
name: username
|
||||||
|
description: ''
|
||||||
|
required: true
|
||||||
|
example: dignissimos
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
password:
|
||||||
|
name: password
|
||||||
|
description: ''
|
||||||
|
required: true
|
||||||
|
example: OK+XEG2)
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
host:
|
||||||
|
name: host
|
||||||
|
description: 'Host, if it is a remote user.'
|
||||||
|
required: true
|
||||||
|
example: '%'
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanBodyParameters:
|
||||||
|
username: dignissimos
|
||||||
|
password: OK+XEG2)
|
||||||
|
host: '%'
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":null,"server_id":null,"username":"amya.nitzsche","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer 31hgfcvEb6Pkaa48D6dZ5Ve'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- GET
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/database-users/{databaseUser_id}'
|
||||||
|
metadata:
|
||||||
|
groupName: database-users
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: show
|
||||||
|
description: 'Get a database user by ID.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
databaseUser_id:
|
||||||
|
name: databaseUser_id
|
||||||
|
description: 'The ID of the databaseUser.'
|
||||||
|
required: true
|
||||||
|
example: 4
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
databaseUser_id: 4
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":null,"server_id":null,"username":"bergstrom.ericka","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer aDv48631h5af6EdkcVbPZeg'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- POST
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/database-users/{databaseUser_id}/link'
|
||||||
|
metadata:
|
||||||
|
groupName: database-users
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: link
|
||||||
|
description: 'Link to databases'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
databaseUser_id:
|
||||||
|
name: databaseUser_id
|
||||||
|
description: 'The ID of the databaseUser.'
|
||||||
|
required: true
|
||||||
|
example: 4
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
databaseUser_id: 4
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters:
|
||||||
|
databases:
|
||||||
|
name: databases
|
||||||
|
description: 'Array of database names to link to the user.'
|
||||||
|
required: true
|
||||||
|
example: accusantium
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanBodyParameters:
|
||||||
|
databases: accusantium
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":null,"server_id":null,"username":"fmurray","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer cf8ZPhV1k3d5DaEva46beg6'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- DELETE
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/database-users/{databaseUser_id}'
|
||||||
|
metadata:
|
||||||
|
groupName: database-users
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: delete
|
||||||
|
description: 'Delete database user.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
databaseUser_id:
|
||||||
|
name: databaseUser_id
|
||||||
|
description: 'The ID of the databaseUser.'
|
||||||
|
required: true
|
||||||
|
example: 4
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
databaseUser_id: 4
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 204
|
||||||
|
content: 'null'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer hdEvkbaPVf4cZ65a8631eDg'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
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: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"data":[{"id":null,"server_id":null,"type":"allow","protocol":"tcp","port":18074,"source":"189.27.156.82","mask":24,"note":"test","status":null,"created_at":null,"updated_at":null},{"id":null,"server_id":null,"type":"allow","protocol":"tcp","port":41088,"source":"86.177.121.87","mask":24,"note":"test","status":null,"created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« 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 vhkc4aPa6ZdeV8D3Ef156gb'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- POST
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/firewall-rules'
|
||||||
|
metadata:
|
||||||
|
groupName: firewall-rules
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: create
|
||||||
|
description: 'Create a new firewall rule.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters:
|
||||||
|
type:
|
||||||
|
name: type
|
||||||
|
description: ''
|
||||||
|
required: true
|
||||||
|
example: allow
|
||||||
|
type: string
|
||||||
|
enumValues:
|
||||||
|
- allow
|
||||||
|
- deny
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
protocol:
|
||||||
|
name: protocol
|
||||||
|
description: ''
|
||||||
|
required: true
|
||||||
|
example: udp
|
||||||
|
type: string
|
||||||
|
enumValues:
|
||||||
|
- tcp
|
||||||
|
- udp
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
port:
|
||||||
|
name: port
|
||||||
|
description: ''
|
||||||
|
required: true
|
||||||
|
example: voluptates
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
source:
|
||||||
|
name: source
|
||||||
|
description: ''
|
||||||
|
required: true
|
||||||
|
example: saepe
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
mask:
|
||||||
|
name: mask
|
||||||
|
description: 'Mask for source IP.'
|
||||||
|
required: true
|
||||||
|
example: '0'
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanBodyParameters:
|
||||||
|
type: allow
|
||||||
|
protocol: udp
|
||||||
|
port: voluptates
|
||||||
|
source: saepe
|
||||||
|
mask: '0'
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":null,"server_id":null,"type":"allow","protocol":"tcp","port":61992,"source":"47.222.76.48","mask":24,"note":"test","status":null,"created_at":null,"updated_at":null}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer 1cEb5P66VeDkf8aahg3Zdv4'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- GET
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/firewall-rules/{firewallRule_id}'
|
||||||
|
metadata:
|
||||||
|
groupName: firewall-rules
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: show
|
||||||
|
description: 'Get a firewall rule by ID.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
firewallRule_id:
|
||||||
|
name: firewallRule_id
|
||||||
|
description: 'The ID of the firewallRule.'
|
||||||
|
required: true
|
||||||
|
example: 7
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
firewallRule_id: 7
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":null,"server_id":null,"type":"allow","protocol":"tcp","port":43107,"source":"135.73.216.16","mask":24,"note":"test","status":null,"created_at":null,"updated_at":null}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer 6VaPhkD5vd1Z8e6E3cba4gf'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- DELETE
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/firewall-rules/{firewallRule_id}'
|
||||||
|
metadata:
|
||||||
|
groupName: firewall-rules
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: delete
|
||||||
|
description: 'Delete firewall rule.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
firewallRule_id:
|
||||||
|
name: firewallRule_id
|
||||||
|
description: 'The ID of the firewallRule.'
|
||||||
|
required: true
|
||||||
|
example: 7
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
firewallRule_id: 7
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 204
|
||||||
|
content: 'null'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer v81d5Efch636aVgZebaPkD4'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
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.0.0"}'
|
||||||
|
headers:
|
||||||
|
cache-control: 'no-cache, private'
|
||||||
|
content-type: application/json
|
||||||
|
x-ratelimit-limit: '60'
|
||||||
|
x-ratelimit-remaining: '59'
|
||||||
|
access-control-allow-origin: '*'
|
||||||
|
description: null
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth: []
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
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":29,"name":"Zachary Lueilwitz","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"},{"id":30,"name":"Mrs. Kiarra Heller IV","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« 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 eb14DEPv6cdah65VfZgka38'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- POST
|
||||||
|
uri: api/projects
|
||||||
|
metadata:
|
||||||
|
groupName: projects
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: create
|
||||||
|
description: 'Create a new project.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters: []
|
||||||
|
cleanUrlParameters: []
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
description: 'The name of the project.'
|
||||||
|
required: true
|
||||||
|
example: quos
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanBodyParameters:
|
||||||
|
name: quos
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":29,"name":"Hershel Spinka","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer V1E3566Pf4gkvh8dDZabeca'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- GET
|
||||||
|
uri: 'api/projects/{id}'
|
||||||
|
metadata:
|
||||||
|
groupName: projects
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: show
|
||||||
|
description: 'Get a project by ID.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
id:
|
||||||
|
name: id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
id: 1
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":29,"name":"Emery Kiehn","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer haD6e36VZbkf4P8aEcvd15g'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- PUT
|
||||||
|
uri: 'api/projects/{id}'
|
||||||
|
metadata:
|
||||||
|
groupName: projects
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: update
|
||||||
|
description: 'Update project.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
id:
|
||||||
|
name: id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
id: 1
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
description: 'The name of the project.'
|
||||||
|
required: true
|
||||||
|
example: ut
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanBodyParameters:
|
||||||
|
name: ut
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":29,"name":"Mable Prohaska","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer V14kPa5deva8Ebgc36f6hDZ'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- DELETE
|
||||||
|
uri: 'api/projects/{project_id}'
|
||||||
|
metadata:
|
||||||
|
groupName: projects
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: delete
|
||||||
|
description: 'Delete project.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 204
|
||||||
|
content: 'null'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer k1D68d5ePavVZag6h4fb3cE'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
516
.scribe/endpoints.cache/06.yaml
Normal file
516
.scribe/endpoints.cache/06.yaml
Normal file
@ -0,0 +1,516 @@
|
|||||||
|
## Autogenerated by Scribe. DO NOT MODIFY.
|
||||||
|
|
||||||
|
name: servers
|
||||||
|
description: ''
|
||||||
|
endpoints:
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- GET
|
||||||
|
uri: 'api/projects/{project_id}/servers'
|
||||||
|
metadata:
|
||||||
|
groupName: servers
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: list
|
||||||
|
description: 'Get all servers in a project.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"data":[{"id":null,"project_id":null,"user_id":null,"provider_id":null,"name":"Dorthy Toy","ssh_user":"vito","ip":"172.132.95.155","local_ip":"118.57.197.65","port":22,"os":"ubuntu_22","type":"regular","type_data":null,"provider":"custom","provider_data":null,"public_key":"test","status":"ready","auto_update":null,"available_updates":0,"security_updates":null,"progress":100,"progress_step":null,"updates":null,"last_update_check":null,"created_at":null,"updated_at":null},{"id":null,"project_id":null,"user_id":null,"provider_id":null,"name":"Carrie Sporer","ssh_user":"vito","ip":"184.242.162.173","local_ip":"135.244.50.22","port":22,"os":"ubuntu_22","type":"regular","type_data":null,"provider":"custom","provider_data":null,"public_key":"test","status":"ready","auto_update":null,"available_updates":0,"security_updates":null,"progress":100,"progress_step":null,"updates":null,"last_update_check":null,"created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« 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 8VE41PdZcvb6kgafD635ahe'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- POST
|
||||||
|
uri: 'api/projects/{project_id}/servers'
|
||||||
|
metadata:
|
||||||
|
groupName: servers
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: create
|
||||||
|
description: 'Create a new server.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters:
|
||||||
|
provider:
|
||||||
|
name: provider
|
||||||
|
description: 'The server provider type'
|
||||||
|
required: true
|
||||||
|
example: et
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_provider:
|
||||||
|
name: server_provider
|
||||||
|
description: 'If the provider is not custom, the ID of the server provider profile'
|
||||||
|
required: true
|
||||||
|
example: digitalocean
|
||||||
|
type: string
|
||||||
|
enumValues:
|
||||||
|
- custom
|
||||||
|
- hetzner
|
||||||
|
- digitalocean
|
||||||
|
- linode
|
||||||
|
- vultr
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
region:
|
||||||
|
name: region
|
||||||
|
description: 'Provider region if the provider is not custom'
|
||||||
|
required: true
|
||||||
|
example: inventore
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
plan:
|
||||||
|
name: plan
|
||||||
|
description: 'Provider plan if the provider is not custom'
|
||||||
|
required: true
|
||||||
|
example: atque
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
ip:
|
||||||
|
name: ip
|
||||||
|
description: 'SSH IP address if the provider is custom'
|
||||||
|
required: true
|
||||||
|
example: quam
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
port:
|
||||||
|
name: port
|
||||||
|
description: 'SSH Port if the provider is custom'
|
||||||
|
required: true
|
||||||
|
example: nemo
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
description: 'The name of the server.'
|
||||||
|
required: true
|
||||||
|
example: perspiciatis
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
os:
|
||||||
|
name: os
|
||||||
|
description: 'The os of the server'
|
||||||
|
required: true
|
||||||
|
example: similique
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
type:
|
||||||
|
name: type
|
||||||
|
description: 'Server type'
|
||||||
|
required: true
|
||||||
|
example: regular
|
||||||
|
type: string
|
||||||
|
enumValues:
|
||||||
|
- regular
|
||||||
|
- database
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
webserver:
|
||||||
|
name: webserver
|
||||||
|
description: 'Web server'
|
||||||
|
required: true
|
||||||
|
example: none
|
||||||
|
type: string
|
||||||
|
enumValues:
|
||||||
|
- none
|
||||||
|
- nginx
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
database:
|
||||||
|
name: database
|
||||||
|
description: Database
|
||||||
|
required: true
|
||||||
|
example: none
|
||||||
|
type: string
|
||||||
|
enumValues:
|
||||||
|
- none
|
||||||
|
- mysql57
|
||||||
|
- mysql80
|
||||||
|
- mariadb103
|
||||||
|
- mariadb104
|
||||||
|
- mariadb103
|
||||||
|
- postgresql12
|
||||||
|
- postgresql13
|
||||||
|
- postgresql14
|
||||||
|
- postgresql15
|
||||||
|
- postgresql16
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
php:
|
||||||
|
name: php
|
||||||
|
description: 'PHP version'
|
||||||
|
required: true
|
||||||
|
example: '8.1'
|
||||||
|
type: string
|
||||||
|
enumValues:
|
||||||
|
- '7.0'
|
||||||
|
- '7.1'
|
||||||
|
- '7.2'
|
||||||
|
- '7.3'
|
||||||
|
- '7.4'
|
||||||
|
- '8.0'
|
||||||
|
- '8.1'
|
||||||
|
- '8.2'
|
||||||
|
- '8.3'
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanBodyParameters:
|
||||||
|
provider: et
|
||||||
|
server_provider: digitalocean
|
||||||
|
region: inventore
|
||||||
|
plan: atque
|
||||||
|
ip: quam
|
||||||
|
port: nemo
|
||||||
|
name: perspiciatis
|
||||||
|
os: similique
|
||||||
|
type: regular
|
||||||
|
webserver: none
|
||||||
|
database: none
|
||||||
|
php: '8.1'
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":null,"project_id":null,"user_id":null,"provider_id":null,"name":"Flo Beer PhD","ssh_user":"vito","ip":"168.238.14.230","local_ip":"40.232.73.41","port":22,"os":"ubuntu_22","type":"regular","type_data":null,"provider":"custom","provider_data":null,"public_key":"test","status":"ready","auto_update":null,"available_updates":0,"security_updates":null,"progress":100,"progress_step":null,"updates":null,"last_update_check":null,"created_at":null,"updated_at":null}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer Z8g36aaV4E1bdcPfehDv65k'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- GET
|
||||||
|
uri: 'api/projects/{project_id}/servers/{id}'
|
||||||
|
metadata:
|
||||||
|
groupName: servers
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: show
|
||||||
|
description: 'Get a server by ID.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
id:
|
||||||
|
name: id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
id: 3
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":null,"project_id":null,"user_id":null,"provider_id":null,"name":"Stephany Ankunding","ssh_user":"vito","ip":"145.28.94.46","local_ip":"69.133.44.100","port":22,"os":"ubuntu_22","type":"regular","type_data":null,"provider":"custom","provider_data":null,"public_key":"test","status":"ready","auto_update":null,"available_updates":0,"security_updates":null,"progress":100,"progress_step":null,"updates":null,"last_update_check":null,"created_at":null,"updated_at":null}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer adD3EfP5hZ4vgbkV861eca6'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- POST
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/reboot'
|
||||||
|
metadata:
|
||||||
|
groupName: servers
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: reboot
|
||||||
|
description: 'Reboot a server.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 204
|
||||||
|
content: 'null'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer P3ec6aagD4hbdV5fEk168vZ'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- POST
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/upgrade'
|
||||||
|
metadata:
|
||||||
|
groupName: servers
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: upgrade
|
||||||
|
description: 'Upgrade server.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 204
|
||||||
|
content: 'null'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer P34ZV6D1bEegdvac8f5kh6a'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- DELETE
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}'
|
||||||
|
metadata:
|
||||||
|
groupName: servers
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: delete
|
||||||
|
description: 'Delete server.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 204
|
||||||
|
content: 'null'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer ha6v5V41afkdPgcZbDEe386'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
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":"dolor","provider":"digitalocean","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"},{"id":3,"project_id":null,"global":true,"name":"enim","provider":"digitalocean","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« 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 1a6kb58vEP3fZdVhcea64gD'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- POST
|
||||||
|
uri: 'api/projects/{project_id}/server-providers'
|
||||||
|
metadata:
|
||||||
|
groupName: server-providers
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: create
|
||||||
|
description: ''
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters:
|
||||||
|
provider:
|
||||||
|
name: provider
|
||||||
|
description: 'The provider (aws, linode, hetzner, digitalocean, vultr, ...)'
|
||||||
|
required: true
|
||||||
|
example: autem
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
description: 'The name of the server provider.'
|
||||||
|
required: true
|
||||||
|
example: enim
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
token:
|
||||||
|
name: token
|
||||||
|
description: 'The token if provider requires api token'
|
||||||
|
required: true
|
||||||
|
example: culpa
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
key:
|
||||||
|
name: key
|
||||||
|
description: 'The key if provider requires key'
|
||||||
|
required: true
|
||||||
|
example: sit
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
secret:
|
||||||
|
name: secret
|
||||||
|
description: 'The secret if provider requires key'
|
||||||
|
required: true
|
||||||
|
example: voluptates
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanBodyParameters:
|
||||||
|
provider: autem
|
||||||
|
name: enim
|
||||||
|
token: culpa
|
||||||
|
key: sit
|
||||||
|
secret: voluptates
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":2,"project_id":null,"global":true,"name":"eligendi","provider":"aws","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer PD3ZcaVdvgfa5k4be8E6h16'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- GET
|
||||||
|
uri: 'api/projects/{project_id}/server-providers/{serverProvider_id}'
|
||||||
|
metadata:
|
||||||
|
groupName: server-providers
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: show
|
||||||
|
description: ''
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
serverProvider_id:
|
||||||
|
name: serverProvider_id
|
||||||
|
description: 'The ID of the serverProvider.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
serverProvider_id: 1
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":2,"project_id":null,"global":true,"name":"architecto","provider":"digitalocean","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer DP45bg1aEadh8Z6Vke63fcv'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- PUT
|
||||||
|
uri: 'api/projects/{project_id}/server-providers/{serverProvider_id}'
|
||||||
|
metadata:
|
||||||
|
groupName: server-providers
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: update
|
||||||
|
description: ''
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
serverProvider_id:
|
||||||
|
name: serverProvider_id
|
||||||
|
description: 'The ID of the serverProvider.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
serverProvider_id: 1
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
description: 'The name of the server provider.'
|
||||||
|
required: true
|
||||||
|
example: minus
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
global:
|
||||||
|
name: global
|
||||||
|
description: 'Accessible in all projects'
|
||||||
|
required: true
|
||||||
|
example: false
|
||||||
|
type: string
|
||||||
|
enumValues:
|
||||||
|
- true
|
||||||
|
- false
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanBodyParameters:
|
||||||
|
name: minus
|
||||||
|
global: false
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":2,"project_id":null,"global":true,"name":"reiciendis","provider":"hetzner","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer bv1kdegh6fP8V56ZE4acaD3'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- DELETE
|
||||||
|
uri: 'api/projects/{project_id}/server-providers/{serverProvider_id}'
|
||||||
|
metadata:
|
||||||
|
groupName: server-providers
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: delete
|
||||||
|
description: ''
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
serverProvider_id:
|
||||||
|
name: serverProvider_id
|
||||||
|
description: 'The ID of the serverProvider.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
serverProvider_id: 1
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 204
|
||||||
|
content: 'null'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer k6hb43Vf5Z1dv8aaeEDcg6P'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
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: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"data":[{"id":null,"user":null,"name":"Dr. Reanna Braun","created_at":null,"updated_at":null},{"id":null,"user":null,"name":"Norene Fritsch","created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« 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 dV1gcvfZ46Eh8ebaP5Da63k'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- POST
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/ssh-keys'
|
||||||
|
metadata:
|
||||||
|
groupName: ssh-keys
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: create
|
||||||
|
description: 'Deploy ssh key to server.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters:
|
||||||
|
key_id:
|
||||||
|
name: key_id
|
||||||
|
description: 'The ID of the key.'
|
||||||
|
required: true
|
||||||
|
example: vero
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
description: 'Key name, required if key_id is not provided.'
|
||||||
|
required: true
|
||||||
|
example: voluptates
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
public_key:
|
||||||
|
name: public_key
|
||||||
|
description: 'Public Key, required if key_id is not provided.'
|
||||||
|
required: true
|
||||||
|
example: dolor
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanBodyParameters:
|
||||||
|
key_id: vero
|
||||||
|
name: voluptates
|
||||||
|
public_key: dolor
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":null,"user":null,"name":"Sophia D''Amore","created_at":null,"updated_at":null}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer gkadV36a5f8E6vhb14ZceDP'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- DELETE
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/ssh-keys/{sshKey_id}'
|
||||||
|
metadata:
|
||||||
|
groupName: ssh-keys
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: delete
|
||||||
|
description: 'Delete ssh key from server.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
sshKey_id:
|
||||||
|
name: sshKey_id
|
||||||
|
description: 'The ID of the sshKey.'
|
||||||
|
required: true
|
||||||
|
example: 4
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
sshKey_id: 4
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 204
|
||||||
|
content: 'null'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer PfchD4Zge386abadE5kV61v'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
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: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"data":[{"id":null,"server_id":null,"type":null,"type_data":null,"name":null,"version":null,"unit":null,"status":null,"is_default":null,"created_at":null,"updated_at":null},{"id":null,"server_id":null,"type":null,"type_data":null,"name":null,"version":null,"unit":null,"status":null,"is_default":null,"created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« 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 h6bDec51ak84ZVafgv3PE6d'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- GET
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/services/{id}'
|
||||||
|
metadata:
|
||||||
|
groupName: services
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: show
|
||||||
|
description: 'Get a service by ID.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
id:
|
||||||
|
name: id
|
||||||
|
description: 'The ID of the service.'
|
||||||
|
required: true
|
||||||
|
example: 27
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
id: 27
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":null,"server_id":null,"type":null,"type_data":null,"name":null,"version":null,"unit":null,"status":null,"is_default":null,"created_at":null,"updated_at":null}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer da4V3kfgZ6a86PchevED5b1'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- POST
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/services/{service_id}/start'
|
||||||
|
metadata:
|
||||||
|
groupName: services
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: start
|
||||||
|
description: 'Start service.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
service_id:
|
||||||
|
name: service_id
|
||||||
|
description: 'The ID of the service.'
|
||||||
|
required: true
|
||||||
|
example: 27
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
service_id: 27
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 204
|
||||||
|
content: 'null'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer 86fdV5D6gv1E3ekaPZac4hb'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- POST
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/services/{service_id}/stop'
|
||||||
|
metadata:
|
||||||
|
groupName: services
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: stop
|
||||||
|
description: 'Stop service.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
service_id:
|
||||||
|
name: service_id
|
||||||
|
description: 'The ID of the service.'
|
||||||
|
required: true
|
||||||
|
example: 27
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
service_id: 27
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 204
|
||||||
|
content: 'null'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer kPZ563E1Vfgh4cbDad8vae6'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- POST
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/services/{service_id}/restart'
|
||||||
|
metadata:
|
||||||
|
groupName: services
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: restart
|
||||||
|
description: 'Restart service.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
service_id:
|
||||||
|
name: service_id
|
||||||
|
description: 'The ID of the service.'
|
||||||
|
required: true
|
||||||
|
example: 27
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
service_id: 27
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 204
|
||||||
|
content: 'null'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer fd14PaDb58gchv3ZVeaEk66'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- POST
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/services/{service_id}/enable'
|
||||||
|
metadata:
|
||||||
|
groupName: services
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: enable
|
||||||
|
description: 'Enable service.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
service_id:
|
||||||
|
name: service_id
|
||||||
|
description: 'The ID of the service.'
|
||||||
|
required: true
|
||||||
|
example: 27
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
service_id: 27
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 204
|
||||||
|
content: 'null'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer Dv1aVe6hZfkagdE356b4cP8'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- POST
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/services/{service_id}/disable'
|
||||||
|
metadata:
|
||||||
|
groupName: services
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: disable
|
||||||
|
description: 'Disable service.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
service_id:
|
||||||
|
name: service_id
|
||||||
|
description: 'The ID of the service.'
|
||||||
|
required: true
|
||||||
|
example: 27
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
service_id: 27
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 204
|
||||||
|
content: 'null'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer 6bdDc4Eah3ZV18kf6Pveag5'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- DELETE
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/services/{service_id}'
|
||||||
|
metadata:
|
||||||
|
groupName: services
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: delete
|
||||||
|
description: 'Delete service.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
service_id:
|
||||||
|
name: service_id
|
||||||
|
description: 'The ID of the service.'
|
||||||
|
required: true
|
||||||
|
example: 27
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
service_id: 27
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 204
|
||||||
|
content: 'null'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer 36kf84v6bVhE5gdPDeZ1caa'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
392
.scribe/endpoints.cache/10.yaml
Normal file
392
.scribe/endpoints.cache/10.yaml
Normal file
@ -0,0 +1,392 @@
|
|||||||
|
## Autogenerated by Scribe. DO NOT MODIFY.
|
||||||
|
|
||||||
|
name: sites
|
||||||
|
description: ''
|
||||||
|
endpoints:
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- GET
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/sites'
|
||||||
|
metadata:
|
||||||
|
groupName: sites
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: list
|
||||||
|
description: 'Get all sites.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"data":[{"id":null,"server_id":null,"source_control_id":null,"type":"laravel","type_data":null,"domain":"test.com","aliases":null,"web_directory":"\/","path":"\/home","php_version":"8.2","repository":null,"branch":"main","status":"ready","port":null,"progress":100,"created_at":null,"updated_at":null},{"id":null,"server_id":null,"source_control_id":null,"type":"laravel","type_data":null,"domain":"test.com","aliases":null,"web_directory":"\/","path":"\/home","php_version":"8.2","repository":null,"branch":"main","status":"ready","port":null,"progress":100,"created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« 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 gaeE86fd1aZP53Vvc6Dhbk4'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- POST
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/sites'
|
||||||
|
metadata:
|
||||||
|
groupName: sites
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: create
|
||||||
|
description: 'Create a new site.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters:
|
||||||
|
type:
|
||||||
|
name: type
|
||||||
|
description: ''
|
||||||
|
required: true
|
||||||
|
example: wordpress
|
||||||
|
type: string
|
||||||
|
enumValues:
|
||||||
|
- php
|
||||||
|
- php-blank
|
||||||
|
- phpmyadmin
|
||||||
|
- laravel
|
||||||
|
- wordpress
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
domain:
|
||||||
|
name: domain
|
||||||
|
description: ''
|
||||||
|
required: true
|
||||||
|
example: quo
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
aliases:
|
||||||
|
name: aliases
|
||||||
|
description: ''
|
||||||
|
required: true
|
||||||
|
example:
|
||||||
|
- dolorum
|
||||||
|
type: 'string[]'
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
php_version:
|
||||||
|
name: php_version
|
||||||
|
description: 'One of the installed PHP Versions'
|
||||||
|
required: true
|
||||||
|
example: '7.4'
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
web_directory:
|
||||||
|
name: web_directory
|
||||||
|
description: 'Required for PHP and Laravel sites'
|
||||||
|
required: true
|
||||||
|
example: public
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
source_control:
|
||||||
|
name: source_control
|
||||||
|
description: 'Source control ID, Required for Sites which support source control'
|
||||||
|
required: true
|
||||||
|
example: explicabo
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
repository:
|
||||||
|
name: repository
|
||||||
|
description: 'Repository, Required for Sites which support source control'
|
||||||
|
required: true
|
||||||
|
example: organization/repository
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
branch:
|
||||||
|
name: branch
|
||||||
|
description: 'Branch, Required for Sites which support source control'
|
||||||
|
required: true
|
||||||
|
example: main
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
composer:
|
||||||
|
name: composer
|
||||||
|
description: 'Run composer if site supports composer'
|
||||||
|
required: true
|
||||||
|
example: true
|
||||||
|
type: boolean
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
version:
|
||||||
|
name: version
|
||||||
|
description: 'Version, if the site type requires a version like PHPMyAdmin'
|
||||||
|
required: true
|
||||||
|
example: 5.2.1
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanBodyParameters:
|
||||||
|
type: wordpress
|
||||||
|
domain: quo
|
||||||
|
aliases:
|
||||||
|
- dolorum
|
||||||
|
php_version: '7.4'
|
||||||
|
web_directory: public
|
||||||
|
source_control: explicabo
|
||||||
|
repository: organization/repository
|
||||||
|
branch: main
|
||||||
|
composer: true
|
||||||
|
version: 5.2.1
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":null,"server_id":null,"source_control_id":null,"type":"laravel","type_data":null,"domain":"test.com","aliases":null,"web_directory":"\/","path":"\/home","php_version":"8.2","repository":null,"branch":"main","status":"ready","port":null,"progress":100,"created_at":null,"updated_at":null}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer efDd36cab6vZEaV4hkP851g'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- GET
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/sites/{id}'
|
||||||
|
metadata:
|
||||||
|
groupName: sites
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: show
|
||||||
|
description: 'Get a site by ID.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
id:
|
||||||
|
name: id
|
||||||
|
description: 'The ID of the site.'
|
||||||
|
required: true
|
||||||
|
example: 8
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
id: 8
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":null,"server_id":null,"source_control_id":null,"type":"laravel","type_data":null,"domain":"test.com","aliases":null,"web_directory":"\/","path":"\/home","php_version":"8.2","repository":null,"branch":"main","status":"ready","port":null,"progress":100,"created_at":null,"updated_at":null}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer bVkf841ava5gE6DPch36Zde'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- DELETE
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/sites/{site_id}'
|
||||||
|
metadata:
|
||||||
|
groupName: sites
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: delete
|
||||||
|
description: 'Delete site.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
site_id:
|
||||||
|
name: site_id
|
||||||
|
description: 'The ID of the site.'
|
||||||
|
required: true
|
||||||
|
example: 8
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
site_id: 8
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 204
|
||||||
|
content: 'null'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer gfVZbEP5Ddah6k13ae6c8v4'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
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":"Jaiden Kling","provider":"github","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"},{"id":6,"project_id":null,"global":true,"name":"Ms. Brianne Bosco","provider":"github","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« 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 PfaEg1eZh66cd5V4v8bD3ak'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- POST
|
||||||
|
uri: 'api/projects/{project_id}/source-controls'
|
||||||
|
metadata:
|
||||||
|
groupName: source-controls
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: create
|
||||||
|
description: ''
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters:
|
||||||
|
provider:
|
||||||
|
name: provider
|
||||||
|
description: 'The provider'
|
||||||
|
required: true
|
||||||
|
example: bitbucket
|
||||||
|
type: string
|
||||||
|
enumValues:
|
||||||
|
- gitlab
|
||||||
|
- github
|
||||||
|
- bitbucket
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
description: 'The name of the storage provider.'
|
||||||
|
required: true
|
||||||
|
example: eos
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
token:
|
||||||
|
name: token
|
||||||
|
description: 'The token if provider requires api token'
|
||||||
|
required: true
|
||||||
|
example: et
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
url:
|
||||||
|
name: url
|
||||||
|
description: 'The URL if the provider is Gitlab and it is self-hosted'
|
||||||
|
required: true
|
||||||
|
example: 'https://lueilwitz.com/nostrum-et-porro-atque-sint.html'
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
username:
|
||||||
|
name: username
|
||||||
|
description: 'The username if the provider is Bitbucket'
|
||||||
|
required: true
|
||||||
|
example: consectetur
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
password:
|
||||||
|
name: password
|
||||||
|
description: 'The password if the provider is Bitbucket'
|
||||||
|
required: true
|
||||||
|
example: 'PL.P?{06\ECi0'
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanBodyParameters:
|
||||||
|
provider: bitbucket
|
||||||
|
name: eos
|
||||||
|
token: et
|
||||||
|
url: 'https://lueilwitz.com/nostrum-et-porro-atque-sint.html'
|
||||||
|
username: consectetur
|
||||||
|
password: 'PL.P?{06\ECi0'
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":5,"project_id":null,"global":true,"name":"Toby Parker","provider":"github","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer V5Zf3a1ve6d6kP4cbgha8DE'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- GET
|
||||||
|
uri: 'api/projects/{project_id}/source-controls/{sourceControl_id}'
|
||||||
|
metadata:
|
||||||
|
groupName: source-controls
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: show
|
||||||
|
description: ''
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
sourceControl_id:
|
||||||
|
name: sourceControl_id
|
||||||
|
description: 'The ID of the sourceControl.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
sourceControl_id: 3
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":5,"project_id":null,"global":true,"name":"Prof. Bartholome Graham IV","provider":"github","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer k1b5hac6veZ36P8gDV4fadE'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- PUT
|
||||||
|
uri: 'api/projects/{project_id}/source-controls/{sourceControl_id}'
|
||||||
|
metadata:
|
||||||
|
groupName: source-controls
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: update
|
||||||
|
description: ''
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
sourceControl_id:
|
||||||
|
name: sourceControl_id
|
||||||
|
description: 'The ID of the sourceControl.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
sourceControl_id: 3
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
description: 'The name of the storage provider.'
|
||||||
|
required: true
|
||||||
|
example: quaerat
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
token:
|
||||||
|
name: token
|
||||||
|
description: 'The token if provider requires api token'
|
||||||
|
required: true
|
||||||
|
example: consectetur
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
url:
|
||||||
|
name: url
|
||||||
|
description: 'The URL if the provider is Gitlab and it is self-hosted'
|
||||||
|
required: true
|
||||||
|
example: 'http://www.hudson.biz/rerum-voluptatem-debitis-accusamus'
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
username:
|
||||||
|
name: username
|
||||||
|
description: 'The username if the provider is Bitbucket'
|
||||||
|
required: true
|
||||||
|
example: voluptatem
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
password:
|
||||||
|
name: password
|
||||||
|
description: 'The password if the provider is Bitbucket'
|
||||||
|
required: true
|
||||||
|
example: '\p/el>)3#~E?kI'
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
global:
|
||||||
|
name: global
|
||||||
|
description: 'Accessible in all projects'
|
||||||
|
required: true
|
||||||
|
example: false
|
||||||
|
type: string
|
||||||
|
enumValues:
|
||||||
|
- true
|
||||||
|
- false
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanBodyParameters:
|
||||||
|
name: quaerat
|
||||||
|
token: consectetur
|
||||||
|
url: 'http://www.hudson.biz/rerum-voluptatem-debitis-accusamus'
|
||||||
|
username: voluptatem
|
||||||
|
password: '\p/el>)3#~E?kI'
|
||||||
|
global: false
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":5,"project_id":null,"global":true,"name":"Cicero Smitham","provider":"github","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer 6dkE6h8a5eg3f14acVvbPDZ'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- DELETE
|
||||||
|
uri: 'api/projects/{project_id}/source-controls/{sourceControl_id}'
|
||||||
|
metadata:
|
||||||
|
groupName: source-controls
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: delete
|
||||||
|
description: ''
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
sourceControl_id:
|
||||||
|
name: sourceControl_id
|
||||||
|
description: 'The ID of the sourceControl.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
sourceControl_id: 3
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 204
|
||||||
|
content: 'null'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer fb6Zk4EP318eva5hDdcV6ga'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
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":3,"project_id":null,"global":true,"name":"et","provider":"local","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"},{"id":4,"project_id":null,"global":true,"name":"sed","provider":"local","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« 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 1dbV3vkh6EPD5g48cafeZ6a'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- POST
|
||||||
|
uri: 'api/projects/{project_id}/storage-providers'
|
||||||
|
metadata:
|
||||||
|
groupName: storage-providers
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: create
|
||||||
|
description: ''
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters:
|
||||||
|
provider:
|
||||||
|
name: provider
|
||||||
|
description: 'The provider (aws, linode, hetzner, digitalocean, vultr, ...)'
|
||||||
|
required: true
|
||||||
|
example: quod
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
description: 'The name of the storage provider.'
|
||||||
|
required: true
|
||||||
|
example: commodi
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
token:
|
||||||
|
name: token
|
||||||
|
description: 'The token if provider requires api token'
|
||||||
|
required: true
|
||||||
|
example: ipsum
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
key:
|
||||||
|
name: key
|
||||||
|
description: 'The key if provider requires key'
|
||||||
|
required: true
|
||||||
|
example: ratione
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
secret:
|
||||||
|
name: secret
|
||||||
|
description: 'The secret if provider requires key'
|
||||||
|
required: true
|
||||||
|
example: iste
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanBodyParameters:
|
||||||
|
provider: quod
|
||||||
|
name: commodi
|
||||||
|
token: ipsum
|
||||||
|
key: ratione
|
||||||
|
secret: iste
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":3,"project_id":null,"global":true,"name":"est","provider":"dropbox","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer abehv36kP4D658VafgdZE1c'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- GET
|
||||||
|
uri: 'api/projects/{project_id}/storage-providers/{storageProvider_id}'
|
||||||
|
metadata:
|
||||||
|
groupName: storage-providers
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: show
|
||||||
|
description: ''
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
storageProvider_id:
|
||||||
|
name: storageProvider_id
|
||||||
|
description: 'The ID of the storageProvider.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
storageProvider_id: 1
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":3,"project_id":null,"global":true,"name":"officia","provider":"ftp","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer bda64P5c1gEDe8V3Z6vhkaf'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- PUT
|
||||||
|
uri: 'api/projects/{project_id}/storage-providers/{storageProvider_id}'
|
||||||
|
metadata:
|
||||||
|
groupName: storage-providers
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: update
|
||||||
|
description: ''
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
storageProvider_id:
|
||||||
|
name: storageProvider_id
|
||||||
|
description: 'The ID of the storageProvider.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
storageProvider_id: 1
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
description: 'The name of the storage provider.'
|
||||||
|
required: true
|
||||||
|
example: iusto
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
global:
|
||||||
|
name: global
|
||||||
|
description: 'Accessible in all projects'
|
||||||
|
required: true
|
||||||
|
example: true
|
||||||
|
type: string
|
||||||
|
enumValues:
|
||||||
|
- true
|
||||||
|
- false
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanBodyParameters:
|
||||||
|
name: iusto
|
||||||
|
global: true
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":3,"project_id":null,"global":true,"name":"rerum","provider":"ftp","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer aEP35hVakDdf814eZvg66cb'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- DELETE
|
||||||
|
uri: 'api/projects/{project_id}/storage-providers/{storageProvider_id}'
|
||||||
|
metadata:
|
||||||
|
groupName: storage-providers
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: delete
|
||||||
|
description: ''
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
storageProvider_id:
|
||||||
|
name: storageProvider_id
|
||||||
|
description: 'The ID of the storageProvider.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
storageProvider_id: 1
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 204
|
||||||
|
content: 'null'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer Dah3PgE5d64fcbe8a16VkvZ'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
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: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"data":[{"id":null,"server_id":null,"command":"ls -la","user":"root","frequency":"* * * * *","status":"ready","created_at":null,"updated_at":null},{"id":null,"server_id":null,"command":"ls -la","user":"root","frequency":"* * * * *","status":"ready","created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« 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 6ed1gv5ak6hEPcaV8D3Z4bf'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- POST
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/cron-jobs'
|
||||||
|
metadata:
|
||||||
|
groupName: cron-jobs
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: create
|
||||||
|
description: 'Create a new cron job.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters:
|
||||||
|
command:
|
||||||
|
name: command
|
||||||
|
description: ''
|
||||||
|
required: true
|
||||||
|
example: qui
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
user:
|
||||||
|
name: user
|
||||||
|
description: ''
|
||||||
|
required: true
|
||||||
|
example: root
|
||||||
|
type: string
|
||||||
|
enumValues:
|
||||||
|
- root
|
||||||
|
- vito
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
frequency:
|
||||||
|
name: frequency
|
||||||
|
description: 'Frequency of the cron job.'
|
||||||
|
required: true
|
||||||
|
example: '* * * * *'
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanBodyParameters:
|
||||||
|
command: qui
|
||||||
|
user: root
|
||||||
|
frequency: '* * * * *'
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":null,"server_id":null,"command":"ls -la","user":"root","frequency":"* * * * *","status":"ready","created_at":null,"updated_at":null}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer VEfc5h3gva68PkZ46Deabd1'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- GET
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/cron-jobs/{cronJob_id}'
|
||||||
|
metadata:
|
||||||
|
groupName: cron-jobs
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: show
|
||||||
|
description: 'Get a cron job by ID.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cronJob_id:
|
||||||
|
name: cronJob_id
|
||||||
|
description: 'The ID of the cronJob.'
|
||||||
|
required: true
|
||||||
|
example: 5
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
cronJob_id: 5
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":null,"server_id":null,"command":"ls -la","user":"root","frequency":"* * * * *","status":"ready","created_at":null,"updated_at":null}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer 614DaP5vZ6edcaVEgfhk83b'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- DELETE
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/cron-jobs/{cronJob_id}'
|
||||||
|
metadata:
|
||||||
|
groupName: cron-jobs
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: delete
|
||||||
|
description: 'Delete cron job.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cronJob_id:
|
||||||
|
name: cronJob_id
|
||||||
|
description: 'The ID of the cronJob.'
|
||||||
|
required: true
|
||||||
|
example: 5
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
cronJob_id: 5
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 204
|
||||||
|
content: 'null'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer gDV6bZ1dEckvf45P86eaha3'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
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: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"data":[{"id":null,"server_id":null,"name":"clockman","status":"ready","created_at":null,"updated_at":null},{"id":null,"server_id":null,"name":"wvonrueden","status":"ready","created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« 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 efEV4g86bd5PZac6vak3Dh1'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- POST
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/databases'
|
||||||
|
metadata:
|
||||||
|
groupName: databases
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: create
|
||||||
|
description: 'Create a new database.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
description: ''
|
||||||
|
required: true
|
||||||
|
example: nesciunt
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanBodyParameters:
|
||||||
|
name: nesciunt
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":null,"server_id":null,"name":"johanna76","status":"ready","created_at":null,"updated_at":null}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer 3E6VD14dvaekbaZfh6Pg8c5'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- GET
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/databases/{id}'
|
||||||
|
metadata:
|
||||||
|
groupName: databases
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: show
|
||||||
|
description: 'Get a database by ID.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
id:
|
||||||
|
name: id
|
||||||
|
description: 'The ID of the database.'
|
||||||
|
required: true
|
||||||
|
example: 6
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
id: 6
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":null,"server_id":null,"name":"chloe.huel","status":"ready","created_at":null,"updated_at":null}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer fb5hVc38e1aDP6ZvkgEda46'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- DELETE
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/databases/{database_id}'
|
||||||
|
metadata:
|
||||||
|
groupName: databases
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: delete
|
||||||
|
description: 'Delete database.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
database_id:
|
||||||
|
name: database_id
|
||||||
|
description: 'The ID of the database.'
|
||||||
|
required: true
|
||||||
|
example: 6
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
database_id: 6
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 204
|
||||||
|
content: 'null'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer cPVbhaZkfg5aEv46D183ed6'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
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: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"data":[{"id":null,"server_id":null,"username":"nyasia68","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null},{"id":null,"server_id":null,"username":"madyson20","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« 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 egc5VaDdvabfP6843k61hZE'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- POST
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/database-users'
|
||||||
|
metadata:
|
||||||
|
groupName: database-users
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: create
|
||||||
|
description: 'Create a new database user.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters:
|
||||||
|
username:
|
||||||
|
name: username
|
||||||
|
description: ''
|
||||||
|
required: true
|
||||||
|
example: dignissimos
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
password:
|
||||||
|
name: password
|
||||||
|
description: ''
|
||||||
|
required: true
|
||||||
|
example: OK+XEG2)
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
host:
|
||||||
|
name: host
|
||||||
|
description: 'Host, if it is a remote user.'
|
||||||
|
required: true
|
||||||
|
example: '%'
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanBodyParameters:
|
||||||
|
username: dignissimos
|
||||||
|
password: OK+XEG2)
|
||||||
|
host: '%'
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":null,"server_id":null,"username":"amya.nitzsche","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer 31hgfcvEb6Pkaa48D6dZ5Ve'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- GET
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/database-users/{databaseUser_id}'
|
||||||
|
metadata:
|
||||||
|
groupName: database-users
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: show
|
||||||
|
description: 'Get a database user by ID.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
databaseUser_id:
|
||||||
|
name: databaseUser_id
|
||||||
|
description: 'The ID of the databaseUser.'
|
||||||
|
required: true
|
||||||
|
example: 4
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
databaseUser_id: 4
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":null,"server_id":null,"username":"bergstrom.ericka","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer aDv48631h5af6EdkcVbPZeg'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- POST
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/database-users/{databaseUser_id}/link'
|
||||||
|
metadata:
|
||||||
|
groupName: database-users
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: link
|
||||||
|
description: 'Link to databases'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
databaseUser_id:
|
||||||
|
name: databaseUser_id
|
||||||
|
description: 'The ID of the databaseUser.'
|
||||||
|
required: true
|
||||||
|
example: 4
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
databaseUser_id: 4
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters:
|
||||||
|
databases:
|
||||||
|
name: databases
|
||||||
|
description: 'Array of database names to link to the user.'
|
||||||
|
required: true
|
||||||
|
example: accusantium
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanBodyParameters:
|
||||||
|
databases: accusantium
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":null,"server_id":null,"username":"fmurray","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer cf8ZPhV1k3d5DaEva46beg6'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- DELETE
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/database-users/{databaseUser_id}'
|
||||||
|
metadata:
|
||||||
|
groupName: database-users
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: delete
|
||||||
|
description: 'Delete database user.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
databaseUser_id:
|
||||||
|
name: databaseUser_id
|
||||||
|
description: 'The ID of the databaseUser.'
|
||||||
|
required: true
|
||||||
|
example: 4
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
databaseUser_id: 4
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 204
|
||||||
|
content: 'null'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer hdEvkbaPVf4cZ65a8631eDg'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
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: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"data":[{"id":null,"server_id":null,"type":"allow","protocol":"tcp","port":18074,"source":"189.27.156.82","mask":24,"note":"test","status":null,"created_at":null,"updated_at":null},{"id":null,"server_id":null,"type":"allow","protocol":"tcp","port":41088,"source":"86.177.121.87","mask":24,"note":"test","status":null,"created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« 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 vhkc4aPa6ZdeV8D3Ef156gb'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- POST
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/firewall-rules'
|
||||||
|
metadata:
|
||||||
|
groupName: firewall-rules
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: create
|
||||||
|
description: 'Create a new firewall rule.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters:
|
||||||
|
type:
|
||||||
|
name: type
|
||||||
|
description: ''
|
||||||
|
required: true
|
||||||
|
example: allow
|
||||||
|
type: string
|
||||||
|
enumValues:
|
||||||
|
- allow
|
||||||
|
- deny
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
protocol:
|
||||||
|
name: protocol
|
||||||
|
description: ''
|
||||||
|
required: true
|
||||||
|
example: udp
|
||||||
|
type: string
|
||||||
|
enumValues:
|
||||||
|
- tcp
|
||||||
|
- udp
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
port:
|
||||||
|
name: port
|
||||||
|
description: ''
|
||||||
|
required: true
|
||||||
|
example: voluptates
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
source:
|
||||||
|
name: source
|
||||||
|
description: ''
|
||||||
|
required: true
|
||||||
|
example: saepe
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
mask:
|
||||||
|
name: mask
|
||||||
|
description: 'Mask for source IP.'
|
||||||
|
required: true
|
||||||
|
example: '0'
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanBodyParameters:
|
||||||
|
type: allow
|
||||||
|
protocol: udp
|
||||||
|
port: voluptates
|
||||||
|
source: saepe
|
||||||
|
mask: '0'
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":null,"server_id":null,"type":"allow","protocol":"tcp","port":61992,"source":"47.222.76.48","mask":24,"note":"test","status":null,"created_at":null,"updated_at":null}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer 1cEb5P66VeDkf8aahg3Zdv4'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- GET
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/firewall-rules/{firewallRule_id}'
|
||||||
|
metadata:
|
||||||
|
groupName: firewall-rules
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: show
|
||||||
|
description: 'Get a firewall rule by ID.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
firewallRule_id:
|
||||||
|
name: firewallRule_id
|
||||||
|
description: 'The ID of the firewallRule.'
|
||||||
|
required: true
|
||||||
|
example: 7
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
firewallRule_id: 7
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":null,"server_id":null,"type":"allow","protocol":"tcp","port":43107,"source":"135.73.216.16","mask":24,"note":"test","status":null,"created_at":null,"updated_at":null}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer 6VaPhkD5vd1Z8e6E3cba4gf'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- DELETE
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/firewall-rules/{firewallRule_id}'
|
||||||
|
metadata:
|
||||||
|
groupName: firewall-rules
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: delete
|
||||||
|
description: 'Delete firewall rule.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
firewallRule_id:
|
||||||
|
name: firewallRule_id
|
||||||
|
description: 'The ID of the firewallRule.'
|
||||||
|
required: true
|
||||||
|
example: 7
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
firewallRule_id: 7
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 204
|
||||||
|
content: 'null'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer v81d5Efch636aVgZebaPkD4'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
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.0.0"}'
|
||||||
|
headers:
|
||||||
|
cache-control: 'no-cache, private'
|
||||||
|
content-type: application/json
|
||||||
|
x-ratelimit-limit: '60'
|
||||||
|
x-ratelimit-remaining: '59'
|
||||||
|
access-control-allow-origin: '*'
|
||||||
|
description: null
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth: []
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
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":29,"name":"Zachary Lueilwitz","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"},{"id":30,"name":"Mrs. Kiarra Heller IV","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« 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 eb14DEPv6cdah65VfZgka38'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- POST
|
||||||
|
uri: api/projects
|
||||||
|
metadata:
|
||||||
|
groupName: projects
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: create
|
||||||
|
description: 'Create a new project.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters: []
|
||||||
|
cleanUrlParameters: []
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
description: 'The name of the project.'
|
||||||
|
required: true
|
||||||
|
example: quos
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanBodyParameters:
|
||||||
|
name: quos
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":29,"name":"Hershel Spinka","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer V1E3566Pf4gkvh8dDZabeca'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- GET
|
||||||
|
uri: 'api/projects/{id}'
|
||||||
|
metadata:
|
||||||
|
groupName: projects
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: show
|
||||||
|
description: 'Get a project by ID.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
id:
|
||||||
|
name: id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
id: 1
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":29,"name":"Emery Kiehn","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer haD6e36VZbkf4P8aEcvd15g'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- PUT
|
||||||
|
uri: 'api/projects/{id}'
|
||||||
|
metadata:
|
||||||
|
groupName: projects
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: update
|
||||||
|
description: 'Update project.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
id:
|
||||||
|
name: id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
id: 1
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
description: 'The name of the project.'
|
||||||
|
required: true
|
||||||
|
example: ut
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanBodyParameters:
|
||||||
|
name: ut
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":29,"name":"Mable Prohaska","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer V14kPa5deva8Ebgc36f6hDZ'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- DELETE
|
||||||
|
uri: 'api/projects/{project_id}'
|
||||||
|
metadata:
|
||||||
|
groupName: projects
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: delete
|
||||||
|
description: 'Delete project.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 204
|
||||||
|
content: 'null'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer k1D68d5ePavVZag6h4fb3cE'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
514
.scribe/endpoints/06.yaml
Normal file
514
.scribe/endpoints/06.yaml
Normal file
@ -0,0 +1,514 @@
|
|||||||
|
name: servers
|
||||||
|
description: ''
|
||||||
|
endpoints:
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- GET
|
||||||
|
uri: 'api/projects/{project_id}/servers'
|
||||||
|
metadata:
|
||||||
|
groupName: servers
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: list
|
||||||
|
description: 'Get all servers in a project.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"data":[{"id":null,"project_id":null,"user_id":null,"provider_id":null,"name":"Dorthy Toy","ssh_user":"vito","ip":"172.132.95.155","local_ip":"118.57.197.65","port":22,"os":"ubuntu_22","type":"regular","type_data":null,"provider":"custom","provider_data":null,"public_key":"test","status":"ready","auto_update":null,"available_updates":0,"security_updates":null,"progress":100,"progress_step":null,"updates":null,"last_update_check":null,"created_at":null,"updated_at":null},{"id":null,"project_id":null,"user_id":null,"provider_id":null,"name":"Carrie Sporer","ssh_user":"vito","ip":"184.242.162.173","local_ip":"135.244.50.22","port":22,"os":"ubuntu_22","type":"regular","type_data":null,"provider":"custom","provider_data":null,"public_key":"test","status":"ready","auto_update":null,"available_updates":0,"security_updates":null,"progress":100,"progress_step":null,"updates":null,"last_update_check":null,"created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« 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 8VE41PdZcvb6kgafD635ahe'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- POST
|
||||||
|
uri: 'api/projects/{project_id}/servers'
|
||||||
|
metadata:
|
||||||
|
groupName: servers
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: create
|
||||||
|
description: 'Create a new server.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters:
|
||||||
|
provider:
|
||||||
|
name: provider
|
||||||
|
description: 'The server provider type'
|
||||||
|
required: true
|
||||||
|
example: et
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_provider:
|
||||||
|
name: server_provider
|
||||||
|
description: 'If the provider is not custom, the ID of the server provider profile'
|
||||||
|
required: true
|
||||||
|
example: digitalocean
|
||||||
|
type: string
|
||||||
|
enumValues:
|
||||||
|
- custom
|
||||||
|
- hetzner
|
||||||
|
- digitalocean
|
||||||
|
- linode
|
||||||
|
- vultr
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
region:
|
||||||
|
name: region
|
||||||
|
description: 'Provider region if the provider is not custom'
|
||||||
|
required: true
|
||||||
|
example: inventore
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
plan:
|
||||||
|
name: plan
|
||||||
|
description: 'Provider plan if the provider is not custom'
|
||||||
|
required: true
|
||||||
|
example: atque
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
ip:
|
||||||
|
name: ip
|
||||||
|
description: 'SSH IP address if the provider is custom'
|
||||||
|
required: true
|
||||||
|
example: quam
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
port:
|
||||||
|
name: port
|
||||||
|
description: 'SSH Port if the provider is custom'
|
||||||
|
required: true
|
||||||
|
example: nemo
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
description: 'The name of the server.'
|
||||||
|
required: true
|
||||||
|
example: perspiciatis
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
os:
|
||||||
|
name: os
|
||||||
|
description: 'The os of the server'
|
||||||
|
required: true
|
||||||
|
example: similique
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
type:
|
||||||
|
name: type
|
||||||
|
description: 'Server type'
|
||||||
|
required: true
|
||||||
|
example: regular
|
||||||
|
type: string
|
||||||
|
enumValues:
|
||||||
|
- regular
|
||||||
|
- database
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
webserver:
|
||||||
|
name: webserver
|
||||||
|
description: 'Web server'
|
||||||
|
required: true
|
||||||
|
example: none
|
||||||
|
type: string
|
||||||
|
enumValues:
|
||||||
|
- none
|
||||||
|
- nginx
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
database:
|
||||||
|
name: database
|
||||||
|
description: Database
|
||||||
|
required: true
|
||||||
|
example: none
|
||||||
|
type: string
|
||||||
|
enumValues:
|
||||||
|
- none
|
||||||
|
- mysql57
|
||||||
|
- mysql80
|
||||||
|
- mariadb103
|
||||||
|
- mariadb104
|
||||||
|
- mariadb103
|
||||||
|
- postgresql12
|
||||||
|
- postgresql13
|
||||||
|
- postgresql14
|
||||||
|
- postgresql15
|
||||||
|
- postgresql16
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
php:
|
||||||
|
name: php
|
||||||
|
description: 'PHP version'
|
||||||
|
required: true
|
||||||
|
example: '8.1'
|
||||||
|
type: string
|
||||||
|
enumValues:
|
||||||
|
- '7.0'
|
||||||
|
- '7.1'
|
||||||
|
- '7.2'
|
||||||
|
- '7.3'
|
||||||
|
- '7.4'
|
||||||
|
- '8.0'
|
||||||
|
- '8.1'
|
||||||
|
- '8.2'
|
||||||
|
- '8.3'
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanBodyParameters:
|
||||||
|
provider: et
|
||||||
|
server_provider: digitalocean
|
||||||
|
region: inventore
|
||||||
|
plan: atque
|
||||||
|
ip: quam
|
||||||
|
port: nemo
|
||||||
|
name: perspiciatis
|
||||||
|
os: similique
|
||||||
|
type: regular
|
||||||
|
webserver: none
|
||||||
|
database: none
|
||||||
|
php: '8.1'
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":null,"project_id":null,"user_id":null,"provider_id":null,"name":"Flo Beer PhD","ssh_user":"vito","ip":"168.238.14.230","local_ip":"40.232.73.41","port":22,"os":"ubuntu_22","type":"regular","type_data":null,"provider":"custom","provider_data":null,"public_key":"test","status":"ready","auto_update":null,"available_updates":0,"security_updates":null,"progress":100,"progress_step":null,"updates":null,"last_update_check":null,"created_at":null,"updated_at":null}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer Z8g36aaV4E1bdcPfehDv65k'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- GET
|
||||||
|
uri: 'api/projects/{project_id}/servers/{id}'
|
||||||
|
metadata:
|
||||||
|
groupName: servers
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: show
|
||||||
|
description: 'Get a server by ID.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
id:
|
||||||
|
name: id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
id: 3
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":null,"project_id":null,"user_id":null,"provider_id":null,"name":"Stephany Ankunding","ssh_user":"vito","ip":"145.28.94.46","local_ip":"69.133.44.100","port":22,"os":"ubuntu_22","type":"regular","type_data":null,"provider":"custom","provider_data":null,"public_key":"test","status":"ready","auto_update":null,"available_updates":0,"security_updates":null,"progress":100,"progress_step":null,"updates":null,"last_update_check":null,"created_at":null,"updated_at":null}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer adD3EfP5hZ4vgbkV861eca6'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- POST
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/reboot'
|
||||||
|
metadata:
|
||||||
|
groupName: servers
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: reboot
|
||||||
|
description: 'Reboot a server.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 204
|
||||||
|
content: 'null'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer P3ec6aagD4hbdV5fEk168vZ'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- POST
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/upgrade'
|
||||||
|
metadata:
|
||||||
|
groupName: servers
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: upgrade
|
||||||
|
description: 'Upgrade server.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 204
|
||||||
|
content: 'null'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer P34ZV6D1bEegdvac8f5kh6a'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- DELETE
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}'
|
||||||
|
metadata:
|
||||||
|
groupName: servers
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: delete
|
||||||
|
description: 'Delete server.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 204
|
||||||
|
content: 'null'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer ha6v5V41afkdPgcZbDEe386'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
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":"dolor","provider":"digitalocean","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"},{"id":3,"project_id":null,"global":true,"name":"enim","provider":"digitalocean","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« 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 1a6kb58vEP3fZdVhcea64gD'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- POST
|
||||||
|
uri: 'api/projects/{project_id}/server-providers'
|
||||||
|
metadata:
|
||||||
|
groupName: server-providers
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: create
|
||||||
|
description: ''
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters:
|
||||||
|
provider:
|
||||||
|
name: provider
|
||||||
|
description: 'The provider (aws, linode, hetzner, digitalocean, vultr, ...)'
|
||||||
|
required: true
|
||||||
|
example: autem
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
description: 'The name of the server provider.'
|
||||||
|
required: true
|
||||||
|
example: enim
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
token:
|
||||||
|
name: token
|
||||||
|
description: 'The token if provider requires api token'
|
||||||
|
required: true
|
||||||
|
example: culpa
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
key:
|
||||||
|
name: key
|
||||||
|
description: 'The key if provider requires key'
|
||||||
|
required: true
|
||||||
|
example: sit
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
secret:
|
||||||
|
name: secret
|
||||||
|
description: 'The secret if provider requires key'
|
||||||
|
required: true
|
||||||
|
example: voluptates
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanBodyParameters:
|
||||||
|
provider: autem
|
||||||
|
name: enim
|
||||||
|
token: culpa
|
||||||
|
key: sit
|
||||||
|
secret: voluptates
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":2,"project_id":null,"global":true,"name":"eligendi","provider":"aws","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer PD3ZcaVdvgfa5k4be8E6h16'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- GET
|
||||||
|
uri: 'api/projects/{project_id}/server-providers/{serverProvider_id}'
|
||||||
|
metadata:
|
||||||
|
groupName: server-providers
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: show
|
||||||
|
description: ''
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
serverProvider_id:
|
||||||
|
name: serverProvider_id
|
||||||
|
description: 'The ID of the serverProvider.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
serverProvider_id: 1
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":2,"project_id":null,"global":true,"name":"architecto","provider":"digitalocean","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer DP45bg1aEadh8Z6Vke63fcv'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- PUT
|
||||||
|
uri: 'api/projects/{project_id}/server-providers/{serverProvider_id}'
|
||||||
|
metadata:
|
||||||
|
groupName: server-providers
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: update
|
||||||
|
description: ''
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
serverProvider_id:
|
||||||
|
name: serverProvider_id
|
||||||
|
description: 'The ID of the serverProvider.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
serverProvider_id: 1
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
description: 'The name of the server provider.'
|
||||||
|
required: true
|
||||||
|
example: minus
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
global:
|
||||||
|
name: global
|
||||||
|
description: 'Accessible in all projects'
|
||||||
|
required: true
|
||||||
|
example: false
|
||||||
|
type: string
|
||||||
|
enumValues:
|
||||||
|
- true
|
||||||
|
- false
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanBodyParameters:
|
||||||
|
name: minus
|
||||||
|
global: false
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":2,"project_id":null,"global":true,"name":"reiciendis","provider":"hetzner","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer bv1kdegh6fP8V56ZE4acaD3'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- DELETE
|
||||||
|
uri: 'api/projects/{project_id}/server-providers/{serverProvider_id}'
|
||||||
|
metadata:
|
||||||
|
groupName: server-providers
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: delete
|
||||||
|
description: ''
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
serverProvider_id:
|
||||||
|
name: serverProvider_id
|
||||||
|
description: 'The ID of the serverProvider.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
serverProvider_id: 1
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 204
|
||||||
|
content: 'null'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer k6hb43Vf5Z1dv8aaeEDcg6P'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
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: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"data":[{"id":null,"user":null,"name":"Dr. Reanna Braun","created_at":null,"updated_at":null},{"id":null,"user":null,"name":"Norene Fritsch","created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« 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 dV1gcvfZ46Eh8ebaP5Da63k'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- POST
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/ssh-keys'
|
||||||
|
metadata:
|
||||||
|
groupName: ssh-keys
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: create
|
||||||
|
description: 'Deploy ssh key to server.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters:
|
||||||
|
key_id:
|
||||||
|
name: key_id
|
||||||
|
description: 'The ID of the key.'
|
||||||
|
required: true
|
||||||
|
example: vero
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
description: 'Key name, required if key_id is not provided.'
|
||||||
|
required: true
|
||||||
|
example: voluptates
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
public_key:
|
||||||
|
name: public_key
|
||||||
|
description: 'Public Key, required if key_id is not provided.'
|
||||||
|
required: true
|
||||||
|
example: dolor
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanBodyParameters:
|
||||||
|
key_id: vero
|
||||||
|
name: voluptates
|
||||||
|
public_key: dolor
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":null,"user":null,"name":"Sophia D''Amore","created_at":null,"updated_at":null}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer gkadV36a5f8E6vhb14ZceDP'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- DELETE
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/ssh-keys/{sshKey_id}'
|
||||||
|
metadata:
|
||||||
|
groupName: ssh-keys
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: delete
|
||||||
|
description: 'Delete ssh key from server.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
sshKey_id:
|
||||||
|
name: sshKey_id
|
||||||
|
description: 'The ID of the sshKey.'
|
||||||
|
required: true
|
||||||
|
example: 4
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
sshKey_id: 4
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 204
|
||||||
|
content: 'null'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer PfchD4Zge386abadE5kV61v'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
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: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"data":[{"id":null,"server_id":null,"type":null,"type_data":null,"name":null,"version":null,"unit":null,"status":null,"is_default":null,"created_at":null,"updated_at":null},{"id":null,"server_id":null,"type":null,"type_data":null,"name":null,"version":null,"unit":null,"status":null,"is_default":null,"created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« 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 h6bDec51ak84ZVafgv3PE6d'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- GET
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/services/{id}'
|
||||||
|
metadata:
|
||||||
|
groupName: services
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: show
|
||||||
|
description: 'Get a service by ID.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
id:
|
||||||
|
name: id
|
||||||
|
description: 'The ID of the service.'
|
||||||
|
required: true
|
||||||
|
example: 27
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
id: 27
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":null,"server_id":null,"type":null,"type_data":null,"name":null,"version":null,"unit":null,"status":null,"is_default":null,"created_at":null,"updated_at":null}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer da4V3kfgZ6a86PchevED5b1'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- POST
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/services/{service_id}/start'
|
||||||
|
metadata:
|
||||||
|
groupName: services
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: start
|
||||||
|
description: 'Start service.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
service_id:
|
||||||
|
name: service_id
|
||||||
|
description: 'The ID of the service.'
|
||||||
|
required: true
|
||||||
|
example: 27
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
service_id: 27
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 204
|
||||||
|
content: 'null'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer 86fdV5D6gv1E3ekaPZac4hb'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- POST
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/services/{service_id}/stop'
|
||||||
|
metadata:
|
||||||
|
groupName: services
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: stop
|
||||||
|
description: 'Stop service.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
service_id:
|
||||||
|
name: service_id
|
||||||
|
description: 'The ID of the service.'
|
||||||
|
required: true
|
||||||
|
example: 27
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
service_id: 27
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 204
|
||||||
|
content: 'null'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer kPZ563E1Vfgh4cbDad8vae6'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- POST
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/services/{service_id}/restart'
|
||||||
|
metadata:
|
||||||
|
groupName: services
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: restart
|
||||||
|
description: 'Restart service.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
service_id:
|
||||||
|
name: service_id
|
||||||
|
description: 'The ID of the service.'
|
||||||
|
required: true
|
||||||
|
example: 27
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
service_id: 27
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 204
|
||||||
|
content: 'null'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer fd14PaDb58gchv3ZVeaEk66'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- POST
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/services/{service_id}/enable'
|
||||||
|
metadata:
|
||||||
|
groupName: services
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: enable
|
||||||
|
description: 'Enable service.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
service_id:
|
||||||
|
name: service_id
|
||||||
|
description: 'The ID of the service.'
|
||||||
|
required: true
|
||||||
|
example: 27
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
service_id: 27
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 204
|
||||||
|
content: 'null'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer Dv1aVe6hZfkagdE356b4cP8'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- POST
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/services/{service_id}/disable'
|
||||||
|
metadata:
|
||||||
|
groupName: services
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: disable
|
||||||
|
description: 'Disable service.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
service_id:
|
||||||
|
name: service_id
|
||||||
|
description: 'The ID of the service.'
|
||||||
|
required: true
|
||||||
|
example: 27
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
service_id: 27
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 204
|
||||||
|
content: 'null'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer 6bdDc4Eah3ZV18kf6Pveag5'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- DELETE
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/services/{service_id}'
|
||||||
|
metadata:
|
||||||
|
groupName: services
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: delete
|
||||||
|
description: 'Delete service.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
service_id:
|
||||||
|
name: service_id
|
||||||
|
description: 'The ID of the service.'
|
||||||
|
required: true
|
||||||
|
example: 27
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
service_id: 27
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 204
|
||||||
|
content: 'null'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer 36kf84v6bVhE5gdPDeZ1caa'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
390
.scribe/endpoints/10.yaml
Normal file
390
.scribe/endpoints/10.yaml
Normal file
@ -0,0 +1,390 @@
|
|||||||
|
name: sites
|
||||||
|
description: ''
|
||||||
|
endpoints:
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- GET
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/sites'
|
||||||
|
metadata:
|
||||||
|
groupName: sites
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: list
|
||||||
|
description: 'Get all sites.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"data":[{"id":null,"server_id":null,"source_control_id":null,"type":"laravel","type_data":null,"domain":"test.com","aliases":null,"web_directory":"\/","path":"\/home","php_version":"8.2","repository":null,"branch":"main","status":"ready","port":null,"progress":100,"created_at":null,"updated_at":null},{"id":null,"server_id":null,"source_control_id":null,"type":"laravel","type_data":null,"domain":"test.com","aliases":null,"web_directory":"\/","path":"\/home","php_version":"8.2","repository":null,"branch":"main","status":"ready","port":null,"progress":100,"created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« 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 gaeE86fd1aZP53Vvc6Dhbk4'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- POST
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/sites'
|
||||||
|
metadata:
|
||||||
|
groupName: sites
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: create
|
||||||
|
description: 'Create a new site.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters:
|
||||||
|
type:
|
||||||
|
name: type
|
||||||
|
description: ''
|
||||||
|
required: true
|
||||||
|
example: wordpress
|
||||||
|
type: string
|
||||||
|
enumValues:
|
||||||
|
- php
|
||||||
|
- php-blank
|
||||||
|
- phpmyadmin
|
||||||
|
- laravel
|
||||||
|
- wordpress
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
domain:
|
||||||
|
name: domain
|
||||||
|
description: ''
|
||||||
|
required: true
|
||||||
|
example: quo
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
aliases:
|
||||||
|
name: aliases
|
||||||
|
description: ''
|
||||||
|
required: true
|
||||||
|
example:
|
||||||
|
- dolorum
|
||||||
|
type: 'string[]'
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
php_version:
|
||||||
|
name: php_version
|
||||||
|
description: 'One of the installed PHP Versions'
|
||||||
|
required: true
|
||||||
|
example: '7.4'
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
web_directory:
|
||||||
|
name: web_directory
|
||||||
|
description: 'Required for PHP and Laravel sites'
|
||||||
|
required: true
|
||||||
|
example: public
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
source_control:
|
||||||
|
name: source_control
|
||||||
|
description: 'Source control ID, Required for Sites which support source control'
|
||||||
|
required: true
|
||||||
|
example: explicabo
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
repository:
|
||||||
|
name: repository
|
||||||
|
description: 'Repository, Required for Sites which support source control'
|
||||||
|
required: true
|
||||||
|
example: organization/repository
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
branch:
|
||||||
|
name: branch
|
||||||
|
description: 'Branch, Required for Sites which support source control'
|
||||||
|
required: true
|
||||||
|
example: main
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
composer:
|
||||||
|
name: composer
|
||||||
|
description: 'Run composer if site supports composer'
|
||||||
|
required: true
|
||||||
|
example: true
|
||||||
|
type: boolean
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
version:
|
||||||
|
name: version
|
||||||
|
description: 'Version, if the site type requires a version like PHPMyAdmin'
|
||||||
|
required: true
|
||||||
|
example: 5.2.1
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanBodyParameters:
|
||||||
|
type: wordpress
|
||||||
|
domain: quo
|
||||||
|
aliases:
|
||||||
|
- dolorum
|
||||||
|
php_version: '7.4'
|
||||||
|
web_directory: public
|
||||||
|
source_control: explicabo
|
||||||
|
repository: organization/repository
|
||||||
|
branch: main
|
||||||
|
composer: true
|
||||||
|
version: 5.2.1
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":null,"server_id":null,"source_control_id":null,"type":"laravel","type_data":null,"domain":"test.com","aliases":null,"web_directory":"\/","path":"\/home","php_version":"8.2","repository":null,"branch":"main","status":"ready","port":null,"progress":100,"created_at":null,"updated_at":null}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer efDd36cab6vZEaV4hkP851g'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- GET
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/sites/{id}'
|
||||||
|
metadata:
|
||||||
|
groupName: sites
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: show
|
||||||
|
description: 'Get a site by ID.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
id:
|
||||||
|
name: id
|
||||||
|
description: 'The ID of the site.'
|
||||||
|
required: true
|
||||||
|
example: 8
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
id: 8
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":null,"server_id":null,"source_control_id":null,"type":"laravel","type_data":null,"domain":"test.com","aliases":null,"web_directory":"\/","path":"\/home","php_version":"8.2","repository":null,"branch":"main","status":"ready","port":null,"progress":100,"created_at":null,"updated_at":null}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer bVkf841ava5gE6DPch36Zde'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- DELETE
|
||||||
|
uri: 'api/projects/{project_id}/servers/{server_id}/sites/{site_id}'
|
||||||
|
metadata:
|
||||||
|
groupName: sites
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: delete
|
||||||
|
description: 'Delete site.'
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
server_id:
|
||||||
|
name: server_id
|
||||||
|
description: 'The ID of the server.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
site_id:
|
||||||
|
name: site_id
|
||||||
|
description: 'The ID of the site.'
|
||||||
|
required: true
|
||||||
|
example: 8
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
server_id: 3
|
||||||
|
site_id: 8
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 204
|
||||||
|
content: 'null'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer gfVZbEP5Ddah6k13ae6c8v4'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
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":"Jaiden Kling","provider":"github","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"},{"id":6,"project_id":null,"global":true,"name":"Ms. Brianne Bosco","provider":"github","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« 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 PfaEg1eZh66cd5V4v8bD3ak'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- POST
|
||||||
|
uri: 'api/projects/{project_id}/source-controls'
|
||||||
|
metadata:
|
||||||
|
groupName: source-controls
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: create
|
||||||
|
description: ''
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters:
|
||||||
|
provider:
|
||||||
|
name: provider
|
||||||
|
description: 'The provider'
|
||||||
|
required: true
|
||||||
|
example: bitbucket
|
||||||
|
type: string
|
||||||
|
enumValues:
|
||||||
|
- gitlab
|
||||||
|
- github
|
||||||
|
- bitbucket
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
description: 'The name of the storage provider.'
|
||||||
|
required: true
|
||||||
|
example: eos
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
token:
|
||||||
|
name: token
|
||||||
|
description: 'The token if provider requires api token'
|
||||||
|
required: true
|
||||||
|
example: et
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
url:
|
||||||
|
name: url
|
||||||
|
description: 'The URL if the provider is Gitlab and it is self-hosted'
|
||||||
|
required: true
|
||||||
|
example: 'https://lueilwitz.com/nostrum-et-porro-atque-sint.html'
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
username:
|
||||||
|
name: username
|
||||||
|
description: 'The username if the provider is Bitbucket'
|
||||||
|
required: true
|
||||||
|
example: consectetur
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
password:
|
||||||
|
name: password
|
||||||
|
description: 'The password if the provider is Bitbucket'
|
||||||
|
required: true
|
||||||
|
example: 'PL.P?{06\ECi0'
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanBodyParameters:
|
||||||
|
provider: bitbucket
|
||||||
|
name: eos
|
||||||
|
token: et
|
||||||
|
url: 'https://lueilwitz.com/nostrum-et-porro-atque-sint.html'
|
||||||
|
username: consectetur
|
||||||
|
password: 'PL.P?{06\ECi0'
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":5,"project_id":null,"global":true,"name":"Toby Parker","provider":"github","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer V5Zf3a1ve6d6kP4cbgha8DE'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- GET
|
||||||
|
uri: 'api/projects/{project_id}/source-controls/{sourceControl_id}'
|
||||||
|
metadata:
|
||||||
|
groupName: source-controls
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: show
|
||||||
|
description: ''
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
sourceControl_id:
|
||||||
|
name: sourceControl_id
|
||||||
|
description: 'The ID of the sourceControl.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
sourceControl_id: 3
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":5,"project_id":null,"global":true,"name":"Prof. Bartholome Graham IV","provider":"github","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer k1b5hac6veZ36P8gDV4fadE'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- PUT
|
||||||
|
uri: 'api/projects/{project_id}/source-controls/{sourceControl_id}'
|
||||||
|
metadata:
|
||||||
|
groupName: source-controls
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: update
|
||||||
|
description: ''
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
sourceControl_id:
|
||||||
|
name: sourceControl_id
|
||||||
|
description: 'The ID of the sourceControl.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
sourceControl_id: 3
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
description: 'The name of the storage provider.'
|
||||||
|
required: true
|
||||||
|
example: quaerat
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
token:
|
||||||
|
name: token
|
||||||
|
description: 'The token if provider requires api token'
|
||||||
|
required: true
|
||||||
|
example: consectetur
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
url:
|
||||||
|
name: url
|
||||||
|
description: 'The URL if the provider is Gitlab and it is self-hosted'
|
||||||
|
required: true
|
||||||
|
example: 'http://www.hudson.biz/rerum-voluptatem-debitis-accusamus'
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
username:
|
||||||
|
name: username
|
||||||
|
description: 'The username if the provider is Bitbucket'
|
||||||
|
required: true
|
||||||
|
example: voluptatem
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
password:
|
||||||
|
name: password
|
||||||
|
description: 'The password if the provider is Bitbucket'
|
||||||
|
required: true
|
||||||
|
example: '\p/el>)3#~E?kI'
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
global:
|
||||||
|
name: global
|
||||||
|
description: 'Accessible in all projects'
|
||||||
|
required: true
|
||||||
|
example: false
|
||||||
|
type: string
|
||||||
|
enumValues:
|
||||||
|
- true
|
||||||
|
- false
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanBodyParameters:
|
||||||
|
name: quaerat
|
||||||
|
token: consectetur
|
||||||
|
url: 'http://www.hudson.biz/rerum-voluptatem-debitis-accusamus'
|
||||||
|
username: voluptatem
|
||||||
|
password: '\p/el>)3#~E?kI'
|
||||||
|
global: false
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":5,"project_id":null,"global":true,"name":"Cicero Smitham","provider":"github","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer 6dkE6h8a5eg3f14acVvbPDZ'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- DELETE
|
||||||
|
uri: 'api/projects/{project_id}/source-controls/{sourceControl_id}'
|
||||||
|
metadata:
|
||||||
|
groupName: source-controls
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: delete
|
||||||
|
description: ''
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
sourceControl_id:
|
||||||
|
name: sourceControl_id
|
||||||
|
description: 'The ID of the sourceControl.'
|
||||||
|
required: true
|
||||||
|
example: 3
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
sourceControl_id: 3
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 204
|
||||||
|
content: 'null'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer fb6Zk4EP318eva5hDdcV6ga'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
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":3,"project_id":null,"global":true,"name":"et","provider":"local","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"},{"id":4,"project_id":null,"global":true,"name":"sed","provider":"local","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« 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 1dbV3vkh6EPD5g48cafeZ6a'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- POST
|
||||||
|
uri: 'api/projects/{project_id}/storage-providers'
|
||||||
|
metadata:
|
||||||
|
groupName: storage-providers
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: create
|
||||||
|
description: ''
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters:
|
||||||
|
provider:
|
||||||
|
name: provider
|
||||||
|
description: 'The provider (aws, linode, hetzner, digitalocean, vultr, ...)'
|
||||||
|
required: true
|
||||||
|
example: quod
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
description: 'The name of the storage provider.'
|
||||||
|
required: true
|
||||||
|
example: commodi
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
token:
|
||||||
|
name: token
|
||||||
|
description: 'The token if provider requires api token'
|
||||||
|
required: true
|
||||||
|
example: ipsum
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
key:
|
||||||
|
name: key
|
||||||
|
description: 'The key if provider requires key'
|
||||||
|
required: true
|
||||||
|
example: ratione
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
secret:
|
||||||
|
name: secret
|
||||||
|
description: 'The secret if provider requires key'
|
||||||
|
required: true
|
||||||
|
example: iste
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanBodyParameters:
|
||||||
|
provider: quod
|
||||||
|
name: commodi
|
||||||
|
token: ipsum
|
||||||
|
key: ratione
|
||||||
|
secret: iste
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":3,"project_id":null,"global":true,"name":"est","provider":"dropbox","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer abehv36kP4D658VafgdZE1c'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- GET
|
||||||
|
uri: 'api/projects/{project_id}/storage-providers/{storageProvider_id}'
|
||||||
|
metadata:
|
||||||
|
groupName: storage-providers
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: show
|
||||||
|
description: ''
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
storageProvider_id:
|
||||||
|
name: storageProvider_id
|
||||||
|
description: 'The ID of the storageProvider.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
storageProvider_id: 1
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":3,"project_id":null,"global":true,"name":"officia","provider":"ftp","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer bda64P5c1gEDe8V3Z6vhkaf'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- PUT
|
||||||
|
uri: 'api/projects/{project_id}/storage-providers/{storageProvider_id}'
|
||||||
|
metadata:
|
||||||
|
groupName: storage-providers
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: update
|
||||||
|
description: ''
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
storageProvider_id:
|
||||||
|
name: storageProvider_id
|
||||||
|
description: 'The ID of the storageProvider.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
storageProvider_id: 1
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters:
|
||||||
|
name:
|
||||||
|
name: name
|
||||||
|
description: 'The name of the storage provider.'
|
||||||
|
required: true
|
||||||
|
example: iusto
|
||||||
|
type: string
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
global:
|
||||||
|
name: global
|
||||||
|
description: 'Accessible in all projects'
|
||||||
|
required: true
|
||||||
|
example: true
|
||||||
|
type: string
|
||||||
|
enumValues:
|
||||||
|
- true
|
||||||
|
- false
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanBodyParameters:
|
||||||
|
name: iusto
|
||||||
|
global: true
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 200
|
||||||
|
content: '{"id":3,"project_id":null,"global":true,"name":"rerum","provider":"ftp","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer aEP35hVakDdf814eZvg66cb'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
||||||
|
-
|
||||||
|
httpMethods:
|
||||||
|
- DELETE
|
||||||
|
uri: 'api/projects/{project_id}/storage-providers/{storageProvider_id}'
|
||||||
|
metadata:
|
||||||
|
groupName: storage-providers
|
||||||
|
groupDescription: ''
|
||||||
|
subgroup: ''
|
||||||
|
subgroupDescription: ''
|
||||||
|
title: delete
|
||||||
|
description: ''
|
||||||
|
authenticated: true
|
||||||
|
custom: []
|
||||||
|
headers:
|
||||||
|
Authorization: 'Bearer YOUR-API-KEY'
|
||||||
|
Content-Type: application/json
|
||||||
|
Accept: application/json
|
||||||
|
urlParameters:
|
||||||
|
project_id:
|
||||||
|
name: project_id
|
||||||
|
description: 'The ID of the project.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
storageProvider_id:
|
||||||
|
name: storageProvider_id
|
||||||
|
description: 'The ID of the storageProvider.'
|
||||||
|
required: true
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
enumValues: []
|
||||||
|
exampleWasSpecified: false
|
||||||
|
nullable: false
|
||||||
|
custom: []
|
||||||
|
cleanUrlParameters:
|
||||||
|
project_id: 1
|
||||||
|
storageProvider_id: 1
|
||||||
|
queryParameters: []
|
||||||
|
cleanQueryParameters: []
|
||||||
|
bodyParameters: []
|
||||||
|
cleanBodyParameters: []
|
||||||
|
fileParameters: []
|
||||||
|
responses:
|
||||||
|
-
|
||||||
|
status: 204
|
||||||
|
content: 'null'
|
||||||
|
headers: []
|
||||||
|
description: ''
|
||||||
|
custom: []
|
||||||
|
responseFields: []
|
||||||
|
auth:
|
||||||
|
- headers
|
||||||
|
- Authorization
|
||||||
|
- 'Bearer Dah3PgE5d64fcbe8a16VkvZ'
|
||||||
|
controller: null
|
||||||
|
method: null
|
||||||
|
route: null
|
||||||
|
custom: []
|
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
|
# 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
|
https://vitodeploy.com/prologue/contribution-guide.html
|
||||||
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.
|
|
||||||
|
30
README.md
30
README.md
@ -1,20 +1,21 @@
|
|||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<img alt="srcshot 2024-02-23 at 16 26 21@2x" src="https://github.com/vitodeploy/vito/assets/61919774/9b3ae8fe-996a-4e10-b42e-74097f8e5512" alt="VitoDeploy>
|
<img src="https://github.com/user-attachments/assets/57f77bd5-bd3f-4367-84c0-aff6ecd392b4" alt="VitoDeploy>
|
||||||
<p align="center">
|
<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>
|
<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>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
------
|
------
|
||||||
|
|
||||||
## About Vito
|
## About Vito
|
||||||
|
|
||||||
Vito is a self-hosted web application that helps you manage your servers and deploy your PHP applications into production servers without a hassle.
|
Vito is a self-hosted web application that helps you manage your servers and deploy your PHP applications into
|
||||||
|
production servers without a hassle.
|
||||||
|
|
||||||
## Quick Start
|
## Quick Start
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
bash <(curl -Ls https://raw.githubusercontent.com/vitodeploy/vito/1.x/scripts/install.sh)
|
bash <(curl -Ls https://raw.githubusercontent.com/vitodeploy/vito/2.x/scripts/install.sh)
|
||||||
```
|
```
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
@ -28,17 +29,17 @@ ## Features
|
|||||||
- Manages server's services
|
- Manages server's services
|
||||||
- Deploy your SSH Keys to the server
|
- Deploy your SSH Keys to the server
|
||||||
- Create and Manage cron jobs on the server
|
- Create and Manage cron jobs on the server
|
||||||
|
- API
|
||||||
|
|
||||||
## Useful Links
|
## Useful Links
|
||||||
|
|
||||||
- [Documentation](https://vitodeploy.com)
|
- [Documentation](https://vitodeploy.com)
|
||||||
- [Install on Server](https://vitodeploy.com/introduction/installation.html#install-on-vps-recommended)
|
- [Demo Website](https://demo.vitodeploy.com)
|
||||||
- [Install via Docker](https://vitodeploy.com/introduction/installation.html#install-via-docker)
|
- [Install on Server](https://vitodeploy.com/getting-started/installation.html#install-on-vps)
|
||||||
- [Feedbacks](https://vitodeploy.featurebase.app)
|
- [Install via Docker](https://vitodeploy.com/getting-started/installation.html#install-via-docker)
|
||||||
- [Roadmap](https://vitodeploy.featurebase.app/roadmap)
|
- [Roadmap](https://github.com/orgs/vitodeploy/projects/5)
|
||||||
- [Video Demo](https://youtu.be/rLRHIyEfON8)
|
- [Discord](https://discord.gg/uZeeHZZnm5)
|
||||||
- [Discord](https://discord.gg/dcUWA5DV)
|
- [Contribution](https://vitodeploy.com/prologue/contribution-guide.html)
|
||||||
- [Contribution](/CONTRIBUTING.md)
|
|
||||||
- [Security](/SECURITY.md)
|
- [Security](/SECURITY.md)
|
||||||
|
|
||||||
## Credits
|
## Credits
|
||||||
@ -48,9 +49,10 @@ ## Credits
|
|||||||
- PHPUnit
|
- PHPUnit
|
||||||
- Tailwindcss
|
- Tailwindcss
|
||||||
- Alpinejs
|
- Alpinejs
|
||||||
- HTMX
|
- Livewire
|
||||||
- Vite
|
- Vite
|
||||||
- Toastr by CodeSeven
|
|
||||||
- Prettier
|
- Prettier
|
||||||
- Postcss
|
- Postcss
|
||||||
- Flowbite
|
- FilamentPHP
|
||||||
|
- Mobiledetect
|
||||||
|
- Spatie
|
||||||
|
@ -2,10 +2,11 @@ # Security Policy
|
|||||||
|
|
||||||
## Supported Versions
|
## Supported Versions
|
||||||
|
|
||||||
| Version | Supported |
|
| Version | New Features | Bug Fixes | Security Fixes |
|
||||||
| ------- | ----------|
|
|---------|--------------|-----------|----------------------|
|
||||||
| 0.x | ❌ |
|
| 0.x | ❌ | ❌ | ❌ |
|
||||||
| 1.x | ✅ |
|
| 1.x | ❌ | ❌ | ✅ (Until March 2025) |
|
||||||
|
| 2.x | ✅ | ✅ | ✅ |
|
||||||
|
|
||||||
## Reporting a Vulnerability
|
## Reporting a Vulnerability
|
||||||
|
|
||||||
|
@ -6,15 +6,11 @@
|
|||||||
use App\Models\CronJob;
|
use App\Models\CronJob;
|
||||||
use App\Models\Server;
|
use App\Models\Server;
|
||||||
use App\ValidationRules\CronRule;
|
use App\ValidationRules\CronRule;
|
||||||
use Illuminate\Support\Facades\Validator;
|
|
||||||
use Illuminate\Validation\ValidationException;
|
|
||||||
|
|
||||||
class CreateCronJob
|
class CreateCronJob
|
||||||
{
|
{
|
||||||
public function create(Server $server, array $input): void
|
public function create(Server $server, array $input): CronJob
|
||||||
{
|
{
|
||||||
$this->validate($input);
|
|
||||||
|
|
||||||
$cronJob = new CronJob([
|
$cronJob = new CronJob([
|
||||||
'server_id' => $server->id,
|
'server_id' => $server->id,
|
||||||
'user' => $input['user'],
|
'user' => $input['user'],
|
||||||
@ -27,14 +23,13 @@ public function create(Server $server, array $input): void
|
|||||||
$server->cron()->update($cronJob->user, CronJob::crontab($server, $cronJob->user));
|
$server->cron()->update($cronJob->user, CronJob::crontab($server, $cronJob->user));
|
||||||
$cronJob->status = CronjobStatus::READY;
|
$cronJob->status = CronjobStatus::READY;
|
||||||
$cronJob->save();
|
$cronJob->save();
|
||||||
|
|
||||||
|
return $cronJob;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public static function rules(array $input): array
|
||||||
* @throws ValidationException
|
|
||||||
*/
|
|
||||||
private function validate(array $input): void
|
|
||||||
{
|
{
|
||||||
Validator::make($input, [
|
$rules = [
|
||||||
'command' => [
|
'command' => [
|
||||||
'required',
|
'required',
|
||||||
],
|
],
|
||||||
@ -46,15 +41,15 @@ private function validate(array $input): void
|
|||||||
'required',
|
'required',
|
||||||
new CronRule(acceptCustom: true),
|
new CronRule(acceptCustom: true),
|
||||||
],
|
],
|
||||||
])->validate();
|
];
|
||||||
|
|
||||||
if ($input['frequency'] == 'custom') {
|
if (isset($input['frequency']) && $input['frequency'] == 'custom') {
|
||||||
Validator::make($input, [
|
$rules['custom'] = [
|
||||||
'custom' => [
|
'required',
|
||||||
'required',
|
new CronRule,
|
||||||
new CronRule(),
|
];
|
||||||
],
|
|
||||||
])->validate();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return $rules;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Actions\CronJob;
|
namespace App\Actions\CronJob;
|
||||||
|
|
||||||
|
use App\Enums\CronjobStatus;
|
||||||
use App\Models\CronJob;
|
use App\Models\CronJob;
|
||||||
use App\Models\Server;
|
use App\Models\Server;
|
||||||
|
|
||||||
@ -10,7 +11,9 @@ class DeleteCronJob
|
|||||||
public function delete(Server $server, CronJob $cronJob): void
|
public function delete(Server $server, CronJob $cronJob): void
|
||||||
{
|
{
|
||||||
$user = $cronJob->user;
|
$user = $cronJob->user;
|
||||||
$cronJob->delete();
|
$cronJob->status = CronjobStatus::DELETING;
|
||||||
|
$cronJob->save();
|
||||||
$server->cron()->update($cronJob->user, CronJob::crontab($server, $user));
|
$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();
|
||||||
|
}
|
||||||
|
}
|
@ -7,7 +7,6 @@
|
|||||||
use App\Models\Backup;
|
use App\Models\Backup;
|
||||||
use App\Models\Server;
|
use App\Models\Server;
|
||||||
use Illuminate\Auth\Access\AuthorizationException;
|
use Illuminate\Auth\Access\AuthorizationException;
|
||||||
use Illuminate\Support\Facades\Validator;
|
|
||||||
use Illuminate\Validation\Rule;
|
use Illuminate\Validation\Rule;
|
||||||
use Illuminate\Validation\ValidationException;
|
use Illuminate\Validation\ValidationException;
|
||||||
|
|
||||||
@ -17,17 +16,15 @@ class CreateBackup
|
|||||||
* @throws AuthorizationException
|
* @throws AuthorizationException
|
||||||
* @throws ValidationException
|
* @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([
|
$backup = new Backup([
|
||||||
'type' => $type,
|
'type' => 'database',
|
||||||
'server_id' => $server->id,
|
'server_id' => $server->id,
|
||||||
'database_id' => $input['backup_database'] ?? null,
|
'database_id' => $input['database'] ?? null,
|
||||||
'storage_id' => $input['backup_storage'],
|
'storage_id' => $input['storage'],
|
||||||
'interval' => $input['backup_interval'] == 'custom' ? $input['backup_custom'] : $input['backup_interval'],
|
'interval' => $input['interval'] == 'custom' ? $input['custom_interval'] : $input['interval'],
|
||||||
'keep_backups' => $input['backup_keep'],
|
'keep_backups' => $input['keep'],
|
||||||
'status' => BackupStatus::RUNNING,
|
'status' => BackupStatus::RUNNING,
|
||||||
]);
|
]);
|
||||||
$backup->save();
|
$backup->save();
|
||||||
@ -37,45 +34,35 @@ public function create($type, Server $server, array $input): Backup
|
|||||||
return $backup;
|
return $backup;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public static function rules(Server $server, array $input): array
|
||||||
* @throws ValidationException
|
|
||||||
*/
|
|
||||||
private function validate($type, Server $server, array $input): void
|
|
||||||
{
|
{
|
||||||
$rules = [
|
$rules = [
|
||||||
'backup_storage' => [
|
'storage' => [
|
||||||
'required',
|
'required',
|
||||||
Rule::exists('storage_providers', 'id'),
|
Rule::exists('storage_providers', 'id'),
|
||||||
],
|
],
|
||||||
'backup_keep' => [
|
'keep' => [
|
||||||
'required',
|
'required',
|
||||||
'numeric',
|
'numeric',
|
||||||
'min:1',
|
'min:1',
|
||||||
],
|
],
|
||||||
'backup_interval' => [
|
'interval' => [
|
||||||
'required',
|
'required',
|
||||||
Rule::in([
|
Rule::in(array_keys(config('core.cronjob_intervals'))),
|
||||||
'0 * * * *',
|
|
||||||
'0 0 * * *',
|
|
||||||
'0 0 * * 0',
|
|
||||||
'0 0 1 * *',
|
|
||||||
'custom',
|
|
||||||
]),
|
|
||||||
],
|
],
|
||||||
];
|
'database' => [
|
||||||
if ($input['backup_interval'] == 'custom') {
|
|
||||||
$rules['backup_custom'] = [
|
|
||||||
'required',
|
|
||||||
];
|
|
||||||
}
|
|
||||||
if ($type === 'database') {
|
|
||||||
$rules['backup_database'] = [
|
|
||||||
'required',
|
'required',
|
||||||
Rule::exists('databases', 'id')
|
Rule::exists('databases', 'id')
|
||||||
->where('server_id', $server->id)
|
->where('server_id', $server->id)
|
||||||
->where('status', DatabaseStatus::READY),
|
->where('status', DatabaseStatus::READY),
|
||||||
|
],
|
||||||
|
];
|
||||||
|
if ($input['interval'] == 'custom') {
|
||||||
|
$rules['custom_interval'] = [
|
||||||
|
'required',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
Validator::make($input, $rules)->validate();
|
|
||||||
|
return $rules;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,34 +5,36 @@
|
|||||||
use App\Enums\DatabaseStatus;
|
use App\Enums\DatabaseStatus;
|
||||||
use App\Models\Database;
|
use App\Models\Database;
|
||||||
use App\Models\Server;
|
use App\Models\Server;
|
||||||
use Illuminate\Support\Facades\Validator;
|
|
||||||
use Illuminate\Validation\Rule;
|
use Illuminate\Validation\Rule;
|
||||||
use Illuminate\Validation\ValidationException;
|
use Illuminate\Validation\ValidationException;
|
||||||
|
|
||||||
class CreateDatabase
|
class CreateDatabase
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* @throws ValidationException
|
|
||||||
*/
|
|
||||||
public function create(Server $server, array $input): Database
|
public function create(Server $server, array $input): Database
|
||||||
{
|
{
|
||||||
$this->validate($server, $input);
|
|
||||||
|
|
||||||
$database = new Database([
|
$database = new Database([
|
||||||
'server_id' => $server->id,
|
'server_id' => $server->id,
|
||||||
'name' => $input['name'],
|
'name' => $input['name'],
|
||||||
]);
|
]);
|
||||||
$server->database()->handler()->create($database->name);
|
/** @var \App\SSH\Services\Database\Database $databaseHandler */
|
||||||
|
$databaseHandler = $server->database()->handler();
|
||||||
|
$databaseHandler->create($database->name);
|
||||||
$database->status = DatabaseStatus::READY;
|
$database->status = DatabaseStatus::READY;
|
||||||
$database->save();
|
$database->save();
|
||||||
|
|
||||||
|
if (isset($input['user']) && $input['user']) {
|
||||||
|
$databaseUser = app(CreateDatabaseUser::class)->create($server, $input, [$database->name]);
|
||||||
|
|
||||||
|
app(LinkUser::class)->link($databaseUser, ['databases' => [$database->name]]);
|
||||||
|
}
|
||||||
|
|
||||||
return $database;
|
return $database;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @throws ValidationException
|
* @throws ValidationException
|
||||||
*/
|
*/
|
||||||
private function validate(Server $server, array $input): void
|
public static function rules(Server $server, array $input): array
|
||||||
{
|
{
|
||||||
$rules = [
|
$rules = [
|
||||||
'name' => [
|
'name' => [
|
||||||
@ -55,6 +57,7 @@ private function validate(Server $server, array $input): void
|
|||||||
if (isset($input['remote']) && $input['remote']) {
|
if (isset($input['remote']) && $input['remote']) {
|
||||||
$rules['host'] = 'required';
|
$rules['host'] = 'required';
|
||||||
}
|
}
|
||||||
Validator::make($input, $rules)->validate();
|
|
||||||
|
return $rules;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
use App\Enums\DatabaseUserStatus;
|
use App\Enums\DatabaseUserStatus;
|
||||||
use App\Models\DatabaseUser;
|
use App\Models\DatabaseUser;
|
||||||
use App\Models\Server;
|
use App\Models\Server;
|
||||||
use Illuminate\Support\Facades\Validator;
|
use App\SSH\Services\Database\Database;
|
||||||
use Illuminate\Validation\Rule;
|
use Illuminate\Validation\Rule;
|
||||||
use Illuminate\Validation\ValidationException;
|
use Illuminate\Validation\ValidationException;
|
||||||
|
|
||||||
@ -16,16 +16,16 @@ class CreateDatabaseUser
|
|||||||
*/
|
*/
|
||||||
public function create(Server $server, array $input, array $links = []): DatabaseUser
|
public function create(Server $server, array $input, array $links = []): DatabaseUser
|
||||||
{
|
{
|
||||||
$this->validate($server, $input);
|
|
||||||
|
|
||||||
$databaseUser = new DatabaseUser([
|
$databaseUser = new DatabaseUser([
|
||||||
'server_id' => $server->id,
|
'server_id' => $server->id,
|
||||||
'username' => $input['username'],
|
'username' => $input['username'],
|
||||||
'password' => $input['password'],
|
'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,
|
'databases' => $links,
|
||||||
]);
|
]);
|
||||||
$server->database()->handler()->createUser(
|
/** @var Database $databaseHandler */
|
||||||
|
$databaseHandler = $server->database()->handler();
|
||||||
|
$databaseHandler->createUser(
|
||||||
$databaseUser->username,
|
$databaseUser->username,
|
||||||
$databaseUser->password,
|
$databaseUser->password,
|
||||||
$databaseUser->host
|
$databaseUser->host
|
||||||
@ -43,7 +43,7 @@ public function create(Server $server, array $input, array $links = []): Databas
|
|||||||
/**
|
/**
|
||||||
* @throws ValidationException
|
* @throws ValidationException
|
||||||
*/
|
*/
|
||||||
private function validate(Server $server, array $input): void
|
public static function rules(Server $server, array $input): array
|
||||||
{
|
{
|
||||||
$rules = [
|
$rules = [
|
||||||
'username' => [
|
'username' => [
|
||||||
@ -59,6 +59,7 @@ private function validate(Server $server, array $input): void
|
|||||||
if (isset($input['remote']) && $input['remote']) {
|
if (isset($input['remote']) && $input['remote']) {
|
||||||
$rules['host'] = 'required';
|
$rules['host'] = 'required';
|
||||||
}
|
}
|
||||||
Validator::make($input, $rules)->validate();
|
|
||||||
|
return $rules;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
use App\Models\Database;
|
use App\Models\Database;
|
||||||
use App\Models\DatabaseUser;
|
use App\Models\DatabaseUser;
|
||||||
use App\Models\Server;
|
use App\Models\Server;
|
||||||
use Illuminate\Support\Facades\Validator;
|
|
||||||
use Illuminate\Validation\Rule;
|
use Illuminate\Validation\Rule;
|
||||||
use Illuminate\Validation\ValidationException;
|
use Illuminate\Validation\ValidationException;
|
||||||
|
|
||||||
@ -14,14 +13,12 @@ class LinkUser
|
|||||||
/**
|
/**
|
||||||
* @throws ValidationException
|
* @throws ValidationException
|
||||||
*/
|
*/
|
||||||
public function link(DatabaseUser $databaseUser, array $input): void
|
public function link(DatabaseUser $databaseUser, array $input): DatabaseUser
|
||||||
{
|
{
|
||||||
if (! isset($input['databases']) || ! is_array($input['databases'])) {
|
if (! isset($input['databases']) || ! is_array($input['databases'])) {
|
||||||
$input['databases'] = [];
|
$input['databases'] = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->validate($databaseUser->server, $input);
|
|
||||||
|
|
||||||
$dbs = Database::query()
|
$dbs = Database::query()
|
||||||
->where('server_id', $databaseUser->server_id)
|
->where('server_id', $databaseUser->server_id)
|
||||||
->whereIn('name', $input['databases'])
|
->whereIn('name', $input['databases'])
|
||||||
@ -46,17 +43,19 @@ public function link(DatabaseUser $databaseUser, array $input): void
|
|||||||
);
|
);
|
||||||
|
|
||||||
$databaseUser->save();
|
$databaseUser->save();
|
||||||
|
|
||||||
|
$databaseUser->refresh();
|
||||||
|
|
||||||
|
return $databaseUser;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function validate(Server $server, array $input): void
|
public static function rules(Server $server, array $input): array
|
||||||
{
|
{
|
||||||
$rules = [
|
return [
|
||||||
'databases.*' => [
|
'databases.*' => [
|
||||||
'required',
|
'nullable',
|
||||||
Rule::exists('databases', 'name')->where('server_id', $server->id),
|
Rule::exists('databases', 'name')->where('server_id', $server->id),
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
Validator::make($input, $rules)->validate();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,14 +5,11 @@
|
|||||||
use App\Enums\BackupFileStatus;
|
use App\Enums\BackupFileStatus;
|
||||||
use App\Models\BackupFile;
|
use App\Models\BackupFile;
|
||||||
use App\Models\Database;
|
use App\Models\Database;
|
||||||
use Illuminate\Support\Facades\Validator;
|
|
||||||
|
|
||||||
class RestoreBackup
|
class RestoreBackup
|
||||||
{
|
{
|
||||||
public function restore(BackupFile $backupFile, array $input): void
|
public function restore(BackupFile $backupFile, array $input): void
|
||||||
{
|
{
|
||||||
$this->validate($input);
|
|
||||||
|
|
||||||
/** @var Database $database */
|
/** @var Database $database */
|
||||||
$database = Database::query()->findOrFail($input['database']);
|
$database = Database::query()->findOrFail($input['database']);
|
||||||
$backupFile->status = BackupFileStatus::RESTORING;
|
$backupFile->status = BackupFileStatus::RESTORING;
|
||||||
@ -20,7 +17,9 @@ public function restore(BackupFile $backupFile, array $input): void
|
|||||||
$backupFile->save();
|
$backupFile->save();
|
||||||
|
|
||||||
dispatch(function () use ($backupFile, $database) {
|
dispatch(function () use ($backupFile, $database) {
|
||||||
$database->server->database()->handler()->restoreBackup($backupFile, $database->name);
|
/** @var \App\SSH\Services\Database\Database $databaseHandler */
|
||||||
|
$databaseHandler = $database->server->database()->handler();
|
||||||
|
$databaseHandler->restoreBackup($backupFile, $database->name);
|
||||||
$backupFile->status = BackupFileStatus::RESTORED;
|
$backupFile->status = BackupFileStatus::RESTORED;
|
||||||
$backupFile->restored_at = now();
|
$backupFile->restored_at = now();
|
||||||
$backupFile->save();
|
$backupFile->save();
|
||||||
@ -30,10 +29,13 @@ public function restore(BackupFile $backupFile, array $input): void
|
|||||||
})->onConnection('ssh');
|
})->onConnection('ssh');
|
||||||
}
|
}
|
||||||
|
|
||||||
private function validate(array $input): void
|
public static function rules(): array
|
||||||
{
|
{
|
||||||
Validator::make($input, [
|
return [
|
||||||
'database' => 'required|exists:databases,id',
|
'database' => [
|
||||||
])->validate();
|
'required',
|
||||||
|
'exists:databases,id',
|
||||||
|
],
|
||||||
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,8 +3,10 @@
|
|||||||
namespace App\Actions\Database;
|
namespace App\Actions\Database;
|
||||||
|
|
||||||
use App\Enums\BackupFileStatus;
|
use App\Enums\BackupFileStatus;
|
||||||
|
use App\Enums\BackupStatus;
|
||||||
use App\Models\Backup;
|
use App\Models\Backup;
|
||||||
use App\Models\BackupFile;
|
use App\Models\BackupFile;
|
||||||
|
use App\SSH\Services\Database\Database;
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
class RunBackup
|
class RunBackup
|
||||||
@ -18,11 +20,20 @@ public function run(Backup $backup): BackupFile
|
|||||||
]);
|
]);
|
||||||
$file->save();
|
$file->save();
|
||||||
|
|
||||||
dispatch(function () use ($file) {
|
dispatch(function () use ($file, $backup) {
|
||||||
$file->backup->server->database()->handler()->runBackup($file);
|
/** @var Database $databaseHandler */
|
||||||
|
$databaseHandler = $file->backup->server->database()->handler();
|
||||||
|
$databaseHandler->runBackup($file);
|
||||||
$file->status = BackupFileStatus::CREATED;
|
$file->status = BackupFileStatus::CREATED;
|
||||||
$file->save();
|
$file->save();
|
||||||
})->catch(function () use ($file) {
|
|
||||||
|
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->status = BackupFileStatus::FAILED;
|
||||||
$file->save();
|
$file->save();
|
||||||
})->onConnection('ssh');
|
})->onConnection('ssh');
|
||||||
|
@ -5,15 +5,13 @@
|
|||||||
use App\Enums\FirewallRuleStatus;
|
use App\Enums\FirewallRuleStatus;
|
||||||
use App\Models\FirewallRule;
|
use App\Models\FirewallRule;
|
||||||
use App\Models\Server;
|
use App\Models\Server;
|
||||||
use Illuminate\Support\Facades\Validator;
|
use App\SSH\Services\Firewall\Firewall;
|
||||||
use Illuminate\Validation\ValidationException;
|
use Illuminate\Validation\Rule;
|
||||||
|
|
||||||
class CreateRule
|
class CreateRule
|
||||||
{
|
{
|
||||||
public function create(Server $server, array $input): FirewallRule
|
public function create(Server $server, array $input): FirewallRule
|
||||||
{
|
{
|
||||||
$this->validate($server, $input);
|
|
||||||
|
|
||||||
$rule = new FirewallRule([
|
$rule = new FirewallRule([
|
||||||
'server_id' => $server->id,
|
'server_id' => $server->id,
|
||||||
'type' => $input['type'],
|
'type' => $input['type'],
|
||||||
@ -23,15 +21,15 @@ public function create(Server $server, array $input): FirewallRule
|
|||||||
'mask' => $input['mask'] ?? null,
|
'mask' => $input['mask'] ?? null,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$server->firewall()
|
/** @var Firewall $firewallHandler */
|
||||||
->handler()
|
$firewallHandler = $server->firewall()->handler();
|
||||||
->addRule(
|
$firewallHandler->addRule(
|
||||||
$rule->type,
|
$rule->type,
|
||||||
$rule->getRealProtocol(),
|
$rule->getRealProtocol(),
|
||||||
$rule->port,
|
$rule->port,
|
||||||
$rule->source,
|
$rule->source,
|
||||||
$rule->mask
|
$rule->mask
|
||||||
);
|
);
|
||||||
|
|
||||||
$rule->status = FirewallRuleStatus::READY;
|
$rule->status = FirewallRuleStatus::READY;
|
||||||
$rule->save();
|
$rule->save();
|
||||||
@ -39,19 +37,16 @@ public function create(Server $server, array $input): FirewallRule
|
|||||||
return $rule;
|
return $rule;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public static function rules(): array
|
||||||
* @throws ValidationException
|
|
||||||
*/
|
|
||||||
private function validate(Server $server, array $input): void
|
|
||||||
{
|
{
|
||||||
Validator::make($input, [
|
return [
|
||||||
'type' => [
|
'type' => [
|
||||||
'required',
|
'required',
|
||||||
'in:allow,deny',
|
'in:allow,deny',
|
||||||
],
|
],
|
||||||
'protocol' => [
|
'protocol' => [
|
||||||
'required',
|
'required',
|
||||||
'in:'.implode(',', array_keys(config('core.firewall_protocols_port'))),
|
Rule::in(array_keys(config('core.firewall_protocols_port'))),
|
||||||
],
|
],
|
||||||
'port' => [
|
'port' => [
|
||||||
'required',
|
'required',
|
||||||
@ -64,8 +59,9 @@ private function validate(Server $server, array $input): void
|
|||||||
'ip',
|
'ip',
|
||||||
],
|
],
|
||||||
'mask' => [
|
'mask' => [
|
||||||
|
'required',
|
||||||
'numeric',
|
'numeric',
|
||||||
],
|
],
|
||||||
])->validate();
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
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',
|
||||||
|
],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
@ -4,61 +4,74 @@
|
|||||||
|
|
||||||
use App\Models\NotificationChannel;
|
use App\Models\NotificationChannel;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use Illuminate\Support\Facades\Validator;
|
use Exception;
|
||||||
|
use Illuminate\Validation\Rule;
|
||||||
use Illuminate\Validation\ValidationException;
|
use Illuminate\Validation\ValidationException;
|
||||||
|
|
||||||
class AddChannel
|
class AddChannel
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @throws ValidationException
|
* @throws ValidationException
|
||||||
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function add(User $user, array $input): void
|
public function add(User $user, array $input): void
|
||||||
{
|
{
|
||||||
$this->validate($input);
|
|
||||||
$channel = new NotificationChannel([
|
$channel = new NotificationChannel([
|
||||||
'user_id' => $user->id,
|
'user_id' => $user->id,
|
||||||
'provider' => $input['provider'],
|
'provider' => $input['provider'],
|
||||||
'label' => $input['label'],
|
'label' => $input['label'],
|
||||||
|
'project_id' => isset($input['global']) && $input['global'] ? null : $user->current_project_id,
|
||||||
]);
|
]);
|
||||||
$this->validateType($channel, $input);
|
|
||||||
$channel->data = $channel->provider()->createData($input);
|
$channel->data = $channel->provider()->createData($input);
|
||||||
$channel->save();
|
$channel->save();
|
||||||
|
|
||||||
if (! $channel->provider()->connect()) {
|
try {
|
||||||
$channel->delete();
|
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.'),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
if ($channel->provider === \App\Enums\NotificationChannel::EMAIL) {
|
|
||||||
throw ValidationException::withMessages([
|
throw ValidationException::withMessages([
|
||||||
'email' => __('Could not connect! Make sure you configured `.env` file correctly.'),
|
'provider' => __('Could not connect'),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
} catch (Exception $e) {
|
||||||
|
$channel->delete();
|
||||||
|
|
||||||
throw ValidationException::withMessages([
|
throw $e;
|
||||||
'provider' => __('Could not connect'),
|
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$channel->connected = true;
|
$channel->connected = true;
|
||||||
$channel->save();
|
$channel->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public static function rules(array $input): array
|
||||||
* @throws ValidationException
|
|
||||||
*/
|
|
||||||
protected function validate(array $input): void
|
|
||||||
{
|
{
|
||||||
Validator::make($input, [
|
$rules = [
|
||||||
'provider' => 'required|in:'.implode(',', config('core.notification_channels_providers')),
|
'provider' => [
|
||||||
|
'required',
|
||||||
|
Rule::in(config('core.notification_channels_providers')),
|
||||||
|
],
|
||||||
'label' => 'required',
|
'label' => 'required',
|
||||||
])->validate();
|
];
|
||||||
|
|
||||||
|
return array_merge($rules, static::providerRules($input));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
private static function providerRules(array $input): array
|
||||||
* @throws ValidationException
|
|
||||||
*/
|
|
||||||
protected function validateType(NotificationChannel $channel, array $input): void
|
|
||||||
{
|
{
|
||||||
Validator::make($input, $channel->provider()->createRules($input))
|
if (! isset($input['provider'])) {
|
||||||
->validate();
|
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',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
use App\Enums\ServiceStatus;
|
use App\Enums\ServiceStatus;
|
||||||
use App\Models\Server;
|
use App\Models\Server;
|
||||||
|
use App\SSH\Services\PHP\PHP;
|
||||||
use Illuminate\Validation\ValidationException;
|
use Illuminate\Validation\ValidationException;
|
||||||
|
|
||||||
class ChangeDefaultCli
|
class ChangeDefaultCli
|
||||||
@ -12,7 +13,9 @@ public function change(Server $server, array $input): void
|
|||||||
{
|
{
|
||||||
$this->validate($server, $input);
|
$this->validate($server, $input);
|
||||||
$service = $server->php($input['version']);
|
$service = $server->php($input['version']);
|
||||||
$service->handler()->setDefaultCli();
|
/** @var PHP $handler */
|
||||||
|
$handler = $service->handler();
|
||||||
|
$handler->setDefaultCli();
|
||||||
$server->defaultService('php')->update(['is_default' => 0]);
|
$server->defaultService('php')->update(['is_default' => 0]);
|
||||||
$service->update(['is_default' => 1]);
|
$service->update(['is_default' => 1]);
|
||||||
$service->update(['status' => ServiceStatus::READY]);
|
$service->update(['status' => ServiceStatus::READY]);
|
||||||
|
@ -2,7 +2,11 @@
|
|||||||
|
|
||||||
namespace App\Actions\PHP;
|
namespace App\Actions\PHP;
|
||||||
|
|
||||||
|
use App\Enums\PHPIniType;
|
||||||
use App\Models\Server;
|
use App\Models\Server;
|
||||||
|
use App\SSH\Services\PHP\PHP;
|
||||||
|
use Illuminate\Support\Facades\Validator;
|
||||||
|
use Illuminate\Validation\Rule;
|
||||||
use Illuminate\Validation\ValidationException;
|
use Illuminate\Validation\ValidationException;
|
||||||
|
|
||||||
class GetPHPIni
|
class GetPHPIni
|
||||||
@ -14,7 +18,10 @@ public function getIni(Server $server, array $input): string
|
|||||||
$php = $server->php($input['version']);
|
$php = $server->php($input['version']);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return $php->handler()->getPHPIni();
|
/** @var PHP $handler */
|
||||||
|
$handler = $php->handler();
|
||||||
|
|
||||||
|
return $handler->getPHPIni($input['type']);
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
throw ValidationException::withMessages(
|
throw ValidationException::withMessages(
|
||||||
['ini' => $e->getMessage()]
|
['ini' => $e->getMessage()]
|
||||||
@ -24,6 +31,13 @@ public function getIni(Server $server, array $input): string
|
|||||||
|
|
||||||
public function validate(Server $server, array $input): void
|
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())) {
|
if (! isset($input['version']) || ! in_array($input['version'], $server->installedPHPVersions())) {
|
||||||
throw ValidationException::withMessages(
|
throw ValidationException::withMessages(
|
||||||
['version' => __('This version is not installed')]
|
['version' => __('This version is not installed')]
|
||||||
|
@ -2,19 +2,16 @@
|
|||||||
|
|
||||||
namespace App\Actions\PHP;
|
namespace App\Actions\PHP;
|
||||||
|
|
||||||
|
use App\Enums\PHP;
|
||||||
use App\Enums\ServiceStatus;
|
use App\Enums\ServiceStatus;
|
||||||
use App\Models\Server;
|
use App\Models\Server;
|
||||||
use App\Models\Service;
|
use App\Models\Service;
|
||||||
use Illuminate\Support\Facades\Validator;
|
|
||||||
use Illuminate\Validation\Rule;
|
use Illuminate\Validation\Rule;
|
||||||
use Illuminate\Validation\ValidationException;
|
|
||||||
|
|
||||||
class InstallNewPHP
|
class InstallNewPHP
|
||||||
{
|
{
|
||||||
public function install(Server $server, array $input): void
|
public function install(Server $server, array $input): void
|
||||||
{
|
{
|
||||||
$this->validate($server, $input);
|
|
||||||
|
|
||||||
$php = new Service([
|
$php = new Service([
|
||||||
'server_id' => $server->id,
|
'server_id' => $server->id,
|
||||||
'type' => 'php',
|
'type' => 'php',
|
||||||
@ -38,22 +35,14 @@ public function install(Server $server, array $input): void
|
|||||||
})->onConnection('ssh');
|
})->onConnection('ssh');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public static function rules(Server $server): array
|
||||||
* @throws ValidationException
|
|
||||||
*/
|
|
||||||
private function validate(Server $server, array $input): void
|
|
||||||
{
|
{
|
||||||
Validator::make($input, [
|
return [
|
||||||
'version' => [
|
'version' => [
|
||||||
'required',
|
'required',
|
||||||
Rule::in(config('core.php_versions')),
|
Rule::in(config('core.php_versions')),
|
||||||
|
Rule::notIn(array_merge($server->installedPHPVersions(), [PHP::NONE])),
|
||||||
],
|
],
|
||||||
])->validate();
|
];
|
||||||
|
|
||||||
if (in_array($input['version'], $server->installedPHPVersions())) {
|
|
||||||
throw ValidationException::withMessages(
|
|
||||||
['version' => __('This version is already installed')]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,9 +2,10 @@
|
|||||||
|
|
||||||
namespace App\Actions\PHP;
|
namespace App\Actions\PHP;
|
||||||
|
|
||||||
|
use App\Exceptions\SSHCommandError;
|
||||||
use App\Models\Server;
|
use App\Models\Server;
|
||||||
use App\Models\Service;
|
use App\Models\Service;
|
||||||
use Illuminate\Support\Facades\Validator;
|
use App\SSH\Services\PHP\PHP;
|
||||||
use Illuminate\Validation\Rule;
|
use Illuminate\Validation\Rule;
|
||||||
use Illuminate\Validation\ValidationException;
|
use Illuminate\Validation\ValidationException;
|
||||||
|
|
||||||
@ -12,52 +13,53 @@ class InstallPHPExtension
|
|||||||
{
|
{
|
||||||
public function install(Server $server, array $input): Service
|
public function install(Server $server, array $input): Service
|
||||||
{
|
{
|
||||||
$this->validate($server, $input);
|
|
||||||
|
|
||||||
/** @var Service $service */
|
/** @var Service $service */
|
||||||
$service = $server->php($input['version']);
|
$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 = $service->type_data;
|
||||||
$typeData['extensions'] = $typeData['extensions'] ?? [];
|
$typeData['extensions'] = $typeData['extensions'] ?? [];
|
||||||
$typeData['extensions'][] = $input['extension'];
|
$typeData['extensions'][] = $input['extension'];
|
||||||
$service->type_data = $typeData;
|
$service->type_data = $typeData;
|
||||||
$service->save();
|
$service->save();
|
||||||
|
|
||||||
dispatch(function () use ($service, $input) {
|
dispatch(
|
||||||
$service->handler()->installExtension($input['extension']);
|
/**
|
||||||
})->catch(function () use ($service, $input) {
|
* @throws SSHCommandError
|
||||||
$service->refresh();
|
*/
|
||||||
$typeData = $service->type_data;
|
function () use ($service, $input) {
|
||||||
$typeData['extensions'] = array_values(array_diff($typeData['extensions'], [$input['extension']]));
|
/** @var PHP $handler */
|
||||||
$service->type_data = $typeData;
|
$handler = $service->handler();
|
||||||
$service->save();
|
$handler->installExtension($input['extension']);
|
||||||
})->onConnection('ssh');
|
})->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;
|
return $service;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public static function rules(Server $server): array
|
||||||
* @throws ValidationException
|
|
||||||
*/
|
|
||||||
private function validate(Server $server, array $input): void
|
|
||||||
{
|
{
|
||||||
Validator::make($input, [
|
return [
|
||||||
'extension' => [
|
'extension' => [
|
||||||
'required',
|
'required',
|
||||||
'in:'.implode(',', config('core.php_extensions')),
|
Rule::in(config('core.php_extensions')),
|
||||||
],
|
],
|
||||||
'version' => [
|
'version' => [
|
||||||
'required',
|
'required',
|
||||||
Rule::in($server->installedPHPVersions()),
|
Rule::exists('services', 'version')
|
||||||
|
->where('server_id', $server->id)
|
||||||
|
->where('type', 'php'),
|
||||||
],
|
],
|
||||||
])->validate();
|
];
|
||||||
|
|
||||||
/** @var Service $service */
|
|
||||||
$service = $server->php($input['version']);
|
|
||||||
|
|
||||||
if (in_array($input['extension'], $service->type_data['extensions'])) {
|
|
||||||
throw ValidationException::withMessages(
|
|
||||||
['extension' => __('This extension already installed')]
|
|
||||||
)->errorBag('installPHPExtension');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,10 +2,12 @@
|
|||||||
|
|
||||||
namespace App\Actions\PHP;
|
namespace App\Actions\PHP;
|
||||||
|
|
||||||
|
use App\Enums\PHPIniType;
|
||||||
use App\Models\Server;
|
use App\Models\Server;
|
||||||
|
use Illuminate\Filesystem\FilesystemAdapter;
|
||||||
use Illuminate\Support\Facades\Storage;
|
use Illuminate\Support\Facades\Storage;
|
||||||
use Illuminate\Support\Facades\Validator;
|
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
|
use Illuminate\Validation\Rule;
|
||||||
use Illuminate\Validation\ValidationException;
|
use Illuminate\Validation\ValidationException;
|
||||||
use Throwable;
|
use Throwable;
|
||||||
|
|
||||||
@ -16,25 +18,23 @@ class UpdatePHPIni
|
|||||||
*/
|
*/
|
||||||
public function update(Server $server, array $input): void
|
public function update(Server $server, array $input): void
|
||||||
{
|
{
|
||||||
$this->validate($server, $input);
|
|
||||||
|
|
||||||
$service = $server->php($input['version']);
|
$service = $server->php($input['version']);
|
||||||
|
|
||||||
$tmpName = Str::random(10).strtotime('now');
|
$tmpName = Str::random(10).strtotime('now');
|
||||||
try {
|
try {
|
||||||
/** @var \Illuminate\Filesystem\FilesystemAdapter $storageDisk */
|
/** @var FilesystemAdapter $storageDisk */
|
||||||
$storageDisk = Storage::disk('local');
|
$storageDisk = Storage::disk('local');
|
||||||
|
|
||||||
$storageDisk->put($tmpName, $input['ini']);
|
$storageDisk->put($tmpName, $input['ini']);
|
||||||
$service->server->ssh('root')->upload(
|
$service->server->ssh('root')->upload(
|
||||||
$storageDisk->path($tmpName),
|
$storageDisk->path($tmpName),
|
||||||
"/etc/php/$service->version/cli/php.ini"
|
sprintf('/etc/php/%s/%s/php.ini', $service->version, $input['type'])
|
||||||
);
|
);
|
||||||
$this->deleteTempFile($tmpName);
|
$this->deleteTempFile($tmpName);
|
||||||
} catch (Throwable) {
|
} catch (Throwable) {
|
||||||
$this->deleteTempFile($tmpName);
|
$this->deleteTempFile($tmpName);
|
||||||
throw ValidationException::withMessages([
|
throw ValidationException::withMessages([
|
||||||
'ini' => __("Couldn't update php.ini file!"),
|
'ini' => __("Couldn't update php.ini (:type) file!", ['type' => $input['type']]),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -48,20 +48,23 @@ private function deleteTempFile(string $name): void
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function validate(Server $server, array $input): void
|
public static function rules(Server $server): array
|
||||||
{
|
{
|
||||||
Validator::make($input, [
|
return [
|
||||||
'ini' => [
|
'ini' => [
|
||||||
'required',
|
'required',
|
||||||
'string',
|
'string',
|
||||||
],
|
],
|
||||||
'version' => 'required|string',
|
'version' => [
|
||||||
])->validate();
|
'required',
|
||||||
|
Rule::exists('services', 'version')
|
||||||
if (! in_array($input['version'], $server->installedPHPVersions())) {
|
->where('server_id', $server->id)
|
||||||
throw ValidationException::withMessages(
|
->where('type', 'php'),
|
||||||
['version' => __('This version is not installed')]
|
],
|
||||||
);
|
'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);
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
@ -10,27 +10,38 @@ class CreateProject
|
|||||||
{
|
{
|
||||||
public function create(User $user, array $input): Project
|
public function create(User $user, array $input): Project
|
||||||
{
|
{
|
||||||
$this->validate($user, $input);
|
if (isset($input['name'])) {
|
||||||
|
$input['name'] = strtolower($input['name']);
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->validate($input);
|
||||||
|
|
||||||
$project = new Project([
|
$project = new Project([
|
||||||
'user_id' => $user->id,
|
|
||||||
'name' => $input['name'],
|
'name' => $input['name'],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$project->save();
|
$project->save();
|
||||||
|
|
||||||
|
$project->users()->attach($user);
|
||||||
|
|
||||||
return $project;
|
return $project;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function validate(User $user, array $input): void
|
public static function rules(): array
|
||||||
{
|
{
|
||||||
Validator::make($input, [
|
return [
|
||||||
'name' => [
|
'name' => [
|
||||||
'required',
|
'required',
|
||||||
'string',
|
'string',
|
||||||
'max:255',
|
'max:255',
|
||||||
'unique:projects,name,NULL,id,user_id,'.$user->id,
|
'unique:projects,name',
|
||||||
|
'lowercase:projects,name',
|
||||||
],
|
],
|
||||||
])->validate();
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
private function validate(array $input): void
|
||||||
|
{
|
||||||
|
Validator::make($input, self::rules())->validate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,12 +17,16 @@ public function delete(User $user, Project $project): void
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($user->current_project_id == $project->id) {
|
if ($user->current_project_id == $project->id) {
|
||||||
/** @var Project $randomProject */
|
throw ValidationException::withMessages([
|
||||||
$randomProject = $user->projects()->where('id', '!=', $project->id)->first();
|
'project' => __('Cannot delete your current project.'),
|
||||||
$user->current_project_id = $randomProject->id;
|
]);
|
||||||
$user->save();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @var Project $randomProject */
|
||||||
|
$randomProject = $user->projects()->where('project_id', '!=', $project->id)->first();
|
||||||
|
$user->current_project_id = $randomProject->id;
|
||||||
|
$user->save();
|
||||||
|
|
||||||
$project->delete();
|
$project->delete();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,10 @@ class UpdateProject
|
|||||||
{
|
{
|
||||||
public function update(Project $project, array $input): Project
|
public function update(Project $project, array $input): Project
|
||||||
{
|
{
|
||||||
|
if (isset($input['name'])) {
|
||||||
|
$input['name'] = strtolower($input['name']);
|
||||||
|
}
|
||||||
|
|
||||||
$this->validate($project, $input);
|
$this->validate($project, $input);
|
||||||
|
|
||||||
$project->name = $input['name'];
|
$project->name = $input['name'];
|
||||||
@ -19,15 +23,21 @@ public function update(Project $project, array $input): Project
|
|||||||
return $project;
|
return $project;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function validate(Project $project, array $input): void
|
public static function rules(Project $project): array
|
||||||
{
|
{
|
||||||
Validator::make($input, [
|
return [
|
||||||
'name' => [
|
'name' => [
|
||||||
'required',
|
'required',
|
||||||
'string',
|
'string',
|
||||||
'max:255',
|
'max:255',
|
||||||
Rule::unique('projects')->where('user_id', $project->user_id)->ignore($project->id),
|
Rule::unique('projects', 'name')->ignore($project->id),
|
||||||
|
'lowercase:projects,name',
|
||||||
],
|
],
|
||||||
])->validate();
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
private function validate(Project $project, array $input): void
|
||||||
|
{
|
||||||
|
Validator::make($input, self::rules($project))->validate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
use App\Models\Queue;
|
use App\Models\Queue;
|
||||||
use App\Models\Server;
|
use App\Models\Server;
|
||||||
use App\Models\Site;
|
use App\Models\Site;
|
||||||
use Illuminate\Support\Facades\Validator;
|
use Illuminate\Validation\Rule;
|
||||||
use Illuminate\Validation\ValidationException;
|
use Illuminate\Validation\ValidationException;
|
||||||
|
|
||||||
class CreateQueue
|
class CreateQueue
|
||||||
@ -16,15 +16,13 @@ class CreateQueue
|
|||||||
*/
|
*/
|
||||||
public function create(mixed $queueable, array $input): void
|
public function create(mixed $queueable, array $input): void
|
||||||
{
|
{
|
||||||
$this->validate($input);
|
|
||||||
|
|
||||||
$queue = new Queue([
|
$queue = new Queue([
|
||||||
'server_id' => $queueable instanceof Server ? $queueable->id : $queueable->server_id,
|
'server_id' => $queueable instanceof Server ? $queueable->id : $queueable->server_id,
|
||||||
'site_id' => $queueable instanceof Site ? $queueable->id : null,
|
'site_id' => $queueable instanceof Site ? $queueable->id : null,
|
||||||
'command' => $input['command'],
|
'command' => $input['command'],
|
||||||
'user' => $input['user'],
|
'user' => $input['user'],
|
||||||
'auto_start' => $input['auto_start'],
|
'auto_start' => $input['auto_start'] ? 1 : 0,
|
||||||
'auto_restart' => $input['auto_restart'],
|
'auto_restart' => $input['auto_restart'] ? 1 : 0,
|
||||||
'numprocs' => $input['numprocs'],
|
'numprocs' => $input['numprocs'],
|
||||||
'status' => QueueStatus::CREATING,
|
'status' => QueueStatus::CREATING,
|
||||||
]);
|
]);
|
||||||
@ -48,26 +46,18 @@ public function create(mixed $queueable, array $input): void
|
|||||||
})->onConnection('ssh');
|
})->onConnection('ssh');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public static function rules(Server $server): array
|
||||||
* @throws ValidationException
|
|
||||||
*/
|
|
||||||
protected function validate(array $input): void
|
|
||||||
{
|
{
|
||||||
$rules = [
|
return [
|
||||||
'command' => [
|
'command' => [
|
||||||
'required',
|
'required',
|
||||||
],
|
],
|
||||||
'user' => [
|
'user' => [
|
||||||
'required',
|
'required',
|
||||||
'in:root,'.config('core.ssh_user'),
|
Rule::in([
|
||||||
],
|
'root',
|
||||||
'auto_start' => [
|
$server->ssh_user,
|
||||||
'required',
|
]),
|
||||||
'in:0,1',
|
|
||||||
],
|
|
||||||
'auto_restart' => [
|
|
||||||
'required',
|
|
||||||
'in:0,1',
|
|
||||||
],
|
],
|
||||||
'numprocs' => [
|
'numprocs' => [
|
||||||
'required',
|
'required',
|
||||||
@ -75,7 +65,5 @@ protected function validate(array $input): void
|
|||||||
'min:1',
|
'min:1',
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
Validator::make($input, $rules)->validate();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,12 +3,15 @@
|
|||||||
namespace App\Actions\Queue;
|
namespace App\Actions\Queue;
|
||||||
|
|
||||||
use App\Models\Queue;
|
use App\Models\Queue;
|
||||||
|
use App\SSH\Services\ProcessManager\ProcessManager;
|
||||||
|
|
||||||
class DeleteQueue
|
class DeleteQueue
|
||||||
{
|
{
|
||||||
public function delete(Queue $queue): void
|
public function delete(Queue $queue): void
|
||||||
{
|
{
|
||||||
$queue->server->processManager()->handler()->delete($queue->id, $queue->site_id);
|
/** @var ProcessManager $processManager */
|
||||||
|
$processManager = $queue->server->processManager()->handler();
|
||||||
|
$processManager->delete($queue->id, $queue->site_id);
|
||||||
$queue->delete();
|
$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',
|
||||||
|
],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
@ -4,9 +4,10 @@
|
|||||||
|
|
||||||
use App\Enums\SslStatus;
|
use App\Enums\SslStatus;
|
||||||
use App\Enums\SslType;
|
use App\Enums\SslType;
|
||||||
|
use App\Models\ServerLog;
|
||||||
use App\Models\Site;
|
use App\Models\Site;
|
||||||
use App\Models\Ssl;
|
use App\Models\Ssl;
|
||||||
use Illuminate\Support\Facades\Validator;
|
use App\SSH\Services\Webserver\Webserver;
|
||||||
use Illuminate\Validation\Rule;
|
use Illuminate\Validation\Rule;
|
||||||
use Illuminate\Validation\ValidationException;
|
use Illuminate\Validation\ValidationException;
|
||||||
|
|
||||||
@ -17,7 +18,10 @@ class CreateSSL
|
|||||||
*/
|
*/
|
||||||
public function create(Site $site, array $input): void
|
public function create(Site $site, array $input): void
|
||||||
{
|
{
|
||||||
$this->validate($input);
|
$site->ssls()
|
||||||
|
->where('type', $input['type'])
|
||||||
|
->where('status', SslStatus::FAILED)
|
||||||
|
->delete();
|
||||||
|
|
||||||
$ssl = new Ssl([
|
$ssl = new Ssl([
|
||||||
'site_id' => $site->id,
|
'site_id' => $site->id,
|
||||||
@ -27,22 +31,27 @@ public function create(Site $site, array $input): void
|
|||||||
'expires_at' => $input['type'] === SslType::LETSENCRYPT ? now()->addMonths(3) : $input['expires_at'],
|
'expires_at' => $input['type'] === SslType::LETSENCRYPT ? now()->addMonths(3) : $input['expires_at'],
|
||||||
'status' => SslStatus::CREATING,
|
'status' => SslStatus::CREATING,
|
||||||
]);
|
]);
|
||||||
|
$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();
|
$ssl->save();
|
||||||
|
|
||||||
dispatch(function () use ($site, $ssl) {
|
dispatch(function () use ($site, $ssl) {
|
||||||
$site->server->webserver()->handler()->setupSSL($ssl);
|
/** @var Webserver $webserver */
|
||||||
|
$webserver = $site->server->webserver()->handler();
|
||||||
|
$webserver->setupSSL($ssl);
|
||||||
$ssl->status = SslStatus::CREATED;
|
$ssl->status = SslStatus::CREATED;
|
||||||
$ssl->save();
|
$ssl->save();
|
||||||
$site->type()->edit();
|
$site->type()->edit();
|
||||||
})->catch(function () use ($ssl) {
|
})->catch(function () use ($ssl) {
|
||||||
$ssl->delete();
|
$ssl->status = SslStatus::FAILED;
|
||||||
});
|
$ssl->save();
|
||||||
|
})->onConnection('ssh');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public static function rules(array $input): array
|
||||||
* @throws ValidationException
|
|
||||||
*/
|
|
||||||
protected function validate(array $input): void
|
|
||||||
{
|
{
|
||||||
$rules = [
|
$rules = [
|
||||||
'type' => [
|
'type' => [
|
||||||
@ -53,9 +62,13 @@ protected function validate(array $input): void
|
|||||||
if (isset($input['type']) && $input['type'] == SslType::CUSTOM) {
|
if (isset($input['type']) && $input['type'] == SslType::CUSTOM) {
|
||||||
$rules['certificate'] = 'required';
|
$rules['certificate'] = 'required';
|
||||||
$rules['private'] = 'required';
|
$rules['private'] = 'required';
|
||||||
$rules['expires_at'] = 'required|date_format:Y-m-d|after_or_equal:'.now();
|
$rules['expires_at'] = [
|
||||||
|
'required',
|
||||||
|
'date_format:Y-m-d',
|
||||||
|
'after_or_equal:'.now(),
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
Validator::make($input, $rules)->validate();
|
return $rules;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,12 +3,15 @@
|
|||||||
namespace App\Actions\SSL;
|
namespace App\Actions\SSL;
|
||||||
|
|
||||||
use App\Models\Ssl;
|
use App\Models\Ssl;
|
||||||
|
use App\SSH\Services\Webserver\Webserver;
|
||||||
|
|
||||||
class DeleteSSL
|
class DeleteSSL
|
||||||
{
|
{
|
||||||
public function delete(Ssl $ssl): void
|
public function delete(Ssl $ssl): void
|
||||||
{
|
{
|
||||||
$ssl->site->server->webserver()->handler()->removeSSL($ssl);
|
/** @var Webserver $webserver */
|
||||||
|
$webserver = $ssl->site->server->webserver()->handler();
|
||||||
|
$webserver->removeSSL($ssl);
|
||||||
$ssl->delete();
|
$ssl->delete();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
30
app/Actions/Script/CreateScript.php
Normal file
30
app/Actions/Script/CreateScript.php
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Actions\Script;
|
||||||
|
|
||||||
|
use App\Models\Script;
|
||||||
|
use App\Models\User;
|
||||||
|
|
||||||
|
class CreateScript
|
||||||
|
{
|
||||||
|
public function create(User $user, array $input): Script
|
||||||
|
{
|
||||||
|
$script = new Script([
|
||||||
|
'user_id' => $user->id,
|
||||||
|
'name' => $input['name'],
|
||||||
|
'content' => $input['content'],
|
||||||
|
'project_id' => isset($input['global']) && $input['global'] ? null : $user->current_project_id,
|
||||||
|
]);
|
||||||
|
$script->save();
|
||||||
|
|
||||||
|
return $script;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function rules(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'name' => ['required', 'string', 'max:255'],
|
||||||
|
'content' => ['required', 'string'],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
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'],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
69
app/Actions/Script/ExecuteScript.php
Normal file
69
app/Actions/Script/ExecuteScript.php
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
<?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
|
||||||
|
{
|
||||||
|
if (isset($input['server'])) {
|
||||||
|
/** @var ?Server $server */
|
||||||
|
$server = Server::query()->find($input['server']);
|
||||||
|
}
|
||||||
|
|
||||||
|
return [
|
||||||
|
'server' => [
|
||||||
|
'required',
|
||||||
|
Rule::exists('servers', 'id'),
|
||||||
|
],
|
||||||
|
'user' => [
|
||||||
|
'required',
|
||||||
|
Rule::in([
|
||||||
|
'root',
|
||||||
|
isset($server) ? $server?->ssh_user : null,
|
||||||
|
]),
|
||||||
|
],
|
||||||
|
'variables' => 'array',
|
||||||
|
'variables.*' => [
|
||||||
|
'required',
|
||||||
|
'string',
|
||||||
|
'max:255',
|
||||||
|
],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Actions\Server;
|
namespace App\Actions\Server;
|
||||||
|
|
||||||
|
use App\Enums\ServerStatus;
|
||||||
use App\Facades\Notifier;
|
use App\Facades\Notifier;
|
||||||
use App\Models\Server;
|
use App\Models\Server;
|
||||||
use App\Notifications\ServerDisconnected;
|
use App\Notifications\ServerDisconnected;
|
||||||
@ -15,12 +16,12 @@ public function check(Server $server): Server
|
|||||||
try {
|
try {
|
||||||
$server->ssh()->connect();
|
$server->ssh()->connect();
|
||||||
$server->refresh();
|
$server->refresh();
|
||||||
if ($status == 'disconnected') {
|
if (in_array($status, [ServerStatus::DISCONNECTED, ServerStatus::UPDATING])) {
|
||||||
$server->status = 'ready';
|
$server->status = ServerStatus::READY;
|
||||||
$server->save();
|
$server->save();
|
||||||
}
|
}
|
||||||
} catch (Throwable) {
|
} catch (Throwable) {
|
||||||
$server->status = 'disconnected';
|
$server->status = ServerStatus::DISCONNECTED;
|
||||||
$server->save();
|
$server->save();
|
||||||
Notifier::send($server, new ServerDisconnected($server));
|
Notifier::send($server, new ServerDisconnected($server));
|
||||||
}
|
}
|
||||||
|
@ -5,18 +5,18 @@
|
|||||||
use App\Enums\FirewallRuleStatus;
|
use App\Enums\FirewallRuleStatus;
|
||||||
use App\Enums\ServerProvider;
|
use App\Enums\ServerProvider;
|
||||||
use App\Enums\ServerStatus;
|
use App\Enums\ServerStatus;
|
||||||
use App\Exceptions\ServerProviderError;
|
use App\Enums\ServerType;
|
||||||
use App\Facades\Notifier;
|
use App\Facades\Notifier;
|
||||||
|
use App\Models\Project;
|
||||||
use App\Models\Server;
|
use App\Models\Server;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use App\Notifications\ServerInstallationFailed;
|
use App\Notifications\ServerInstallationFailed;
|
||||||
use App\Notifications\ServerInstallationSucceed;
|
use App\Notifications\ServerInstallationSucceed;
|
||||||
use App\ValidationRules\RestrictedIPAddressesRule;
|
use App\ValidationRules\RestrictedIPAddressesRule;
|
||||||
use Exception;
|
use Exception;
|
||||||
|
use Illuminate\Database\Query\Builder;
|
||||||
use Illuminate\Support\Facades\Bus;
|
use Illuminate\Support\Facades\Bus;
|
||||||
use Illuminate\Support\Facades\DB;
|
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
use Illuminate\Support\Facades\Validator;
|
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
use Illuminate\Validation\Rule;
|
use Illuminate\Validation\Rule;
|
||||||
use Illuminate\Validation\ValidationException;
|
use Illuminate\Validation\ValidationException;
|
||||||
@ -24,22 +24,17 @@
|
|||||||
|
|
||||||
class CreateServer
|
class CreateServer
|
||||||
{
|
{
|
||||||
/**
|
public function create(User $creator, Project $project, array $input): Server
|
||||||
* @throws Throwable
|
|
||||||
*/
|
|
||||||
public function create(User $creator, array $input): Server
|
|
||||||
{
|
{
|
||||||
$this->validateInputs($input);
|
|
||||||
|
|
||||||
$server = new Server([
|
$server = new Server([
|
||||||
'project_id' => $creator->currentProject->id,
|
'project_id' => $project->id,
|
||||||
'user_id' => $creator->id,
|
'user_id' => $creator->id,
|
||||||
'name' => $input['name'],
|
'name' => $input['name'],
|
||||||
'ssh_user' => config('core.server_providers_default_user')[$input['provider']][$input['os']],
|
'ssh_user' => config('core.server_providers_default_user')[$input['provider']][$input['os']],
|
||||||
'ip' => $input['ip'] ?? '',
|
'ip' => $input['ip'] ?? '',
|
||||||
'port' => $input['port'] ?? 22,
|
'port' => $input['port'] ?? 22,
|
||||||
'os' => $input['os'],
|
'os' => $input['os'],
|
||||||
'type' => $input['type'],
|
'type' => ServerType::REGULAR,
|
||||||
'provider' => $input['provider'],
|
'provider' => $input['provider'],
|
||||||
'authentication' => [
|
'authentication' => [
|
||||||
'user' => config('core.ssh_user'),
|
'user' => config('core.ssh_user'),
|
||||||
@ -50,18 +45,13 @@ public function create(User $creator, array $input): Server
|
|||||||
'progress_step' => 'Initializing',
|
'progress_step' => 'Initializing',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
DB::beginTransaction();
|
|
||||||
try {
|
try {
|
||||||
if ($server->provider != 'custom') {
|
if ($server->provider != 'custom') {
|
||||||
$server->provider_id = $input['server_provider'];
|
$server->provider_id = $input['server_provider'];
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate type
|
|
||||||
$this->validateType($server, $input);
|
|
||||||
$server->type_data = $server->type()->data($input);
|
$server->type_data = $server->type()->data($input);
|
||||||
|
|
||||||
// validate provider
|
|
||||||
$this->validateProvider($server, $input);
|
|
||||||
$server->provider_data = $server->provider()->data($input);
|
$server->provider_data = $server->provider()->data($input);
|
||||||
|
|
||||||
// save
|
// save
|
||||||
@ -79,18 +69,13 @@ public function create(User $creator, array $input): Server
|
|||||||
// install server
|
// install server
|
||||||
$this->install($server);
|
$this->install($server);
|
||||||
|
|
||||||
DB::commit();
|
|
||||||
|
|
||||||
return $server;
|
return $server;
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$server->provider()->delete();
|
$server->delete();
|
||||||
DB::rollBack();
|
|
||||||
if ($e instanceof ServerProviderError) {
|
throw ValidationException::withMessages([
|
||||||
throw ValidationException::withMessages([
|
'provider' => $e->getMessage(),
|
||||||
'provider' => __('Provider Error: ').$e->getMessage(),
|
]);
|
||||||
]);
|
|
||||||
}
|
|
||||||
throw $e;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -126,62 +111,85 @@ function () use ($server) {
|
|||||||
$bus->onConnection('ssh')->dispatch();
|
$bus->onConnection('ssh')->dispatch();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public static function rules(Project $project, array $input): array
|
||||||
* @throws ValidationException
|
|
||||||
*/
|
|
||||||
private function validateInputs(array $input): void
|
|
||||||
{
|
{
|
||||||
$rules = [
|
$rules = [
|
||||||
'provider' => 'required|in:'.implode(',', config('core.server_providers')),
|
'provider' => [
|
||||||
'name' => 'required',
|
|
||||||
'os' => 'required|in:'.implode(',', config('core.operating_systems')),
|
|
||||||
'type' => [
|
|
||||||
'required',
|
'required',
|
||||||
Rule::in(config('core.server_types')),
|
Rule::in(config('core.server_providers')),
|
||||||
|
],
|
||||||
|
'name' => [
|
||||||
|
'required',
|
||||||
|
],
|
||||||
|
'os' => [
|
||||||
|
'required',
|
||||||
|
Rule::in(config('core.operating_systems')),
|
||||||
|
],
|
||||||
|
'server_provider' => [
|
||||||
|
Rule::when(function () use ($input) {
|
||||||
|
return isset($input['provider']) && $input['provider'] != ServerProvider::CUSTOM;
|
||||||
|
}, [
|
||||||
|
'required',
|
||||||
|
Rule::exists('server_providers', 'id')->where(function (Builder $query) use ($project) {
|
||||||
|
$query->where('project_id', $project->id)
|
||||||
|
->orWhereNull('project_id');
|
||||||
|
}),
|
||||||
|
]),
|
||||||
|
],
|
||||||
|
'ip' => [
|
||||||
|
Rule::when(function () use ($input) {
|
||||||
|
return isset($input['provider']) && $input['provider'] == ServerProvider::CUSTOM;
|
||||||
|
}, [
|
||||||
|
'required',
|
||||||
|
new RestrictedIPAddressesRule,
|
||||||
|
]),
|
||||||
|
],
|
||||||
|
'port' => [
|
||||||
|
Rule::when(function () use ($input) {
|
||||||
|
return isset($input['provider']) && $input['provider'] == ServerProvider::CUSTOM;
|
||||||
|
}, [
|
||||||
|
'required',
|
||||||
|
'numeric',
|
||||||
|
'min:1',
|
||||||
|
'max:65535',
|
||||||
|
]),
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
Validator::make($input, $rules)->validate();
|
return array_merge($rules, self::typeRules($input), self::providerRules($input));
|
||||||
|
}
|
||||||
|
|
||||||
if ($input['provider'] != 'custom') {
|
private static function typeRules(array $input): array
|
||||||
$rules['server_provider'] = 'required|exists:server_providers,id,user_id,'.auth()->user()->id;
|
{
|
||||||
|
if (! isset($input['type']) || ! in_array($input['type'], config('core.server_types'))) {
|
||||||
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($input['provider'] == 'custom') {
|
$server = new Server(['type' => $input['type']]);
|
||||||
$rules['ip'] = [
|
|
||||||
'required',
|
return $server->type()->createRules($input);
|
||||||
new RestrictedIPAddressesRule(),
|
}
|
||||||
];
|
|
||||||
$rules['port'] = [
|
private static function providerRules(array $input): array
|
||||||
'required',
|
{
|
||||||
'numeric',
|
if (
|
||||||
'min:1',
|
! isset($input['provider']) ||
|
||||||
'max:65535',
|
! isset($input['server_provider']) ||
|
||||||
];
|
! in_array($input['provider'], config('core.server_providers')) ||
|
||||||
|
$input['provider'] == ServerProvider::CUSTOM
|
||||||
|
) {
|
||||||
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
Validator::make($input, $rules)->validate();
|
$server = new Server([
|
||||||
|
'provider' => $input['provider'],
|
||||||
|
'provider_id' => $input['server_provider'],
|
||||||
|
]);
|
||||||
|
|
||||||
|
return $server->provider()->createRules($input);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public function createFirewallRules(Server $server): void
|
||||||
* @throws ValidationException
|
|
||||||
*/
|
|
||||||
private function validateType(Server $server, array $input): void
|
|
||||||
{
|
|
||||||
Validator::make($input, $server->type()->createRules($input))
|
|
||||||
->validate();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @throws ValidationException
|
|
||||||
*/
|
|
||||||
private function validateProvider(Server $server, array $input): void
|
|
||||||
{
|
|
||||||
Validator::make($input, $server->provider()->createRules($input))
|
|
||||||
->validate();
|
|
||||||
}
|
|
||||||
|
|
||||||
private function createFirewallRules(Server $server): void
|
|
||||||
{
|
{
|
||||||
$server->firewallRules()->createMany([
|
$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\Models\Server;
|
||||||
use App\ValidationRules\RestrictedIPAddressesRule;
|
use App\ValidationRules\RestrictedIPAddressesRule;
|
||||||
use Illuminate\Support\Facades\Validator;
|
use Illuminate\Validation\Rule;
|
||||||
use Illuminate\Validation\ValidationException;
|
use Illuminate\Validation\ValidationException;
|
||||||
|
|
||||||
class EditServer
|
class EditServer
|
||||||
@ -14,8 +14,6 @@ class EditServer
|
|||||||
*/
|
*/
|
||||||
public function edit(Server $server, array $input): Server
|
public function edit(Server $server, array $input): Server
|
||||||
{
|
{
|
||||||
$this->validate($input);
|
|
||||||
|
|
||||||
$checkConnection = false;
|
$checkConnection = false;
|
||||||
if (isset($input['name'])) {
|
if (isset($input['name'])) {
|
||||||
$server->name = $input['name'];
|
$server->name = $input['name'];
|
||||||
@ -41,15 +39,24 @@ public function edit(Server $server, array $input): Server
|
|||||||
return $server;
|
return $server;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public static function rules(Server $server): array
|
||||||
* @throws ValidationException
|
|
||||||
*/
|
|
||||||
protected function validate(array $input): void
|
|
||||||
{
|
{
|
||||||
Validator::make($input, [
|
return [
|
||||||
'ip' => [
|
'name' => [
|
||||||
new RestrictedIPAddressesRule(),
|
'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),
|
||||||
|
],
|
||||||
|
'port' => [
|
||||||
|
'integer',
|
||||||
|
'min:1',
|
||||||
|
'max:65535',
|
||||||
|
],
|
||||||
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
25
app/Actions/Server/Update.php
Normal file
25
app/Actions/Server/Update.php
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Actions\Server;
|
||||||
|
|
||||||
|
use App\Enums\ServerStatus;
|
||||||
|
use App\Facades\Notifier;
|
||||||
|
use App\Models\Server;
|
||||||
|
use App\Notifications\ServerUpdateFailed;
|
||||||
|
|
||||||
|
class Update
|
||||||
|
{
|
||||||
|
public function update(Server $server): void
|
||||||
|
{
|
||||||
|
$server->status = ServerStatus::UPDATING;
|
||||||
|
$server->save();
|
||||||
|
dispatch(function () use ($server) {
|
||||||
|
$server->os()->upgrade();
|
||||||
|
$server->checkConnection();
|
||||||
|
$server->checkForUpdates();
|
||||||
|
})->catch(function () use ($server) {
|
||||||
|
Notifier::send($server, new ServerUpdateFailed($server));
|
||||||
|
$server->checkConnection();
|
||||||
|
})->onConnection('ssh');
|
||||||
|
}
|
||||||
|
}
|
@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
namespace App\Actions\ServerProvider;
|
namespace App\Actions\ServerProvider;
|
||||||
|
|
||||||
|
use App\Models\Project;
|
||||||
use App\Models\ServerProvider;
|
use App\Models\ServerProvider;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use App\ServerProviders\ServerProvider as ServerProviderContract;
|
use App\ServerProviders\ServerProvider as ServerProviderContract;
|
||||||
use Exception;
|
use Exception;
|
||||||
use Illuminate\Support\Facades\Validator;
|
|
||||||
use Illuminate\Validation\Rule;
|
use Illuminate\Validation\Rule;
|
||||||
use Illuminate\Validation\ValidationException;
|
use Illuminate\Validation\ValidationException;
|
||||||
|
|
||||||
@ -15,13 +15,9 @@ class CreateServerProvider
|
|||||||
/**
|
/**
|
||||||
* @throws ValidationException
|
* @throws ValidationException
|
||||||
*/
|
*/
|
||||||
public function create(User $user, array $input): ServerProvider
|
public function create(User $user, Project $project, array $input): ServerProvider
|
||||||
{
|
{
|
||||||
$this->validateInput($input);
|
$provider = static::getProvider($input['provider']);
|
||||||
|
|
||||||
$provider = $this->getProvider($input['provider']);
|
|
||||||
|
|
||||||
$this->validateProvider($provider, $input);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$provider->connect($input);
|
$provider->connect($input);
|
||||||
@ -33,29 +29,27 @@ public function create(User $user, array $input): ServerProvider
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$serverProvider = new ServerProvider();
|
$serverProvider = new ServerProvider;
|
||||||
$serverProvider->user_id = $user->id;
|
$serverProvider->user_id = $user->id;
|
||||||
$serverProvider->profile = $input['name'];
|
$serverProvider->profile = $input['name'];
|
||||||
$serverProvider->provider = $input['provider'];
|
$serverProvider->provider = $input['provider'];
|
||||||
$serverProvider->credentials = $provider->credentialData($input);
|
$serverProvider->credentials = $provider->credentialData($input);
|
||||||
|
$serverProvider->project_id = isset($input['global']) && $input['global'] ? null : $project->id;
|
||||||
$serverProvider->save();
|
$serverProvider->save();
|
||||||
|
|
||||||
return $serverProvider;
|
return $serverProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getProvider($name): ServerProviderContract
|
private static function getProvider($name): ServerProviderContract
|
||||||
{
|
{
|
||||||
$providerClass = config('core.server_providers_class.'.$name);
|
$providerClass = config('core.server_providers_class.'.$name);
|
||||||
|
|
||||||
return new $providerClass();
|
return new $providerClass;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public static function rules(array $input): array
|
||||||
* @throws ValidationException
|
|
||||||
*/
|
|
||||||
private function validateInput(array $input): void
|
|
||||||
{
|
{
|
||||||
Validator::make($input, [
|
$rules = [
|
||||||
'name' => [
|
'name' => [
|
||||||
'required',
|
'required',
|
||||||
],
|
],
|
||||||
@ -64,14 +58,17 @@ private function validateInput(array $input): void
|
|||||||
Rule::in(config('core.server_providers')),
|
Rule::in(config('core.server_providers')),
|
||||||
Rule::notIn('custom'),
|
Rule::notIn('custom'),
|
||||||
],
|
],
|
||||||
])->validate();
|
];
|
||||||
|
|
||||||
|
return array_merge($rules, static::providerRules($input));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
private static function providerRules(array $input): array
|
||||||
* @throws ValidationException
|
|
||||||
*/
|
|
||||||
private function validateProvider(ServerProviderContract $provider, array $input): void
|
|
||||||
{
|
{
|
||||||
Validator::make($input, $provider->credentialValidationRules($input))->validate();
|
if (! isset($input['provider'])) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
return static::getProvider($input['provider'])->credentialValidationRules($input);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,17 +3,16 @@
|
|||||||
namespace App\Actions\ServerProvider;
|
namespace App\Actions\ServerProvider;
|
||||||
|
|
||||||
use App\Models\ServerProvider;
|
use App\Models\ServerProvider;
|
||||||
use Exception;
|
use Illuminate\Validation\ValidationException;
|
||||||
|
|
||||||
class DeleteServerProvider
|
class DeleteServerProvider
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
|
||||||
public function delete(ServerProvider $serverProvider): void
|
public function delete(ServerProvider $serverProvider): void
|
||||||
{
|
{
|
||||||
if ($serverProvider->servers()->exists()) {
|
if ($serverProvider->servers()->exists()) {
|
||||||
throw new Exception('This server provider is being used by a server.');
|
throw ValidationException::withMessages([
|
||||||
|
'provider' => 'This server provider is being used by a server.',
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$serverProvider->delete();
|
$serverProvider->delete();
|
||||||
|
28
app/Actions/ServerProvider/EditServerProvider.php
Normal file
28
app/Actions/ServerProvider/EditServerProvider.php
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Actions\ServerProvider;
|
||||||
|
|
||||||
|
use App\Models\Project;
|
||||||
|
use App\Models\ServerProvider;
|
||||||
|
|
||||||
|
class EditServerProvider
|
||||||
|
{
|
||||||
|
public function edit(ServerProvider $serverProvider, Project $project, array $input): ServerProvider
|
||||||
|
{
|
||||||
|
$serverProvider->profile = $input['name'];
|
||||||
|
$serverProvider->project_id = isset($input['global']) && $input['global'] ? null : $project->id;
|
||||||
|
|
||||||
|
$serverProvider->save();
|
||||||
|
|
||||||
|
return $serverProvider;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function rules(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'name' => [
|
||||||
|
'required',
|
||||||
|
],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
60
app/Actions/Service/Install.php
Normal file
60
app/Actions/Service/Install.php
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Actions\Service;
|
||||||
|
|
||||||
|
use App\Enums\ServiceStatus;
|
||||||
|
use App\Models\Server;
|
||||||
|
use App\Models\Service;
|
||||||
|
use Illuminate\Support\Facades\Validator;
|
||||||
|
use Illuminate\Validation\Rule;
|
||||||
|
|
||||||
|
class Install
|
||||||
|
{
|
||||||
|
public function install(Server $server, array $input): Service
|
||||||
|
{
|
||||||
|
$input['type'] = config('core.service_types')[$input['name']];
|
||||||
|
|
||||||
|
$service = new Service([
|
||||||
|
'server_id' => $server->id,
|
||||||
|
'name' => $input['name'],
|
||||||
|
'type' => $input['type'],
|
||||||
|
'version' => $input['version'],
|
||||||
|
'status' => ServiceStatus::INSTALLING,
|
||||||
|
]);
|
||||||
|
|
||||||
|
Validator::make($input, $service->handler()->creationRules($input))->validate();
|
||||||
|
|
||||||
|
$service->type_data = $service->handler()->creationData($input);
|
||||||
|
|
||||||
|
$service->save();
|
||||||
|
|
||||||
|
dispatch(function () use ($service) {
|
||||||
|
$service->handler()->install();
|
||||||
|
$service->status = ServiceStatus::READY;
|
||||||
|
$service->save();
|
||||||
|
})->catch(function () use ($service) {
|
||||||
|
$service->status = ServiceStatus::INSTALLATION_FAILED;
|
||||||
|
$service->save();
|
||||||
|
})->onConnection('ssh');
|
||||||
|
|
||||||
|
return $service;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function rules(array $input): array
|
||||||
|
{
|
||||||
|
$rules = [
|
||||||
|
'name' => [
|
||||||
|
'required',
|
||||||
|
Rule::in(array_keys(config('core.service_types'))),
|
||||||
|
],
|
||||||
|
'version' => [
|
||||||
|
'required',
|
||||||
|
],
|
||||||
|
];
|
||||||
|
if (isset($input['name'])) {
|
||||||
|
$rules['version'][] = Rule::in(config("core.service_versions.{$input['name']}"));
|
||||||
|
}
|
||||||
|
|
||||||
|
return $rules;
|
||||||
|
}
|
||||||
|
}
|
31
app/Actions/Service/Uninstall.php
Normal file
31
app/Actions/Service/Uninstall.php
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Actions\Service;
|
||||||
|
|
||||||
|
use App\Enums\ServiceStatus;
|
||||||
|
use App\Models\Service;
|
||||||
|
use Illuminate\Support\Facades\Validator;
|
||||||
|
|
||||||
|
class Uninstall
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* @TODO: Implement the uninstaller for all service handlers
|
||||||
|
*/
|
||||||
|
public function uninstall(Service $service): void
|
||||||
|
{
|
||||||
|
Validator::make([
|
||||||
|
'service' => $service->id,
|
||||||
|
], $service->handler()->deletionRules())->validate();
|
||||||
|
|
||||||
|
$service->status = ServiceStatus::UNINSTALLING;
|
||||||
|
$service->save();
|
||||||
|
|
||||||
|
dispatch(function () use ($service) {
|
||||||
|
$service->handler()->uninstall();
|
||||||
|
$service->delete();
|
||||||
|
})->catch(function () use ($service) {
|
||||||
|
$service->status = ServiceStatus::FAILED;
|
||||||
|
$service->save();
|
||||||
|
})->onConnection('ssh');
|
||||||
|
}
|
||||||
|
}
|
@ -3,6 +3,8 @@
|
|||||||
namespace App\Actions\Site;
|
namespace App\Actions\Site;
|
||||||
|
|
||||||
use App\Enums\SiteStatus;
|
use App\Enums\SiteStatus;
|
||||||
|
use App\Exceptions\RepositoryNotFound;
|
||||||
|
use App\Exceptions\RepositoryPermissionDenied;
|
||||||
use App\Exceptions\SourceControlIsNotConnected;
|
use App\Exceptions\SourceControlIsNotConnected;
|
||||||
use App\Facades\Notifier;
|
use App\Facades\Notifier;
|
||||||
use App\Models\Server;
|
use App\Models\Server;
|
||||||
@ -12,27 +14,20 @@
|
|||||||
use App\ValidationRules\DomainRule;
|
use App\ValidationRules\DomainRule;
|
||||||
use Exception;
|
use Exception;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
use Illuminate\Support\Facades\Validator;
|
|
||||||
use Illuminate\Validation\Rule;
|
use Illuminate\Validation\Rule;
|
||||||
use Illuminate\Validation\ValidationException;
|
use Illuminate\Validation\ValidationException;
|
||||||
|
|
||||||
class CreateSite
|
class CreateSite
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* @throws SourceControlIsNotConnected
|
|
||||||
* @throws ValidationException
|
|
||||||
*/
|
|
||||||
public function create(Server $server, array $input): Site
|
public function create(Server $server, array $input): Site
|
||||||
{
|
{
|
||||||
$this->validateInputs($server, $input);
|
|
||||||
|
|
||||||
DB::beginTransaction();
|
DB::beginTransaction();
|
||||||
try {
|
try {
|
||||||
$site = new Site([
|
$site = new Site([
|
||||||
'server_id' => $server->id,
|
'server_id' => $server->id,
|
||||||
'type' => $input['type'],
|
'type' => $input['type'],
|
||||||
'domain' => $input['domain'],
|
'domain' => $input['domain'],
|
||||||
'aliases' => isset($input['alias']) ? [$input['alias']] : [],
|
'aliases' => $input['aliases'] ?? [],
|
||||||
'path' => '/home/'.$server->getSshUser().'/'.$input['domain'],
|
'path' => '/home/'.$server->getSshUser().'/'.$input['domain'],
|
||||||
'status' => SiteStatus::INSTALLING,
|
'status' => SiteStatus::INSTALLING,
|
||||||
]);
|
]);
|
||||||
@ -42,18 +37,23 @@ public function create(Server $server, array $input): Site
|
|||||||
|
|
||||||
// check has access to repository
|
// check has access to repository
|
||||||
try {
|
try {
|
||||||
if ($site->sourceControl()) {
|
if ($site->sourceControl) {
|
||||||
$site->sourceControl()->getRepo($site->repository);
|
$site->sourceControl?->getRepo($site->repository);
|
||||||
}
|
}
|
||||||
} catch (SourceControlIsNotConnected) {
|
} catch (SourceControlIsNotConnected) {
|
||||||
throw ValidationException::withMessages([
|
throw ValidationException::withMessages([
|
||||||
'source_control' => __('Source control is not connected'),
|
'source_control' => 'Source control is not connected',
|
||||||
|
]);
|
||||||
|
} catch (RepositoryPermissionDenied) {
|
||||||
|
throw ValidationException::withMessages([
|
||||||
|
'repository' => 'You do not have permission to access this repository',
|
||||||
|
]);
|
||||||
|
} catch (RepositoryNotFound) {
|
||||||
|
throw ValidationException::withMessages([
|
||||||
|
'repository' => 'Repository not found',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate type
|
|
||||||
$this->validateType($site, $input);
|
|
||||||
|
|
||||||
// set type data
|
// set type data
|
||||||
$site->type_data = $site->type()->data($input);
|
$site->type_data = $site->type()->data($input);
|
||||||
|
|
||||||
@ -85,14 +85,13 @@ public function create(Server $server, array $input): Site
|
|||||||
return $site;
|
return $site;
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
DB::rollBack();
|
DB::rollBack();
|
||||||
throw $e;
|
throw ValidationException::withMessages([
|
||||||
|
'type' => $e->getMessage(),
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public static function rules(Server $server, array $input): array
|
||||||
* @throws ValidationException
|
|
||||||
*/
|
|
||||||
private function validateInputs(Server $server, array $input): void
|
|
||||||
{
|
{
|
||||||
$rules = [
|
$rules = [
|
||||||
'type' => [
|
'type' => [
|
||||||
@ -101,26 +100,30 @@ private function validateInputs(Server $server, array $input): void
|
|||||||
],
|
],
|
||||||
'domain' => [
|
'domain' => [
|
||||||
'required',
|
'required',
|
||||||
new DomainRule(),
|
new DomainRule,
|
||||||
Rule::unique('sites', 'domain')->where(function ($query) use ($server) {
|
Rule::unique('sites', 'domain')->where(function ($query) use ($server) {
|
||||||
return $query->where('server_id', $server->id);
|
return $query->where('server_id', $server->id);
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
'alias' => [
|
'aliases.*' => [
|
||||||
new DomainRule(),
|
new DomainRule,
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
Validator::make($input, $rules)->validate();
|
return array_merge($rules, self::typeRules($server, $input));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
private static function typeRules(Server $server, array $input): array
|
||||||
* @throws ValidationException
|
|
||||||
*/
|
|
||||||
private function validateType(Site $site, array $input): void
|
|
||||||
{
|
{
|
||||||
$rules = $site->type()->createRules($input);
|
if (! isset($input['type']) || ! in_array($input['type'], config('core.site_types'))) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
Validator::make($input, $rules)->validate();
|
$site = new Site([
|
||||||
|
'server_id' => $server->id,
|
||||||
|
'type' => $input['type']]
|
||||||
|
);
|
||||||
|
|
||||||
|
return $site->type()->createRules($input);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,12 +3,15 @@
|
|||||||
namespace App\Actions\Site;
|
namespace App\Actions\Site;
|
||||||
|
|
||||||
use App\Models\Site;
|
use App\Models\Site;
|
||||||
|
use App\SSH\Services\Webserver\Webserver;
|
||||||
|
|
||||||
class DeleteSite
|
class DeleteSite
|
||||||
{
|
{
|
||||||
public function delete(Site $site): void
|
public function delete(Site $site): void
|
||||||
{
|
{
|
||||||
$site->server->webserver()->handler()->deleteSite($site);
|
/** @var Webserver $webserverHandler */
|
||||||
|
$webserverHandler = $site->server->webserver()->handler();
|
||||||
|
$webserverHandler->deleteSite($site);
|
||||||
$site->delete();
|
$site->delete();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
use App\Exceptions\DeploymentScriptIsEmptyException;
|
use App\Exceptions\DeploymentScriptIsEmptyException;
|
||||||
use App\Exceptions\SourceControlIsNotConnected;
|
use App\Exceptions\SourceControlIsNotConnected;
|
||||||
use App\Models\Deployment;
|
use App\Models\Deployment;
|
||||||
|
use App\Models\ServerLog;
|
||||||
use App\Models\Site;
|
use App\Models\Site;
|
||||||
|
|
||||||
class Deploy
|
class Deploy
|
||||||
@ -16,12 +17,12 @@ class Deploy
|
|||||||
*/
|
*/
|
||||||
public function run(Site $site): Deployment
|
public function run(Site $site): Deployment
|
||||||
{
|
{
|
||||||
if ($site->sourceControl()) {
|
if ($site->sourceControl) {
|
||||||
$site->sourceControl()->getRepo($site->repository);
|
$site->sourceControl->getRepo($site->repository);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $site->deploymentScript?->content) {
|
if (! $site->deploymentScript?->content) {
|
||||||
throw new DeploymentScriptIsEmptyException();
|
throw new DeploymentScriptIsEmptyException;
|
||||||
}
|
}
|
||||||
|
|
||||||
$deployment = new Deployment([
|
$deployment = new Deployment([
|
||||||
@ -29,7 +30,7 @@ public function run(Site $site): Deployment
|
|||||||
'deployment_script_id' => $site->deploymentScript->id,
|
'deployment_script_id' => $site->deploymentScript->id,
|
||||||
'status' => DeploymentStatus::DEPLOYING,
|
'status' => DeploymentStatus::DEPLOYING,
|
||||||
]);
|
]);
|
||||||
$lastCommit = $site->sourceControl()->provider()->getLastCommit($site->repository, $site->branch);
|
$lastCommit = $site->sourceControl?->provider()?->getLastCommit($site->repository, $site->branch);
|
||||||
if ($lastCommit) {
|
if ($lastCommit) {
|
||||||
$deployment->commit_id = $lastCommit['commit_id'];
|
$deployment->commit_id = $lastCommit['commit_id'];
|
||||||
$deployment->commit_data = $lastCommit['commit_data'];
|
$deployment->commit_data = $lastCommit['commit_data'];
|
||||||
@ -37,10 +38,20 @@ public function run(Site $site): Deployment
|
|||||||
$deployment->save();
|
$deployment->save();
|
||||||
|
|
||||||
dispatch(function () use ($site, $deployment) {
|
dispatch(function () use ($site, $deployment) {
|
||||||
$log = $site->server->os()->runScript($site->path, $site->deploymentScript->content, $site->id);
|
/** @var ServerLog $log */
|
||||||
$deployment->status = DeploymentStatus::FINISHED;
|
$log = ServerLog::make($site->server, 'deploy-'.strtotime('now'))
|
||||||
|
->forSite($site);
|
||||||
|
$log->save();
|
||||||
$deployment->log_id = $log->id;
|
$deployment->log_id = $log->id;
|
||||||
$deployment->save();
|
$deployment->save();
|
||||||
|
$site->server->os()->runScript(
|
||||||
|
path: $site->path,
|
||||||
|
script: $site->deploymentScript->content,
|
||||||
|
serverLog: $log,
|
||||||
|
variables: $site->environmentVariables($deployment)
|
||||||
|
);
|
||||||
|
$deployment->status = DeploymentStatus::FINISHED;
|
||||||
|
$deployment->save();
|
||||||
})->catch(function () use ($deployment) {
|
})->catch(function () use ($deployment) {
|
||||||
$deployment->status = DeploymentStatus::FAILED;
|
$deployment->status = DeploymentStatus::FAILED;
|
||||||
$deployment->save();
|
$deployment->save();
|
||||||
|
30
app/Actions/Site/UpdateAliases.php
Normal file
30
app/Actions/Site/UpdateAliases.php
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Actions\Site;
|
||||||
|
|
||||||
|
use App\Models\Site;
|
||||||
|
use App\SSH\Services\Webserver\Webserver;
|
||||||
|
use App\ValidationRules\DomainRule;
|
||||||
|
|
||||||
|
class UpdateAliases
|
||||||
|
{
|
||||||
|
public function update(Site $site, array $input): void
|
||||||
|
{
|
||||||
|
$site->aliases = $input['aliases'] ?? [];
|
||||||
|
|
||||||
|
/** @var Webserver $webserver */
|
||||||
|
$webserver = $site->server->webserver()->handler();
|
||||||
|
$webserver->updateVHost($site, ! $site->hasSSL());
|
||||||
|
|
||||||
|
$site->save();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function rules(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'aliases.*' => [
|
||||||
|
new DomainRule,
|
||||||
|
],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
use App\Models\Site;
|
use App\Models\Site;
|
||||||
use App\SSH\Git\Git;
|
use App\SSH\Git\Git;
|
||||||
use Illuminate\Support\Facades\Validator;
|
|
||||||
use Illuminate\Validation\ValidationException;
|
use Illuminate\Validation\ValidationException;
|
||||||
|
|
||||||
class UpdateBranch
|
class UpdateBranch
|
||||||
@ -14,7 +13,6 @@ class UpdateBranch
|
|||||||
*/
|
*/
|
||||||
public function update(Site $site, array $input): void
|
public function update(Site $site, array $input): void
|
||||||
{
|
{
|
||||||
$this->validate($input);
|
|
||||||
$site->branch = $input['branch'];
|
$site->branch = $input['branch'];
|
||||||
app(Git::class)->checkout($site);
|
app(Git::class)->checkout($site);
|
||||||
$site->save();
|
$site->save();
|
||||||
@ -23,10 +21,10 @@ public function update(Site $site, array $input): void
|
|||||||
/**
|
/**
|
||||||
* @throws ValidationException
|
* @throws ValidationException
|
||||||
*/
|
*/
|
||||||
protected function validate(array $input): void
|
public static function rules(): array
|
||||||
{
|
{
|
||||||
Validator::make($input, [
|
return [
|
||||||
'branch' => 'required',
|
'branch' => 'required',
|
||||||
]);
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
namespace App\Actions\Site;
|
namespace App\Actions\Site;
|
||||||
|
|
||||||
use App\Models\Site;
|
use App\Models\Site;
|
||||||
use Illuminate\Support\Facades\Validator;
|
|
||||||
use Illuminate\Validation\ValidationException;
|
use Illuminate\Validation\ValidationException;
|
||||||
|
|
||||||
class UpdateDeploymentScript
|
class UpdateDeploymentScript
|
||||||
@ -13,8 +12,6 @@ class UpdateDeploymentScript
|
|||||||
*/
|
*/
|
||||||
public function update(Site $site, array $input): void
|
public function update(Site $site, array $input): void
|
||||||
{
|
{
|
||||||
$this->validate($input);
|
|
||||||
|
|
||||||
$site->deploymentScript()->update([
|
$site->deploymentScript()->update([
|
||||||
'content' => $input['script'],
|
'content' => $input['script'],
|
||||||
]);
|
]);
|
||||||
@ -23,10 +20,10 @@ public function update(Site $site, array $input): void
|
|||||||
/**
|
/**
|
||||||
* @throws ValidationException
|
* @throws ValidationException
|
||||||
*/
|
*/
|
||||||
protected function validate(array $input): void
|
public static function rules(): array
|
||||||
{
|
{
|
||||||
Validator::make($input, [
|
return [
|
||||||
'script' => 'required',
|
'script' => ['required', 'string'],
|
||||||
]);
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,10 +2,14 @@
|
|||||||
|
|
||||||
namespace App\Actions\Site;
|
namespace App\Actions\Site;
|
||||||
|
|
||||||
|
use App\Exceptions\SSHUploadFailed;
|
||||||
use App\Models\Site;
|
use App\Models\Site;
|
||||||
|
|
||||||
class UpdateEnv
|
class UpdateEnv
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @throws SSHUploadFailed
|
||||||
|
*/
|
||||||
public function update(Site $site, array $input): void
|
public function update(Site $site, array $input): void
|
||||||
{
|
{
|
||||||
$site->server->os()->editFile(
|
$site->server->os()->editFile(
|
||||||
|
26
app/Actions/Site/UpdatePHPVersion.php
Normal file
26
app/Actions/Site/UpdatePHPVersion.php
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Actions\Site;
|
||||||
|
|
||||||
|
use App\Models\Site;
|
||||||
|
use Illuminate\Validation\Rule;
|
||||||
|
|
||||||
|
class UpdatePHPVersion
|
||||||
|
{
|
||||||
|
public static function rules(Site $site): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'version' => [
|
||||||
|
'required',
|
||||||
|
Rule::exists('services', 'version')
|
||||||
|
->where('server_id', $site->server_id)
|
||||||
|
->where('type', 'php'),
|
||||||
|
],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function update(Site $site, array $input): void
|
||||||
|
{
|
||||||
|
$site->changePHPVersion($input['version']);
|
||||||
|
}
|
||||||
|
}
|
46
app/Actions/Site/UpdateSourceControl.php
Normal file
46
app/Actions/Site/UpdateSourceControl.php
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Actions\Site;
|
||||||
|
|
||||||
|
use App\Exceptions\RepositoryNotFound;
|
||||||
|
use App\Exceptions\RepositoryPermissionDenied;
|
||||||
|
use App\Exceptions\SourceControlIsNotConnected;
|
||||||
|
use App\Models\Site;
|
||||||
|
use Illuminate\Validation\Rule;
|
||||||
|
use Illuminate\Validation\ValidationException;
|
||||||
|
|
||||||
|
class UpdateSourceControl
|
||||||
|
{
|
||||||
|
public function update(Site $site, array $input): void
|
||||||
|
{
|
||||||
|
$site->source_control_id = $input['source_control'];
|
||||||
|
try {
|
||||||
|
if ($site->sourceControl) {
|
||||||
|
$site->sourceControl?->getRepo($site->repository);
|
||||||
|
}
|
||||||
|
} catch (SourceControlIsNotConnected) {
|
||||||
|
throw ValidationException::withMessages([
|
||||||
|
'source_control' => 'Source control is not connected',
|
||||||
|
]);
|
||||||
|
} catch (RepositoryPermissionDenied) {
|
||||||
|
throw ValidationException::withMessages([
|
||||||
|
'repository' => 'You do not have permission to access this repository',
|
||||||
|
]);
|
||||||
|
} catch (RepositoryNotFound) {
|
||||||
|
throw ValidationException::withMessages([
|
||||||
|
'repository' => 'Repository not found',
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
$site->save();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function rules(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'source_control' => [
|
||||||
|
'required',
|
||||||
|
Rule::exists('source_controls', 'id'),
|
||||||
|
],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
@ -2,26 +2,24 @@
|
|||||||
|
|
||||||
namespace App\Actions\SourceControl;
|
namespace App\Actions\SourceControl;
|
||||||
|
|
||||||
|
use App\Models\Project;
|
||||||
use App\Models\SourceControl;
|
use App\Models\SourceControl;
|
||||||
|
use App\Models\User;
|
||||||
use Illuminate\Support\Arr;
|
use Illuminate\Support\Arr;
|
||||||
use Illuminate\Support\Facades\Validator;
|
|
||||||
use Illuminate\Validation\Rule;
|
use Illuminate\Validation\Rule;
|
||||||
use Illuminate\Validation\ValidationException;
|
use Illuminate\Validation\ValidationException;
|
||||||
|
|
||||||
class ConnectSourceControl
|
class ConnectSourceControl
|
||||||
{
|
{
|
||||||
public function connect(array $input): void
|
public function connect(User $user, Project $project, array $input): SourceControl
|
||||||
{
|
{
|
||||||
$this->validate($input);
|
|
||||||
|
|
||||||
$sourceControl = new SourceControl([
|
$sourceControl = new SourceControl([
|
||||||
'provider' => $input['provider'],
|
'provider' => $input['provider'],
|
||||||
'profile' => $input['name'],
|
'profile' => $input['name'],
|
||||||
'url' => Arr::has($input, 'url') ? $input['url'] : null,
|
'url' => Arr::has($input, 'url') ? $input['url'] : null,
|
||||||
|
'project_id' => isset($input['global']) && $input['global'] ? null : $project->id,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->validateProvider($sourceControl, $input);
|
|
||||||
|
|
||||||
$sourceControl->provider_data = $sourceControl->provider()->createData($input);
|
$sourceControl->provider_data = $sourceControl->provider()->createData($input);
|
||||||
|
|
||||||
if (! $sourceControl->provider()->connect()) {
|
if (! $sourceControl->provider()->connect()) {
|
||||||
@ -32,30 +30,38 @@ public function connect(array $input): void
|
|||||||
}
|
}
|
||||||
|
|
||||||
$sourceControl->save();
|
$sourceControl->save();
|
||||||
|
|
||||||
|
return $sourceControl;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public static function rules(array $input): array
|
||||||
* @throws ValidationException
|
|
||||||
*/
|
|
||||||
private function validate(array $input): void
|
|
||||||
{
|
{
|
||||||
$rules = [
|
$rules = [
|
||||||
|
'name' => [
|
||||||
|
'required',
|
||||||
|
],
|
||||||
'provider' => [
|
'provider' => [
|
||||||
'required',
|
'required',
|
||||||
Rule::in(config('core.source_control_providers')),
|
Rule::in(config('core.source_control_providers')),
|
||||||
],
|
],
|
||||||
'name' => [
|
|
||||||
'required',
|
|
||||||
],
|
|
||||||
];
|
];
|
||||||
Validator::make($input, $rules)->validate();
|
|
||||||
|
return array_merge($rules, static::providerRules($input));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @throws ValidationException
|
* @throws ValidationException
|
||||||
*/
|
*/
|
||||||
private function validateProvider(SourceControl $sourceControl, array $input): void
|
private static function providerRules(array $input): array
|
||||||
{
|
{
|
||||||
Validator::make($input, $sourceControl->provider()->createRules($input))->validate();
|
if (! isset($input['provider'])) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
$sourceControl = new SourceControl([
|
||||||
|
'provider' => $input['provider'],
|
||||||
|
]);
|
||||||
|
|
||||||
|
return $sourceControl->provider()->createRules($input);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,13 +3,16 @@
|
|||||||
namespace App\Actions\SourceControl;
|
namespace App\Actions\SourceControl;
|
||||||
|
|
||||||
use App\Models\SourceControl;
|
use App\Models\SourceControl;
|
||||||
|
use Illuminate\Validation\ValidationException;
|
||||||
|
|
||||||
class DeleteSourceControl
|
class DeleteSourceControl
|
||||||
{
|
{
|
||||||
public function delete(SourceControl $sourceControl): void
|
public function delete(SourceControl $sourceControl): void
|
||||||
{
|
{
|
||||||
if ($sourceControl->sites()->exists()) {
|
if ($sourceControl->sites()->exists()) {
|
||||||
throw new \Exception('This source control is being used by a site.');
|
throw ValidationException::withMessages([
|
||||||
|
'source_control' => __('This source control is being used by a site.'),
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$sourceControl->delete();
|
$sourceControl->delete();
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user