mirror of
https://github.com/vitodeploy/vito.git
synced 2025-04-19 18:01:37 +00:00
Compare commits
115 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
7cda14cb76 | ||
|
3bf3f7eebc | ||
|
e17fdbb1a0 | ||
|
e99146209e | ||
|
1223ea1499 | ||
|
2356e44f5b | ||
|
8c7c3d2192 | ||
|
e2b9d18a71 | ||
|
75e554ad74 | ||
|
4d59529767 | ||
|
ea31d0978f | ||
|
ee4e9e5452 | ||
|
48c12e26b2 | ||
|
72f68b5917 | ||
|
a889cf11a2 | ||
|
75a4fde8de | ||
|
fd67097884 | ||
|
705d029a63 | ||
|
7be63384d4 | ||
|
dd78c86a60 | ||
|
262c5e040d | ||
|
ea396786e4 | ||
|
6966f06b1a | ||
|
53e20cbc2a | ||
|
270928af13 | ||
|
1e4a944acb | ||
|
d702b95e0c | ||
|
7b723bcba5 | ||
|
8b58834a31 | ||
|
cdbde063f0 | ||
|
a73476c1dd | ||
|
465951fd1e | ||
|
b63ddfc568 | ||
|
bfdf3533fd | ||
|
c1ae58772c | ||
|
5947ae80bb | ||
|
93a7bf9c3a | ||
|
a0940d4581 | ||
|
e976709522 | ||
|
5aa100519e | ||
|
ab43dfb2a6 | ||
|
a320e52dbf | ||
|
20c6b58866 | ||
|
f5c9d6701b | ||
|
ba069a2db0 | ||
|
8b86ff23c9 | ||
|
dfdd50beb7 | ||
|
924920e6e8 | ||
|
da1043185a | ||
|
ea3d64607a | ||
|
db81583884 | ||
|
1490f6b707 | ||
|
544e31c562 | ||
|
572d1df010 | ||
|
0d12dd0c69 | ||
|
d91fa4061c | ||
|
3f7284f771 | ||
|
e0b3c7fec7 | ||
|
d9dd861313 | ||
|
1f95cb3854 | ||
|
1b741070b3 | ||
|
d4ec4c66ed | ||
|
acdbfa70f5 | ||
|
d77ceb1472 | ||
|
b7184dcfc4 | ||
|
c926ce4271 | ||
|
bc2e421128 | ||
|
5aac48b942 | ||
|
9c63b96a42 | ||
|
20944421de | ||
|
57b2771c7e | ||
|
34c5750950 | ||
|
cc79aa9fbf | ||
|
deb0b328e3 | ||
|
1ca72d7ddd | ||
|
1dfd13583a | ||
|
e8ac6eb5ae | ||
|
07c51ab122 | ||
|
2c49e2712c | ||
|
0f810f4077 | ||
|
113607aae3 | ||
|
23eee5a91e | ||
|
6639fac9c0 | ||
|
f743611b22 | ||
|
37a4b6af51 | ||
|
417bf73e44 | ||
|
da7b24640e | ||
|
a11f221619 | ||
|
54dc6cfb9a | ||
|
321465d3e2 | ||
|
37f502d6dd | ||
|
d7dc54ef5d | ||
|
224e0ac2b0 | ||
|
386d8e73a7 | ||
|
7086e84c3c | ||
|
93cee92568 | ||
|
0007e6f00a | ||
|
eaecafc9b0 | ||
|
0da21f40bd | ||
|
974af959f1 | ||
|
8bf1cc141e | ||
|
a94d1d42d2 | ||
|
06d690138d | ||
|
8b2338cb41 | ||
|
c24b4b7333 | ||
|
3c50e2c947 | ||
|
d1f2add699 | ||
|
ecdba02bc9 | ||
|
f57e81f12e | ||
|
63e7cfd8f7 | ||
|
906ddc38de | ||
|
2e9620409b | ||
|
e4fed24498 | ||
|
32993025de | ||
|
f6bc04763b |
@ -7,6 +7,7 @@ indent_size = 4
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
ij_any_block_comment_at_first_column = false
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
@ -14,3 +14,7 @@ MAIL_PASSWORD=null
|
||||
MAIL_ENCRYPTION=null
|
||||
MAIL_FROM_ADDRESS="noreply@${APP_NAME}"
|
||||
MAIL_FROM_NAME="${APP_NAME}"
|
||||
|
||||
APP_PORT=8000
|
||||
|
||||
SCRIBE_AUTH_KEY="YOUR-API-KEY"
|
||||
|
6
.github/workflows/code-style.yml
vendored
6
.github/workflows/code-style.yml
vendored
@ -3,7 +3,9 @@ name: code-style
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- 1.x
|
||||
- 2.x
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
@ -13,8 +15,8 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
php: [8.2]
|
||||
node-version: ["20.x"]
|
||||
php: [ 8.2 ]
|
||||
node-version: [ "20.x" ]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
@ -1,9 +1,10 @@
|
||||
name: Build and push Docker image
|
||||
name: Docker Latest
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 1.x
|
||||
workflow_dispatch:
|
||||
# push:
|
||||
# branches:
|
||||
# - 2.x
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
@ -24,12 +25,10 @@ jobs:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
- name: Build and push to the latest tag
|
||||
run: |
|
||||
docker buildx build . \
|
||||
-f docker/Dockerfile \
|
||||
-t vitodeploy/vito:1.x \
|
||||
--build-arg="RELEASE=0" \
|
||||
-t vitodeploy/vito:latest \
|
||||
--platform linux/amd64,linux/arm64 \
|
||||
--no-cache \
|
||||
--push
|
29
.github/workflows/docker-release.yml
vendored
29
.github/workflows/docker-release.yml
vendored
@ -1,8 +1,9 @@
|
||||
name: Build and push Docker image
|
||||
name: Docker Release
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [created]
|
||||
workflow_dispatch:
|
||||
# release:
|
||||
# types: [ created ]
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
@ -23,13 +24,29 @@ jobs:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
- name: Build and push to the release tag
|
||||
run: |
|
||||
docker buildx build . \
|
||||
-f docker/Dockerfile \
|
||||
-t vitodeploy/vito:${{ github.event.release.tag_name }} \
|
||||
-t vitodeploy/vito:latest \
|
||||
--build-arg="RELEASE=0" \
|
||||
--platform linux/amd64,linux/arm64 \
|
||||
--no-cache \
|
||||
--push
|
||||
|
||||
- name: Build and push to the 1.x tag
|
||||
if: startsWith(github.event.release.target_commitish, '1.x')
|
||||
run: |
|
||||
docker buildx build . \
|
||||
-f docker/Dockerfile \
|
||||
-t vitodeploy/vito:1.x \
|
||||
--platform linux/amd64,linux/arm64 \
|
||||
--push
|
||||
|
||||
- name: Build and push to the 2.x tag
|
||||
if: startsWith(github.event.release.target_commitish, '2.x')
|
||||
run: |
|
||||
docker buildx build . \
|
||||
-f docker/Dockerfile \
|
||||
-t vitodeploy/vito:2.x \
|
||||
--platform linux/amd64,linux/arm64 \
|
||||
--push
|
||||
|
77
.github/workflows/releases.yml
vendored
Normal file
77
.github/workflows/releases.yml
vendored
Normal file
@ -0,0 +1,77 @@
|
||||
name: manual release
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: 'Version to release'
|
||||
required: true
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
name: Release ${{ inputs.version }}
|
||||
|
||||
outputs:
|
||||
version: ${{ steps.version.outputs.version }}
|
||||
notes: ${{ steps.cleaned-notes.outputs.notes }}
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Remove optional "v" prefix
|
||||
id: version
|
||||
run: |
|
||||
echo "version=${VERSION#v}" >> "$GITHUB_OUTPUT"
|
||||
env:
|
||||
VERSION: ${{ inputs.version }}
|
||||
|
||||
- name: Check if branch and version match
|
||||
id: guard
|
||||
run: |
|
||||
MAJOR_VERSION="${NUMERIC_VERSION%%.*}"
|
||||
BRANCH_MAJOR_VERSION="${BRANCH%%.*}"
|
||||
|
||||
if [ "$MAJOR_VERSION" != "$BRANCH_MAJOR_VERSION" ]; then
|
||||
echo "Mismatched versions! Aborting."
|
||||
VERSION_MISMATCH='true';
|
||||
else
|
||||
echo "Versions match! Proceeding."
|
||||
VERSION_MISMATCH='false';
|
||||
fi
|
||||
|
||||
echo "VERSION_MISMATCH=$(echo $VERSION_MISMATCH)" >> "$GITHUB_OUTPUT";
|
||||
env:
|
||||
BRANCH: ${{ github.ref_name }}
|
||||
NUMERIC_VERSION: ${{ steps.version.outputs.version }}
|
||||
|
||||
- name: Fail if branch and release tag do not match
|
||||
if: ${{ steps.guard.outputs.VERSION_MISMATCH == 'true' }}
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
core.setFailed('Workflow failed. Release version does not match with selected target branch. Did you select the correct branch?')
|
||||
|
||||
- name: Update config/app.php
|
||||
run: sed -i "s/'version' => '[^']*'/'version' => '${{ steps.version.outputs.version }}'/" config/app.php
|
||||
|
||||
- name: Commit version change
|
||||
uses: stefanzweifel/git-auto-commit-action@v5
|
||||
with:
|
||||
commit_message: "Update version to ${{ steps.version.outputs.version }}"
|
||||
|
||||
- name: Create release
|
||||
uses: softprops/action-gh-release@v2
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ steps.version.outputs.version }}
|
||||
name: ${{ steps.version.outputs.version }}
|
||||
body: ${{ steps.cleaned-notes.outputs.notes }}
|
||||
target_commitish: ${{ github.ref_name }}
|
||||
make_latest: "${{ github.ref_name == github.event.repository.default_branch }}"
|
7
.github/workflows/tests.yml
vendored
7
.github/workflows/tests.yml
vendored
@ -3,7 +3,9 @@ name: tests
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- 1.x
|
||||
- 2.x
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
@ -13,7 +15,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
php: [8.2]
|
||||
php: [ 8.2 ]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@ -38,5 +40,8 @@ jobs:
|
||||
- name: Create sqlite database
|
||||
run: touch storage/database-test.sqlite
|
||||
|
||||
- name: Set up the .env file
|
||||
run: touch .env
|
||||
|
||||
- name: Run test suite
|
||||
run: php artisan test
|
||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -21,3 +21,4 @@ yarn-error.log
|
||||
/.fleet
|
||||
/.idea
|
||||
/.vscode
|
||||
laradumps.yaml
|
||||
|
15
.prettierignore
Normal file
15
.prettierignore
Normal file
@ -0,0 +1,15 @@
|
||||
.git/
|
||||
.scribe/
|
||||
node_modules/
|
||||
public/
|
||||
storage/
|
||||
vendor/
|
||||
composer.lock
|
||||
.env
|
||||
.env.example
|
||||
sail
|
||||
*.md
|
||||
*.yml
|
||||
!*.blade.php
|
||||
!*.sh
|
||||
resources/views/ssh/
|
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": [
|
||||
{
|
||||
"files": ["*.blade.php"],
|
||||
@ -11,6 +15,12 @@
|
||||
"quoteProps": "consistent",
|
||||
"trailingComma": "none"
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": ["*.sh"],
|
||||
"options": {
|
||||
"parser": "sh"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
4
.scribe/.filehashes
Normal file
4
.scribe/.filehashes
Normal file
@ -0,0 +1,4 @@
|
||||
# GENERATED. YOU SHOULDN'T MODIFY OR DELETE THIS FILE.
|
||||
# Scribe uses this file to know when you change something manually in your docs.
|
||||
.scribe/intro.md=98adb6862b118c06e02e4e22390feb6f
|
||||
.scribe/auth.md=7fcc12b2e5a86fa9c49f509d348f3cc2
|
7
.scribe/auth.md
Normal file
7
.scribe/auth.md
Normal file
@ -0,0 +1,7 @@
|
||||
# Authenticating requests
|
||||
|
||||
To authenticate requests, include an **`Authorization`** header with the value **`"Bearer YOUR-API-KEY"`**.
|
||||
|
||||
All authenticated endpoints are marked with a `requires authentication` badge in the documentation below.
|
||||
|
||||
You can retrieve your token by visiting <a href="/settings/api-keys" target="_blank">here</a>
|
310
.scribe/endpoints.cache/00.yaml
Normal file
310
.scribe/endpoints.cache/00.yaml
Normal file
@ -0,0 +1,310 @@
|
||||
## Autogenerated by Scribe. DO NOT MODIFY.
|
||||
|
||||
name: cron-jobs
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/cron-jobs'
|
||||
metadata:
|
||||
groupName: cron-jobs
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: list
|
||||
description: 'Get all cron jobs.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":null,"server_id":null,"command":"ls -la","user":"root","frequency":"* * * * *","status":"ready","created_at":null,"updated_at":null},{"id":null,"server_id":null,"command":"ls -la","user":"root","frequency":"* * * * *","status":"ready","created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer ge6ZVa4kfD86hdv5a31EcbP'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/cron-jobs'
|
||||
metadata:
|
||||
groupName: cron-jobs
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: create
|
||||
description: 'Create a new cron job.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
command:
|
||||
name: command
|
||||
description: ''
|
||||
required: true
|
||||
example: itaque
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
user:
|
||||
name: user
|
||||
description: ''
|
||||
required: true
|
||||
example: root
|
||||
type: string
|
||||
enumValues:
|
||||
- root
|
||||
- vito
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
frequency:
|
||||
name: frequency
|
||||
description: 'Frequency of the cron job.'
|
||||
required: true
|
||||
example: '* * * * *'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
command: itaque
|
||||
user: root
|
||||
frequency: '* * * * *'
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"command":"ls -la","user":"root","frequency":"* * * * *","status":"ready","created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer cdh5bD8gVPkf34e1ZEva6a6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/cron-jobs/{cronJob_id}'
|
||||
metadata:
|
||||
groupName: cron-jobs
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: show
|
||||
description: 'Get a cron job by ID.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cronJob_id:
|
||||
name: cronJob_id
|
||||
description: 'The ID of the cronJob.'
|
||||
required: true
|
||||
example: 18
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
cronJob_id: 18
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"command":"ls -la","user":"root","frequency":"* * * * *","status":"ready","created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer fa5VgdkaD8cZ6vh34Pb16eE'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/cron-jobs/{cronJob_id}'
|
||||
metadata:
|
||||
groupName: cron-jobs
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: delete
|
||||
description: 'Delete cron job.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cronJob_id:
|
||||
name: cronJob_id
|
||||
description: 'The ID of the cronJob.'
|
||||
required: true
|
||||
example: 10
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
cronJob_id: 10
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer P8hkva3ZD4fgb166adEVce5'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
286
.scribe/endpoints.cache/01.yaml
Normal file
286
.scribe/endpoints.cache/01.yaml
Normal file
@ -0,0 +1,286 @@
|
||||
## Autogenerated by Scribe. DO NOT MODIFY.
|
||||
|
||||
name: databases
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/databases'
|
||||
metadata:
|
||||
groupName: databases
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: list
|
||||
description: 'Get all databases.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":null,"server_id":null,"name":"amalia38","status":"ready","created_at":null,"updated_at":null},{"id":null,"server_id":null,"name":"troy.rippin","status":"ready","created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer Z641ebPacDV6f38kEgdah5v'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/databases'
|
||||
metadata:
|
||||
groupName: databases
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: create
|
||||
description: 'Create a new database.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
name:
|
||||
name: name
|
||||
description: ''
|
||||
required: true
|
||||
example: et
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
name: et
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"name":"harvey.haskell","status":"ready","created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer d4gbv56caV3aZ8D1h6kfEPe'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/databases/{id}'
|
||||
metadata:
|
||||
groupName: databases
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: show
|
||||
description: 'Get a database by ID.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the database.'
|
||||
required: true
|
||||
example: 19
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
id: 19
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"name":"ruthie.koepp","status":"ready","created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer P68VgDcaEZvk63f4b5aed1h'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/databases/{database_id}'
|
||||
metadata:
|
||||
groupName: databases
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: delete
|
||||
description: 'Delete database.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
database_id:
|
||||
name: database_id
|
||||
description: 'The ID of the database.'
|
||||
required: true
|
||||
example: 15
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
database_id: 15
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer DkPc6d1heEv5a8fb4V63agZ'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
392
.scribe/endpoints.cache/02.yaml
Normal file
392
.scribe/endpoints.cache/02.yaml
Normal file
@ -0,0 +1,392 @@
|
||||
## Autogenerated by Scribe. DO NOT MODIFY.
|
||||
|
||||
name: database-users
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/database-users'
|
||||
metadata:
|
||||
groupName: database-users
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: list
|
||||
description: 'Get all database users.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":null,"server_id":null,"username":"xgaylord","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null},{"id":null,"server_id":null,"username":"una37","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer P4gD36fZeckvVh5ab86Ead1'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/database-users'
|
||||
metadata:
|
||||
groupName: database-users
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: create
|
||||
description: 'Create a new database user.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
username:
|
||||
name: username
|
||||
description: ''
|
||||
required: true
|
||||
example: consequuntur
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
password:
|
||||
name: password
|
||||
description: ''
|
||||
required: true
|
||||
example: 'fI/i2.O4u&dla?eXvR2'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
host:
|
||||
name: host
|
||||
description: 'Host, if it is a remote user.'
|
||||
required: true
|
||||
example: '%'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
username: consequuntur
|
||||
password: 'fI/i2.O4u&dla?eXvR2'
|
||||
host: '%'
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"username":"kari.farrell","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 5k8Vced1baaE6f4ZvDPgh36'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/database-users/{databaseUser_id}'
|
||||
metadata:
|
||||
groupName: database-users
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: show
|
||||
description: 'Get a database user by ID.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
databaseUser_id:
|
||||
name: databaseUser_id
|
||||
description: 'The ID of the databaseUser.'
|
||||
required: true
|
||||
example: 18
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
databaseUser_id: 18
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"username":"caterina.mosciski","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 3kDveP5V8a6dghfa4E16cbZ'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/database-users/{databaseUser_id}/link'
|
||||
metadata:
|
||||
groupName: database-users
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: link
|
||||
description: 'Link to databases'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
databaseUser_id:
|
||||
name: databaseUser_id
|
||||
description: 'The ID of the databaseUser.'
|
||||
required: true
|
||||
example: 4
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
databaseUser_id: 4
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
databases:
|
||||
name: databases
|
||||
description: 'Array of database names to link to the user.'
|
||||
required: true
|
||||
example: non
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
databases: non
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"username":"kurtis05","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer DgPea43EvV51a866dfbZckh'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/database-users/{databaseUser_id}'
|
||||
metadata:
|
||||
groupName: database-users
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: delete
|
||||
description: 'Delete database user.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
databaseUser_id:
|
||||
name: databaseUser_id
|
||||
description: 'The ID of the databaseUser.'
|
||||
required: true
|
||||
example: 6
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
databaseUser_id: 6
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6ackVP8hEZd3164gD5evafb'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
334
.scribe/endpoints.cache/03.yaml
Normal file
334
.scribe/endpoints.cache/03.yaml
Normal file
@ -0,0 +1,334 @@
|
||||
## Autogenerated by Scribe. DO NOT MODIFY.
|
||||
|
||||
name: firewall-rules
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/firewall-rules'
|
||||
metadata:
|
||||
groupName: firewall-rules
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: list
|
||||
description: 'Get all firewall rules.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":null,"server_id":null,"type":"allow","protocol":"tcp","port":38781,"source":"79.116.255.150","mask":24,"note":"test","status":null,"created_at":null,"updated_at":null},{"id":null,"server_id":null,"type":"allow","protocol":"tcp","port":32141,"source":"52.174.114.251","mask":24,"note":"test","status":null,"created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer h3P5gD8E4dkeZ6abac6vfV1'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/firewall-rules'
|
||||
metadata:
|
||||
groupName: firewall-rules
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: create
|
||||
description: 'Create a new firewall rule.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
type:
|
||||
name: type
|
||||
description: ''
|
||||
required: true
|
||||
example: deny
|
||||
type: string
|
||||
enumValues:
|
||||
- allow
|
||||
- deny
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
protocol:
|
||||
name: protocol
|
||||
description: ''
|
||||
required: true
|
||||
example: udp
|
||||
type: string
|
||||
enumValues:
|
||||
- tcp
|
||||
- udp
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
port:
|
||||
name: port
|
||||
description: ''
|
||||
required: true
|
||||
example: et
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
source:
|
||||
name: source
|
||||
description: ''
|
||||
required: true
|
||||
example: voluptates
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
mask:
|
||||
name: mask
|
||||
description: 'Mask for source IP.'
|
||||
required: true
|
||||
example: '0'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
type: deny
|
||||
protocol: udp
|
||||
port: et
|
||||
source: voluptates
|
||||
mask: '0'
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"type":"allow","protocol":"tcp","port":47148,"source":"119.182.8.45","mask":24,"note":"test","status":null,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6a8DVv5k3gZfEe6hb1daPc4'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/firewall-rules/{firewallRule_id}'
|
||||
metadata:
|
||||
groupName: firewall-rules
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: show
|
||||
description: 'Get a firewall rule by ID.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
firewallRule_id:
|
||||
name: firewallRule_id
|
||||
description: 'The ID of the firewallRule.'
|
||||
required: true
|
||||
example: 29
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
firewallRule_id: 29
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"type":"allow","protocol":"tcp","port":2317,"source":"44.161.134.114","mask":24,"note":"test","status":null,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer P4bZdV1geED3kfh568aa6cv'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/firewall-rules/{firewallRule_id}'
|
||||
metadata:
|
||||
groupName: firewall-rules
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: delete
|
||||
description: 'Delete firewall rule.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
firewallRule_id:
|
||||
name: firewallRule_id
|
||||
description: 'The ID of the firewallRule.'
|
||||
required: true
|
||||
example: 29
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
firewallRule_id: 29
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer Dh3kcaafdg6E5ZvV46ePb81'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
46
.scribe/endpoints.cache/04.yaml
Normal file
46
.scribe/endpoints.cache/04.yaml
Normal file
@ -0,0 +1,46 @@
|
||||
## Autogenerated by Scribe. DO NOT MODIFY.
|
||||
|
||||
name: general
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: api/health
|
||||
metadata:
|
||||
groupName: general
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: health-check
|
||||
description: ''
|
||||
authenticated: false
|
||||
custom: []
|
||||
headers:
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"success":true,"version":"2.1.0"}'
|
||||
headers:
|
||||
cache-control: 'no-cache, private'
|
||||
content-type: application/json
|
||||
x-ratelimit-limit: '60'
|
||||
x-ratelimit-remaining: '59'
|
||||
access-control-allow-origin: '*'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth: []
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
260
.scribe/endpoints.cache/05.yaml
Normal file
260
.scribe/endpoints.cache/05.yaml
Normal file
@ -0,0 +1,260 @@
|
||||
## Autogenerated by Scribe. DO NOT MODIFY.
|
||||
|
||||
name: projects
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: api/projects
|
||||
metadata:
|
||||
groupName: projects
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: list
|
||||
description: 'Get all projects.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":3,"name":"Jeffry Dickinson","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"},{"id":4,"name":"Miss Tianna Dietrich PhD","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 5DaveP3d6b6khEZVcg4fa18'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: api/projects
|
||||
metadata:
|
||||
groupName: projects
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: create
|
||||
description: 'Create a new project.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
name:
|
||||
name: name
|
||||
description: 'The name of the project.'
|
||||
required: true
|
||||
example: quos
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
name: quos
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":3,"name":"Isidro Franecki","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer a6P53EvkcZV6D4ghad1efb8'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{id}'
|
||||
metadata:
|
||||
groupName: projects
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: show
|
||||
description: 'Get a project by ID.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":3,"name":"Rhoda Parisian","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer v48Ve5ZghdcbE1akP66fD3a'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- PUT
|
||||
uri: 'api/projects/{id}'
|
||||
metadata:
|
||||
groupName: projects
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: update
|
||||
description: 'Update project.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
name:
|
||||
name: name
|
||||
description: 'The name of the project.'
|
||||
required: true
|
||||
example: ullam
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
name: ullam
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":3,"name":"Mr. Dashawn Jacobson Sr.","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer fvEdh3Vgbk56Z4a61eP8caD'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/projects/{project_id}'
|
||||
metadata:
|
||||
groupName: projects
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: delete
|
||||
description: 'Delete project.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer eg4c3vZ1Dhaa68d6PEfk5bV'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
503
.scribe/endpoints.cache/06.yaml
Normal file
503
.scribe/endpoints.cache/06.yaml
Normal file
@ -0,0 +1,503 @@
|
||||
## Autogenerated by Scribe. DO NOT MODIFY.
|
||||
|
||||
name: servers
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers'
|
||||
metadata:
|
||||
groupName: servers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: list
|
||||
description: 'Get all servers in a project.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":null,"project_id":null,"user_id":null,"provider_id":null,"name":"Amina DuBuque","ssh_user":"vito","ip":"163.77.69.73","local_ip":"137.139.200.70","port":22,"os":"ubuntu_22","type":"regular","type_data":null,"provider":"custom","provider_data":null,"public_key":"test","status":"ready","auto_update":null,"available_updates":0,"security_updates":null,"progress":100,"progress_step":null,"updates":null,"last_update_check":null,"created_at":null,"updated_at":null},{"id":null,"project_id":null,"user_id":null,"provider_id":null,"name":"Floy Cummerata","ssh_user":"vito","ip":"62.53.140.25","local_ip":"34.59.35.195","port":22,"os":"ubuntu_22","type":"regular","type_data":null,"provider":"custom","provider_data":null,"public_key":"test","status":"ready","auto_update":null,"available_updates":0,"security_updates":null,"progress":100,"progress_step":null,"updates":null,"last_update_check":null,"created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer E81avahec6365dbZfgD4kPV'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers'
|
||||
metadata:
|
||||
groupName: servers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: create
|
||||
description: 'Create a new server.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
provider:
|
||||
name: provider
|
||||
description: 'The server provider type'
|
||||
required: true
|
||||
example: iste
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_provider:
|
||||
name: server_provider
|
||||
description: 'If the provider is not custom, the ID of the server provider profile'
|
||||
required: true
|
||||
example: custom
|
||||
type: string
|
||||
enumValues:
|
||||
- custom
|
||||
- hetzner
|
||||
- digitalocean
|
||||
- linode
|
||||
- vultr
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
region:
|
||||
name: region
|
||||
description: 'Provider region if the provider is not custom'
|
||||
required: true
|
||||
example: libero
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
plan:
|
||||
name: plan
|
||||
description: 'Provider plan if the provider is not custom'
|
||||
required: true
|
||||
example: ut
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
ip:
|
||||
name: ip
|
||||
description: 'SSH IP address if the provider is custom'
|
||||
required: true
|
||||
example: molestias
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
port:
|
||||
name: port
|
||||
description: 'SSH Port if the provider is custom'
|
||||
required: true
|
||||
example: laudantium
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
name:
|
||||
name: name
|
||||
description: 'The name of the server.'
|
||||
required: true
|
||||
example: illum
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
os:
|
||||
name: os
|
||||
description: 'The os of the server'
|
||||
required: true
|
||||
example: autem
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
webserver:
|
||||
name: webserver
|
||||
description: 'Web server'
|
||||
required: true
|
||||
example: none
|
||||
type: string
|
||||
enumValues:
|
||||
- none
|
||||
- nginx
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
database:
|
||||
name: database
|
||||
description: Database
|
||||
required: true
|
||||
example: postgresql12
|
||||
type: string
|
||||
enumValues:
|
||||
- none
|
||||
- mysql57
|
||||
- mysql80
|
||||
- mariadb103
|
||||
- mariadb104
|
||||
- mariadb103
|
||||
- postgresql12
|
||||
- postgresql13
|
||||
- postgresql14
|
||||
- postgresql15
|
||||
- postgresql16
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
php:
|
||||
name: php
|
||||
description: 'PHP version'
|
||||
required: true
|
||||
example: '7.4'
|
||||
type: string
|
||||
enumValues:
|
||||
- '7.0'
|
||||
- '7.1'
|
||||
- '7.2'
|
||||
- '7.3'
|
||||
- '7.4'
|
||||
- '8.0'
|
||||
- '8.1'
|
||||
- '8.2'
|
||||
- '8.3'
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
provider: iste
|
||||
server_provider: custom
|
||||
region: libero
|
||||
plan: ut
|
||||
ip: molestias
|
||||
port: laudantium
|
||||
name: illum
|
||||
os: autem
|
||||
webserver: none
|
||||
database: postgresql12
|
||||
php: '7.4'
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"project_id":null,"user_id":null,"provider_id":null,"name":"Archibald Nolan","ssh_user":"vito","ip":"226.168.13.177","local_ip":"143.14.43.182","port":22,"os":"ubuntu_22","type":"regular","type_data":null,"provider":"custom","provider_data":null,"public_key":"test","status":"ready","auto_update":null,"available_updates":0,"security_updates":null,"progress":100,"progress_step":null,"updates":null,"last_update_check":null,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer aad3Pvc4e65DghZVEk8f1b6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{id}'
|
||||
metadata:
|
||||
groupName: servers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: show
|
||||
description: 'Get a server by ID.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"project_id":null,"user_id":null,"provider_id":null,"name":"Tevin Sipes","ssh_user":"vito","ip":"61.41.183.152","local_ip":"197.160.239.147","port":22,"os":"ubuntu_22","type":"regular","type_data":null,"provider":"custom","provider_data":null,"public_key":"test","status":"ready","auto_update":null,"available_updates":0,"security_updates":null,"progress":100,"progress_step":null,"updates":null,"last_update_check":null,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 5EhD3v6Z8Vdakfg46eP1cab'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/reboot'
|
||||
metadata:
|
||||
groupName: servers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: reboot
|
||||
description: 'Reboot a server.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer Pc5Da6Vhdk1vag6fE84e3Zb'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/upgrade'
|
||||
metadata:
|
||||
groupName: servers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: upgrade
|
||||
description: 'Upgrade server.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer a61v48DfkeEbcg3a6hd5PZV'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}'
|
||||
metadata:
|
||||
groupName: servers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: delete
|
||||
description: 'Delete server.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer haE8D6Z6gePk1vadVb53c4f'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
372
.scribe/endpoints.cache/07.yaml
Normal file
372
.scribe/endpoints.cache/07.yaml
Normal file
@ -0,0 +1,372 @@
|
||||
## Autogenerated by Scribe. DO NOT MODIFY.
|
||||
|
||||
name: server-providers
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/server-providers'
|
||||
metadata:
|
||||
groupName: server-providers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: list
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":2,"project_id":null,"global":true,"name":"laudantium","provider":"vultr","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"},{"id":3,"project_id":null,"global":true,"name":"aut","provider":"aws","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer Df16eda8Pa345EkgbZ6cvhV'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/server-providers'
|
||||
metadata:
|
||||
groupName: server-providers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: create
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
provider:
|
||||
name: provider
|
||||
description: 'The provider (aws, linode, hetzner, digitalocean, vultr, ...)'
|
||||
required: true
|
||||
example: voluptatem
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
name:
|
||||
name: name
|
||||
description: 'The name of the server provider.'
|
||||
required: true
|
||||
example: repellat
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
token:
|
||||
name: token
|
||||
description: 'The token if provider requires api token'
|
||||
required: true
|
||||
example: omnis
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
key:
|
||||
name: key
|
||||
description: 'The key if provider requires key'
|
||||
required: true
|
||||
example: recusandae
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
secret:
|
||||
name: secret
|
||||
description: 'The secret if provider requires key'
|
||||
required: true
|
||||
example: in
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
provider: voluptatem
|
||||
name: repellat
|
||||
token: omnis
|
||||
key: recusandae
|
||||
secret: in
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":2,"project_id":null,"global":true,"name":"quia","provider":"vultr","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 8fbgDV6vdhakE1c64e3P5aZ'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/server-providers/{serverProvider_id}'
|
||||
metadata:
|
||||
groupName: server-providers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: show
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
serverProvider_id:
|
||||
name: serverProvider_id
|
||||
description: 'The ID of the serverProvider.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
serverProvider_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":2,"project_id":null,"global":true,"name":"ab","provider":"hetzner","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer eVE816Pc4ak3bdfahDZv6g5'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- PUT
|
||||
uri: 'api/projects/{project_id}/server-providers/{serverProvider_id}'
|
||||
metadata:
|
||||
groupName: server-providers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: update
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
serverProvider_id:
|
||||
name: serverProvider_id
|
||||
description: 'The ID of the serverProvider.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
serverProvider_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
name:
|
||||
name: name
|
||||
description: 'The name of the server provider.'
|
||||
required: true
|
||||
example: est
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
global:
|
||||
name: global
|
||||
description: 'Accessible in all projects'
|
||||
required: true
|
||||
example: true
|
||||
type: string
|
||||
enumValues:
|
||||
- true
|
||||
- false
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
name: est
|
||||
global: true
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":2,"project_id":null,"global":true,"name":"nesciunt","provider":"linode","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer va86keaPDdh3b16Z54EgfcV'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/projects/{project_id}/server-providers/{serverProvider_id}'
|
||||
metadata:
|
||||
groupName: server-providers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: delete
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
serverProvider_id:
|
||||
name: serverProvider_id
|
||||
description: 'The ID of the serverProvider.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
serverProvider_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer abv13ag8h5fZ4EPVDe6dc6k'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
235
.scribe/endpoints.cache/08.yaml
Normal file
235
.scribe/endpoints.cache/08.yaml
Normal file
@ -0,0 +1,235 @@
|
||||
## Autogenerated by Scribe. DO NOT MODIFY.
|
||||
|
||||
name: ssh-keys
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/ssh-keys'
|
||||
metadata:
|
||||
groupName: ssh-keys
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: list
|
||||
description: 'Get all ssh keys.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":null,"user":null,"name":"Godfrey Mills","created_at":null,"updated_at":null},{"id":null,"user":null,"name":"Donato Streich","created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 1gEva8Z6e6abPDhk453fdVc'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/ssh-keys'
|
||||
metadata:
|
||||
groupName: ssh-keys
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: create
|
||||
description: 'Deploy ssh key to server.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
key_id:
|
||||
name: key_id
|
||||
description: 'The ID of the key.'
|
||||
required: true
|
||||
example: numquam
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
name:
|
||||
name: name
|
||||
description: 'Key name, required if key_id is not provided.'
|
||||
required: true
|
||||
example: alias
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
public_key:
|
||||
name: public_key
|
||||
description: 'Public Key, required if key_id is not provided.'
|
||||
required: true
|
||||
example: voluptate
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
key_id: numquam
|
||||
name: alias
|
||||
public_key: voluptate
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"user":null,"name":"Mr. Stanton Bergnaum","created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer V64Z86fEdbavh1PgackDe53'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/ssh-keys/{sshKey_id}'
|
||||
metadata:
|
||||
groupName: ssh-keys
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: delete
|
||||
description: 'Delete ssh key from server.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
sshKey_id:
|
||||
name: sshKey_id
|
||||
description: 'The ID of the sshKey.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
sshKey_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 3deg1vc65k8D6abahfZVPE4'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
578
.scribe/endpoints.cache/09.yaml
Normal file
578
.scribe/endpoints.cache/09.yaml
Normal file
@ -0,0 +1,578 @@
|
||||
## Autogenerated by Scribe. DO NOT MODIFY.
|
||||
|
||||
name: services
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/services'
|
||||
metadata:
|
||||
groupName: services
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: list
|
||||
description: 'Get all services.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":null,"server_id":null,"type":null,"type_data":null,"name":null,"version":null,"unit":null,"status":null,"is_default":null,"created_at":null,"updated_at":null},{"id":null,"server_id":null,"type":null,"type_data":null,"name":null,"version":null,"unit":null,"status":null,"is_default":null,"created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer cdhb5VevgkZ6DafP6184a3E'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/services/{id}'
|
||||
metadata:
|
||||
groupName: services
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: show
|
||||
description: 'Get a service by ID.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the service.'
|
||||
required: true
|
||||
example: 53
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
id: 53
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"type":null,"type_data":null,"name":null,"version":null,"unit":null,"status":null,"is_default":null,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 3vDaE6Pc51Zg8kbheadVf64'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/services/{service_id}/start'
|
||||
metadata:
|
||||
groupName: services
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: start
|
||||
description: 'Start service.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
service_id:
|
||||
name: service_id
|
||||
description: 'The ID of the service.'
|
||||
required: true
|
||||
example: 53
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
service_id: 53
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer a6e6Db5VcP314EgZdka8vhf'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/services/{service_id}/stop'
|
||||
metadata:
|
||||
groupName: services
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: stop
|
||||
description: 'Stop service.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
service_id:
|
||||
name: service_id
|
||||
description: 'The ID of the service.'
|
||||
required: true
|
||||
example: 53
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
service_id: 53
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer kefg56PEc4a18aDdvVZb3h6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/services/{service_id}/restart'
|
||||
metadata:
|
||||
groupName: services
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: restart
|
||||
description: 'Restart service.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
service_id:
|
||||
name: service_id
|
||||
description: 'The ID of the service.'
|
||||
required: true
|
||||
example: 53
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
service_id: 53
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer edhaE164avZ6gbVDPf3k8c5'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/services/{service_id}/enable'
|
||||
metadata:
|
||||
groupName: services
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: enable
|
||||
description: 'Enable service.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
service_id:
|
||||
name: service_id
|
||||
description: 'The ID of the service.'
|
||||
required: true
|
||||
example: 53
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
service_id: 53
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer D4c1hbfV6Pad68v3gEkaeZ5'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/services/{service_id}/disable'
|
||||
metadata:
|
||||
groupName: services
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: disable
|
||||
description: 'Disable service.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
service_id:
|
||||
name: service_id
|
||||
description: 'The ID of the service.'
|
||||
required: true
|
||||
example: 53
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
service_id: 53
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer be41fvh6a8d5PkDVEgZ36ca'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/services/{service_id}'
|
||||
metadata:
|
||||
groupName: services
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: delete
|
||||
description: 'Delete service.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
service_id:
|
||||
name: service_id
|
||||
description: 'The ID of the service.'
|
||||
required: true
|
||||
example: 53
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
service_id: 53
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer dcb68hg634P1DaZvef5VakE'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
518
.scribe/endpoints.cache/10.yaml
Normal file
518
.scribe/endpoints.cache/10.yaml
Normal file
@ -0,0 +1,518 @@
|
||||
## Autogenerated by Scribe. DO NOT MODIFY.
|
||||
|
||||
name: sites
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/sites'
|
||||
metadata:
|
||||
groupName: sites
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: list
|
||||
description: 'Get all sites.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":null,"server_id":null,"source_control_id":null,"type":"laravel","type_data":null,"domain":"test.com","aliases":null,"web_directory":"\/","path":"\/home","php_version":"8.2","repository":null,"branch":"main","status":"ready","port":null,"user":"vito","progress":100,"created_at":null,"updated_at":null},{"id":null,"server_id":null,"source_control_id":null,"type":"laravel","type_data":null,"domain":"test.com","aliases":null,"web_directory":"\/","path":"\/home","php_version":"8.2","repository":null,"branch":"main","status":"ready","port":null,"user":"vito","progress":100,"created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 3gE54ahkea166PfvbVD8Zdc'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/sites'
|
||||
metadata:
|
||||
groupName: sites
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: create
|
||||
description: 'Create a new site.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
type:
|
||||
name: type
|
||||
description: ''
|
||||
required: true
|
||||
example: php
|
||||
type: string
|
||||
enumValues:
|
||||
- php
|
||||
- php-blank
|
||||
- phpmyadmin
|
||||
- laravel
|
||||
- wordpress
|
||||
- load-balancer
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
domain:
|
||||
name: domain
|
||||
description: ''
|
||||
required: true
|
||||
example: rem
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
aliases:
|
||||
name: aliases
|
||||
description: ''
|
||||
required: true
|
||||
example:
|
||||
- libero
|
||||
type: 'string[]'
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
php_version:
|
||||
name: php_version
|
||||
description: 'One of the installed PHP Versions'
|
||||
required: true
|
||||
example: '7.4'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
web_directory:
|
||||
name: web_directory
|
||||
description: 'Required for PHP and Laravel sites'
|
||||
required: true
|
||||
example: public
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
source_control:
|
||||
name: source_control
|
||||
description: 'Source control ID, Required for Sites which support source control'
|
||||
required: true
|
||||
example: dolor
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
repository:
|
||||
name: repository
|
||||
description: 'Repository, Required for Sites which support source control'
|
||||
required: true
|
||||
example: organization/repository
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
branch:
|
||||
name: branch
|
||||
description: 'Branch, Required for Sites which support source control'
|
||||
required: true
|
||||
example: main
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
composer:
|
||||
name: composer
|
||||
description: 'Run composer if site supports composer'
|
||||
required: true
|
||||
example: true
|
||||
type: boolean
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
version:
|
||||
name: version
|
||||
description: 'Version, if the site type requires a version like PHPMyAdmin'
|
||||
required: true
|
||||
example: 5.2.1
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
user:
|
||||
name: user
|
||||
description: 'user, to isolate the website under a new user'
|
||||
required: true
|
||||
example: vitae
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
method:
|
||||
name: method
|
||||
description: 'Load balancer method, Required if the site type is Load balancer'
|
||||
required: true
|
||||
example: ip-hash
|
||||
type: string
|
||||
enumValues:
|
||||
- round-robin
|
||||
- least-connections
|
||||
- ip-hash
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
type: php
|
||||
domain: rem
|
||||
aliases:
|
||||
- libero
|
||||
php_version: '7.4'
|
||||
web_directory: public
|
||||
source_control: dolor
|
||||
repository: organization/repository
|
||||
branch: main
|
||||
composer: true
|
||||
version: 5.2.1
|
||||
user: vitae
|
||||
method: ip-hash
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"source_control_id":null,"type":"laravel","type_data":null,"domain":"test.com","aliases":null,"web_directory":"\/","path":"\/home","php_version":"8.2","repository":null,"branch":"main","status":"ready","port":null,"user":"vito","progress":100,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer e1V4ga3Pavk6ch6b5E8fZdD'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/sites/{id}'
|
||||
metadata:
|
||||
groupName: sites
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: show
|
||||
description: 'Get a site by ID.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the site.'
|
||||
required: true
|
||||
example: 26
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
id: 26
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"source_control_id":null,"type":"laravel","type_data":null,"domain":"test.com","aliases":null,"web_directory":"\/","path":"\/home","php_version":"8.2","repository":null,"branch":"main","status":"ready","port":null,"user":"vito","progress":100,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 8gZkEaehfd4v3bac615DVP6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/sites/{site_id}'
|
||||
metadata:
|
||||
groupName: sites
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: delete
|
||||
description: 'Delete site.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
site_id:
|
||||
name: site_id
|
||||
description: 'The ID of the site.'
|
||||
required: true
|
||||
example: 26
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
site_id: 26
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer aadb1h6f6kD4V8vePZgcE35'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/sites/{site_id}/load-balancer'
|
||||
metadata:
|
||||
groupName: sites
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: load-balancer
|
||||
description: 'Update load balancer.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
site_id:
|
||||
name: site_id
|
||||
description: 'The ID of the site.'
|
||||
required: true
|
||||
example: 26
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
site_id: 26
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
method:
|
||||
name: method
|
||||
description: 'Load balancer method, Required if the site type is Load balancer'
|
||||
required: true
|
||||
example: least-connections
|
||||
type: string
|
||||
enumValues:
|
||||
- round-robin
|
||||
- least-connections
|
||||
- ip-hash
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
servers:
|
||||
name: servers
|
||||
description: 'Array of servers including server, port, weight, backup. (server is the local IP of the server)'
|
||||
required: true
|
||||
example:
|
||||
- deleniti
|
||||
type: 'string[]'
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
method: least-connections
|
||||
servers:
|
||||
- deleniti
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 5E6hZa64bka1cV3Pdvf8Deg'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
430
.scribe/endpoints.cache/11.yaml
Normal file
430
.scribe/endpoints.cache/11.yaml
Normal file
@ -0,0 +1,430 @@
|
||||
## Autogenerated by Scribe. DO NOT MODIFY.
|
||||
|
||||
name: source-controls
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/source-controls'
|
||||
metadata:
|
||||
groupName: source-controls
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: list
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":5,"project_id":null,"global":true,"name":"Mr. Reuben Schimmel","provider":"github","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"},{"id":6,"project_id":null,"global":true,"name":"Ms. Brandy Mraz V","provider":"github","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer g4kDa1vV6cdfPe3baZ8h5E6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/source-controls'
|
||||
metadata:
|
||||
groupName: source-controls
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: create
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
provider:
|
||||
name: provider
|
||||
description: 'The provider'
|
||||
required: true
|
||||
example: bitbucket
|
||||
type: string
|
||||
enumValues:
|
||||
- gitlab
|
||||
- github
|
||||
- bitbucket
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
name:
|
||||
name: name
|
||||
description: 'The name of the storage provider.'
|
||||
required: true
|
||||
example: dignissimos
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
token:
|
||||
name: token
|
||||
description: 'The token if provider requires api token'
|
||||
required: true
|
||||
example: voluptates
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
url:
|
||||
name: url
|
||||
description: 'The URL if the provider is Gitlab and it is self-hosted'
|
||||
required: true
|
||||
example: 'https://www.hamill.net/culpa-non-qui-suscipit-dolores-id-aliquam'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
username:
|
||||
name: username
|
||||
description: 'The username if the provider is Bitbucket'
|
||||
required: true
|
||||
example: nisi
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
password:
|
||||
name: password
|
||||
description: 'The password if the provider is Bitbucket'
|
||||
required: true
|
||||
example: W~19Z0
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
provider: bitbucket
|
||||
name: dignissimos
|
||||
token: voluptates
|
||||
url: 'https://www.hamill.net/culpa-non-qui-suscipit-dolores-id-aliquam'
|
||||
username: nisi
|
||||
password: W~19Z0
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":5,"project_id":null,"global":true,"name":"Harmony Koss DVM","provider":"github","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer fhEkg836V6cbd5ZPva4Dae1'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/source-controls/{sourceControl_id}'
|
||||
metadata:
|
||||
groupName: source-controls
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: show
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
sourceControl_id:
|
||||
name: sourceControl_id
|
||||
description: 'The ID of the sourceControl.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
sourceControl_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":5,"project_id":null,"global":true,"name":"Martin Welch","provider":"github","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 458gPbv6deEfkcZ13ahaD6V'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- PUT
|
||||
uri: 'api/projects/{project_id}/source-controls/{sourceControl_id}'
|
||||
metadata:
|
||||
groupName: source-controls
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: update
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
sourceControl_id:
|
||||
name: sourceControl_id
|
||||
description: 'The ID of the sourceControl.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
sourceControl_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
name:
|
||||
name: name
|
||||
description: 'The name of the storage provider.'
|
||||
required: true
|
||||
example: aut
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
token:
|
||||
name: token
|
||||
description: 'The token if provider requires api token'
|
||||
required: true
|
||||
example: repudiandae
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
url:
|
||||
name: url
|
||||
description: 'The URL if the provider is Gitlab and it is self-hosted'
|
||||
required: true
|
||||
example: 'http://howe.net/eaque-assumenda-voluptatem-quo-libero-eius.html'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
username:
|
||||
name: username
|
||||
description: 'The username if the provider is Bitbucket'
|
||||
required: true
|
||||
example: consequatur
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
password:
|
||||
name: password
|
||||
description: 'The password if the provider is Bitbucket'
|
||||
required: true
|
||||
example: 'oX/H"pAIt7R2"'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
global:
|
||||
name: global
|
||||
description: 'Accessible in all projects'
|
||||
required: true
|
||||
example: false
|
||||
type: string
|
||||
enumValues:
|
||||
- true
|
||||
- false
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
name: aut
|
||||
token: repudiandae
|
||||
url: 'http://howe.net/eaque-assumenda-voluptatem-quo-libero-eius.html'
|
||||
username: consequatur
|
||||
password: 'oX/H"pAIt7R2"'
|
||||
global: false
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":5,"project_id":null,"global":true,"name":"Miss Dulce Nicolas III","provider":"github","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer De1a4dEaV5v3Zgh8fPk66bc'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/projects/{project_id}/source-controls/{sourceControl_id}'
|
||||
metadata:
|
||||
groupName: source-controls
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: delete
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
sourceControl_id:
|
||||
name: sourceControl_id
|
||||
description: 'The ID of the sourceControl.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
sourceControl_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer EZhd63eafgcV4a651PvkDb8'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
372
.scribe/endpoints.cache/12.yaml
Normal file
372
.scribe/endpoints.cache/12.yaml
Normal file
@ -0,0 +1,372 @@
|
||||
## Autogenerated by Scribe. DO NOT MODIFY.
|
||||
|
||||
name: storage-providers
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/storage-providers'
|
||||
metadata:
|
||||
groupName: storage-providers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: list
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":5,"project_id":null,"global":true,"name":"dolorem","provider":"s3","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"},{"id":6,"project_id":null,"global":true,"name":"itaque","provider":"s3","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer D16Vg58E6Pfkh3Zveab4dca'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/storage-providers'
|
||||
metadata:
|
||||
groupName: storage-providers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: create
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
provider:
|
||||
name: provider
|
||||
description: 'The provider (aws, linode, hetzner, digitalocean, vultr, ...)'
|
||||
required: true
|
||||
example: alias
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
name:
|
||||
name: name
|
||||
description: 'The name of the storage provider.'
|
||||
required: true
|
||||
example: explicabo
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
token:
|
||||
name: token
|
||||
description: 'The token if provider requires api token'
|
||||
required: true
|
||||
example: ut
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
key:
|
||||
name: key
|
||||
description: 'The key if provider requires key'
|
||||
required: true
|
||||
example: libero
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
secret:
|
||||
name: secret
|
||||
description: 'The secret if provider requires key'
|
||||
required: true
|
||||
example: consequatur
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
provider: alias
|
||||
name: explicabo
|
||||
token: ut
|
||||
key: libero
|
||||
secret: consequatur
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":5,"project_id":null,"global":true,"name":"quos","provider":"s3","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer DaZ6d6Eck1bhVe3g4aP85vf'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/storage-providers/{storageProvider_id}'
|
||||
metadata:
|
||||
groupName: storage-providers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: show
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
storageProvider_id:
|
||||
name: storageProvider_id
|
||||
description: 'The ID of the storageProvider.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
storageProvider_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":5,"project_id":null,"global":true,"name":"id","provider":"s3","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 1dekD4gva56bc683VPEhZfa'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- PUT
|
||||
uri: 'api/projects/{project_id}/storage-providers/{storageProvider_id}'
|
||||
metadata:
|
||||
groupName: storage-providers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: update
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
storageProvider_id:
|
||||
name: storageProvider_id
|
||||
description: 'The ID of the storageProvider.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
storageProvider_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
name:
|
||||
name: name
|
||||
description: 'The name of the storage provider.'
|
||||
required: true
|
||||
example: sequi
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
global:
|
||||
name: global
|
||||
description: 'Accessible in all projects'
|
||||
required: true
|
||||
example: false
|
||||
type: string
|
||||
enumValues:
|
||||
- true
|
||||
- false
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
name: sequi
|
||||
global: false
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":5,"project_id":null,"global":true,"name":"velit","provider":"s3","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer V65g18Pca4v3hDEkbZfe6da'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/projects/{project_id}/storage-providers/{storageProvider_id}'
|
||||
metadata:
|
||||
groupName: storage-providers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: delete
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
storageProvider_id:
|
||||
name: storageProvider_id
|
||||
description: 'The ID of the storageProvider.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
storageProvider_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 1v6a6efgch3DbZ4aVE5d8kP'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
308
.scribe/endpoints/00.yaml
Normal file
308
.scribe/endpoints/00.yaml
Normal file
@ -0,0 +1,308 @@
|
||||
name: cron-jobs
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/cron-jobs'
|
||||
metadata:
|
||||
groupName: cron-jobs
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: list
|
||||
description: 'Get all cron jobs.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":null,"server_id":null,"command":"ls -la","user":"root","frequency":"* * * * *","status":"ready","created_at":null,"updated_at":null},{"id":null,"server_id":null,"command":"ls -la","user":"root","frequency":"* * * * *","status":"ready","created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer ge6ZVa4kfD86hdv5a31EcbP'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/cron-jobs'
|
||||
metadata:
|
||||
groupName: cron-jobs
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: create
|
||||
description: 'Create a new cron job.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
command:
|
||||
name: command
|
||||
description: ''
|
||||
required: true
|
||||
example: itaque
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
user:
|
||||
name: user
|
||||
description: ''
|
||||
required: true
|
||||
example: root
|
||||
type: string
|
||||
enumValues:
|
||||
- root
|
||||
- vito
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
frequency:
|
||||
name: frequency
|
||||
description: 'Frequency of the cron job.'
|
||||
required: true
|
||||
example: '* * * * *'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
command: itaque
|
||||
user: root
|
||||
frequency: '* * * * *'
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"command":"ls -la","user":"root","frequency":"* * * * *","status":"ready","created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer cdh5bD8gVPkf34e1ZEva6a6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/cron-jobs/{cronJob_id}'
|
||||
metadata:
|
||||
groupName: cron-jobs
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: show
|
||||
description: 'Get a cron job by ID.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cronJob_id:
|
||||
name: cronJob_id
|
||||
description: 'The ID of the cronJob.'
|
||||
required: true
|
||||
example: 18
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
cronJob_id: 18
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"command":"ls -la","user":"root","frequency":"* * * * *","status":"ready","created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer fa5VgdkaD8cZ6vh34Pb16eE'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/cron-jobs/{cronJob_id}'
|
||||
metadata:
|
||||
groupName: cron-jobs
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: delete
|
||||
description: 'Delete cron job.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cronJob_id:
|
||||
name: cronJob_id
|
||||
description: 'The ID of the cronJob.'
|
||||
required: true
|
||||
example: 10
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
cronJob_id: 10
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer P8hkva3ZD4fgb166adEVce5'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
284
.scribe/endpoints/01.yaml
Normal file
284
.scribe/endpoints/01.yaml
Normal file
@ -0,0 +1,284 @@
|
||||
name: databases
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/databases'
|
||||
metadata:
|
||||
groupName: databases
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: list
|
||||
description: 'Get all databases.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":null,"server_id":null,"name":"amalia38","status":"ready","created_at":null,"updated_at":null},{"id":null,"server_id":null,"name":"troy.rippin","status":"ready","created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer Z641ebPacDV6f38kEgdah5v'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/databases'
|
||||
metadata:
|
||||
groupName: databases
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: create
|
||||
description: 'Create a new database.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
name:
|
||||
name: name
|
||||
description: ''
|
||||
required: true
|
||||
example: et
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
name: et
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"name":"harvey.haskell","status":"ready","created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer d4gbv56caV3aZ8D1h6kfEPe'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/databases/{id}'
|
||||
metadata:
|
||||
groupName: databases
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: show
|
||||
description: 'Get a database by ID.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the database.'
|
||||
required: true
|
||||
example: 19
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
id: 19
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"name":"ruthie.koepp","status":"ready","created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer P68VgDcaEZvk63f4b5aed1h'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/databases/{database_id}'
|
||||
metadata:
|
||||
groupName: databases
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: delete
|
||||
description: 'Delete database.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
database_id:
|
||||
name: database_id
|
||||
description: 'The ID of the database.'
|
||||
required: true
|
||||
example: 15
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
database_id: 15
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer DkPc6d1heEv5a8fb4V63agZ'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
390
.scribe/endpoints/02.yaml
Normal file
390
.scribe/endpoints/02.yaml
Normal file
@ -0,0 +1,390 @@
|
||||
name: database-users
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/database-users'
|
||||
metadata:
|
||||
groupName: database-users
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: list
|
||||
description: 'Get all database users.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":null,"server_id":null,"username":"xgaylord","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null},{"id":null,"server_id":null,"username":"una37","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer P4gD36fZeckvVh5ab86Ead1'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/database-users'
|
||||
metadata:
|
||||
groupName: database-users
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: create
|
||||
description: 'Create a new database user.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
username:
|
||||
name: username
|
||||
description: ''
|
||||
required: true
|
||||
example: consequuntur
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
password:
|
||||
name: password
|
||||
description: ''
|
||||
required: true
|
||||
example: 'fI/i2.O4u&dla?eXvR2'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
host:
|
||||
name: host
|
||||
description: 'Host, if it is a remote user.'
|
||||
required: true
|
||||
example: '%'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
username: consequuntur
|
||||
password: 'fI/i2.O4u&dla?eXvR2'
|
||||
host: '%'
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"username":"kari.farrell","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 5k8Vced1baaE6f4ZvDPgh36'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/database-users/{databaseUser_id}'
|
||||
metadata:
|
||||
groupName: database-users
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: show
|
||||
description: 'Get a database user by ID.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
databaseUser_id:
|
||||
name: databaseUser_id
|
||||
description: 'The ID of the databaseUser.'
|
||||
required: true
|
||||
example: 18
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
databaseUser_id: 18
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"username":"caterina.mosciski","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 3kDveP5V8a6dghfa4E16cbZ'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/database-users/{databaseUser_id}/link'
|
||||
metadata:
|
||||
groupName: database-users
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: link
|
||||
description: 'Link to databases'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
databaseUser_id:
|
||||
name: databaseUser_id
|
||||
description: 'The ID of the databaseUser.'
|
||||
required: true
|
||||
example: 4
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
databaseUser_id: 4
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
databases:
|
||||
name: databases
|
||||
description: 'Array of database names to link to the user.'
|
||||
required: true
|
||||
example: non
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
databases: non
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"username":"kurtis05","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer DgPea43EvV51a866dfbZckh'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/database-users/{databaseUser_id}'
|
||||
metadata:
|
||||
groupName: database-users
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: delete
|
||||
description: 'Delete database user.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
databaseUser_id:
|
||||
name: databaseUser_id
|
||||
description: 'The ID of the databaseUser.'
|
||||
required: true
|
||||
example: 6
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
databaseUser_id: 6
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6ackVP8hEZd3164gD5evafb'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
332
.scribe/endpoints/03.yaml
Normal file
332
.scribe/endpoints/03.yaml
Normal file
@ -0,0 +1,332 @@
|
||||
name: firewall-rules
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/firewall-rules'
|
||||
metadata:
|
||||
groupName: firewall-rules
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: list
|
||||
description: 'Get all firewall rules.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":null,"server_id":null,"type":"allow","protocol":"tcp","port":38781,"source":"79.116.255.150","mask":24,"note":"test","status":null,"created_at":null,"updated_at":null},{"id":null,"server_id":null,"type":"allow","protocol":"tcp","port":32141,"source":"52.174.114.251","mask":24,"note":"test","status":null,"created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer h3P5gD8E4dkeZ6abac6vfV1'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/firewall-rules'
|
||||
metadata:
|
||||
groupName: firewall-rules
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: create
|
||||
description: 'Create a new firewall rule.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
type:
|
||||
name: type
|
||||
description: ''
|
||||
required: true
|
||||
example: deny
|
||||
type: string
|
||||
enumValues:
|
||||
- allow
|
||||
- deny
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
protocol:
|
||||
name: protocol
|
||||
description: ''
|
||||
required: true
|
||||
example: udp
|
||||
type: string
|
||||
enumValues:
|
||||
- tcp
|
||||
- udp
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
port:
|
||||
name: port
|
||||
description: ''
|
||||
required: true
|
||||
example: et
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
source:
|
||||
name: source
|
||||
description: ''
|
||||
required: true
|
||||
example: voluptates
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
mask:
|
||||
name: mask
|
||||
description: 'Mask for source IP.'
|
||||
required: true
|
||||
example: '0'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
type: deny
|
||||
protocol: udp
|
||||
port: et
|
||||
source: voluptates
|
||||
mask: '0'
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"type":"allow","protocol":"tcp","port":47148,"source":"119.182.8.45","mask":24,"note":"test","status":null,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6a8DVv5k3gZfEe6hb1daPc4'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/firewall-rules/{firewallRule_id}'
|
||||
metadata:
|
||||
groupName: firewall-rules
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: show
|
||||
description: 'Get a firewall rule by ID.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
firewallRule_id:
|
||||
name: firewallRule_id
|
||||
description: 'The ID of the firewallRule.'
|
||||
required: true
|
||||
example: 29
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
firewallRule_id: 29
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"type":"allow","protocol":"tcp","port":2317,"source":"44.161.134.114","mask":24,"note":"test","status":null,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer P4bZdV1geED3kfh568aa6cv'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/firewall-rules/{firewallRule_id}'
|
||||
metadata:
|
||||
groupName: firewall-rules
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: delete
|
||||
description: 'Delete firewall rule.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
firewallRule_id:
|
||||
name: firewallRule_id
|
||||
description: 'The ID of the firewallRule.'
|
||||
required: true
|
||||
example: 29
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
firewallRule_id: 29
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer Dh3kcaafdg6E5ZvV46ePb81'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
44
.scribe/endpoints/04.yaml
Normal file
44
.scribe/endpoints/04.yaml
Normal file
@ -0,0 +1,44 @@
|
||||
name: general
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: api/health
|
||||
metadata:
|
||||
groupName: general
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: health-check
|
||||
description: ''
|
||||
authenticated: false
|
||||
custom: []
|
||||
headers:
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"success":true,"version":"2.1.0"}'
|
||||
headers:
|
||||
cache-control: 'no-cache, private'
|
||||
content-type: application/json
|
||||
x-ratelimit-limit: '60'
|
||||
x-ratelimit-remaining: '59'
|
||||
access-control-allow-origin: '*'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth: []
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
258
.scribe/endpoints/05.yaml
Normal file
258
.scribe/endpoints/05.yaml
Normal file
@ -0,0 +1,258 @@
|
||||
name: projects
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: api/projects
|
||||
metadata:
|
||||
groupName: projects
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: list
|
||||
description: 'Get all projects.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":3,"name":"Jeffry Dickinson","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"},{"id":4,"name":"Miss Tianna Dietrich PhD","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 5DaveP3d6b6khEZVcg4fa18'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: api/projects
|
||||
metadata:
|
||||
groupName: projects
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: create
|
||||
description: 'Create a new project.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
name:
|
||||
name: name
|
||||
description: 'The name of the project.'
|
||||
required: true
|
||||
example: quos
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
name: quos
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":3,"name":"Isidro Franecki","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer a6P53EvkcZV6D4ghad1efb8'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{id}'
|
||||
metadata:
|
||||
groupName: projects
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: show
|
||||
description: 'Get a project by ID.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":3,"name":"Rhoda Parisian","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer v48Ve5ZghdcbE1akP66fD3a'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- PUT
|
||||
uri: 'api/projects/{id}'
|
||||
metadata:
|
||||
groupName: projects
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: update
|
||||
description: 'Update project.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
name:
|
||||
name: name
|
||||
description: 'The name of the project.'
|
||||
required: true
|
||||
example: ullam
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
name: ullam
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":3,"name":"Mr. Dashawn Jacobson Sr.","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer fvEdh3Vgbk56Z4a61eP8caD'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/projects/{project_id}'
|
||||
metadata:
|
||||
groupName: projects
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: delete
|
||||
description: 'Delete project.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer eg4c3vZ1Dhaa68d6PEfk5bV'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
501
.scribe/endpoints/06.yaml
Normal file
501
.scribe/endpoints/06.yaml
Normal file
@ -0,0 +1,501 @@
|
||||
name: servers
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers'
|
||||
metadata:
|
||||
groupName: servers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: list
|
||||
description: 'Get all servers in a project.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":null,"project_id":null,"user_id":null,"provider_id":null,"name":"Amina DuBuque","ssh_user":"vito","ip":"163.77.69.73","local_ip":"137.139.200.70","port":22,"os":"ubuntu_22","type":"regular","type_data":null,"provider":"custom","provider_data":null,"public_key":"test","status":"ready","auto_update":null,"available_updates":0,"security_updates":null,"progress":100,"progress_step":null,"updates":null,"last_update_check":null,"created_at":null,"updated_at":null},{"id":null,"project_id":null,"user_id":null,"provider_id":null,"name":"Floy Cummerata","ssh_user":"vito","ip":"62.53.140.25","local_ip":"34.59.35.195","port":22,"os":"ubuntu_22","type":"regular","type_data":null,"provider":"custom","provider_data":null,"public_key":"test","status":"ready","auto_update":null,"available_updates":0,"security_updates":null,"progress":100,"progress_step":null,"updates":null,"last_update_check":null,"created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer E81avahec6365dbZfgD4kPV'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers'
|
||||
metadata:
|
||||
groupName: servers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: create
|
||||
description: 'Create a new server.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
provider:
|
||||
name: provider
|
||||
description: 'The server provider type'
|
||||
required: true
|
||||
example: iste
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_provider:
|
||||
name: server_provider
|
||||
description: 'If the provider is not custom, the ID of the server provider profile'
|
||||
required: true
|
||||
example: custom
|
||||
type: string
|
||||
enumValues:
|
||||
- custom
|
||||
- hetzner
|
||||
- digitalocean
|
||||
- linode
|
||||
- vultr
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
region:
|
||||
name: region
|
||||
description: 'Provider region if the provider is not custom'
|
||||
required: true
|
||||
example: libero
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
plan:
|
||||
name: plan
|
||||
description: 'Provider plan if the provider is not custom'
|
||||
required: true
|
||||
example: ut
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
ip:
|
||||
name: ip
|
||||
description: 'SSH IP address if the provider is custom'
|
||||
required: true
|
||||
example: molestias
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
port:
|
||||
name: port
|
||||
description: 'SSH Port if the provider is custom'
|
||||
required: true
|
||||
example: laudantium
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
name:
|
||||
name: name
|
||||
description: 'The name of the server.'
|
||||
required: true
|
||||
example: illum
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
os:
|
||||
name: os
|
||||
description: 'The os of the server'
|
||||
required: true
|
||||
example: autem
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
webserver:
|
||||
name: webserver
|
||||
description: 'Web server'
|
||||
required: true
|
||||
example: none
|
||||
type: string
|
||||
enumValues:
|
||||
- none
|
||||
- nginx
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
database:
|
||||
name: database
|
||||
description: Database
|
||||
required: true
|
||||
example: postgresql12
|
||||
type: string
|
||||
enumValues:
|
||||
- none
|
||||
- mysql57
|
||||
- mysql80
|
||||
- mariadb103
|
||||
- mariadb104
|
||||
- mariadb103
|
||||
- postgresql12
|
||||
- postgresql13
|
||||
- postgresql14
|
||||
- postgresql15
|
||||
- postgresql16
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
php:
|
||||
name: php
|
||||
description: 'PHP version'
|
||||
required: true
|
||||
example: '7.4'
|
||||
type: string
|
||||
enumValues:
|
||||
- '7.0'
|
||||
- '7.1'
|
||||
- '7.2'
|
||||
- '7.3'
|
||||
- '7.4'
|
||||
- '8.0'
|
||||
- '8.1'
|
||||
- '8.2'
|
||||
- '8.3'
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
provider: iste
|
||||
server_provider: custom
|
||||
region: libero
|
||||
plan: ut
|
||||
ip: molestias
|
||||
port: laudantium
|
||||
name: illum
|
||||
os: autem
|
||||
webserver: none
|
||||
database: postgresql12
|
||||
php: '7.4'
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"project_id":null,"user_id":null,"provider_id":null,"name":"Archibald Nolan","ssh_user":"vito","ip":"226.168.13.177","local_ip":"143.14.43.182","port":22,"os":"ubuntu_22","type":"regular","type_data":null,"provider":"custom","provider_data":null,"public_key":"test","status":"ready","auto_update":null,"available_updates":0,"security_updates":null,"progress":100,"progress_step":null,"updates":null,"last_update_check":null,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer aad3Pvc4e65DghZVEk8f1b6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{id}'
|
||||
metadata:
|
||||
groupName: servers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: show
|
||||
description: 'Get a server by ID.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"project_id":null,"user_id":null,"provider_id":null,"name":"Tevin Sipes","ssh_user":"vito","ip":"61.41.183.152","local_ip":"197.160.239.147","port":22,"os":"ubuntu_22","type":"regular","type_data":null,"provider":"custom","provider_data":null,"public_key":"test","status":"ready","auto_update":null,"available_updates":0,"security_updates":null,"progress":100,"progress_step":null,"updates":null,"last_update_check":null,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 5EhD3v6Z8Vdakfg46eP1cab'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/reboot'
|
||||
metadata:
|
||||
groupName: servers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: reboot
|
||||
description: 'Reboot a server.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer Pc5Da6Vhdk1vag6fE84e3Zb'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/upgrade'
|
||||
metadata:
|
||||
groupName: servers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: upgrade
|
||||
description: 'Upgrade server.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer a61v48DfkeEbcg3a6hd5PZV'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}'
|
||||
metadata:
|
||||
groupName: servers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: delete
|
||||
description: 'Delete server.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer haE8D6Z6gePk1vadVb53c4f'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
370
.scribe/endpoints/07.yaml
Normal file
370
.scribe/endpoints/07.yaml
Normal file
@ -0,0 +1,370 @@
|
||||
name: server-providers
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/server-providers'
|
||||
metadata:
|
||||
groupName: server-providers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: list
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":2,"project_id":null,"global":true,"name":"laudantium","provider":"vultr","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"},{"id":3,"project_id":null,"global":true,"name":"aut","provider":"aws","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer Df16eda8Pa345EkgbZ6cvhV'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/server-providers'
|
||||
metadata:
|
||||
groupName: server-providers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: create
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
provider:
|
||||
name: provider
|
||||
description: 'The provider (aws, linode, hetzner, digitalocean, vultr, ...)'
|
||||
required: true
|
||||
example: voluptatem
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
name:
|
||||
name: name
|
||||
description: 'The name of the server provider.'
|
||||
required: true
|
||||
example: repellat
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
token:
|
||||
name: token
|
||||
description: 'The token if provider requires api token'
|
||||
required: true
|
||||
example: omnis
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
key:
|
||||
name: key
|
||||
description: 'The key if provider requires key'
|
||||
required: true
|
||||
example: recusandae
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
secret:
|
||||
name: secret
|
||||
description: 'The secret if provider requires key'
|
||||
required: true
|
||||
example: in
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
provider: voluptatem
|
||||
name: repellat
|
||||
token: omnis
|
||||
key: recusandae
|
||||
secret: in
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":2,"project_id":null,"global":true,"name":"quia","provider":"vultr","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 8fbgDV6vdhakE1c64e3P5aZ'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/server-providers/{serverProvider_id}'
|
||||
metadata:
|
||||
groupName: server-providers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: show
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
serverProvider_id:
|
||||
name: serverProvider_id
|
||||
description: 'The ID of the serverProvider.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
serverProvider_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":2,"project_id":null,"global":true,"name":"ab","provider":"hetzner","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer eVE816Pc4ak3bdfahDZv6g5'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- PUT
|
||||
uri: 'api/projects/{project_id}/server-providers/{serverProvider_id}'
|
||||
metadata:
|
||||
groupName: server-providers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: update
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
serverProvider_id:
|
||||
name: serverProvider_id
|
||||
description: 'The ID of the serverProvider.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
serverProvider_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
name:
|
||||
name: name
|
||||
description: 'The name of the server provider.'
|
||||
required: true
|
||||
example: est
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
global:
|
||||
name: global
|
||||
description: 'Accessible in all projects'
|
||||
required: true
|
||||
example: true
|
||||
type: string
|
||||
enumValues:
|
||||
- true
|
||||
- false
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
name: est
|
||||
global: true
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":2,"project_id":null,"global":true,"name":"nesciunt","provider":"linode","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer va86keaPDdh3b16Z54EgfcV'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/projects/{project_id}/server-providers/{serverProvider_id}'
|
||||
metadata:
|
||||
groupName: server-providers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: delete
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
serverProvider_id:
|
||||
name: serverProvider_id
|
||||
description: 'The ID of the serverProvider.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
serverProvider_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer abv13ag8h5fZ4EPVDe6dc6k'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
233
.scribe/endpoints/08.yaml
Normal file
233
.scribe/endpoints/08.yaml
Normal file
@ -0,0 +1,233 @@
|
||||
name: ssh-keys
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/ssh-keys'
|
||||
metadata:
|
||||
groupName: ssh-keys
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: list
|
||||
description: 'Get all ssh keys.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":null,"user":null,"name":"Godfrey Mills","created_at":null,"updated_at":null},{"id":null,"user":null,"name":"Donato Streich","created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 1gEva8Z6e6abPDhk453fdVc'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/ssh-keys'
|
||||
metadata:
|
||||
groupName: ssh-keys
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: create
|
||||
description: 'Deploy ssh key to server.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
key_id:
|
||||
name: key_id
|
||||
description: 'The ID of the key.'
|
||||
required: true
|
||||
example: numquam
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
name:
|
||||
name: name
|
||||
description: 'Key name, required if key_id is not provided.'
|
||||
required: true
|
||||
example: alias
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
public_key:
|
||||
name: public_key
|
||||
description: 'Public Key, required if key_id is not provided.'
|
||||
required: true
|
||||
example: voluptate
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
key_id: numquam
|
||||
name: alias
|
||||
public_key: voluptate
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"user":null,"name":"Mr. Stanton Bergnaum","created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer V64Z86fEdbavh1PgackDe53'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/ssh-keys/{sshKey_id}'
|
||||
metadata:
|
||||
groupName: ssh-keys
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: delete
|
||||
description: 'Delete ssh key from server.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
sshKey_id:
|
||||
name: sshKey_id
|
||||
description: 'The ID of the sshKey.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
sshKey_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 3deg1vc65k8D6abahfZVPE4'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
576
.scribe/endpoints/09.yaml
Normal file
576
.scribe/endpoints/09.yaml
Normal file
@ -0,0 +1,576 @@
|
||||
name: services
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/services'
|
||||
metadata:
|
||||
groupName: services
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: list
|
||||
description: 'Get all services.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":null,"server_id":null,"type":null,"type_data":null,"name":null,"version":null,"unit":null,"status":null,"is_default":null,"created_at":null,"updated_at":null},{"id":null,"server_id":null,"type":null,"type_data":null,"name":null,"version":null,"unit":null,"status":null,"is_default":null,"created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer cdhb5VevgkZ6DafP6184a3E'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/services/{id}'
|
||||
metadata:
|
||||
groupName: services
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: show
|
||||
description: 'Get a service by ID.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the service.'
|
||||
required: true
|
||||
example: 53
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
id: 53
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"type":null,"type_data":null,"name":null,"version":null,"unit":null,"status":null,"is_default":null,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 3vDaE6Pc51Zg8kbheadVf64'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/services/{service_id}/start'
|
||||
metadata:
|
||||
groupName: services
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: start
|
||||
description: 'Start service.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
service_id:
|
||||
name: service_id
|
||||
description: 'The ID of the service.'
|
||||
required: true
|
||||
example: 53
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
service_id: 53
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer a6e6Db5VcP314EgZdka8vhf'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/services/{service_id}/stop'
|
||||
metadata:
|
||||
groupName: services
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: stop
|
||||
description: 'Stop service.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
service_id:
|
||||
name: service_id
|
||||
description: 'The ID of the service.'
|
||||
required: true
|
||||
example: 53
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
service_id: 53
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer kefg56PEc4a18aDdvVZb3h6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/services/{service_id}/restart'
|
||||
metadata:
|
||||
groupName: services
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: restart
|
||||
description: 'Restart service.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
service_id:
|
||||
name: service_id
|
||||
description: 'The ID of the service.'
|
||||
required: true
|
||||
example: 53
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
service_id: 53
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer edhaE164avZ6gbVDPf3k8c5'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/services/{service_id}/enable'
|
||||
metadata:
|
||||
groupName: services
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: enable
|
||||
description: 'Enable service.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
service_id:
|
||||
name: service_id
|
||||
description: 'The ID of the service.'
|
||||
required: true
|
||||
example: 53
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
service_id: 53
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer D4c1hbfV6Pad68v3gEkaeZ5'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/services/{service_id}/disable'
|
||||
metadata:
|
||||
groupName: services
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: disable
|
||||
description: 'Disable service.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
service_id:
|
||||
name: service_id
|
||||
description: 'The ID of the service.'
|
||||
required: true
|
||||
example: 53
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
service_id: 53
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer be41fvh6a8d5PkDVEgZ36ca'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/services/{service_id}'
|
||||
metadata:
|
||||
groupName: services
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: delete
|
||||
description: 'Delete service.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
service_id:
|
||||
name: service_id
|
||||
description: 'The ID of the service.'
|
||||
required: true
|
||||
example: 53
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
service_id: 53
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer dcb68hg634P1DaZvef5VakE'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
516
.scribe/endpoints/10.yaml
Normal file
516
.scribe/endpoints/10.yaml
Normal file
@ -0,0 +1,516 @@
|
||||
name: sites
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/sites'
|
||||
metadata:
|
||||
groupName: sites
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: list
|
||||
description: 'Get all sites.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":null,"server_id":null,"source_control_id":null,"type":"laravel","type_data":null,"domain":"test.com","aliases":null,"web_directory":"\/","path":"\/home","php_version":"8.2","repository":null,"branch":"main","status":"ready","port":null,"user":"vito","progress":100,"created_at":null,"updated_at":null},{"id":null,"server_id":null,"source_control_id":null,"type":"laravel","type_data":null,"domain":"test.com","aliases":null,"web_directory":"\/","path":"\/home","php_version":"8.2","repository":null,"branch":"main","status":"ready","port":null,"user":"vito","progress":100,"created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 3gE54ahkea166PfvbVD8Zdc'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/sites'
|
||||
metadata:
|
||||
groupName: sites
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: create
|
||||
description: 'Create a new site.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
type:
|
||||
name: type
|
||||
description: ''
|
||||
required: true
|
||||
example: php
|
||||
type: string
|
||||
enumValues:
|
||||
- php
|
||||
- php-blank
|
||||
- phpmyadmin
|
||||
- laravel
|
||||
- wordpress
|
||||
- load-balancer
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
domain:
|
||||
name: domain
|
||||
description: ''
|
||||
required: true
|
||||
example: rem
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
aliases:
|
||||
name: aliases
|
||||
description: ''
|
||||
required: true
|
||||
example:
|
||||
- libero
|
||||
type: 'string[]'
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
php_version:
|
||||
name: php_version
|
||||
description: 'One of the installed PHP Versions'
|
||||
required: true
|
||||
example: '7.4'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
web_directory:
|
||||
name: web_directory
|
||||
description: 'Required for PHP and Laravel sites'
|
||||
required: true
|
||||
example: public
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
source_control:
|
||||
name: source_control
|
||||
description: 'Source control ID, Required for Sites which support source control'
|
||||
required: true
|
||||
example: dolor
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
repository:
|
||||
name: repository
|
||||
description: 'Repository, Required for Sites which support source control'
|
||||
required: true
|
||||
example: organization/repository
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
branch:
|
||||
name: branch
|
||||
description: 'Branch, Required for Sites which support source control'
|
||||
required: true
|
||||
example: main
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
composer:
|
||||
name: composer
|
||||
description: 'Run composer if site supports composer'
|
||||
required: true
|
||||
example: true
|
||||
type: boolean
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
version:
|
||||
name: version
|
||||
description: 'Version, if the site type requires a version like PHPMyAdmin'
|
||||
required: true
|
||||
example: 5.2.1
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
user:
|
||||
name: user
|
||||
description: 'user, to isolate the website under a new user'
|
||||
required: true
|
||||
example: vitae
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
method:
|
||||
name: method
|
||||
description: 'Load balancer method, Required if the site type is Load balancer'
|
||||
required: true
|
||||
example: ip-hash
|
||||
type: string
|
||||
enumValues:
|
||||
- round-robin
|
||||
- least-connections
|
||||
- ip-hash
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
type: php
|
||||
domain: rem
|
||||
aliases:
|
||||
- libero
|
||||
php_version: '7.4'
|
||||
web_directory: public
|
||||
source_control: dolor
|
||||
repository: organization/repository
|
||||
branch: main
|
||||
composer: true
|
||||
version: 5.2.1
|
||||
user: vitae
|
||||
method: ip-hash
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"source_control_id":null,"type":"laravel","type_data":null,"domain":"test.com","aliases":null,"web_directory":"\/","path":"\/home","php_version":"8.2","repository":null,"branch":"main","status":"ready","port":null,"user":"vito","progress":100,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer e1V4ga3Pavk6ch6b5E8fZdD'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/sites/{id}'
|
||||
metadata:
|
||||
groupName: sites
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: show
|
||||
description: 'Get a site by ID.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the site.'
|
||||
required: true
|
||||
example: 26
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
id: 26
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"source_control_id":null,"type":"laravel","type_data":null,"domain":"test.com","aliases":null,"web_directory":"\/","path":"\/home","php_version":"8.2","repository":null,"branch":"main","status":"ready","port":null,"user":"vito","progress":100,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 8gZkEaehfd4v3bac615DVP6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/sites/{site_id}'
|
||||
metadata:
|
||||
groupName: sites
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: delete
|
||||
description: 'Delete site.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
site_id:
|
||||
name: site_id
|
||||
description: 'The ID of the site.'
|
||||
required: true
|
||||
example: 26
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
site_id: 26
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer aadb1h6f6kD4V8vePZgcE35'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/sites/{site_id}/load-balancer'
|
||||
metadata:
|
||||
groupName: sites
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: load-balancer
|
||||
description: 'Update load balancer.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
site_id:
|
||||
name: site_id
|
||||
description: 'The ID of the site.'
|
||||
required: true
|
||||
example: 26
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 8
|
||||
site_id: 26
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
method:
|
||||
name: method
|
||||
description: 'Load balancer method, Required if the site type is Load balancer'
|
||||
required: true
|
||||
example: least-connections
|
||||
type: string
|
||||
enumValues:
|
||||
- round-robin
|
||||
- least-connections
|
||||
- ip-hash
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
servers:
|
||||
name: servers
|
||||
description: 'Array of servers including server, port, weight, backup. (server is the local IP of the server)'
|
||||
required: true
|
||||
example:
|
||||
- deleniti
|
||||
type: 'string[]'
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
method: least-connections
|
||||
servers:
|
||||
- deleniti
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 5E6hZa64bka1cV3Pdvf8Deg'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
428
.scribe/endpoints/11.yaml
Normal file
428
.scribe/endpoints/11.yaml
Normal file
@ -0,0 +1,428 @@
|
||||
name: source-controls
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/source-controls'
|
||||
metadata:
|
||||
groupName: source-controls
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: list
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":5,"project_id":null,"global":true,"name":"Mr. Reuben Schimmel","provider":"github","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"},{"id":6,"project_id":null,"global":true,"name":"Ms. Brandy Mraz V","provider":"github","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer g4kDa1vV6cdfPe3baZ8h5E6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/source-controls'
|
||||
metadata:
|
||||
groupName: source-controls
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: create
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
provider:
|
||||
name: provider
|
||||
description: 'The provider'
|
||||
required: true
|
||||
example: bitbucket
|
||||
type: string
|
||||
enumValues:
|
||||
- gitlab
|
||||
- github
|
||||
- bitbucket
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
name:
|
||||
name: name
|
||||
description: 'The name of the storage provider.'
|
||||
required: true
|
||||
example: dignissimos
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
token:
|
||||
name: token
|
||||
description: 'The token if provider requires api token'
|
||||
required: true
|
||||
example: voluptates
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
url:
|
||||
name: url
|
||||
description: 'The URL if the provider is Gitlab and it is self-hosted'
|
||||
required: true
|
||||
example: 'https://www.hamill.net/culpa-non-qui-suscipit-dolores-id-aliquam'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
username:
|
||||
name: username
|
||||
description: 'The username if the provider is Bitbucket'
|
||||
required: true
|
||||
example: nisi
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
password:
|
||||
name: password
|
||||
description: 'The password if the provider is Bitbucket'
|
||||
required: true
|
||||
example: W~19Z0
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
provider: bitbucket
|
||||
name: dignissimos
|
||||
token: voluptates
|
||||
url: 'https://www.hamill.net/culpa-non-qui-suscipit-dolores-id-aliquam'
|
||||
username: nisi
|
||||
password: W~19Z0
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":5,"project_id":null,"global":true,"name":"Harmony Koss DVM","provider":"github","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer fhEkg836V6cbd5ZPva4Dae1'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/source-controls/{sourceControl_id}'
|
||||
metadata:
|
||||
groupName: source-controls
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: show
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
sourceControl_id:
|
||||
name: sourceControl_id
|
||||
description: 'The ID of the sourceControl.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
sourceControl_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":5,"project_id":null,"global":true,"name":"Martin Welch","provider":"github","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 458gPbv6deEfkcZ13ahaD6V'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- PUT
|
||||
uri: 'api/projects/{project_id}/source-controls/{sourceControl_id}'
|
||||
metadata:
|
||||
groupName: source-controls
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: update
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
sourceControl_id:
|
||||
name: sourceControl_id
|
||||
description: 'The ID of the sourceControl.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
sourceControl_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
name:
|
||||
name: name
|
||||
description: 'The name of the storage provider.'
|
||||
required: true
|
||||
example: aut
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
token:
|
||||
name: token
|
||||
description: 'The token if provider requires api token'
|
||||
required: true
|
||||
example: repudiandae
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
url:
|
||||
name: url
|
||||
description: 'The URL if the provider is Gitlab and it is self-hosted'
|
||||
required: true
|
||||
example: 'http://howe.net/eaque-assumenda-voluptatem-quo-libero-eius.html'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
username:
|
||||
name: username
|
||||
description: 'The username if the provider is Bitbucket'
|
||||
required: true
|
||||
example: consequatur
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
password:
|
||||
name: password
|
||||
description: 'The password if the provider is Bitbucket'
|
||||
required: true
|
||||
example: 'oX/H"pAIt7R2"'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
global:
|
||||
name: global
|
||||
description: 'Accessible in all projects'
|
||||
required: true
|
||||
example: false
|
||||
type: string
|
||||
enumValues:
|
||||
- true
|
||||
- false
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
name: aut
|
||||
token: repudiandae
|
||||
url: 'http://howe.net/eaque-assumenda-voluptatem-quo-libero-eius.html'
|
||||
username: consequatur
|
||||
password: 'oX/H"pAIt7R2"'
|
||||
global: false
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":5,"project_id":null,"global":true,"name":"Miss Dulce Nicolas III","provider":"github","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer De1a4dEaV5v3Zgh8fPk66bc'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/projects/{project_id}/source-controls/{sourceControl_id}'
|
||||
metadata:
|
||||
groupName: source-controls
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: delete
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
sourceControl_id:
|
||||
name: sourceControl_id
|
||||
description: 'The ID of the sourceControl.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
sourceControl_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer EZhd63eafgcV4a651PvkDb8'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
370
.scribe/endpoints/12.yaml
Normal file
370
.scribe/endpoints/12.yaml
Normal file
@ -0,0 +1,370 @@
|
||||
name: storage-providers
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/storage-providers'
|
||||
metadata:
|
||||
groupName: storage-providers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: list
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":5,"project_id":null,"global":true,"name":"dolorem","provider":"s3","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"},{"id":6,"project_id":null,"global":true,"name":"itaque","provider":"s3","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer D16Vg58E6Pfkh3Zveab4dca'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/storage-providers'
|
||||
metadata:
|
||||
groupName: storage-providers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: create
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
provider:
|
||||
name: provider
|
||||
description: 'The provider (aws, linode, hetzner, digitalocean, vultr, ...)'
|
||||
required: true
|
||||
example: alias
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
name:
|
||||
name: name
|
||||
description: 'The name of the storage provider.'
|
||||
required: true
|
||||
example: explicabo
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
token:
|
||||
name: token
|
||||
description: 'The token if provider requires api token'
|
||||
required: true
|
||||
example: ut
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
key:
|
||||
name: key
|
||||
description: 'The key if provider requires key'
|
||||
required: true
|
||||
example: libero
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
secret:
|
||||
name: secret
|
||||
description: 'The secret if provider requires key'
|
||||
required: true
|
||||
example: consequatur
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
provider: alias
|
||||
name: explicabo
|
||||
token: ut
|
||||
key: libero
|
||||
secret: consequatur
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":5,"project_id":null,"global":true,"name":"quos","provider":"s3","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer DaZ6d6Eck1bhVe3g4aP85vf'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/storage-providers/{storageProvider_id}'
|
||||
metadata:
|
||||
groupName: storage-providers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: show
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
storageProvider_id:
|
||||
name: storageProvider_id
|
||||
description: 'The ID of the storageProvider.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
storageProvider_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":5,"project_id":null,"global":true,"name":"id","provider":"s3","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 1dekD4gva56bc683VPEhZfa'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- PUT
|
||||
uri: 'api/projects/{project_id}/storage-providers/{storageProvider_id}'
|
||||
metadata:
|
||||
groupName: storage-providers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: update
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
storageProvider_id:
|
||||
name: storageProvider_id
|
||||
description: 'The ID of the storageProvider.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
storageProvider_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
name:
|
||||
name: name
|
||||
description: 'The name of the storage provider.'
|
||||
required: true
|
||||
example: sequi
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
global:
|
||||
name: global
|
||||
description: 'Accessible in all projects'
|
||||
required: true
|
||||
example: false
|
||||
type: string
|
||||
enumValues:
|
||||
- true
|
||||
- false
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
name: sequi
|
||||
global: false
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":5,"project_id":null,"global":true,"name":"velit","provider":"s3","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer V65g18Pca4v3hDEkbZfe6da'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/projects/{project_id}/storage-providers/{storageProvider_id}'
|
||||
metadata:
|
||||
groupName: storage-providers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: delete
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
storageProvider_id:
|
||||
name: storageProvider_id
|
||||
description: 'The ID of the storageProvider.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
storageProvider_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: null
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 1v6a6efgch3DbZ4aVE5d8kP'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
53
.scribe/endpoints/custom.0.yaml
Normal file
53
.scribe/endpoints/custom.0.yaml
Normal file
@ -0,0 +1,53 @@
|
||||
# To include an endpoint that isn't a part of your Laravel app (or belongs to a vendor package),
|
||||
# you can define it in a custom.*.yaml file, like this one.
|
||||
# Each custom file should contain an array of endpoints. Here's an example:
|
||||
# See https://scribe.knuckles.wtf/laravel/documenting/custom-endpoints#extra-sorting-groups-in-custom-endpoint-files for more options
|
||||
|
||||
#- httpMethods:
|
||||
# - POST
|
||||
# uri: api/doSomething/{param}
|
||||
# metadata:
|
||||
# groupName: The group the endpoint belongs to. Can be a new group or an existing group.
|
||||
# groupDescription: A description for the group. You don't need to set this for every endpoint; once is enough.
|
||||
# subgroup: You can add a subgroup, too.
|
||||
# title: Do something
|
||||
# description: 'This endpoint allows you to do something.'
|
||||
# authenticated: false
|
||||
# headers:
|
||||
# Content-Type: application/json
|
||||
# Accept: application/json
|
||||
# urlParameters:
|
||||
# param:
|
||||
# name: param
|
||||
# description: A URL param for no reason.
|
||||
# required: true
|
||||
# example: 2
|
||||
# type: integer
|
||||
# queryParameters:
|
||||
# speed:
|
||||
# name: speed
|
||||
# description: How fast the thing should be done. Can be `slow` or `fast`.
|
||||
# required: false
|
||||
# example: fast
|
||||
# type: string
|
||||
# bodyParameters:
|
||||
# something:
|
||||
# name: something
|
||||
# description: The things we should do.
|
||||
# required: true
|
||||
# example:
|
||||
# - string 1
|
||||
# - string 2
|
||||
# type: 'string[]'
|
||||
# responses:
|
||||
# - status: 200
|
||||
# description: 'When the thing was done smoothly.'
|
||||
# content: # Your response content can be an object, an array, a string or empty.
|
||||
# {
|
||||
# "hey": "ho ho ho"
|
||||
# }
|
||||
# responseFields:
|
||||
# hey:
|
||||
# name: hey
|
||||
# description: Who knows?
|
||||
# type: string # This is optional
|
13
.scribe/intro.md
Normal file
13
.scribe/intro.md
Normal file
@ -0,0 +1,13 @@
|
||||
# Introduction
|
||||
|
||||
VitoDeploy's API documentation.
|
||||
|
||||
<aside>
|
||||
<strong>Base URL</strong>: <code>https://your-vito-url</code>
|
||||
</aside>
|
||||
|
||||
This documentation aims to provide all the information you need to work with our API.
|
||||
|
||||
<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
|
||||
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>
|
||||
|
@ -2,4 +2,4 @@ # Contributing
|
||||
|
||||
Please read the contribution guide on the website
|
||||
|
||||
https://vitodeploy.com/introduction/contribution-guide.html
|
||||
https://vitodeploy.com/prologue/contribution-guide.html
|
||||
|
24
README.md
24
README.md
@ -1,20 +1,21 @@
|
||||
|
||||
<p align="center">
|
||||
<img src="https://github.com/vitodeploy/vito/assets/61919774/8060fded-58e3-4d58-b58b-5b717b0718e9" alt="VitoDeploy>
|
||||
<img src="https://github.com/user-attachments/assets/57f77bd5-bd3f-4367-84c0-aff6ecd392b4" alt="VitoDeploy>
|
||||
<p align="center">
|
||||
<a href="https://github.com/vitodeploy/vito/actions"><img alt="GitHub Workflow Status" src="https://github.com/vitodeploy/vito/workflows/tests/badge.svg"></a>
|
||||
</p>
|
||||
</p>
|
||||
|
||||
------
|
||||
|
||||
## About Vito
|
||||
|
||||
Vito is a self-hosted web application that helps you manage your servers and deploy your PHP applications into production servers without a hassle.
|
||||
Vito is a self-hosted web application that helps you manage your servers and deploy your PHP applications into
|
||||
production servers without a hassle.
|
||||
|
||||
## Quick Start
|
||||
|
||||
```sh
|
||||
bash <(curl -Ls https://raw.githubusercontent.com/vitodeploy/vito/1.x/scripts/install.sh)
|
||||
bash <(curl -Ls https://raw.githubusercontent.com/vitodeploy/vito/2.x/scripts/install.sh)
|
||||
```
|
||||
|
||||
## Features
|
||||
@ -28,16 +29,17 @@ ## Features
|
||||
- Manages server's services
|
||||
- Deploy your SSH Keys to the server
|
||||
- Create and Manage cron jobs on the server
|
||||
- API
|
||||
|
||||
## Useful Links
|
||||
|
||||
- [Documentation](https://vitodeploy.com)
|
||||
- [Install on Server](https://vitodeploy.com/introduction/installation.html#install-on-vps-recommended)
|
||||
- [Install via Docker](https://vitodeploy.com/introduction/installation.html#install-via-docker)
|
||||
- [Demo Website](https://demo.vitodeploy.com)
|
||||
- [Install on Server](https://vitodeploy.com/getting-started/installation.html#install-on-vps)
|
||||
- [Install via Docker](https://vitodeploy.com/getting-started/installation.html#install-via-docker)
|
||||
- [Roadmap](https://github.com/orgs/vitodeploy/projects/5)
|
||||
- [Video Demo](https://youtu.be/AbmUOBDOc28)
|
||||
- [Discord](https://discord.gg/uZeeHZZnm5)
|
||||
- [Contribution](/CONTRIBUTING.md)
|
||||
- [Contribution](https://vitodeploy.com/prologue/contribution-guide.html)
|
||||
- [Security](/SECURITY.md)
|
||||
|
||||
## Credits
|
||||
@ -47,8 +49,10 @@ ## Credits
|
||||
- PHPUnit
|
||||
- Tailwindcss
|
||||
- Alpinejs
|
||||
- HTMX
|
||||
- Livewire
|
||||
- Vite
|
||||
- Prettier
|
||||
- Postcss
|
||||
- Flowbite
|
||||
- FilamentPHP
|
||||
- Mobiledetect
|
||||
- Spatie
|
||||
|
@ -2,10 +2,11 @@ # Security Policy
|
||||
|
||||
## Supported Versions
|
||||
|
||||
| Version | Supported |
|
||||
| ------- | ----------|
|
||||
| 0.x | ❌ |
|
||||
| 1.x | ✅ |
|
||||
| Version | New Features | Bug Fixes | Security Fixes |
|
||||
|---------|--------------|-----------|----------------------|
|
||||
| 0.x | ❌ | ❌ | ❌ |
|
||||
| 1.x | ❌ | ❌ | ✅ (Until March 2025) |
|
||||
| 2.x | ✅ | ✅ | ✅ |
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
|
@ -6,15 +6,12 @@
|
||||
use App\Models\CronJob;
|
||||
use App\Models\Server;
|
||||
use App\ValidationRules\CronRule;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class CreateCronJob
|
||||
{
|
||||
public function create(Server $server, array $input): void
|
||||
public function create(Server $server, array $input): CronJob
|
||||
{
|
||||
$this->validate($input);
|
||||
|
||||
$cronJob = new CronJob([
|
||||
'server_id' => $server->id,
|
||||
'user' => $input['user'],
|
||||
@ -27,34 +24,33 @@ public function create(Server $server, array $input): void
|
||||
$server->cron()->update($cronJob->user, CronJob::crontab($server, $cronJob->user));
|
||||
$cronJob->status = CronjobStatus::READY;
|
||||
$cronJob->save();
|
||||
|
||||
return $cronJob;
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
private function validate(array $input): void
|
||||
public static function rules(array $input, Server $server): array
|
||||
{
|
||||
Validator::make($input, [
|
||||
$rules = [
|
||||
'command' => [
|
||||
'required',
|
||||
],
|
||||
'user' => [
|
||||
'required',
|
||||
'in:root,'.config('core.ssh_user'),
|
||||
Rule::in($server->getSshUsers()),
|
||||
],
|
||||
'frequency' => [
|
||||
'required',
|
||||
new CronRule(acceptCustom: true),
|
||||
],
|
||||
])->validate();
|
||||
];
|
||||
|
||||
if ($input['frequency'] == 'custom') {
|
||||
Validator::make($input, [
|
||||
'custom' => [
|
||||
'required',
|
||||
new CronRule(),
|
||||
],
|
||||
])->validate();
|
||||
if (isset($input['frequency']) && $input['frequency'] == 'custom') {
|
||||
$rules['custom'] = [
|
||||
'required',
|
||||
new CronRule,
|
||||
];
|
||||
}
|
||||
|
||||
return $rules;
|
||||
}
|
||||
}
|
||||
|
@ -1,81 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\Database;
|
||||
|
||||
use App\Enums\BackupStatus;
|
||||
use App\Enums\DatabaseStatus;
|
||||
use App\Models\Backup;
|
||||
use App\Models\Server;
|
||||
use Illuminate\Auth\Access\AuthorizationException;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Validation\Rule;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
class CreateBackup
|
||||
{
|
||||
/**
|
||||
* @throws AuthorizationException
|
||||
* @throws ValidationException
|
||||
*/
|
||||
public function create($type, Server $server, array $input): Backup
|
||||
{
|
||||
$this->validate($type, $server, $input);
|
||||
|
||||
$backup = new Backup([
|
||||
'type' => $type,
|
||||
'server_id' => $server->id,
|
||||
'database_id' => $input['backup_database'] ?? null,
|
||||
'storage_id' => $input['backup_storage'],
|
||||
'interval' => $input['backup_interval'] == 'custom' ? $input['backup_custom'] : $input['backup_interval'],
|
||||
'keep_backups' => $input['backup_keep'],
|
||||
'status' => BackupStatus::RUNNING,
|
||||
]);
|
||||
$backup->save();
|
||||
|
||||
app(RunBackup::class)->run($backup);
|
||||
|
||||
return $backup;
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
private function validate($type, Server $server, array $input): void
|
||||
{
|
||||
$rules = [
|
||||
'backup_storage' => [
|
||||
'required',
|
||||
Rule::exists('storage_providers', 'id'),
|
||||
],
|
||||
'backup_keep' => [
|
||||
'required',
|
||||
'numeric',
|
||||
'min:1',
|
||||
],
|
||||
'backup_interval' => [
|
||||
'required',
|
||||
Rule::in([
|
||||
'0 * * * *',
|
||||
'0 0 * * *',
|
||||
'0 0 * * 0',
|
||||
'0 0 1 * *',
|
||||
'custom',
|
||||
]),
|
||||
],
|
||||
];
|
||||
if ($input['backup_interval'] == 'custom') {
|
||||
$rules['backup_custom'] = [
|
||||
'required',
|
||||
];
|
||||
}
|
||||
if ($type === 'database') {
|
||||
$rules['backup_database'] = [
|
||||
'required',
|
||||
Rule::exists('databases', 'id')
|
||||
->where('server_id', $server->id)
|
||||
->where('status', DatabaseStatus::READY),
|
||||
];
|
||||
}
|
||||
Validator::make($input, $rules)->validate();
|
||||
}
|
||||
}
|
@ -5,36 +5,36 @@
|
||||
use App\Enums\DatabaseStatus;
|
||||
use App\Models\Database;
|
||||
use App\Models\Server;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Validation\Rule;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
class CreateDatabase
|
||||
{
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
public function create(Server $server, array $input): Database
|
||||
{
|
||||
$this->validate($server, $input);
|
||||
|
||||
$database = new Database([
|
||||
'server_id' => $server->id,
|
||||
'name' => $input['name'],
|
||||
]);
|
||||
/** @var \App\SSH\Services\Database\Database */
|
||||
/** @var \App\SSH\Services\Database\Database $databaseHandler */
|
||||
$databaseHandler = $server->database()->handler();
|
||||
$databaseHandler->create($database->name);
|
||||
$database->status = DatabaseStatus::READY;
|
||||
$database->save();
|
||||
|
||||
if (isset($input['user']) && $input['user']) {
|
||||
$databaseUser = app(CreateDatabaseUser::class)->create($server, $input, [$database->name]);
|
||||
|
||||
app(LinkUser::class)->link($databaseUser, ['databases' => [$database->name]]);
|
||||
}
|
||||
|
||||
return $database;
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
private function validate(Server $server, array $input): void
|
||||
public static function rules(Server $server, array $input): array
|
||||
{
|
||||
$rules = [
|
||||
'name' => [
|
||||
@ -57,6 +57,7 @@ private function validate(Server $server, array $input): void
|
||||
if (isset($input['remote']) && $input['remote']) {
|
||||
$rules['host'] = 'required';
|
||||
}
|
||||
Validator::make($input, $rules)->validate();
|
||||
|
||||
return $rules;
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
use App\Enums\DatabaseUserStatus;
|
||||
use App\Models\DatabaseUser;
|
||||
use App\Models\Server;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use App\SSH\Services\Database\Database;
|
||||
use Illuminate\Validation\Rule;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
@ -16,16 +16,16 @@ class CreateDatabaseUser
|
||||
*/
|
||||
public function create(Server $server, array $input, array $links = []): DatabaseUser
|
||||
{
|
||||
$this->validate($server, $input);
|
||||
|
||||
$databaseUser = new DatabaseUser([
|
||||
'server_id' => $server->id,
|
||||
'username' => $input['username'],
|
||||
'password' => $input['password'],
|
||||
'host' => isset($input['remote']) && $input['remote'] ? $input['host'] : 'localhost',
|
||||
'host' => (isset($input['remote']) && $input['remote']) || isset($input['host']) ? $input['host'] : 'localhost',
|
||||
'databases' => $links,
|
||||
]);
|
||||
$server->database()->handler()->createUser(
|
||||
/** @var Database $databaseHandler */
|
||||
$databaseHandler = $server->database()->handler();
|
||||
$databaseHandler->createUser(
|
||||
$databaseUser->username,
|
||||
$databaseUser->password,
|
||||
$databaseUser->host
|
||||
@ -43,7 +43,7 @@ public function create(Server $server, array $input, array $links = []): Databas
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
private function validate(Server $server, array $input): void
|
||||
public static function rules(Server $server, array $input): array
|
||||
{
|
||||
$rules = [
|
||||
'username' => [
|
||||
@ -59,6 +59,7 @@ private function validate(Server $server, array $input): void
|
||||
if (isset($input['remote']) && $input['remote']) {
|
||||
$rules['host'] = 'required';
|
||||
}
|
||||
Validator::make($input, $rules)->validate();
|
||||
|
||||
return $rules;
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,6 @@
|
||||
use App\Models\Database;
|
||||
use App\Models\DatabaseUser;
|
||||
use App\Models\Server;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Validation\Rule;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
@ -14,14 +13,12 @@ class LinkUser
|
||||
/**
|
||||
* @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'])) {
|
||||
$input['databases'] = [];
|
||||
}
|
||||
|
||||
$this->validate($databaseUser->server, $input);
|
||||
|
||||
$dbs = Database::query()
|
||||
->where('server_id', $databaseUser->server_id)
|
||||
->whereIn('name', $input['databases'])
|
||||
@ -46,17 +43,19 @@ public function link(DatabaseUser $databaseUser, array $input): void
|
||||
);
|
||||
|
||||
$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.*' => [
|
||||
'required',
|
||||
'nullable',
|
||||
Rule::exists('databases', 'name')->where('server_id', $server->id),
|
||||
],
|
||||
];
|
||||
|
||||
Validator::make($input, $rules)->validate();
|
||||
}
|
||||
}
|
||||
|
94
app/Actions/Database/ManageBackup.php
Normal file
94
app/Actions/Database/ManageBackup.php
Normal file
@ -0,0 +1,94 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\Database;
|
||||
|
||||
use App\Enums\BackupFileStatus;
|
||||
use App\Enums\BackupStatus;
|
||||
use App\Enums\DatabaseStatus;
|
||||
use App\Models\Backup;
|
||||
use App\Models\Server;
|
||||
use Illuminate\Auth\Access\AuthorizationException;
|
||||
use Illuminate\Validation\Rule;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
class ManageBackup
|
||||
{
|
||||
/**
|
||||
* @throws AuthorizationException
|
||||
* @throws ValidationException
|
||||
*/
|
||||
public function create(Server $server, array $input): Backup
|
||||
{
|
||||
$backup = new Backup([
|
||||
'type' => 'database',
|
||||
'server_id' => $server->id,
|
||||
'database_id' => $input['database'] ?? null,
|
||||
'storage_id' => $input['storage'],
|
||||
'interval' => $input['interval'] == 'custom' ? $input['custom_interval'] : $input['interval'],
|
||||
'keep_backups' => $input['keep'],
|
||||
'status' => BackupStatus::RUNNING,
|
||||
]);
|
||||
$backup->save();
|
||||
|
||||
app(RunBackup::class)->run($backup);
|
||||
|
||||
return $backup;
|
||||
}
|
||||
|
||||
public function update(Backup $backup, array $input): void
|
||||
{
|
||||
$backup->interval = $input['interval'] == 'custom' ? $input['custom_interval'] : $input['interval'];
|
||||
$backup->keep_backups = $input['keep'];
|
||||
$backup->save();
|
||||
}
|
||||
|
||||
public function delete(Backup $backup): void
|
||||
{
|
||||
$backup->status = BackupStatus::DELETING;
|
||||
$backup->save();
|
||||
|
||||
dispatch(function () use ($backup) {
|
||||
$files = $backup->files;
|
||||
foreach ($files as $file) {
|
||||
$file->status = BackupFileStatus::DELETING;
|
||||
$file->save();
|
||||
|
||||
$file->deleteFile();
|
||||
}
|
||||
|
||||
$backup->delete();
|
||||
});
|
||||
}
|
||||
|
||||
public static function rules(Server $server, array $input): array
|
||||
{
|
||||
$rules = [
|
||||
'storage' => [
|
||||
'required',
|
||||
Rule::exists('storage_providers', 'id'),
|
||||
],
|
||||
'keep' => [
|
||||
'required',
|
||||
'numeric',
|
||||
'min:1',
|
||||
],
|
||||
'interval' => [
|
||||
'required',
|
||||
Rule::in(array_keys(config('core.cronjob_intervals'))),
|
||||
],
|
||||
'database' => [
|
||||
'required',
|
||||
Rule::exists('databases', 'id')
|
||||
->where('server_id', $server->id)
|
||||
->where('status', DatabaseStatus::READY),
|
||||
],
|
||||
];
|
||||
if ($input['interval'] == 'custom') {
|
||||
$rules['custom_interval'] = [
|
||||
'required',
|
||||
];
|
||||
}
|
||||
|
||||
return $rules;
|
||||
}
|
||||
}
|
35
app/Actions/Database/ManageBackupFile.php
Normal file
35
app/Actions/Database/ManageBackupFile.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\Database;
|
||||
|
||||
use App\Enums\BackupFileStatus;
|
||||
use App\Models\BackupFile;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Symfony\Component\HttpFoundation\StreamedResponse;
|
||||
use Throwable;
|
||||
|
||||
class ManageBackupFile
|
||||
{
|
||||
/**
|
||||
* @throws Throwable
|
||||
*/
|
||||
public function download(BackupFile $file): StreamedResponse
|
||||
{
|
||||
$file->backup->server->ssh()->download(
|
||||
Storage::disk('tmp')->path(basename($file->path())),
|
||||
$file->path()
|
||||
);
|
||||
|
||||
return Storage::disk('tmp')->download(basename($file->path()));
|
||||
}
|
||||
|
||||
public function delete(BackupFile $file): void
|
||||
{
|
||||
$file->status = BackupFileStatus::DELETING;
|
||||
$file->save();
|
||||
|
||||
dispatch(function () use ($file) {
|
||||
$file->deleteFile();
|
||||
});
|
||||
}
|
||||
}
|
@ -5,14 +5,11 @@
|
||||
use App\Enums\BackupFileStatus;
|
||||
use App\Models\BackupFile;
|
||||
use App\Models\Database;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
|
||||
class RestoreBackup
|
||||
{
|
||||
public function restore(BackupFile $backupFile, array $input): void
|
||||
{
|
||||
$this->validate($input);
|
||||
|
||||
/** @var Database $database */
|
||||
$database = Database::query()->findOrFail($input['database']);
|
||||
$backupFile->status = BackupFileStatus::RESTORING;
|
||||
@ -20,7 +17,9 @@ public function restore(BackupFile $backupFile, array $input): void
|
||||
$backupFile->save();
|
||||
|
||||
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->restored_at = now();
|
||||
$backupFile->save();
|
||||
@ -30,10 +29,13 @@ public function restore(BackupFile $backupFile, array $input): void
|
||||
})->onConnection('ssh');
|
||||
}
|
||||
|
||||
private function validate(array $input): void
|
||||
public static function rules(): array
|
||||
{
|
||||
Validator::make($input, [
|
||||
'database' => 'required|exists:databases,id',
|
||||
])->validate();
|
||||
return [
|
||||
'database' => [
|
||||
'required',
|
||||
'exists:databases,id',
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -3,8 +3,10 @@
|
||||
namespace App\Actions\Database;
|
||||
|
||||
use App\Enums\BackupFileStatus;
|
||||
use App\Enums\BackupStatus;
|
||||
use App\Models\Backup;
|
||||
use App\Models\BackupFile;
|
||||
use App\SSH\Services\Database\Database;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class RunBackup
|
||||
@ -18,11 +20,20 @@ public function run(Backup $backup): BackupFile
|
||||
]);
|
||||
$file->save();
|
||||
|
||||
dispatch(function () use ($file) {
|
||||
$file->backup->server->database()->handler()->runBackup($file);
|
||||
dispatch(function () use ($file, $backup) {
|
||||
/** @var Database $databaseHandler */
|
||||
$databaseHandler = $file->backup->server->database()->handler();
|
||||
$databaseHandler->runBackup($file);
|
||||
$file->status = BackupFileStatus::CREATED;
|
||||
$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->save();
|
||||
})->onConnection('ssh');
|
||||
|
39
app/Actions/FileManager/FetchFiles.php
Normal file
39
app/Actions/FileManager/FetchFiles.php
Normal file
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\FileManager;
|
||||
|
||||
use App\Exceptions\SSHError;
|
||||
use App\Models\File;
|
||||
use App\Models\Server;
|
||||
use App\Models\User;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class FetchFiles
|
||||
{
|
||||
/**
|
||||
* @throws SSHError
|
||||
*/
|
||||
public function fetch(User $user, Server $server, array $input): void
|
||||
{
|
||||
File::parse(
|
||||
$user,
|
||||
$server,
|
||||
$input['path'],
|
||||
$input['user'],
|
||||
$server->os()->ls($input['path'], $input['user'])
|
||||
);
|
||||
}
|
||||
|
||||
public static function rules(Server $server): array
|
||||
{
|
||||
return [
|
||||
'path' => [
|
||||
'required',
|
||||
],
|
||||
'user' => [
|
||||
'required',
|
||||
Rule::in($server->getSshUsers()),
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
@ -1,71 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\FirewallRule;
|
||||
|
||||
use App\Enums\FirewallRuleStatus;
|
||||
use App\Models\FirewallRule;
|
||||
use App\Models\Server;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
class CreateRule
|
||||
{
|
||||
public function create(Server $server, array $input): FirewallRule
|
||||
{
|
||||
$this->validate($server, $input);
|
||||
|
||||
$rule = new FirewallRule([
|
||||
'server_id' => $server->id,
|
||||
'type' => $input['type'],
|
||||
'protocol' => $input['protocol'],
|
||||
'port' => $input['port'],
|
||||
'source' => $input['source'],
|
||||
'mask' => $input['mask'] ?? null,
|
||||
]);
|
||||
|
||||
$server->firewall()
|
||||
->handler()
|
||||
->addRule(
|
||||
$rule->type,
|
||||
$rule->getRealProtocol(),
|
||||
$rule->port,
|
||||
$rule->source,
|
||||
$rule->mask
|
||||
);
|
||||
|
||||
$rule->status = FirewallRuleStatus::READY;
|
||||
$rule->save();
|
||||
|
||||
return $rule;
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
private function validate(Server $server, array $input): void
|
||||
{
|
||||
Validator::make($input, [
|
||||
'type' => [
|
||||
'required',
|
||||
'in:allow,deny',
|
||||
],
|
||||
'protocol' => [
|
||||
'required',
|
||||
'in:'.implode(',', array_keys(config('core.firewall_protocols_port'))),
|
||||
],
|
||||
'port' => [
|
||||
'required',
|
||||
'numeric',
|
||||
'min:1',
|
||||
'max:65535',
|
||||
],
|
||||
'source' => [
|
||||
'required',
|
||||
'ip',
|
||||
],
|
||||
'mask' => [
|
||||
'numeric',
|
||||
],
|
||||
])->validate();
|
||||
}
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\FirewallRule;
|
||||
|
||||
use App\Enums\FirewallRuleStatus;
|
||||
use App\Models\FirewallRule;
|
||||
use App\Models\Server;
|
||||
|
||||
class DeleteRule
|
||||
{
|
||||
public function delete(Server $server, FirewallRule $rule): void
|
||||
{
|
||||
$rule->status = FirewallRuleStatus::DELETING;
|
||||
$rule->save();
|
||||
|
||||
$server->firewall()
|
||||
->handler()
|
||||
->removeRule(
|
||||
$rule->type,
|
||||
$rule->getRealProtocol(),
|
||||
$rule->port,
|
||||
$rule->source,
|
||||
$rule->mask
|
||||
);
|
||||
|
||||
$rule->delete();
|
||||
}
|
||||
}
|
117
app/Actions/FirewallRule/ManageRule.php
Executable file
117
app/Actions/FirewallRule/ManageRule.php
Executable file
@ -0,0 +1,117 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\FirewallRule;
|
||||
|
||||
use App\Enums\FirewallRuleStatus;
|
||||
use App\Models\FirewallRule;
|
||||
use App\Models\Server;
|
||||
use App\SSH\Services\Firewall\Firewall;
|
||||
|
||||
class ManageRule
|
||||
{
|
||||
public function create(Server $server, array $input): FirewallRule
|
||||
{
|
||||
$sourceAny = $input['source_any'] ?? empty($input['source'] ?? null);
|
||||
$rule = new FirewallRule([
|
||||
'name' => $input['name'],
|
||||
'server_id' => $server->id,
|
||||
'type' => $input['type'],
|
||||
'protocol' => $input['protocol'],
|
||||
'port' => $input['port'],
|
||||
'source' => $sourceAny ? null : $input['source'],
|
||||
'mask' => $sourceAny ? null : ($input['mask'] ?? null),
|
||||
'status' => FirewallRuleStatus::CREATING,
|
||||
]);
|
||||
|
||||
$rule->save();
|
||||
|
||||
dispatch(fn () => $this->applyRule($rule));
|
||||
|
||||
return $rule;
|
||||
}
|
||||
|
||||
public function update(FirewallRule $rule, array $input): FirewallRule
|
||||
{
|
||||
$sourceAny = $input['source_any'] ?? empty($input['source'] ?? null);
|
||||
$rule->update([
|
||||
'name' => $input['name'],
|
||||
'type' => $input['type'],
|
||||
'protocol' => $input['protocol'],
|
||||
'port' => $input['port'],
|
||||
'source' => $sourceAny ? null : $input['source'],
|
||||
'mask' => $sourceAny ? null : ($input['mask'] ?? null),
|
||||
'status' => FirewallRuleStatus::UPDATING,
|
||||
]);
|
||||
|
||||
dispatch(fn () => $this->applyRule($rule));
|
||||
|
||||
return $rule;
|
||||
}
|
||||
|
||||
public function delete(FirewallRule $rule): void
|
||||
{
|
||||
$rule->status = FirewallRuleStatus::DELETING;
|
||||
$rule->save();
|
||||
|
||||
dispatch(fn () => $this->applyRule($rule));
|
||||
}
|
||||
|
||||
protected function applyRule($rule): void
|
||||
{
|
||||
try {
|
||||
/** @var Firewall $handler */
|
||||
$handler = $rule->server->firewall()->handler();
|
||||
$handler->applyRules();
|
||||
} catch (\Exception $e) {
|
||||
$rule->server->firewallRules()
|
||||
->where('status', '!=', FirewallRuleStatus::READY)
|
||||
->update(['status' => FirewallRuleStatus::FAILED]);
|
||||
|
||||
throw $e;
|
||||
}
|
||||
|
||||
if ($rule->status === FirewallRuleStatus::DELETING) {
|
||||
$rule->delete();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$rule->status = FirewallRuleStatus::READY;
|
||||
$rule->save();
|
||||
}
|
||||
|
||||
public static function rules(): array
|
||||
{
|
||||
return [
|
||||
'name' => [
|
||||
'required',
|
||||
'string',
|
||||
'max:18',
|
||||
],
|
||||
'type' => [
|
||||
'required',
|
||||
'in:allow,deny',
|
||||
],
|
||||
'protocol' => [
|
||||
'required',
|
||||
'in:tcp,udp',
|
||||
],
|
||||
'port' => [
|
||||
'required',
|
||||
'numeric',
|
||||
'min:1',
|
||||
'max:65535',
|
||||
],
|
||||
'source' => [
|
||||
'nullable',
|
||||
'ip',
|
||||
],
|
||||
'mask' => [
|
||||
'nullable',
|
||||
'numeric',
|
||||
'min:1',
|
||||
'max:32',
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
@ -5,13 +5,13 @@
|
||||
use App\Models\Server;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Contracts\Database\Query\Expression;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class GetMetrics
|
||||
{
|
||||
public function filter(Server $server, array $input): array
|
||||
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';
|
||||
@ -24,8 +24,6 @@ public function filter(Server $server, array $input): array
|
||||
|
||||
$input = array_merge($defaultInput, $input);
|
||||
|
||||
$this->validate($input);
|
||||
|
||||
return $this->metrics(
|
||||
server: $server,
|
||||
fromDate: $this->getFromDate($input),
|
||||
@ -39,8 +37,8 @@ private function metrics(
|
||||
Carbon $fromDate,
|
||||
Carbon $toDate,
|
||||
?Expression $interval = null
|
||||
): array {
|
||||
$metrics = DB::table('metrics')
|
||||
): 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(
|
||||
@ -64,10 +62,6 @@ private function metrics(
|
||||
|
||||
return $item;
|
||||
});
|
||||
|
||||
return [
|
||||
'metrics' => $metrics,
|
||||
];
|
||||
}
|
||||
|
||||
private function getFromDate(array $input): Carbon
|
||||
@ -110,14 +104,12 @@ private function getInterval(array $input): Expression
|
||||
return DB::raw("strftime('%Y-%m-%d %H:00:00', created_at) as date_interval");
|
||||
}
|
||||
|
||||
if ($periodInHours > 24) {
|
||||
return DB::raw("strftime('%Y-%m-%d 00:00:00', created_at) as date_interval");
|
||||
}
|
||||
return DB::raw("strftime('%Y-%m-%d 00:00:00', created_at) as date_interval");
|
||||
}
|
||||
|
||||
private function validate(array $input): void
|
||||
public static function rules(array $input): array
|
||||
{
|
||||
Validator::make($input, [
|
||||
$rules = [
|
||||
'period' => [
|
||||
'required',
|
||||
Rule::in([
|
||||
@ -130,21 +122,13 @@ private function validate(array $input): void
|
||||
'custom',
|
||||
]),
|
||||
],
|
||||
])->validate();
|
||||
];
|
||||
|
||||
if ($input['period'] === 'custom') {
|
||||
Validator::make($input, [
|
||||
'from' => [
|
||||
'required',
|
||||
'date',
|
||||
'before:to',
|
||||
],
|
||||
'to' => [
|
||||
'required',
|
||||
'date',
|
||||
'after:from',
|
||||
],
|
||||
])->validate();
|
||||
if (isset($input['period']) && $input['period'] === 'custom') {
|
||||
$rules['from'] = ['required', 'date', 'before:to'];
|
||||
$rules['to'] = ['required', 'date', 'after:from'];
|
||||
}
|
||||
|
||||
return $rules;
|
||||
}
|
||||
}
|
||||
|
@ -3,15 +3,11 @@
|
||||
namespace App\Actions\Monitoring;
|
||||
|
||||
use App\Models\Server;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class UpdateMetricSettings
|
||||
{
|
||||
public function update(Server $server, array $input): void
|
||||
{
|
||||
$this->validate($input);
|
||||
|
||||
$service = $server->monitoring();
|
||||
|
||||
$data = $service->handler()->data();
|
||||
@ -20,13 +16,14 @@ public function update(Server $server, array $input): void
|
||||
$service->save();
|
||||
}
|
||||
|
||||
private function validate(array $input): void
|
||||
public static function rules(): array
|
||||
{
|
||||
Validator::make($input, [
|
||||
return [
|
||||
'data_retention' => [
|
||||
'required',
|
||||
Rule::in(config('core.metrics_data_retention')),
|
||||
'numeric',
|
||||
'min:1',
|
||||
],
|
||||
])->validate();
|
||||
];
|
||||
}
|
||||
}
|
||||
|
32
app/Actions/NodeJS/ChangeDefaultCli.php
Normal file
32
app/Actions/NodeJS/ChangeDefaultCli.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\NodeJS;
|
||||
|
||||
use App\Enums\ServiceStatus;
|
||||
use App\Models\Server;
|
||||
use App\SSH\Services\NodeJS\NodeJS;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
class ChangeDefaultCli
|
||||
{
|
||||
public function change(Server $server, array $input): void
|
||||
{
|
||||
$this->validate($server, $input);
|
||||
$service = $server->nodejs($input['version']);
|
||||
/** @var NodeJS $handler */
|
||||
$handler = $service->handler();
|
||||
$handler->setDefaultCli();
|
||||
$server->defaultService('nodejs')->update(['is_default' => 0]);
|
||||
$service->update(['is_default' => 1]);
|
||||
$service->update(['status' => ServiceStatus::READY]);
|
||||
}
|
||||
|
||||
public function validate(Server $server, array $input): void
|
||||
{
|
||||
if (! isset($input['version']) || ! in_array($input['version'], $server->installedNodejsVersions())) {
|
||||
throw ValidationException::withMessages(
|
||||
['version' => __('This version is not installed')]
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
45
app/Actions/NodeJS/InstallNewNodeJsVersion.php
Executable file
45
app/Actions/NodeJS/InstallNewNodeJsVersion.php
Executable file
@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\NodeJS;
|
||||
|
||||
use App\Enums\NodeJS;
|
||||
use App\Enums\ServiceStatus;
|
||||
use App\Models\Server;
|
||||
use App\Models\Service;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class InstallNewNodeJsVersion
|
||||
{
|
||||
public function install(Server $server, array $input): void
|
||||
{
|
||||
$nodejs = new Service([
|
||||
'server_id' => $server->id,
|
||||
'type' => 'nodejs',
|
||||
'type_data' => [],
|
||||
'name' => 'nodejs',
|
||||
'version' => $input['version'],
|
||||
'status' => ServiceStatus::INSTALLING,
|
||||
'is_default' => false,
|
||||
]);
|
||||
$nodejs->save();
|
||||
|
||||
dispatch(function () use ($nodejs) {
|
||||
$nodejs->handler()->install();
|
||||
$nodejs->status = ServiceStatus::READY;
|
||||
$nodejs->save();
|
||||
})->catch(function () use ($nodejs) {
|
||||
$nodejs->delete();
|
||||
})->onConnection('ssh');
|
||||
}
|
||||
|
||||
public static function rules(Server $server): array
|
||||
{
|
||||
return [
|
||||
'version' => [
|
||||
'required',
|
||||
Rule::in(config('core.nodejs_versions')),
|
||||
Rule::notIn(array_merge($server->installedNodejsVersions(), [NodeJS::NONE])),
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
53
app/Actions/NodeJS/UninstallNodeJS.php
Executable file
53
app/Actions/NodeJS/UninstallNodeJS.php
Executable file
@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\NodeJS;
|
||||
|
||||
use App\Enums\ServiceStatus;
|
||||
use App\Models\Server;
|
||||
use App\Models\Service;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
class UninstallNodeJS
|
||||
{
|
||||
public function uninstall(Server $server, array $input): void
|
||||
{
|
||||
$this->validate($server, $input);
|
||||
|
||||
/** @var Service $nodejs */
|
||||
$nodejs = $server->nodejs($input['version']);
|
||||
$nodejs->status = ServiceStatus::UNINSTALLING;
|
||||
$nodejs->save();
|
||||
|
||||
dispatch(function () use ($nodejs) {
|
||||
$nodejs->handler()->uninstall();
|
||||
$nodejs->delete();
|
||||
})->catch(function () use ($nodejs) {
|
||||
$nodejs->status = ServiceStatus::FAILED;
|
||||
$nodejs->save();
|
||||
})->onConnection('ssh');
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
private function validate(Server $server, array $input): void
|
||||
{
|
||||
Validator::make($input, [
|
||||
'version' => 'required|string',
|
||||
])->validate();
|
||||
|
||||
if (! in_array($input['version'], $server->installedNodejsVersions())) {
|
||||
throw ValidationException::withMessages(
|
||||
['version' => __('This version is not installed')]
|
||||
);
|
||||
}
|
||||
|
||||
$hasSite = $server->sites()->where('nodejs_version', $input['version'])->first();
|
||||
if ($hasSite) {
|
||||
throw ValidationException::withMessages(
|
||||
['version' => __('Cannot uninstall this version because some sites are using it!')]
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
@ -4,62 +4,74 @@
|
||||
|
||||
use App\Models\NotificationChannel;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Exception;
|
||||
use Illuminate\Validation\Rule;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
class AddChannel
|
||||
{
|
||||
/**
|
||||
* @throws ValidationException
|
||||
* @throws Exception
|
||||
*/
|
||||
public function add(User $user, array $input): void
|
||||
{
|
||||
$this->validate($input);
|
||||
$channel = new NotificationChannel([
|
||||
'user_id' => $user->id,
|
||||
'provider' => $input['provider'],
|
||||
'label' => $input['label'],
|
||||
'project_id' => isset($input['global']) && $input['global'] ? null : $user->current_project_id,
|
||||
]);
|
||||
$this->validateType($channel, $input);
|
||||
$channel->data = $channel->provider()->createData($input);
|
||||
$channel->save();
|
||||
|
||||
if (! $channel->provider()->connect()) {
|
||||
$channel->delete();
|
||||
try {
|
||||
if (! $channel->provider()->connect()) {
|
||||
$channel->delete();
|
||||
|
||||
if ($channel->provider === \App\Enums\NotificationChannel::EMAIL) {
|
||||
throw ValidationException::withMessages([
|
||||
'email' => __('Could not connect! Make sure you configured `.env` file correctly.'),
|
||||
]);
|
||||
}
|
||||
|
||||
if ($channel->provider === \App\Enums\NotificationChannel::EMAIL) {
|
||||
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([
|
||||
'provider' => __('Could not connect'),
|
||||
]);
|
||||
throw $e;
|
||||
}
|
||||
|
||||
$channel->connected = true;
|
||||
$channel->save();
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
protected function validate(array $input): void
|
||||
public static function rules(array $input): array
|
||||
{
|
||||
Validator::make($input, [
|
||||
'provider' => 'required|in:'.implode(',', config('core.notification_channels_providers')),
|
||||
$rules = [
|
||||
'provider' => [
|
||||
'required',
|
||||
Rule::in(config('core.notification_channels_providers')),
|
||||
],
|
||||
'label' => 'required',
|
||||
])->validate();
|
||||
];
|
||||
|
||||
return array_merge($rules, static::providerRules($input));
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
protected function validateType(NotificationChannel $channel, array $input): void
|
||||
private static function providerRules(array $input): array
|
||||
{
|
||||
Validator::make($input, $channel->provider()->createRules($input))
|
||||
->validate();
|
||||
if (! isset($input['provider'])) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$notificationChannel = new NotificationChannel([
|
||||
'provider' => $input['provider'],
|
||||
]);
|
||||
|
||||
return $notificationChannel->provider()->createRules($input);
|
||||
}
|
||||
}
|
||||
|
@ -4,31 +4,22 @@
|
||||
|
||||
use App\Models\NotificationChannel;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
class EditChannel
|
||||
{
|
||||
public function edit(NotificationChannel $notificationChannel, User $user, array $input): void
|
||||
{
|
||||
$this->validate($input);
|
||||
|
||||
$notificationChannel->label = $input['label'];
|
||||
$notificationChannel->project_id = isset($input['global']) && $input['global'] ? null : $user->current_project_id;
|
||||
|
||||
$notificationChannel->fill([
|
||||
'label' => $input['label'],
|
||||
'project_id' => isset($input['global']) && $input['global'] ? null : $user->current_project_id,
|
||||
]);
|
||||
$notificationChannel->save();
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
private function validate(array $input): void
|
||||
public static function rules(array $input): array
|
||||
{
|
||||
$rules = [
|
||||
'label' => [
|
||||
'required',
|
||||
],
|
||||
return [
|
||||
'label' => 'required',
|
||||
];
|
||||
Validator::make($input, $rules)->validate();
|
||||
}
|
||||
}
|
||||
|
@ -2,19 +2,16 @@
|
||||
|
||||
namespace App\Actions\PHP;
|
||||
|
||||
use App\Enums\PHP;
|
||||
use App\Enums\ServiceStatus;
|
||||
use App\Models\Server;
|
||||
use App\Models\Service;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Validation\Rule;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
class InstallNewPHP
|
||||
{
|
||||
public function install(Server $server, array $input): void
|
||||
{
|
||||
$this->validate($server, $input);
|
||||
|
||||
$php = new Service([
|
||||
'server_id' => $server->id,
|
||||
'type' => 'php',
|
||||
@ -38,22 +35,14 @@ public function install(Server $server, array $input): void
|
||||
})->onConnection('ssh');
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
private function validate(Server $server, array $input): void
|
||||
public static function rules(Server $server): array
|
||||
{
|
||||
Validator::make($input, [
|
||||
return [
|
||||
'version' => [
|
||||
'required',
|
||||
Rule::in(config('core.php_versions')),
|
||||
Rule::notIn(array_merge($server->installedPHPVersions(), [PHP::NONE])),
|
||||
],
|
||||
])->validate();
|
||||
|
||||
if (in_array($input['version'], $server->installedPHPVersions())) {
|
||||
throw ValidationException::withMessages(
|
||||
['version' => __('This version is already installed')]
|
||||
);
|
||||
}
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -2,10 +2,10 @@
|
||||
|
||||
namespace App\Actions\PHP;
|
||||
|
||||
use App\Exceptions\SSHCommandError;
|
||||
use App\Models\Server;
|
||||
use App\Models\Service;
|
||||
use App\SSH\Services\PHP\PHP;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Validation\Rule;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
@ -13,54 +13,53 @@ class InstallPHPExtension
|
||||
{
|
||||
public function install(Server $server, array $input): Service
|
||||
{
|
||||
$this->validate($server, $input);
|
||||
|
||||
/** @var Service $service */
|
||||
$service = $server->php($input['version']);
|
||||
|
||||
if (in_array($input['extension'], $service->type_data['extensions'] ?? [])) {
|
||||
throw ValidationException::withMessages([
|
||||
'extension' => 'The extension is already installed.',
|
||||
]);
|
||||
}
|
||||
|
||||
$typeData = $service->type_data;
|
||||
$typeData['extensions'] = $typeData['extensions'] ?? [];
|
||||
$typeData['extensions'][] = $input['extension'];
|
||||
$service->type_data = $typeData;
|
||||
$service->save();
|
||||
|
||||
dispatch(function () use ($service, $input) {
|
||||
/** @var PHP $handler */
|
||||
$handler = $service->handler();
|
||||
$handler->installExtension($input['extension']);
|
||||
})->catch(function () use ($service, $input) {
|
||||
$service->refresh();
|
||||
$typeData = $service->type_data;
|
||||
$typeData['extensions'] = array_values(array_diff($typeData['extensions'], [$input['extension']]));
|
||||
$service->type_data = $typeData;
|
||||
$service->save();
|
||||
})->onConnection('ssh');
|
||||
dispatch(
|
||||
/**
|
||||
* @throws SSHCommandError
|
||||
*/
|
||||
function () use ($service, $input) {
|
||||
/** @var PHP $handler */
|
||||
$handler = $service->handler();
|
||||
$handler->installExtension($input['extension']);
|
||||
})->catch(function () use ($service, $input) {
|
||||
$service->refresh();
|
||||
$typeData = $service->type_data;
|
||||
$typeData['extensions'] = array_values(array_diff($typeData['extensions'], [$input['extension']]));
|
||||
$service->type_data = $typeData;
|
||||
$service->save();
|
||||
})->onConnection('ssh');
|
||||
|
||||
return $service;
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
private function validate(Server $server, array $input): void
|
||||
public static function rules(Server $server): array
|
||||
{
|
||||
Validator::make($input, [
|
||||
return [
|
||||
'extension' => [
|
||||
'required',
|
||||
'in:'.implode(',', config('core.php_extensions')),
|
||||
Rule::in(config('core.php_extensions')),
|
||||
],
|
||||
'version' => [
|
||||
'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');
|
||||
}
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,6 @@
|
||||
use App\Models\Server;
|
||||
use Illuminate\Filesystem\FilesystemAdapter;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Validation\Rule;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
@ -19,8 +18,6 @@ class UpdatePHPIni
|
||||
*/
|
||||
public function update(Server $server, array $input): void
|
||||
{
|
||||
$this->validate($server, $input);
|
||||
|
||||
$service = $server->php($input['version']);
|
||||
|
||||
$tmpName = Str::random(10).strtotime('now');
|
||||
@ -51,24 +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' => [
|
||||
'required',
|
||||
'string',
|
||||
],
|
||||
'version' => 'required|string',
|
||||
'version' => [
|
||||
'required',
|
||||
Rule::exists('services', 'version')
|
||||
->where('server_id', $server->id)
|
||||
->where('type', 'php'),
|
||||
],
|
||||
'type' => [
|
||||
'required',
|
||||
Rule::in([PHPIniType::CLI, PHPIniType::FPM]),
|
||||
],
|
||||
])->validate();
|
||||
|
||||
if (! in_array($input['version'], $server->installedPHPVersions())) {
|
||||
throw ValidationException::withMessages(
|
||||
['version' => __('This version is not installed')]
|
||||
);
|
||||
}
|
||||
];
|
||||
}
|
||||
}
|
||||
|
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);
|
||||
}),
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
@ -27,15 +27,21 @@ public function create(User $user, array $input): Project
|
||||
return $project;
|
||||
}
|
||||
|
||||
private function validate(array $input): void
|
||||
public static function rules(): array
|
||||
{
|
||||
Validator::make($input, [
|
||||
return [
|
||||
'name' => [
|
||||
'required',
|
||||
'string',
|
||||
'max:255',
|
||||
'unique:projects,name',
|
||||
'lowercase:projects,name',
|
||||
],
|
||||
])->validate();
|
||||
];
|
||||
}
|
||||
|
||||
private function validate(array $input): void
|
||||
{
|
||||
Validator::make($input, self::rules())->validate();
|
||||
}
|
||||
}
|
||||
|
@ -23,15 +23,21 @@ public function update(Project $project, array $input): Project
|
||||
return $project;
|
||||
}
|
||||
|
||||
private function validate(Project $project, array $input): void
|
||||
public static function rules(Project $project): array
|
||||
{
|
||||
Validator::make($input, [
|
||||
return [
|
||||
'name' => [
|
||||
'required',
|
||||
'string',
|
||||
'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,8 @@
|
||||
use App\Models\Queue;
|
||||
use App\Models\Server;
|
||||
use App\Models\Site;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use App\SSH\Services\ProcessManager\ProcessManager;
|
||||
use Illuminate\Validation\Rule;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
class CreateQueue
|
||||
@ -16,22 +17,22 @@ class CreateQueue
|
||||
*/
|
||||
public function create(mixed $queueable, array $input): void
|
||||
{
|
||||
$this->validate($input);
|
||||
|
||||
$queue = new Queue([
|
||||
'server_id' => $queueable instanceof Server ? $queueable->id : $queueable->server_id,
|
||||
'site_id' => $queueable instanceof Site ? $queueable->id : null,
|
||||
'command' => $input['command'],
|
||||
'user' => $input['user'],
|
||||
'auto_start' => $input['auto_start'],
|
||||
'auto_restart' => $input['auto_restart'],
|
||||
'auto_start' => $input['auto_start'] ? 1 : 0,
|
||||
'auto_restart' => $input['auto_restart'] ? 1 : 0,
|
||||
'numprocs' => $input['numprocs'],
|
||||
'status' => QueueStatus::CREATING,
|
||||
]);
|
||||
$queue->save();
|
||||
|
||||
dispatch(function () use ($queue) {
|
||||
$queue->server->processManager()->handler()->create(
|
||||
/** @var ProcessManager $processManager */
|
||||
$processManager = $queue->server->processManager()->handler();
|
||||
$processManager->create(
|
||||
$queue->id,
|
||||
$queue->command,
|
||||
$queue->user,
|
||||
@ -48,26 +49,18 @@ public function create(mixed $queueable, array $input): void
|
||||
})->onConnection('ssh');
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
protected function validate(array $input): void
|
||||
public static function rules(Site $site): array
|
||||
{
|
||||
$rules = [
|
||||
return [
|
||||
'command' => [
|
||||
'required',
|
||||
],
|
||||
'user' => [
|
||||
'required',
|
||||
'in:root,'.config('core.ssh_user'),
|
||||
],
|
||||
'auto_start' => [
|
||||
'required',
|
||||
'in:0,1',
|
||||
],
|
||||
'auto_restart' => [
|
||||
'required',
|
||||
'in:0,1',
|
||||
Rule::in([
|
||||
'root',
|
||||
$site->user,
|
||||
]),
|
||||
],
|
||||
'numprocs' => [
|
||||
'required',
|
||||
@ -75,7 +68,5 @@ protected function validate(array $input): void
|
||||
'min:1',
|
||||
],
|
||||
];
|
||||
|
||||
Validator::make($input, $rules)->validate();
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,6 @@ class DeleteQueue
|
||||
{
|
||||
public function delete(Queue $queue): void
|
||||
{
|
||||
$queue->server->processManager()->handler()->delete($queue->id, $queue->site_id);
|
||||
$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',
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
@ -8,6 +8,6 @@ class GetQueueLogs
|
||||
{
|
||||
public function getLogs(Queue $queue): string
|
||||
{
|
||||
return $queue->server->processManager()->handler()->getLogs($queue->getLogFile());
|
||||
return $queue->server->processManager()->handler()->getLogs($queue->user, $queue->getLogFile());
|
||||
}
|
||||
}
|
||||
|
16
app/Actions/SSL/ActivateSSL.php
Normal file
16
app/Actions/SSL/ActivateSSL.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\SSL;
|
||||
|
||||
use App\Models\Ssl;
|
||||
|
||||
class ActivateSSL
|
||||
{
|
||||
public function activate(Ssl $ssl): void
|
||||
{
|
||||
$ssl->site->ssls()->update(['is_active' => false]);
|
||||
$ssl->is_active = true;
|
||||
$ssl->save();
|
||||
$ssl->site->webserver()->updateVHost($ssl->site);
|
||||
}
|
||||
}
|
@ -4,10 +4,10 @@
|
||||
|
||||
use App\Enums\SslStatus;
|
||||
use App\Enums\SslType;
|
||||
use App\Models\ServerLog;
|
||||
use App\Models\Site;
|
||||
use App\Models\Ssl;
|
||||
use App\SSH\Services\Webserver\Webserver;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Validation\Rule;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
@ -18,7 +18,10 @@ class CreateSSL
|
||||
*/
|
||||
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([
|
||||
'site_id' => $site->id,
|
||||
@ -27,11 +30,14 @@ public function create(Site $site, array $input): void
|
||||
'pk' => $input['private'] ?? null,
|
||||
'expires_at' => $input['type'] === SslType::LETSENCRYPT ? now()->addMonths(3) : $input['expires_at'],
|
||||
'status' => SslStatus::CREATING,
|
||||
'email' => $input['email'] ?? null,
|
||||
'is_active' => ! $site->activeSsl,
|
||||
]);
|
||||
$ssl->domains = [$site->domain];
|
||||
if (isset($input['aliases']) && $input['aliases']) {
|
||||
$ssl->domains = array_merge($ssl->domains, $site->aliases);
|
||||
}
|
||||
$ssl->log_id = ServerLog::log($site->server, 'create-ssl', '', $site)->id;
|
||||
$ssl->save();
|
||||
|
||||
dispatch(function () use ($site, $ssl) {
|
||||
@ -40,17 +46,14 @@ public function create(Site $site, array $input): void
|
||||
$webserver->setupSSL($ssl);
|
||||
$ssl->status = SslStatus::CREATED;
|
||||
$ssl->save();
|
||||
$site->type()->edit();
|
||||
$webserver->updateVHost($site);
|
||||
})->catch(function () use ($ssl) {
|
||||
$ssl->status = SslStatus::FAILED;
|
||||
$ssl->save();
|
||||
})->onConnection('ssh');
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
protected function validate(array $input): void
|
||||
public static function rules(array $input): array
|
||||
{
|
||||
$rules = [
|
||||
'type' => [
|
||||
@ -61,9 +64,19 @@ protected function validate(array $input): void
|
||||
if (isset($input['type']) && $input['type'] == SslType::CUSTOM) {
|
||||
$rules['certificate'] = 'required';
|
||||
$rules['private'] = 'required';
|
||||
$rules['expires_at'] = 'required|date_format:Y-m-d|after_or_equal:'.now();
|
||||
$rules['expires_at'] = [
|
||||
'required',
|
||||
'date_format:Y-m-d',
|
||||
'after_or_equal:'.now(),
|
||||
];
|
||||
}
|
||||
if (isset($input['type']) && $input['type'] == SslType::LETSENCRYPT) {
|
||||
$rules['email'] = [
|
||||
'required',
|
||||
'email',
|
||||
];
|
||||
}
|
||||
|
||||
Validator::make($input, $rules)->validate();
|
||||
return $rules;
|
||||
}
|
||||
}
|
||||
|
@ -2,13 +2,19 @@
|
||||
|
||||
namespace App\Actions\SSL;
|
||||
|
||||
use App\Enums\SslStatus;
|
||||
use App\Models\Ssl;
|
||||
use App\SSH\Services\Webserver\Webserver;
|
||||
|
||||
class DeleteSSL
|
||||
{
|
||||
public function delete(Ssl $ssl): void
|
||||
{
|
||||
$ssl->site->server->webserver()->handler()->removeSSL($ssl);
|
||||
$ssl->status = SslStatus::DELETING;
|
||||
$ssl->save();
|
||||
/** @var Webserver $webserver */
|
||||
$webserver = $ssl->site->server->webserver()->handler();
|
||||
$webserver->removeSSL($ssl);
|
||||
$ssl->delete();
|
||||
}
|
||||
}
|
||||
|
@ -4,29 +4,27 @@
|
||||
|
||||
use App\Models\Script;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
|
||||
class CreateScript
|
||||
{
|
||||
public function create(User $user, array $input): Script
|
||||
{
|
||||
$this->validate($input);
|
||||
|
||||
$script = new Script([
|
||||
'user_id' => $user->id,
|
||||
'name' => $input['name'],
|
||||
'content' => $input['content'],
|
||||
'project_id' => isset($input['global']) && $input['global'] ? null : $user->current_project_id,
|
||||
]);
|
||||
$script->save();
|
||||
|
||||
return $script;
|
||||
}
|
||||
|
||||
private function validate(array $input): void
|
||||
public static function rules(): array
|
||||
{
|
||||
Validator::make($input, [
|
||||
return [
|
||||
'name' => ['required', 'string', 'max:255'],
|
||||
'content' => ['required', 'string'],
|
||||
])->validate();
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -3,26 +3,26 @@
|
||||
namespace App\Actions\Script;
|
||||
|
||||
use App\Models\Script;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use App\Models\User;
|
||||
|
||||
class EditScript
|
||||
{
|
||||
public function edit(Script $script, array $input): Script
|
||||
public function edit(Script $script, User $user, array $input): Script
|
||||
{
|
||||
$this->validate($input);
|
||||
|
||||
$script->name = $input['name'];
|
||||
$script->content = $input['content'];
|
||||
$script->project_id = isset($input['global']) && $input['global'] ? null : $user->current_project_id;
|
||||
|
||||
$script->save();
|
||||
|
||||
return $script;
|
||||
}
|
||||
|
||||
private function validate(array $input): void
|
||||
public static function rules(): array
|
||||
{
|
||||
Validator::make($input, [
|
||||
return [
|
||||
'name' => ['required', 'string', 'max:255'],
|
||||
'content' => ['required', 'string'],
|
||||
])->validate();
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -7,30 +7,28 @@
|
||||
use App\Models\ScriptExecution;
|
||||
use App\Models\Server;
|
||||
use App\Models\ServerLog;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class ExecuteScript
|
||||
{
|
||||
public function execute(Script $script, Server $server, array $input): ScriptExecution
|
||||
public function execute(Script $script, array $input): ScriptExecution
|
||||
{
|
||||
$this->validate($server, $input);
|
||||
|
||||
$execution = new ScriptExecution([
|
||||
'script_id' => $script->id,
|
||||
'server_id' => $input['server'],
|
||||
'user' => $input['user'],
|
||||
'variables' => $input['variables'] ?? [],
|
||||
'status' => ScriptExecutionStatus::EXECUTING,
|
||||
]);
|
||||
$execution->save();
|
||||
|
||||
dispatch(function () use ($execution, $server, $script) {
|
||||
dispatch(function () use ($execution, $script) {
|
||||
$content = $execution->getContent();
|
||||
$log = ServerLog::make($server, 'script-'.$script->id.'-'.strtotime('now'));
|
||||
$log = ServerLog::make($execution->server, 'script-'.$script->id.'-'.strtotime('now'));
|
||||
$log->save();
|
||||
$execution->server_log_id = $log->id;
|
||||
$execution->save();
|
||||
$server->os()->runScript('~/', $content, $log, $execution->user);
|
||||
$execution->server->os()->runScript('~/', $content, $log, $execution->user);
|
||||
$execution->status = ScriptExecutionStatus::COMPLETED;
|
||||
$execution->save();
|
||||
})->catch(function () use ($execution) {
|
||||
@ -41,15 +39,23 @@ public function execute(Script $script, Server $server, array $input): ScriptExe
|
||||
return $execution;
|
||||
}
|
||||
|
||||
private function validate(Server $server, array $input): void
|
||||
public static function rules(array $input): array
|
||||
{
|
||||
Validator::make($input, [
|
||||
$users = ['root'];
|
||||
if (isset($input['server'])) {
|
||||
/** @var ?Server $server */
|
||||
$server = Server::query()->find($input['server']);
|
||||
$users = $server->getSshUsers();
|
||||
}
|
||||
|
||||
return [
|
||||
'server' => [
|
||||
'required',
|
||||
Rule::exists('servers', 'id'),
|
||||
],
|
||||
'user' => [
|
||||
'required',
|
||||
Rule::in([
|
||||
'root',
|
||||
$server->ssh_user,
|
||||
]),
|
||||
Rule::in($users),
|
||||
],
|
||||
'variables' => 'array',
|
||||
'variables.*' => [
|
||||
@ -57,6 +63,6 @@ private function validate(Server $server, array $input): void
|
||||
'string',
|
||||
'max:255',
|
||||
],
|
||||
])->validate();
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -5,18 +5,18 @@
|
||||
use App\Enums\FirewallRuleStatus;
|
||||
use App\Enums\ServerProvider;
|
||||
use App\Enums\ServerStatus;
|
||||
use App\Exceptions\ServerProviderError;
|
||||
use App\Enums\ServerType;
|
||||
use App\Exceptions\SSHConnectionError;
|
||||
use App\Facades\Notifier;
|
||||
use App\Models\Project;
|
||||
use App\Models\Server;
|
||||
use App\Models\User;
|
||||
use App\Notifications\ServerInstallationFailed;
|
||||
use App\Notifications\ServerInstallationSucceed;
|
||||
use App\ValidationRules\RestrictedIPAddressesRule;
|
||||
use Exception;
|
||||
use Illuminate\Support\Facades\Bus;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Database\Query\Builder;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Validation\Rule;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
@ -24,22 +24,17 @@
|
||||
|
||||
class CreateServer
|
||||
{
|
||||
/**
|
||||
* @throws Throwable
|
||||
*/
|
||||
public function create(User $creator, array $input): Server
|
||||
public function create(User $creator, Project $project, array $input): Server
|
||||
{
|
||||
$this->validateInputs($input);
|
||||
|
||||
$server = new Server([
|
||||
'project_id' => $creator->currentProject->id,
|
||||
'project_id' => $project->id,
|
||||
'user_id' => $creator->id,
|
||||
'name' => $input['name'],
|
||||
'ssh_user' => config('core.server_providers_default_user')[$input['provider']][$input['os']],
|
||||
'ip' => $input['ip'] ?? '',
|
||||
'port' => $input['port'] ?? 22,
|
||||
'os' => $input['os'],
|
||||
'type' => $input['type'],
|
||||
'type' => ServerType::REGULAR,
|
||||
'provider' => $input['provider'],
|
||||
'authentication' => [
|
||||
'user' => config('core.ssh_user'),
|
||||
@ -50,18 +45,13 @@ public function create(User $creator, array $input): Server
|
||||
'progress_step' => 'Initializing',
|
||||
]);
|
||||
|
||||
DB::beginTransaction();
|
||||
try {
|
||||
if ($server->provider != 'custom') {
|
||||
$server->provider_id = $input['server_provider'];
|
||||
}
|
||||
|
||||
// validate type
|
||||
$this->validateType($server, $input);
|
||||
$server->type_data = $server->type()->data($input);
|
||||
|
||||
// validate provider
|
||||
$this->validateProvider($server, $input);
|
||||
$server->provider_data = $server->provider()->data($input);
|
||||
|
||||
// save
|
||||
@ -79,133 +69,157 @@ public function create(User $creator, array $input): Server
|
||||
// install server
|
||||
$this->install($server);
|
||||
|
||||
DB::commit();
|
||||
|
||||
return $server;
|
||||
} catch (Exception $e) {
|
||||
$server->provider()->delete();
|
||||
DB::rollBack();
|
||||
if ($e instanceof ServerProviderError) {
|
||||
throw ValidationException::withMessages([
|
||||
'provider' => __('Provider Error: ').$e->getMessage(),
|
||||
]);
|
||||
}
|
||||
throw $e;
|
||||
$server->delete();
|
||||
|
||||
throw ValidationException::withMessages([
|
||||
'provider' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
private function install(Server $server): void
|
||||
{
|
||||
$bus = Bus::chain([
|
||||
function () use ($server) {
|
||||
dispatch(function () use ($server) {
|
||||
$maxWait = 180;
|
||||
while ($maxWait > 0) {
|
||||
sleep(10);
|
||||
$maxWait -= 10;
|
||||
if (! $server->provider()->isRunning()) {
|
||||
sleep(2);
|
||||
continue;
|
||||
}
|
||||
$server->type()->install();
|
||||
$server->update([
|
||||
'status' => ServerStatus::READY,
|
||||
]);
|
||||
Notifier::send($server, new ServerInstallationSucceed($server));
|
||||
},
|
||||
])->catch(function (Throwable $e) use ($server) {
|
||||
try {
|
||||
$server->ssh()->connect();
|
||||
break;
|
||||
} catch (SSHConnectionError) {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
$server->type()->install();
|
||||
$server->update([
|
||||
'status' => ServerStatus::INSTALLATION_FAILED,
|
||||
'status' => ServerStatus::READY,
|
||||
]);
|
||||
Notifier::send($server, new ServerInstallationFailed($server));
|
||||
Log::error('server-installation-error', [
|
||||
'error' => (string) $e,
|
||||
]);
|
||||
});
|
||||
|
||||
if ($server->provider != ServerProvider::CUSTOM) {
|
||||
$server->progress_step = 'waiting-for-provider';
|
||||
$server->save();
|
||||
$bus->delay(now()->addMinutes(3));
|
||||
}
|
||||
|
||||
$bus->onConnection('ssh')->dispatch();
|
||||
Notifier::send($server, new ServerInstallationSucceed($server));
|
||||
})
|
||||
->catch(function (Throwable $e) use ($server) {
|
||||
$server->update([
|
||||
'status' => ServerStatus::INSTALLATION_FAILED,
|
||||
]);
|
||||
Notifier::send($server, new ServerInstallationFailed($server));
|
||||
Log::error('server-installation-error', [
|
||||
'error' => (string) $e,
|
||||
]);
|
||||
})
|
||||
->onConnection('ssh');
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
private function validateInputs(array $input): void
|
||||
public static function rules(Project $project, array $input): array
|
||||
{
|
||||
$rules = [
|
||||
'provider' => 'required|in:'.implode(',', config('core.server_providers')),
|
||||
'name' => 'required',
|
||||
'os' => 'required|in:'.implode(',', config('core.operating_systems')),
|
||||
'type' => [
|
||||
'provider' => [
|
||||
'required',
|
||||
Rule::in(config('core.server_types')),
|
||||
Rule::in(config('core.server_providers')),
|
||||
],
|
||||
'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') {
|
||||
$rules['server_provider'] = 'required|exists:server_providers,id,user_id,'.auth()->user()->id;
|
||||
private static function typeRules(array $input): array
|
||||
{
|
||||
if (! isset($input['type']) || ! in_array($input['type'], config('core.server_types'))) {
|
||||
return [];
|
||||
}
|
||||
|
||||
if ($input['provider'] == 'custom') {
|
||||
$rules['ip'] = [
|
||||
'required',
|
||||
new RestrictedIPAddressesRule(),
|
||||
];
|
||||
$rules['port'] = [
|
||||
'required',
|
||||
'numeric',
|
||||
'min:1',
|
||||
'max:65535',
|
||||
];
|
||||
$server = new Server(['type' => $input['type']]);
|
||||
|
||||
return $server->type()->createRules($input);
|
||||
}
|
||||
|
||||
private static function providerRules(array $input): array
|
||||
{
|
||||
if (
|
||||
! isset($input['provider']) ||
|
||||
! 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);
|
||||
}
|
||||
|
||||
/**
|
||||
* @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
|
||||
public function createFirewallRules(Server $server): void
|
||||
{
|
||||
$server->firewallRules()->createMany([
|
||||
[
|
||||
'type' => 'allow',
|
||||
'protocol' => 'ssh',
|
||||
'name' => 'SSH',
|
||||
'protocol' => 'tcp',
|
||||
'port' => 22,
|
||||
'source' => '0.0.0.0',
|
||||
'mask' => 0,
|
||||
'source' => null,
|
||||
'mask' => null,
|
||||
'status' => FirewallRuleStatus::READY,
|
||||
],
|
||||
[
|
||||
'type' => 'allow',
|
||||
'protocol' => 'http',
|
||||
'name' => 'HTTP',
|
||||
'protocol' => 'tcp',
|
||||
'port' => 80,
|
||||
'source' => '0.0.0.0',
|
||||
'mask' => 0,
|
||||
'source' => null,
|
||||
'mask' => null,
|
||||
'status' => FirewallRuleStatus::READY,
|
||||
],
|
||||
[
|
||||
'type' => 'allow',
|
||||
'protocol' => 'https',
|
||||
'name' => 'HTTPS',
|
||||
'protocol' => 'tcp',
|
||||
'port' => 443,
|
||||
'source' => '0.0.0.0',
|
||||
'mask' => 0,
|
||||
'source' => null,
|
||||
'mask' => null,
|
||||
'status' => FirewallRuleStatus::READY,
|
||||
],
|
||||
]);
|
||||
|
@ -3,7 +3,6 @@
|
||||
namespace App\Actions\Server;
|
||||
|
||||
use App\Models\Server;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
class CreateServerLog
|
||||
@ -13,8 +12,6 @@ class CreateServerLog
|
||||
*/
|
||||
public function create(Server $server, array $input): void
|
||||
{
|
||||
$this->validate($input);
|
||||
|
||||
$server->logs()->create([
|
||||
'is_remote' => true,
|
||||
'name' => $input['path'],
|
||||
@ -23,13 +20,10 @@ public function create(Server $server, array $input): void
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
protected function validate(array $input): void
|
||||
public static function rules(): array
|
||||
{
|
||||
Validator::make($input, [
|
||||
return [
|
||||
'path' => 'required',
|
||||
])->validate();
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
use App\Models\Server;
|
||||
use App\ValidationRules\RestrictedIPAddressesRule;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Validation\Rule;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
class EditServer
|
||||
@ -14,8 +14,6 @@ class EditServer
|
||||
*/
|
||||
public function edit(Server $server, array $input): Server
|
||||
{
|
||||
$this->validate($input);
|
||||
|
||||
$checkConnection = false;
|
||||
if (isset($input['name'])) {
|
||||
$server->name = $input['name'];
|
||||
@ -26,6 +24,9 @@ public function edit(Server $server, array $input): Server
|
||||
}
|
||||
$server->ip = $input['ip'];
|
||||
}
|
||||
if (isset($input['local_ip'])) {
|
||||
$server->local_ip = $input['local_ip'];
|
||||
}
|
||||
if (isset($input['port'])) {
|
||||
if ($server->port !== $input['port']) {
|
||||
$checkConnection = true;
|
||||
@ -41,15 +42,28 @@ public function edit(Server $server, array $input): Server
|
||||
return $server;
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
protected function validate(array $input): void
|
||||
public static function rules(Server $server): array
|
||||
{
|
||||
Validator::make($input, [
|
||||
'ip' => [
|
||||
new RestrictedIPAddressesRule(),
|
||||
return [
|
||||
'name' => [
|
||||
'required',
|
||||
'max:255',
|
||||
Rule::unique('servers')->where('project_id', $server->project_id)->ignore($server->id),
|
||||
],
|
||||
])->validateWithBag('editServer');
|
||||
'ip' => [
|
||||
'string',
|
||||
new RestrictedIPAddressesRule,
|
||||
Rule::unique('servers')->where('project_id', $server->project_id)->ignore($server->id),
|
||||
],
|
||||
'local_ip' => [
|
||||
'string',
|
||||
Rule::unique('servers')->where('project_id', $server->project_id)->ignore($server->id),
|
||||
],
|
||||
'port' => [
|
||||
'integer',
|
||||
'min:1',
|
||||
'max:65535',
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -2,11 +2,11 @@
|
||||
|
||||
namespace App\Actions\ServerProvider;
|
||||
|
||||
use App\Models\Project;
|
||||
use App\Models\ServerProvider;
|
||||
use App\Models\User;
|
||||
use App\ServerProviders\ServerProvider as ServerProviderContract;
|
||||
use Exception;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Validation\Rule;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
@ -15,13 +15,9 @@ class CreateServerProvider
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
public function create(User $user, array $input): ServerProvider
|
||||
public function create(User $user, Project $project, array $input): ServerProvider
|
||||
{
|
||||
$this->validateInput($input);
|
||||
|
||||
$provider = $this->getProvider($input['provider']);
|
||||
|
||||
$this->validateProvider($provider, $input);
|
||||
$provider = static::getProvider($input['provider']);
|
||||
|
||||
try {
|
||||
$provider->connect($input);
|
||||
@ -33,30 +29,27 @@ public function create(User $user, array $input): ServerProvider
|
||||
]);
|
||||
}
|
||||
|
||||
$serverProvider = new ServerProvider();
|
||||
$serverProvider = new ServerProvider;
|
||||
$serverProvider->user_id = $user->id;
|
||||
$serverProvider->profile = $input['name'];
|
||||
$serverProvider->provider = $input['provider'];
|
||||
$serverProvider->credentials = $provider->credentialData($input);
|
||||
$serverProvider->project_id = isset($input['global']) && $input['global'] ? null : $user->current_project_id;
|
||||
$serverProvider->project_id = isset($input['global']) && $input['global'] ? null : $project->id;
|
||||
$serverProvider->save();
|
||||
|
||||
return $serverProvider;
|
||||
}
|
||||
|
||||
private function getProvider($name): ServerProviderContract
|
||||
private static function getProvider($name): ServerProviderContract
|
||||
{
|
||||
$providerClass = config('core.server_providers_class.'.$name);
|
||||
|
||||
return new $providerClass();
|
||||
return new $providerClass;
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
private function validateInput(array $input): void
|
||||
public static function rules(array $input): array
|
||||
{
|
||||
Validator::make($input, [
|
||||
$rules = [
|
||||
'name' => [
|
||||
'required',
|
||||
],
|
||||
@ -65,14 +58,17 @@ private function validateInput(array $input): void
|
||||
Rule::in(config('core.server_providers')),
|
||||
Rule::notIn('custom'),
|
||||
],
|
||||
])->validate();
|
||||
];
|
||||
|
||||
return array_merge($rules, static::providerRules($input));
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
private function validateProvider(ServerProviderContract $provider, array $input): void
|
||||
private static function providerRules(array $input): array
|
||||
{
|
||||
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;
|
||||
|
||||
use App\Models\ServerProvider;
|
||||
use Exception;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
class DeleteServerProvider
|
||||
{
|
||||
/**
|
||||
* @throws Exception
|
||||
*/
|
||||
public function delete(ServerProvider $serverProvider): void
|
||||
{
|
||||
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();
|
||||
|
@ -2,33 +2,27 @@
|
||||
|
||||
namespace App\Actions\ServerProvider;
|
||||
|
||||
use App\Models\Project;
|
||||
use App\Models\ServerProvider;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
class EditServerProvider
|
||||
{
|
||||
public function edit(ServerProvider $serverProvider, User $user, array $input): void
|
||||
public function edit(ServerProvider $serverProvider, Project $project, array $input): ServerProvider
|
||||
{
|
||||
$this->validate($input);
|
||||
|
||||
$serverProvider->profile = $input['name'];
|
||||
$serverProvider->project_id = isset($input['global']) && $input['global'] ? null : $user->current_project_id;
|
||||
$serverProvider->project_id = isset($input['global']) && $input['global'] ? null : $project->id;
|
||||
|
||||
$serverProvider->save();
|
||||
|
||||
return $serverProvider;
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
private function validate(array $input): void
|
||||
public static function rules(): array
|
||||
{
|
||||
$rules = [
|
||||
return [
|
||||
'name' => [
|
||||
'required',
|
||||
],
|
||||
];
|
||||
Validator::make($input, $rules)->validate();
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ class Install
|
||||
{
|
||||
public function install(Server $server, array $input): Service
|
||||
{
|
||||
$this->validate($server, $input);
|
||||
$input['type'] = config('core.service_types')[$input['name']];
|
||||
|
||||
$service = new Service([
|
||||
'server_id' => $server->id,
|
||||
@ -40,18 +40,21 @@ public function install(Server $server, array $input): Service
|
||||
return $service;
|
||||
}
|
||||
|
||||
private function validate(Server $server, array $input): void
|
||||
public static function rules(array $input): array
|
||||
{
|
||||
Validator::make($input, [
|
||||
'type' => [
|
||||
'required',
|
||||
Rule::in(config('core.service_types')),
|
||||
],
|
||||
$rules = [
|
||||
'name' => [
|
||||
'required',
|
||||
Rule::in(array_keys(config('core.service_types'))),
|
||||
],
|
||||
'version' => 'required',
|
||||
])->validate();
|
||||
'version' => [
|
||||
'required',
|
||||
],
|
||||
];
|
||||
if (isset($input['name'])) {
|
||||
$rules['version'][] = Rule::in(config("core.service_versions.{$input['name']}"));
|
||||
}
|
||||
|
||||
return $rules;
|
||||
}
|
||||
}
|
||||
|
@ -8,6 +8,9 @@
|
||||
|
||||
class Uninstall
|
||||
{
|
||||
/*
|
||||
* @TODO: Implement the uninstaller for all service handlers
|
||||
*/
|
||||
public function uninstall(Service $service): void
|
||||
{
|
||||
Validator::make([
|
||||
|
@ -14,27 +14,23 @@
|
||||
use App\ValidationRules\DomainRule;
|
||||
use Exception;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Validation\Rule;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
class CreateSite
|
||||
{
|
||||
/**
|
||||
* @throws SourceControlIsNotConnected
|
||||
*/
|
||||
public function create(Server $server, array $input): Site
|
||||
{
|
||||
$this->validateInputs($server, $input);
|
||||
|
||||
DB::beginTransaction();
|
||||
try {
|
||||
$user = $input['user'] ?? $server->getSshUser();
|
||||
$site = new Site([
|
||||
'server_id' => $server->id,
|
||||
'type' => $input['type'],
|
||||
'domain' => $input['domain'],
|
||||
'aliases' => $input['aliases'] ?? [],
|
||||
'path' => '/home/'.$server->getSshUser().'/'.$input['domain'],
|
||||
'user' => $user,
|
||||
'path' => '/home/'.$user.'/'.$input['domain'],
|
||||
'status' => SiteStatus::INSTALLING,
|
||||
]);
|
||||
|
||||
@ -43,8 +39,8 @@ public function create(Server $server, array $input): Site
|
||||
|
||||
// check has access to repository
|
||||
try {
|
||||
if ($site->sourceControl()) {
|
||||
$site->sourceControl()->getRepo($site->repository);
|
||||
if ($site->sourceControl) {
|
||||
$site->sourceControl?->getRepo($site->repository);
|
||||
}
|
||||
} catch (SourceControlIsNotConnected) {
|
||||
throw ValidationException::withMessages([
|
||||
@ -60,9 +56,6 @@ public function create(Server $server, array $input): Site
|
||||
]);
|
||||
}
|
||||
|
||||
// validate type
|
||||
$this->validateType($site, $input);
|
||||
|
||||
// set type data
|
||||
$site->type_data = $site->type()->data($input);
|
||||
|
||||
@ -94,14 +87,13 @@ public function create(Server $server, array $input): Site
|
||||
return $site;
|
||||
} catch (Exception $e) {
|
||||
DB::rollBack();
|
||||
throw $e;
|
||||
throw ValidationException::withMessages([
|
||||
'type' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
private function validateInputs(Server $server, array $input): void
|
||||
public static function rules(Server $server, array $input): array
|
||||
{
|
||||
$rules = [
|
||||
'type' => [
|
||||
@ -110,26 +102,37 @@ private function validateInputs(Server $server, array $input): void
|
||||
],
|
||||
'domain' => [
|
||||
'required',
|
||||
new DomainRule(),
|
||||
new DomainRule,
|
||||
Rule::unique('sites', 'domain')->where(function ($query) use ($server) {
|
||||
return $query->where('server_id', $server->id);
|
||||
}),
|
||||
],
|
||||
'aliases.*' => [
|
||||
new DomainRule(),
|
||||
new DomainRule,
|
||||
],
|
||||
'user' => [
|
||||
'regex:/^[a-z_][a-z0-9_-]*[a-z0-9]$/',
|
||||
'min:3',
|
||||
'max:32',
|
||||
Rule::unique('sites', 'user')->where('server_id', $server->id),
|
||||
Rule::notIn($server->getSshUsers()),
|
||||
],
|
||||
];
|
||||
|
||||
Validator::make($input, $rules)->validate();
|
||||
return array_merge($rules, self::typeRules($server, $input));
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
private function validateType(Site $site, array $input): void
|
||||
private static function typeRules(Server $server, array $input): array
|
||||
{
|
||||
$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);
|
||||
}
|
||||
}
|
||||
|
@ -2,13 +2,31 @@
|
||||
|
||||
namespace App\Actions\Site;
|
||||
|
||||
use App\Exceptions\SSHError;
|
||||
use App\Models\Site;
|
||||
use App\SSH\Services\PHP\PHP;
|
||||
use App\SSH\Services\Webserver\Webserver;
|
||||
|
||||
class DeleteSite
|
||||
{
|
||||
/**
|
||||
* @throws SSHError
|
||||
*/
|
||||
public function delete(Site $site): void
|
||||
{
|
||||
$site->server->webserver()->handler()->deleteSite($site);
|
||||
/** @var Webserver $webserverHandler */
|
||||
$webserverHandler = $site->server->webserver()->handler();
|
||||
$webserverHandler->deleteSite($site);
|
||||
|
||||
if ($site->isIsolated()) {
|
||||
/** @var PHP $php */
|
||||
$php = $site->server->php()->handler();
|
||||
$php->removeFpmPool($site->user, $site->php_version, $site->id);
|
||||
|
||||
$os = $site->server->os();
|
||||
$os->deleteIsolatedUser($site->user);
|
||||
}
|
||||
|
||||
$site->delete();
|
||||
}
|
||||
}
|
||||
|
@ -4,25 +4,27 @@
|
||||
|
||||
use App\Enums\DeploymentStatus;
|
||||
use App\Exceptions\DeploymentScriptIsEmptyException;
|
||||
use App\Exceptions\SourceControlIsNotConnected;
|
||||
use App\Exceptions\SSHError;
|
||||
use App\Facades\Notifier;
|
||||
use App\Models\Deployment;
|
||||
use App\Models\ServerLog;
|
||||
use App\Models\Site;
|
||||
use App\Notifications\DeploymentCompleted;
|
||||
|
||||
class Deploy
|
||||
{
|
||||
/**
|
||||
* @throws SourceControlIsNotConnected
|
||||
* @throws DeploymentScriptIsEmptyException
|
||||
* @throws SSHError
|
||||
*/
|
||||
public function run(Site $site): Deployment
|
||||
{
|
||||
if ($site->sourceControl()) {
|
||||
$site->sourceControl()->getRepo($site->repository);
|
||||
if ($site->sourceControl) {
|
||||
$site->sourceControl->getRepo($site->repository);
|
||||
}
|
||||
|
||||
if (! $site->deploymentScript?->content) {
|
||||
throw new DeploymentScriptIsEmptyException();
|
||||
throw new DeploymentScriptIsEmptyException;
|
||||
}
|
||||
|
||||
$deployment = new Deployment([
|
||||
@ -30,7 +32,7 @@ public function run(Site $site): Deployment
|
||||
'deployment_script_id' => $site->deploymentScript->id,
|
||||
'status' => DeploymentStatus::DEPLOYING,
|
||||
]);
|
||||
$lastCommit = $site->sourceControl()?->provider()?->getLastCommit($site->repository, $site->branch);
|
||||
$lastCommit = $site->sourceControl?->provider()?->getLastCommit($site->repository, $site->branch);
|
||||
if ($lastCommit) {
|
||||
$deployment->commit_id = $lastCommit['commit_id'];
|
||||
$deployment->commit_data = $lastCommit['commit_data'];
|
||||
@ -48,13 +50,16 @@ public function run(Site $site): Deployment
|
||||
path: $site->path,
|
||||
script: $site->deploymentScript->content,
|
||||
serverLog: $log,
|
||||
variables: $site->environmentVariables($deployment)
|
||||
user: $site->user,
|
||||
variables: $site->environmentVariables($deployment),
|
||||
);
|
||||
$deployment->status = DeploymentStatus::FINISHED;
|
||||
$deployment->save();
|
||||
})->catch(function () use ($deployment) {
|
||||
Notifier::send($site, new DeploymentCompleted($deployment, $site));
|
||||
})->catch(function () use ($deployment, $site) {
|
||||
$deployment->status = DeploymentStatus::FAILED;
|
||||
$deployment->save();
|
||||
Notifier::send($site, new DeploymentCompleted($deployment, $site));
|
||||
})->onConnection('ssh');
|
||||
|
||||
return $deployment;
|
||||
|
@ -5,29 +5,26 @@
|
||||
use App\Models\Site;
|
||||
use App\SSH\Services\Webserver\Webserver;
|
||||
use App\ValidationRules\DomainRule;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
|
||||
class UpdateAliases
|
||||
{
|
||||
public function update(Site $site, array $input): void
|
||||
{
|
||||
$this->validate($input);
|
||||
|
||||
$site->aliases = $input['aliases'] ?? [];
|
||||
|
||||
/** @var Webserver $webserver */
|
||||
$webserver = $site->server->webserver()->handler();
|
||||
$webserver->updateVHost($site, ! $site->hasSSL());
|
||||
$webserver->updateVHost($site);
|
||||
|
||||
$site->save();
|
||||
}
|
||||
|
||||
private function validate(array $input): void
|
||||
public static function rules(): array
|
||||
{
|
||||
Validator::make($input, [
|
||||
return [
|
||||
'aliases.*' => [
|
||||
new DomainRule(),
|
||||
new DomainRule,
|
||||
],
|
||||
])->validate();
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -2,19 +2,19 @@
|
||||
|
||||
namespace App\Actions\Site;
|
||||
|
||||
use App\Exceptions\SSHError;
|
||||
use App\Models\Site;
|
||||
use App\SSH\Git\Git;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
class UpdateBranch
|
||||
{
|
||||
/**
|
||||
* @throws ValidationException
|
||||
* @throws SSHError
|
||||
*/
|
||||
public function update(Site $site, array $input): void
|
||||
{
|
||||
$this->validate($input);
|
||||
$site->branch = $input['branch'];
|
||||
app(Git::class)->checkout($site);
|
||||
$site->save();
|
||||
@ -23,10 +23,10 @@ public function update(Site $site, array $input): void
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
protected function validate(array $input): void
|
||||
public static function rules(): array
|
||||
{
|
||||
Validator::make($input, [
|
||||
return [
|
||||
'branch' => 'required',
|
||||
]);
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,6 @@
|
||||
namespace App\Actions\Site;
|
||||
|
||||
use App\Models\Site;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
class UpdateDeploymentScript
|
||||
@ -13,20 +12,18 @@ class UpdateDeploymentScript
|
||||
*/
|
||||
public function update(Site $site, array $input): void
|
||||
{
|
||||
$this->validate($input);
|
||||
|
||||
$site->deploymentScript()->update([
|
||||
'content' => $input['script'],
|
||||
]);
|
||||
$script = $site->deploymentScript;
|
||||
$script->content = $input['script'];
|
||||
$script->save();
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
protected function validate(array $input): void
|
||||
public static function rules(): array
|
||||
{
|
||||
Validator::make($input, [
|
||||
'script' => 'required',
|
||||
]);
|
||||
return [
|
||||
'script' => ['required', 'string'],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -2,19 +2,20 @@
|
||||
|
||||
namespace App\Actions\Site;
|
||||
|
||||
use App\Exceptions\SSHUploadFailed;
|
||||
use App\Exceptions\SSHError;
|
||||
use App\Models\Site;
|
||||
|
||||
class UpdateEnv
|
||||
{
|
||||
/**
|
||||
* @throws SSHUploadFailed
|
||||
* @throws SSHError
|
||||
*/
|
||||
public function update(Site $site, array $input): void
|
||||
{
|
||||
$site->server->os()->editFile(
|
||||
$site->server->os()->editFileAs(
|
||||
$site->path.'/.env',
|
||||
$input['env']
|
||||
$site->user,
|
||||
trim($input['env']),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
63
app/Actions/Site/UpdateLoadBalancer.php
Normal file
63
app/Actions/Site/UpdateLoadBalancer.php
Normal file
@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\Site;
|
||||
|
||||
use App\Enums\LoadBalancerMethod;
|
||||
use App\Models\LoadBalancerServer;
|
||||
use App\Models\Site;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class UpdateLoadBalancer
|
||||
{
|
||||
public function update(Site $site, array $input): void
|
||||
{
|
||||
$site->loadBalancerServers()->delete();
|
||||
|
||||
foreach ($input['servers'] as $server) {
|
||||
$loadBalancerServer = new LoadBalancerServer([
|
||||
'load_balancer_id' => $site->id,
|
||||
'ip' => $server['server'],
|
||||
'port' => $server['port'],
|
||||
'weight' => $server['weight'],
|
||||
'backup' => (bool) $server['backup'],
|
||||
]);
|
||||
$loadBalancerServer->save();
|
||||
}
|
||||
|
||||
$site->webserver()->updateVHost($site);
|
||||
}
|
||||
|
||||
public static function rules(Site $site): array
|
||||
{
|
||||
return [
|
||||
'servers' => [
|
||||
'required',
|
||||
'array',
|
||||
],
|
||||
'servers.*.server' => [
|
||||
'required',
|
||||
Rule::exists('servers', 'local_ip')
|
||||
->where('project_id', $site->project->id),
|
||||
],
|
||||
'servers.*.port' => [
|
||||
'required',
|
||||
'numeric',
|
||||
'min:1',
|
||||
'max:65535',
|
||||
],
|
||||
'servers.*.weight' => [
|
||||
'nullable',
|
||||
'numeric',
|
||||
'min:0',
|
||||
],
|
||||
'servers.*.backup' => [
|
||||
'required',
|
||||
'boolean',
|
||||
],
|
||||
'method' => [
|
||||
'required',
|
||||
Rule::in(LoadBalancerMethod::all()),
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
30
app/Actions/Site/UpdatePHPVersion.php
Normal file
30
app/Actions/Site/UpdatePHPVersion.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\Site;
|
||||
|
||||
use App\Exceptions\SSHError;
|
||||
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'),
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws SSHError
|
||||
*/
|
||||
public function update(Site $site, array $input): void
|
||||
{
|
||||
$site->changePHPVersion($input['version']);
|
||||
}
|
||||
}
|
@ -6,7 +6,6 @@
|
||||
use App\Exceptions\RepositoryPermissionDenied;
|
||||
use App\Exceptions\SourceControlIsNotConnected;
|
||||
use App\Models\Site;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Validation\Rule;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
@ -14,12 +13,10 @@ class UpdateSourceControl
|
||||
{
|
||||
public function update(Site $site, array $input): void
|
||||
{
|
||||
$this->validate($input);
|
||||
|
||||
$site->source_control_id = $input['source_control'];
|
||||
try {
|
||||
if ($site->sourceControl()) {
|
||||
$site->sourceControl()->getRepo($site->repository);
|
||||
if ($site->sourceControl) {
|
||||
$site->sourceControl?->getRepo($site->repository);
|
||||
}
|
||||
} catch (SourceControlIsNotConnected) {
|
||||
throw ValidationException::withMessages([
|
||||
@ -37,13 +34,13 @@ public function update(Site $site, array $input): void
|
||||
$site->save();
|
||||
}
|
||||
|
||||
private function validate(array $input): void
|
||||
public static function rules(): array
|
||||
{
|
||||
Validator::make($input, [
|
||||
return [
|
||||
'source_control' => [
|
||||
'required',
|
||||
Rule::exists('source_controls', 'id'),
|
||||
],
|
||||
])->validate();
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -2,28 +2,24 @@
|
||||
|
||||
namespace App\Actions\SourceControl;
|
||||
|
||||
use App\Models\Project;
|
||||
use App\Models\SourceControl;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Arr;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Validation\Rule;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
class ConnectSourceControl
|
||||
{
|
||||
public function connect(User $user, array $input): void
|
||||
public function connect(User $user, Project $project, array $input): SourceControl
|
||||
{
|
||||
$this->validate($input);
|
||||
|
||||
$sourceControl = new SourceControl([
|
||||
'provider' => $input['provider'],
|
||||
'profile' => $input['name'],
|
||||
'url' => Arr::has($input, 'url') ? $input['url'] : null,
|
||||
'project_id' => isset($input['global']) && $input['global'] ? null : $user->current_project_id,
|
||||
'project_id' => isset($input['global']) && $input['global'] ? null : $project->id,
|
||||
]);
|
||||
|
||||
$this->validateProvider($sourceControl, $input);
|
||||
|
||||
$sourceControl->provider_data = $sourceControl->provider()->createData($input);
|
||||
|
||||
if (! $sourceControl->provider()->connect()) {
|
||||
@ -34,30 +30,38 @@ public function connect(User $user, array $input): void
|
||||
}
|
||||
|
||||
$sourceControl->save();
|
||||
|
||||
return $sourceControl;
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
private function validate(array $input): void
|
||||
public static function rules(array $input): array
|
||||
{
|
||||
$rules = [
|
||||
'name' => [
|
||||
'required',
|
||||
],
|
||||
'provider' => [
|
||||
'required',
|
||||
Rule::in(config('core.source_control_providers')),
|
||||
],
|
||||
'name' => [
|
||||
'required',
|
||||
],
|
||||
];
|
||||
Validator::make($input, $rules)->validate();
|
||||
|
||||
return array_merge($rules, static::providerRules($input));
|
||||
}
|
||||
|
||||
/**
|
||||
* @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;
|
||||
|
||||
use App\Models\SourceControl;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
class DeleteSourceControl
|
||||
{
|
||||
public function delete(SourceControl $sourceControl): void
|
||||
{
|
||||
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();
|
||||
|
@ -2,53 +2,47 @@
|
||||
|
||||
namespace App\Actions\SourceControl;
|
||||
|
||||
use App\Models\Project;
|
||||
use App\Models\SourceControl;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
class EditSourceControl
|
||||
{
|
||||
public function edit(SourceControl $sourceControl, User $user, array $input): void
|
||||
public function edit(SourceControl $sourceControl, Project $project, array $input): SourceControl
|
||||
{
|
||||
$this->validate($input);
|
||||
|
||||
$sourceControl->profile = $input['name'];
|
||||
$sourceControl->url = $input['url'] ?? null;
|
||||
$sourceControl->project_id = isset($input['global']) && $input['global'] ? null : $user->current_project_id;
|
||||
$sourceControl->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()->editData($input);
|
||||
|
||||
if (! $sourceControl->provider()->connect()) {
|
||||
throw ValidationException::withMessages([
|
||||
'token' => __('Cannot connect to :provider or invalid token!', ['provider' => $sourceControl->provider]
|
||||
),
|
||||
'token' => __('Cannot connect to :provider or invalid token!', ['provider' => $sourceControl->provider]),
|
||||
]);
|
||||
}
|
||||
|
||||
$sourceControl->save();
|
||||
|
||||
return $sourceControl;
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
private function validate(array $input): void
|
||||
public static function rules(SourceControl $sourceControl, array $input): array
|
||||
{
|
||||
$rules = [
|
||||
'name' => [
|
||||
'required',
|
||||
],
|
||||
];
|
||||
Validator::make($input, $rules)->validate();
|
||||
|
||||
return array_merge($rules, static::providerRules($sourceControl, $input));
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
private function validateProvider(SourceControl $sourceControl, array $input): void
|
||||
private static function providerRules(SourceControl $sourceControl, array $input): array
|
||||
{
|
||||
Validator::make($input, $sourceControl->provider()->createRules($input))->validate();
|
||||
return $sourceControl->provider()->editRules($input);
|
||||
}
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user