mirror of
https://github.com/vitodeploy/vito.git
synced 2025-04-19 09:51:37 +00:00
API Feature (#334)
This commit is contained in:
parent
da7b24640e
commit
417bf73e44
@ -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"
|
||||
|
4
.scribe/.filehashes
Normal file
4
.scribe/.filehashes
Normal file
@ -0,0 +1,4 @@
|
||||
# GENERATED. YOU SHOULDN'T MODIFY OR DELETE THIS FILE.
|
||||
# Scribe uses this file to know when you change something manually in your docs.
|
||||
.scribe/intro.md=98adb6862b118c06e02e4e22390feb6f
|
||||
.scribe/auth.md=7fcc12b2e5a86fa9c49f509d348f3cc2
|
7
.scribe/auth.md
Normal file
7
.scribe/auth.md
Normal file
@ -0,0 +1,7 @@
|
||||
# Authenticating requests
|
||||
|
||||
To authenticate requests, include an **`Authorization`** header with the value **`"Bearer YOUR-API-KEY"`**.
|
||||
|
||||
All authenticated endpoints are marked with a `requires authentication` badge in the documentation below.
|
||||
|
||||
You can retrieve your token by visiting <a href="/settings/api-keys" target="_blank">here</a>
|
310
.scribe/endpoints.cache/00.yaml
Normal file
310
.scribe/endpoints.cache/00.yaml
Normal file
@ -0,0 +1,310 @@
|
||||
## Autogenerated by Scribe. DO NOT MODIFY.
|
||||
|
||||
name: cron-jobs
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/cron-jobs'
|
||||
metadata:
|
||||
groupName: cron-jobs
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: list
|
||||
description: 'Get all cron jobs.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":null,"server_id":null,"command":"ls -la","user":"root","frequency":"* * * * *","status":"ready","created_at":null,"updated_at":null},{"id":null,"server_id":null,"command":"ls -la","user":"root","frequency":"* * * * *","status":"ready","created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6ed1gv5ak6hEPcaV8D3Z4bf'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/cron-jobs'
|
||||
metadata:
|
||||
groupName: cron-jobs
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: create
|
||||
description: 'Create a new cron job.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
command:
|
||||
name: command
|
||||
description: ''
|
||||
required: true
|
||||
example: qui
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
user:
|
||||
name: user
|
||||
description: ''
|
||||
required: true
|
||||
example: root
|
||||
type: string
|
||||
enumValues:
|
||||
- root
|
||||
- vito
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
frequency:
|
||||
name: frequency
|
||||
description: 'Frequency of the cron job.'
|
||||
required: true
|
||||
example: '* * * * *'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
command: qui
|
||||
user: root
|
||||
frequency: '* * * * *'
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"command":"ls -la","user":"root","frequency":"* * * * *","status":"ready","created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer VEfc5h3gva68PkZ46Deabd1'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/cron-jobs/{cronJob_id}'
|
||||
metadata:
|
||||
groupName: cron-jobs
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: show
|
||||
description: 'Get a cron job by ID.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cronJob_id:
|
||||
name: cronJob_id
|
||||
description: 'The ID of the cronJob.'
|
||||
required: true
|
||||
example: 5
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
cronJob_id: 5
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"command":"ls -la","user":"root","frequency":"* * * * *","status":"ready","created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 614DaP5vZ6edcaVEgfhk83b'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/cron-jobs/{cronJob_id}'
|
||||
metadata:
|
||||
groupName: cron-jobs
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: delete
|
||||
description: 'Delete cron job.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cronJob_id:
|
||||
name: cronJob_id
|
||||
description: 'The ID of the cronJob.'
|
||||
required: true
|
||||
example: 5
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
cronJob_id: 5
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: 'null'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer gDV6bZ1dEckvf45P86eaha3'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
286
.scribe/endpoints.cache/01.yaml
Normal file
286
.scribe/endpoints.cache/01.yaml
Normal file
@ -0,0 +1,286 @@
|
||||
## Autogenerated by Scribe. DO NOT MODIFY.
|
||||
|
||||
name: databases
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/databases'
|
||||
metadata:
|
||||
groupName: databases
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: list
|
||||
description: 'Get all databases.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":null,"server_id":null,"name":"clockman","status":"ready","created_at":null,"updated_at":null},{"id":null,"server_id":null,"name":"wvonrueden","status":"ready","created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer efEV4g86bd5PZac6vak3Dh1'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/databases'
|
||||
metadata:
|
||||
groupName: databases
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: create
|
||||
description: 'Create a new database.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
name:
|
||||
name: name
|
||||
description: ''
|
||||
required: true
|
||||
example: nesciunt
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
name: nesciunt
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"name":"johanna76","status":"ready","created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 3E6VD14dvaekbaZfh6Pg8c5'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/databases/{id}'
|
||||
metadata:
|
||||
groupName: databases
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: show
|
||||
description: 'Get a database by ID.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the database.'
|
||||
required: true
|
||||
example: 6
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
id: 6
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"name":"chloe.huel","status":"ready","created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer fb5hVc38e1aDP6ZvkgEda46'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/databases/{database_id}'
|
||||
metadata:
|
||||
groupName: databases
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: delete
|
||||
description: 'Delete database.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
database_id:
|
||||
name: database_id
|
||||
description: 'The ID of the database.'
|
||||
required: true
|
||||
example: 6
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
database_id: 6
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: 'null'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer cPVbhaZkfg5aEv46D183ed6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
392
.scribe/endpoints.cache/02.yaml
Normal file
392
.scribe/endpoints.cache/02.yaml
Normal file
@ -0,0 +1,392 @@
|
||||
## Autogenerated by Scribe. DO NOT MODIFY.
|
||||
|
||||
name: database-users
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/database-users'
|
||||
metadata:
|
||||
groupName: database-users
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: list
|
||||
description: 'Get all database users.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":null,"server_id":null,"username":"nyasia68","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null},{"id":null,"server_id":null,"username":"madyson20","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer egc5VaDdvabfP6843k61hZE'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/database-users'
|
||||
metadata:
|
||||
groupName: database-users
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: create
|
||||
description: 'Create a new database user.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
username:
|
||||
name: username
|
||||
description: ''
|
||||
required: true
|
||||
example: dignissimos
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
password:
|
||||
name: password
|
||||
description: ''
|
||||
required: true
|
||||
example: OK+XEG2)
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
host:
|
||||
name: host
|
||||
description: 'Host, if it is a remote user.'
|
||||
required: true
|
||||
example: '%'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
username: dignissimos
|
||||
password: OK+XEG2)
|
||||
host: '%'
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"username":"amya.nitzsche","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 31hgfcvEb6Pkaa48D6dZ5Ve'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/database-users/{databaseUser_id}'
|
||||
metadata:
|
||||
groupName: database-users
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: show
|
||||
description: 'Get a database user by ID.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
databaseUser_id:
|
||||
name: databaseUser_id
|
||||
description: 'The ID of the databaseUser.'
|
||||
required: true
|
||||
example: 4
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
databaseUser_id: 4
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"username":"bergstrom.ericka","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer aDv48631h5af6EdkcVbPZeg'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/database-users/{databaseUser_id}/link'
|
||||
metadata:
|
||||
groupName: database-users
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: link
|
||||
description: 'Link to databases'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
databaseUser_id:
|
||||
name: databaseUser_id
|
||||
description: 'The ID of the databaseUser.'
|
||||
required: true
|
||||
example: 4
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
databaseUser_id: 4
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
databases:
|
||||
name: databases
|
||||
description: 'Array of database names to link to the user.'
|
||||
required: true
|
||||
example: accusantium
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
databases: accusantium
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"username":"fmurray","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer cf8ZPhV1k3d5DaEva46beg6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/database-users/{databaseUser_id}'
|
||||
metadata:
|
||||
groupName: database-users
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: delete
|
||||
description: 'Delete database user.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
databaseUser_id:
|
||||
name: databaseUser_id
|
||||
description: 'The ID of the databaseUser.'
|
||||
required: true
|
||||
example: 4
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
databaseUser_id: 4
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: 'null'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer hdEvkbaPVf4cZ65a8631eDg'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
334
.scribe/endpoints.cache/03.yaml
Normal file
334
.scribe/endpoints.cache/03.yaml
Normal file
@ -0,0 +1,334 @@
|
||||
## Autogenerated by Scribe. DO NOT MODIFY.
|
||||
|
||||
name: firewall-rules
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/firewall-rules'
|
||||
metadata:
|
||||
groupName: firewall-rules
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: list
|
||||
description: 'Get all firewall rules.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":null,"server_id":null,"type":"allow","protocol":"tcp","port":18074,"source":"189.27.156.82","mask":24,"note":"test","status":null,"created_at":null,"updated_at":null},{"id":null,"server_id":null,"type":"allow","protocol":"tcp","port":41088,"source":"86.177.121.87","mask":24,"note":"test","status":null,"created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer vhkc4aPa6ZdeV8D3Ef156gb'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/firewall-rules'
|
||||
metadata:
|
||||
groupName: firewall-rules
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: create
|
||||
description: 'Create a new firewall rule.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
type:
|
||||
name: type
|
||||
description: ''
|
||||
required: true
|
||||
example: allow
|
||||
type: string
|
||||
enumValues:
|
||||
- allow
|
||||
- deny
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
protocol:
|
||||
name: protocol
|
||||
description: ''
|
||||
required: true
|
||||
example: udp
|
||||
type: string
|
||||
enumValues:
|
||||
- tcp
|
||||
- udp
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
port:
|
||||
name: port
|
||||
description: ''
|
||||
required: true
|
||||
example: voluptates
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
source:
|
||||
name: source
|
||||
description: ''
|
||||
required: true
|
||||
example: saepe
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
mask:
|
||||
name: mask
|
||||
description: 'Mask for source IP.'
|
||||
required: true
|
||||
example: '0'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
type: allow
|
||||
protocol: udp
|
||||
port: voluptates
|
||||
source: saepe
|
||||
mask: '0'
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"type":"allow","protocol":"tcp","port":61992,"source":"47.222.76.48","mask":24,"note":"test","status":null,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 1cEb5P66VeDkf8aahg3Zdv4'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/firewall-rules/{firewallRule_id}'
|
||||
metadata:
|
||||
groupName: firewall-rules
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: show
|
||||
description: 'Get a firewall rule by ID.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
firewallRule_id:
|
||||
name: firewallRule_id
|
||||
description: 'The ID of the firewallRule.'
|
||||
required: true
|
||||
example: 7
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
firewallRule_id: 7
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"type":"allow","protocol":"tcp","port":43107,"source":"135.73.216.16","mask":24,"note":"test","status":null,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6VaPhkD5vd1Z8e6E3cba4gf'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/firewall-rules/{firewallRule_id}'
|
||||
metadata:
|
||||
groupName: firewall-rules
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: delete
|
||||
description: 'Delete firewall rule.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
firewallRule_id:
|
||||
name: firewallRule_id
|
||||
description: 'The ID of the firewallRule.'
|
||||
required: true
|
||||
example: 7
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
firewallRule_id: 7
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: 'null'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer v81d5Efch636aVgZebaPkD4'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
46
.scribe/endpoints.cache/04.yaml
Normal file
46
.scribe/endpoints.cache/04.yaml
Normal file
@ -0,0 +1,46 @@
|
||||
## Autogenerated by Scribe. DO NOT MODIFY.
|
||||
|
||||
name: general
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: api/health
|
||||
metadata:
|
||||
groupName: general
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: health-check
|
||||
description: ''
|
||||
authenticated: false
|
||||
custom: []
|
||||
headers:
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"success":true,"version":"2.0.0"}'
|
||||
headers:
|
||||
cache-control: 'no-cache, private'
|
||||
content-type: application/json
|
||||
x-ratelimit-limit: '60'
|
||||
x-ratelimit-remaining: '59'
|
||||
access-control-allow-origin: '*'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth: []
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
260
.scribe/endpoints.cache/05.yaml
Normal file
260
.scribe/endpoints.cache/05.yaml
Normal file
@ -0,0 +1,260 @@
|
||||
## Autogenerated by Scribe. DO NOT MODIFY.
|
||||
|
||||
name: projects
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: api/projects
|
||||
metadata:
|
||||
groupName: projects
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: list
|
||||
description: 'Get all projects.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":29,"name":"Zachary Lueilwitz","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"},{"id":30,"name":"Mrs. Kiarra Heller IV","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer eb14DEPv6cdah65VfZgka38'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: api/projects
|
||||
metadata:
|
||||
groupName: projects
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: create
|
||||
description: 'Create a new project.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
name:
|
||||
name: name
|
||||
description: 'The name of the project.'
|
||||
required: true
|
||||
example: quos
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
name: quos
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":29,"name":"Hershel Spinka","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer V1E3566Pf4gkvh8dDZabeca'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{id}'
|
||||
metadata:
|
||||
groupName: projects
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: show
|
||||
description: 'Get a project by ID.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":29,"name":"Emery Kiehn","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer haD6e36VZbkf4P8aEcvd15g'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- PUT
|
||||
uri: 'api/projects/{id}'
|
||||
metadata:
|
||||
groupName: projects
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: update
|
||||
description: 'Update project.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
name:
|
||||
name: name
|
||||
description: 'The name of the project.'
|
||||
required: true
|
||||
example: ut
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
name: ut
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":29,"name":"Mable Prohaska","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer V14kPa5deva8Ebgc36f6hDZ'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/projects/{project_id}'
|
||||
metadata:
|
||||
groupName: projects
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: delete
|
||||
description: 'Delete project.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: 'null'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer k1D68d5ePavVZag6h4fb3cE'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
516
.scribe/endpoints.cache/06.yaml
Normal file
516
.scribe/endpoints.cache/06.yaml
Normal file
@ -0,0 +1,516 @@
|
||||
## Autogenerated by Scribe. DO NOT MODIFY.
|
||||
|
||||
name: servers
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers'
|
||||
metadata:
|
||||
groupName: servers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: list
|
||||
description: 'Get all servers in a project.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":null,"project_id":null,"user_id":null,"provider_id":null,"name":"Dorthy Toy","ssh_user":"vito","ip":"172.132.95.155","local_ip":"118.57.197.65","port":22,"os":"ubuntu_22","type":"regular","type_data":null,"provider":"custom","provider_data":null,"public_key":"test","status":"ready","auto_update":null,"available_updates":0,"security_updates":null,"progress":100,"progress_step":null,"updates":null,"last_update_check":null,"created_at":null,"updated_at":null},{"id":null,"project_id":null,"user_id":null,"provider_id":null,"name":"Carrie Sporer","ssh_user":"vito","ip":"184.242.162.173","local_ip":"135.244.50.22","port":22,"os":"ubuntu_22","type":"regular","type_data":null,"provider":"custom","provider_data":null,"public_key":"test","status":"ready","auto_update":null,"available_updates":0,"security_updates":null,"progress":100,"progress_step":null,"updates":null,"last_update_check":null,"created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 8VE41PdZcvb6kgafD635ahe'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers'
|
||||
metadata:
|
||||
groupName: servers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: create
|
||||
description: 'Create a new server.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
provider:
|
||||
name: provider
|
||||
description: 'The server provider type'
|
||||
required: true
|
||||
example: et
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_provider:
|
||||
name: server_provider
|
||||
description: 'If the provider is not custom, the ID of the server provider profile'
|
||||
required: true
|
||||
example: digitalocean
|
||||
type: string
|
||||
enumValues:
|
||||
- custom
|
||||
- hetzner
|
||||
- digitalocean
|
||||
- linode
|
||||
- vultr
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
region:
|
||||
name: region
|
||||
description: 'Provider region if the provider is not custom'
|
||||
required: true
|
||||
example: inventore
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
plan:
|
||||
name: plan
|
||||
description: 'Provider plan if the provider is not custom'
|
||||
required: true
|
||||
example: atque
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
ip:
|
||||
name: ip
|
||||
description: 'SSH IP address if the provider is custom'
|
||||
required: true
|
||||
example: quam
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
port:
|
||||
name: port
|
||||
description: 'SSH Port if the provider is custom'
|
||||
required: true
|
||||
example: nemo
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
name:
|
||||
name: name
|
||||
description: 'The name of the server.'
|
||||
required: true
|
||||
example: perspiciatis
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
os:
|
||||
name: os
|
||||
description: 'The os of the server'
|
||||
required: true
|
||||
example: similique
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
type:
|
||||
name: type
|
||||
description: 'Server type'
|
||||
required: true
|
||||
example: regular
|
||||
type: string
|
||||
enumValues:
|
||||
- regular
|
||||
- database
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
webserver:
|
||||
name: webserver
|
||||
description: 'Web server'
|
||||
required: true
|
||||
example: none
|
||||
type: string
|
||||
enumValues:
|
||||
- none
|
||||
- nginx
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
database:
|
||||
name: database
|
||||
description: Database
|
||||
required: true
|
||||
example: none
|
||||
type: string
|
||||
enumValues:
|
||||
- none
|
||||
- mysql57
|
||||
- mysql80
|
||||
- mariadb103
|
||||
- mariadb104
|
||||
- mariadb103
|
||||
- postgresql12
|
||||
- postgresql13
|
||||
- postgresql14
|
||||
- postgresql15
|
||||
- postgresql16
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
php:
|
||||
name: php
|
||||
description: 'PHP version'
|
||||
required: true
|
||||
example: '8.1'
|
||||
type: string
|
||||
enumValues:
|
||||
- '7.0'
|
||||
- '7.1'
|
||||
- '7.2'
|
||||
- '7.3'
|
||||
- '7.4'
|
||||
- '8.0'
|
||||
- '8.1'
|
||||
- '8.2'
|
||||
- '8.3'
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
provider: et
|
||||
server_provider: digitalocean
|
||||
region: inventore
|
||||
plan: atque
|
||||
ip: quam
|
||||
port: nemo
|
||||
name: perspiciatis
|
||||
os: similique
|
||||
type: regular
|
||||
webserver: none
|
||||
database: none
|
||||
php: '8.1'
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"project_id":null,"user_id":null,"provider_id":null,"name":"Flo Beer PhD","ssh_user":"vito","ip":"168.238.14.230","local_ip":"40.232.73.41","port":22,"os":"ubuntu_22","type":"regular","type_data":null,"provider":"custom","provider_data":null,"public_key":"test","status":"ready","auto_update":null,"available_updates":0,"security_updates":null,"progress":100,"progress_step":null,"updates":null,"last_update_check":null,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer Z8g36aaV4E1bdcPfehDv65k'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{id}'
|
||||
metadata:
|
||||
groupName: servers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: show
|
||||
description: 'Get a server by ID.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"project_id":null,"user_id":null,"provider_id":null,"name":"Stephany Ankunding","ssh_user":"vito","ip":"145.28.94.46","local_ip":"69.133.44.100","port":22,"os":"ubuntu_22","type":"regular","type_data":null,"provider":"custom","provider_data":null,"public_key":"test","status":"ready","auto_update":null,"available_updates":0,"security_updates":null,"progress":100,"progress_step":null,"updates":null,"last_update_check":null,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer adD3EfP5hZ4vgbkV861eca6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/reboot'
|
||||
metadata:
|
||||
groupName: servers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: reboot
|
||||
description: 'Reboot a server.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: 'null'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer P3ec6aagD4hbdV5fEk168vZ'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/upgrade'
|
||||
metadata:
|
||||
groupName: servers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: upgrade
|
||||
description: 'Upgrade server.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: 'null'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer P34ZV6D1bEegdvac8f5kh6a'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}'
|
||||
metadata:
|
||||
groupName: servers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: delete
|
||||
description: 'Delete server.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: 'null'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer ha6v5V41afkdPgcZbDEe386'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
372
.scribe/endpoints.cache/07.yaml
Normal file
372
.scribe/endpoints.cache/07.yaml
Normal file
@ -0,0 +1,372 @@
|
||||
## Autogenerated by Scribe. DO NOT MODIFY.
|
||||
|
||||
name: server-providers
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/server-providers'
|
||||
metadata:
|
||||
groupName: server-providers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: list
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":2,"project_id":null,"global":true,"name":"dolor","provider":"digitalocean","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"},{"id":3,"project_id":null,"global":true,"name":"enim","provider":"digitalocean","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 1a6kb58vEP3fZdVhcea64gD'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/server-providers'
|
||||
metadata:
|
||||
groupName: server-providers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: create
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
provider:
|
||||
name: provider
|
||||
description: 'The provider (aws, linode, hetzner, digitalocean, vultr, ...)'
|
||||
required: true
|
||||
example: autem
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
name:
|
||||
name: name
|
||||
description: 'The name of the server provider.'
|
||||
required: true
|
||||
example: enim
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
token:
|
||||
name: token
|
||||
description: 'The token if provider requires api token'
|
||||
required: true
|
||||
example: culpa
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
key:
|
||||
name: key
|
||||
description: 'The key if provider requires key'
|
||||
required: true
|
||||
example: sit
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
secret:
|
||||
name: secret
|
||||
description: 'The secret if provider requires key'
|
||||
required: true
|
||||
example: voluptates
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
provider: autem
|
||||
name: enim
|
||||
token: culpa
|
||||
key: sit
|
||||
secret: voluptates
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":2,"project_id":null,"global":true,"name":"eligendi","provider":"aws","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer PD3ZcaVdvgfa5k4be8E6h16'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/server-providers/{serverProvider_id}'
|
||||
metadata:
|
||||
groupName: server-providers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: show
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
serverProvider_id:
|
||||
name: serverProvider_id
|
||||
description: 'The ID of the serverProvider.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
serverProvider_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":2,"project_id":null,"global":true,"name":"architecto","provider":"digitalocean","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer DP45bg1aEadh8Z6Vke63fcv'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- PUT
|
||||
uri: 'api/projects/{project_id}/server-providers/{serverProvider_id}'
|
||||
metadata:
|
||||
groupName: server-providers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: update
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
serverProvider_id:
|
||||
name: serverProvider_id
|
||||
description: 'The ID of the serverProvider.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
serverProvider_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
name:
|
||||
name: name
|
||||
description: 'The name of the server provider.'
|
||||
required: true
|
||||
example: minus
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
global:
|
||||
name: global
|
||||
description: 'Accessible in all projects'
|
||||
required: true
|
||||
example: false
|
||||
type: string
|
||||
enumValues:
|
||||
- true
|
||||
- false
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
name: minus
|
||||
global: false
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":2,"project_id":null,"global":true,"name":"reiciendis","provider":"hetzner","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer bv1kdegh6fP8V56ZE4acaD3'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/projects/{project_id}/server-providers/{serverProvider_id}'
|
||||
metadata:
|
||||
groupName: server-providers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: delete
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
serverProvider_id:
|
||||
name: serverProvider_id
|
||||
description: 'The ID of the serverProvider.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
serverProvider_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: 'null'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer k6hb43Vf5Z1dv8aaeEDcg6P'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
235
.scribe/endpoints.cache/08.yaml
Normal file
235
.scribe/endpoints.cache/08.yaml
Normal file
@ -0,0 +1,235 @@
|
||||
## Autogenerated by Scribe. DO NOT MODIFY.
|
||||
|
||||
name: ssh-keys
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/ssh-keys'
|
||||
metadata:
|
||||
groupName: ssh-keys
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: list
|
||||
description: 'Get all ssh keys.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":null,"user":null,"name":"Dr. Reanna Braun","created_at":null,"updated_at":null},{"id":null,"user":null,"name":"Norene Fritsch","created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer dV1gcvfZ46Eh8ebaP5Da63k'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/ssh-keys'
|
||||
metadata:
|
||||
groupName: ssh-keys
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: create
|
||||
description: 'Deploy ssh key to server.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
key_id:
|
||||
name: key_id
|
||||
description: 'The ID of the key.'
|
||||
required: true
|
||||
example: vero
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
name:
|
||||
name: name
|
||||
description: 'Key name, required if key_id is not provided.'
|
||||
required: true
|
||||
example: voluptates
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
public_key:
|
||||
name: public_key
|
||||
description: 'Public Key, required if key_id is not provided.'
|
||||
required: true
|
||||
example: dolor
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
key_id: vero
|
||||
name: voluptates
|
||||
public_key: dolor
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"user":null,"name":"Sophia D''Amore","created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer gkadV36a5f8E6vhb14ZceDP'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/ssh-keys/{sshKey_id}'
|
||||
metadata:
|
||||
groupName: ssh-keys
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: delete
|
||||
description: 'Delete ssh key from server.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
sshKey_id:
|
||||
name: sshKey_id
|
||||
description: 'The ID of the sshKey.'
|
||||
required: true
|
||||
example: 4
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
sshKey_id: 4
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: 'null'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer PfchD4Zge386abadE5kV61v'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
578
.scribe/endpoints.cache/09.yaml
Normal file
578
.scribe/endpoints.cache/09.yaml
Normal file
@ -0,0 +1,578 @@
|
||||
## Autogenerated by Scribe. DO NOT MODIFY.
|
||||
|
||||
name: services
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/services'
|
||||
metadata:
|
||||
groupName: services
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: list
|
||||
description: 'Get all services.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":null,"server_id":null,"type":null,"type_data":null,"name":null,"version":null,"unit":null,"status":null,"is_default":null,"created_at":null,"updated_at":null},{"id":null,"server_id":null,"type":null,"type_data":null,"name":null,"version":null,"unit":null,"status":null,"is_default":null,"created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer h6bDec51ak84ZVafgv3PE6d'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/services/{id}'
|
||||
metadata:
|
||||
groupName: services
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: show
|
||||
description: 'Get a service by ID.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the service.'
|
||||
required: true
|
||||
example: 27
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
id: 27
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"type":null,"type_data":null,"name":null,"version":null,"unit":null,"status":null,"is_default":null,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer da4V3kfgZ6a86PchevED5b1'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/services/{service_id}/start'
|
||||
metadata:
|
||||
groupName: services
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: start
|
||||
description: 'Start service.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
service_id:
|
||||
name: service_id
|
||||
description: 'The ID of the service.'
|
||||
required: true
|
||||
example: 27
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
service_id: 27
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: 'null'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 86fdV5D6gv1E3ekaPZac4hb'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/services/{service_id}/stop'
|
||||
metadata:
|
||||
groupName: services
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: stop
|
||||
description: 'Stop service.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
service_id:
|
||||
name: service_id
|
||||
description: 'The ID of the service.'
|
||||
required: true
|
||||
example: 27
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
service_id: 27
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: 'null'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer kPZ563E1Vfgh4cbDad8vae6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/services/{service_id}/restart'
|
||||
metadata:
|
||||
groupName: services
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: restart
|
||||
description: 'Restart service.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
service_id:
|
||||
name: service_id
|
||||
description: 'The ID of the service.'
|
||||
required: true
|
||||
example: 27
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
service_id: 27
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: 'null'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer fd14PaDb58gchv3ZVeaEk66'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/services/{service_id}/enable'
|
||||
metadata:
|
||||
groupName: services
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: enable
|
||||
description: 'Enable service.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
service_id:
|
||||
name: service_id
|
||||
description: 'The ID of the service.'
|
||||
required: true
|
||||
example: 27
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
service_id: 27
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: 'null'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer Dv1aVe6hZfkagdE356b4cP8'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/services/{service_id}/disable'
|
||||
metadata:
|
||||
groupName: services
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: disable
|
||||
description: 'Disable service.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
service_id:
|
||||
name: service_id
|
||||
description: 'The ID of the service.'
|
||||
required: true
|
||||
example: 27
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
service_id: 27
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: 'null'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6bdDc4Eah3ZV18kf6Pveag5'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/services/{service_id}'
|
||||
metadata:
|
||||
groupName: services
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: delete
|
||||
description: 'Delete service.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
service_id:
|
||||
name: service_id
|
||||
description: 'The ID of the service.'
|
||||
required: true
|
||||
example: 27
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
service_id: 27
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: 'null'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 36kf84v6bVhE5gdPDeZ1caa'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
392
.scribe/endpoints.cache/10.yaml
Normal file
392
.scribe/endpoints.cache/10.yaml
Normal file
@ -0,0 +1,392 @@
|
||||
## Autogenerated by Scribe. DO NOT MODIFY.
|
||||
|
||||
name: sites
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/sites'
|
||||
metadata:
|
||||
groupName: sites
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: list
|
||||
description: 'Get all sites.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":null,"server_id":null,"source_control_id":null,"type":"laravel","type_data":null,"domain":"test.com","aliases":null,"web_directory":"\/","path":"\/home","php_version":"8.2","repository":null,"branch":"main","status":"ready","port":null,"progress":100,"created_at":null,"updated_at":null},{"id":null,"server_id":null,"source_control_id":null,"type":"laravel","type_data":null,"domain":"test.com","aliases":null,"web_directory":"\/","path":"\/home","php_version":"8.2","repository":null,"branch":"main","status":"ready","port":null,"progress":100,"created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer gaeE86fd1aZP53Vvc6Dhbk4'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/sites'
|
||||
metadata:
|
||||
groupName: sites
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: create
|
||||
description: 'Create a new site.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
type:
|
||||
name: type
|
||||
description: ''
|
||||
required: true
|
||||
example: wordpress
|
||||
type: string
|
||||
enumValues:
|
||||
- php
|
||||
- php-blank
|
||||
- phpmyadmin
|
||||
- laravel
|
||||
- wordpress
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
domain:
|
||||
name: domain
|
||||
description: ''
|
||||
required: true
|
||||
example: quo
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
aliases:
|
||||
name: aliases
|
||||
description: ''
|
||||
required: true
|
||||
example:
|
||||
- dolorum
|
||||
type: 'string[]'
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
php_version:
|
||||
name: php_version
|
||||
description: 'One of the installed PHP Versions'
|
||||
required: true
|
||||
example: '7.4'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
web_directory:
|
||||
name: web_directory
|
||||
description: 'Required for PHP and Laravel sites'
|
||||
required: true
|
||||
example: public
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
source_control:
|
||||
name: source_control
|
||||
description: 'Source control ID, Required for Sites which support source control'
|
||||
required: true
|
||||
example: explicabo
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
repository:
|
||||
name: repository
|
||||
description: 'Repository, Required for Sites which support source control'
|
||||
required: true
|
||||
example: organization/repository
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
branch:
|
||||
name: branch
|
||||
description: 'Branch, Required for Sites which support source control'
|
||||
required: true
|
||||
example: main
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
composer:
|
||||
name: composer
|
||||
description: 'Run composer if site supports composer'
|
||||
required: true
|
||||
example: true
|
||||
type: boolean
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
version:
|
||||
name: version
|
||||
description: 'Version, if the site type requires a version like PHPMyAdmin'
|
||||
required: true
|
||||
example: 5.2.1
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
type: wordpress
|
||||
domain: quo
|
||||
aliases:
|
||||
- dolorum
|
||||
php_version: '7.4'
|
||||
web_directory: public
|
||||
source_control: explicabo
|
||||
repository: organization/repository
|
||||
branch: main
|
||||
composer: true
|
||||
version: 5.2.1
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"source_control_id":null,"type":"laravel","type_data":null,"domain":"test.com","aliases":null,"web_directory":"\/","path":"\/home","php_version":"8.2","repository":null,"branch":"main","status":"ready","port":null,"progress":100,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer efDd36cab6vZEaV4hkP851g'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/sites/{id}'
|
||||
metadata:
|
||||
groupName: sites
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: show
|
||||
description: 'Get a site by ID.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the site.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"source_control_id":null,"type":"laravel","type_data":null,"domain":"test.com","aliases":null,"web_directory":"\/","path":"\/home","php_version":"8.2","repository":null,"branch":"main","status":"ready","port":null,"progress":100,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer bVkf841ava5gE6DPch36Zde'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/sites/{site_id}'
|
||||
metadata:
|
||||
groupName: sites
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: delete
|
||||
description: 'Delete site.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
site_id:
|
||||
name: site_id
|
||||
description: 'The ID of the site.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
site_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: 'null'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer gfVZbEP5Ddah6k13ae6c8v4'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
430
.scribe/endpoints.cache/11.yaml
Normal file
430
.scribe/endpoints.cache/11.yaml
Normal file
@ -0,0 +1,430 @@
|
||||
## Autogenerated by Scribe. DO NOT MODIFY.
|
||||
|
||||
name: source-controls
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/source-controls'
|
||||
metadata:
|
||||
groupName: source-controls
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: list
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":5,"project_id":null,"global":true,"name":"Jaiden Kling","provider":"github","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"},{"id":6,"project_id":null,"global":true,"name":"Ms. Brianne Bosco","provider":"github","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer PfaEg1eZh66cd5V4v8bD3ak'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/source-controls'
|
||||
metadata:
|
||||
groupName: source-controls
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: create
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
provider:
|
||||
name: provider
|
||||
description: 'The provider'
|
||||
required: true
|
||||
example: bitbucket
|
||||
type: string
|
||||
enumValues:
|
||||
- gitlab
|
||||
- github
|
||||
- bitbucket
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
name:
|
||||
name: name
|
||||
description: 'The name of the storage provider.'
|
||||
required: true
|
||||
example: eos
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
token:
|
||||
name: token
|
||||
description: 'The token if provider requires api token'
|
||||
required: true
|
||||
example: et
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
url:
|
||||
name: url
|
||||
description: 'The URL if the provider is Gitlab and it is self-hosted'
|
||||
required: true
|
||||
example: 'https://lueilwitz.com/nostrum-et-porro-atque-sint.html'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
username:
|
||||
name: username
|
||||
description: 'The username if the provider is Bitbucket'
|
||||
required: true
|
||||
example: consectetur
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
password:
|
||||
name: password
|
||||
description: 'The password if the provider is Bitbucket'
|
||||
required: true
|
||||
example: 'PL.P?{06\ECi0'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
provider: bitbucket
|
||||
name: eos
|
||||
token: et
|
||||
url: 'https://lueilwitz.com/nostrum-et-porro-atque-sint.html'
|
||||
username: consectetur
|
||||
password: 'PL.P?{06\ECi0'
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":5,"project_id":null,"global":true,"name":"Toby Parker","provider":"github","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer V5Zf3a1ve6d6kP4cbgha8DE'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/source-controls/{sourceControl_id}'
|
||||
metadata:
|
||||
groupName: source-controls
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: show
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
sourceControl_id:
|
||||
name: sourceControl_id
|
||||
description: 'The ID of the sourceControl.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
sourceControl_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":5,"project_id":null,"global":true,"name":"Prof. Bartholome Graham IV","provider":"github","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer k1b5hac6veZ36P8gDV4fadE'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- PUT
|
||||
uri: 'api/projects/{project_id}/source-controls/{sourceControl_id}'
|
||||
metadata:
|
||||
groupName: source-controls
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: update
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
sourceControl_id:
|
||||
name: sourceControl_id
|
||||
description: 'The ID of the sourceControl.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
sourceControl_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
name:
|
||||
name: name
|
||||
description: 'The name of the storage provider.'
|
||||
required: true
|
||||
example: quaerat
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
token:
|
||||
name: token
|
||||
description: 'The token if provider requires api token'
|
||||
required: true
|
||||
example: consectetur
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
url:
|
||||
name: url
|
||||
description: 'The URL if the provider is Gitlab and it is self-hosted'
|
||||
required: true
|
||||
example: 'http://www.hudson.biz/rerum-voluptatem-debitis-accusamus'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
username:
|
||||
name: username
|
||||
description: 'The username if the provider is Bitbucket'
|
||||
required: true
|
||||
example: voluptatem
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
password:
|
||||
name: password
|
||||
description: 'The password if the provider is Bitbucket'
|
||||
required: true
|
||||
example: '\p/el>)3#~E?kI'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
global:
|
||||
name: global
|
||||
description: 'Accessible in all projects'
|
||||
required: true
|
||||
example: false
|
||||
type: string
|
||||
enumValues:
|
||||
- true
|
||||
- false
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
name: quaerat
|
||||
token: consectetur
|
||||
url: 'http://www.hudson.biz/rerum-voluptatem-debitis-accusamus'
|
||||
username: voluptatem
|
||||
password: '\p/el>)3#~E?kI'
|
||||
global: false
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":5,"project_id":null,"global":true,"name":"Cicero Smitham","provider":"github","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6dkE6h8a5eg3f14acVvbPDZ'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/projects/{project_id}/source-controls/{sourceControl_id}'
|
||||
metadata:
|
||||
groupName: source-controls
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: delete
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
sourceControl_id:
|
||||
name: sourceControl_id
|
||||
description: 'The ID of the sourceControl.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
sourceControl_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: 'null'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer fb6Zk4EP318eva5hDdcV6ga'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
372
.scribe/endpoints.cache/12.yaml
Normal file
372
.scribe/endpoints.cache/12.yaml
Normal file
@ -0,0 +1,372 @@
|
||||
## Autogenerated by Scribe. DO NOT MODIFY.
|
||||
|
||||
name: storage-providers
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/storage-providers'
|
||||
metadata:
|
||||
groupName: storage-providers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: list
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":3,"project_id":null,"global":true,"name":"et","provider":"local","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"},{"id":4,"project_id":null,"global":true,"name":"sed","provider":"local","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 1dbV3vkh6EPD5g48cafeZ6a'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/storage-providers'
|
||||
metadata:
|
||||
groupName: storage-providers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: create
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
provider:
|
||||
name: provider
|
||||
description: 'The provider (aws, linode, hetzner, digitalocean, vultr, ...)'
|
||||
required: true
|
||||
example: quod
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
name:
|
||||
name: name
|
||||
description: 'The name of the storage provider.'
|
||||
required: true
|
||||
example: commodi
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
token:
|
||||
name: token
|
||||
description: 'The token if provider requires api token'
|
||||
required: true
|
||||
example: ipsum
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
key:
|
||||
name: key
|
||||
description: 'The key if provider requires key'
|
||||
required: true
|
||||
example: ratione
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
secret:
|
||||
name: secret
|
||||
description: 'The secret if provider requires key'
|
||||
required: true
|
||||
example: iste
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
provider: quod
|
||||
name: commodi
|
||||
token: ipsum
|
||||
key: ratione
|
||||
secret: iste
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":3,"project_id":null,"global":true,"name":"est","provider":"dropbox","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer abehv36kP4D658VafgdZE1c'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/storage-providers/{storageProvider_id}'
|
||||
metadata:
|
||||
groupName: storage-providers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: show
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
storageProvider_id:
|
||||
name: storageProvider_id
|
||||
description: 'The ID of the storageProvider.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
storageProvider_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":3,"project_id":null,"global":true,"name":"officia","provider":"ftp","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer bda64P5c1gEDe8V3Z6vhkaf'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- PUT
|
||||
uri: 'api/projects/{project_id}/storage-providers/{storageProvider_id}'
|
||||
metadata:
|
||||
groupName: storage-providers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: update
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
storageProvider_id:
|
||||
name: storageProvider_id
|
||||
description: 'The ID of the storageProvider.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
storageProvider_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
name:
|
||||
name: name
|
||||
description: 'The name of the storage provider.'
|
||||
required: true
|
||||
example: iusto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
global:
|
||||
name: global
|
||||
description: 'Accessible in all projects'
|
||||
required: true
|
||||
example: true
|
||||
type: string
|
||||
enumValues:
|
||||
- true
|
||||
- false
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
name: iusto
|
||||
global: true
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":3,"project_id":null,"global":true,"name":"rerum","provider":"ftp","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer aEP35hVakDdf814eZvg66cb'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/projects/{project_id}/storage-providers/{storageProvider_id}'
|
||||
metadata:
|
||||
groupName: storage-providers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: delete
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
storageProvider_id:
|
||||
name: storageProvider_id
|
||||
description: 'The ID of the storageProvider.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
storageProvider_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: 'null'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer Dah3PgE5d64fcbe8a16VkvZ'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
308
.scribe/endpoints/00.yaml
Normal file
308
.scribe/endpoints/00.yaml
Normal file
@ -0,0 +1,308 @@
|
||||
name: cron-jobs
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/cron-jobs'
|
||||
metadata:
|
||||
groupName: cron-jobs
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: list
|
||||
description: 'Get all cron jobs.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":null,"server_id":null,"command":"ls -la","user":"root","frequency":"* * * * *","status":"ready","created_at":null,"updated_at":null},{"id":null,"server_id":null,"command":"ls -la","user":"root","frequency":"* * * * *","status":"ready","created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6ed1gv5ak6hEPcaV8D3Z4bf'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/cron-jobs'
|
||||
metadata:
|
||||
groupName: cron-jobs
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: create
|
||||
description: 'Create a new cron job.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
command:
|
||||
name: command
|
||||
description: ''
|
||||
required: true
|
||||
example: qui
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
user:
|
||||
name: user
|
||||
description: ''
|
||||
required: true
|
||||
example: root
|
||||
type: string
|
||||
enumValues:
|
||||
- root
|
||||
- vito
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
frequency:
|
||||
name: frequency
|
||||
description: 'Frequency of the cron job.'
|
||||
required: true
|
||||
example: '* * * * *'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
command: qui
|
||||
user: root
|
||||
frequency: '* * * * *'
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"command":"ls -la","user":"root","frequency":"* * * * *","status":"ready","created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer VEfc5h3gva68PkZ46Deabd1'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/cron-jobs/{cronJob_id}'
|
||||
metadata:
|
||||
groupName: cron-jobs
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: show
|
||||
description: 'Get a cron job by ID.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cronJob_id:
|
||||
name: cronJob_id
|
||||
description: 'The ID of the cronJob.'
|
||||
required: true
|
||||
example: 5
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
cronJob_id: 5
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"command":"ls -la","user":"root","frequency":"* * * * *","status":"ready","created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 614DaP5vZ6edcaVEgfhk83b'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/cron-jobs/{cronJob_id}'
|
||||
metadata:
|
||||
groupName: cron-jobs
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: delete
|
||||
description: 'Delete cron job.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cronJob_id:
|
||||
name: cronJob_id
|
||||
description: 'The ID of the cronJob.'
|
||||
required: true
|
||||
example: 5
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
cronJob_id: 5
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: 'null'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer gDV6bZ1dEckvf45P86eaha3'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
284
.scribe/endpoints/01.yaml
Normal file
284
.scribe/endpoints/01.yaml
Normal file
@ -0,0 +1,284 @@
|
||||
name: databases
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/databases'
|
||||
metadata:
|
||||
groupName: databases
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: list
|
||||
description: 'Get all databases.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":null,"server_id":null,"name":"clockman","status":"ready","created_at":null,"updated_at":null},{"id":null,"server_id":null,"name":"wvonrueden","status":"ready","created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer efEV4g86bd5PZac6vak3Dh1'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/databases'
|
||||
metadata:
|
||||
groupName: databases
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: create
|
||||
description: 'Create a new database.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
name:
|
||||
name: name
|
||||
description: ''
|
||||
required: true
|
||||
example: nesciunt
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
name: nesciunt
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"name":"johanna76","status":"ready","created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 3E6VD14dvaekbaZfh6Pg8c5'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/databases/{id}'
|
||||
metadata:
|
||||
groupName: databases
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: show
|
||||
description: 'Get a database by ID.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the database.'
|
||||
required: true
|
||||
example: 6
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
id: 6
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"name":"chloe.huel","status":"ready","created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer fb5hVc38e1aDP6ZvkgEda46'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/databases/{database_id}'
|
||||
metadata:
|
||||
groupName: databases
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: delete
|
||||
description: 'Delete database.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
database_id:
|
||||
name: database_id
|
||||
description: 'The ID of the database.'
|
||||
required: true
|
||||
example: 6
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
database_id: 6
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: 'null'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer cPVbhaZkfg5aEv46D183ed6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
390
.scribe/endpoints/02.yaml
Normal file
390
.scribe/endpoints/02.yaml
Normal file
@ -0,0 +1,390 @@
|
||||
name: database-users
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/database-users'
|
||||
metadata:
|
||||
groupName: database-users
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: list
|
||||
description: 'Get all database users.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":null,"server_id":null,"username":"nyasia68","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null},{"id":null,"server_id":null,"username":"madyson20","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer egc5VaDdvabfP6843k61hZE'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/database-users'
|
||||
metadata:
|
||||
groupName: database-users
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: create
|
||||
description: 'Create a new database user.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
username:
|
||||
name: username
|
||||
description: ''
|
||||
required: true
|
||||
example: dignissimos
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
password:
|
||||
name: password
|
||||
description: ''
|
||||
required: true
|
||||
example: OK+XEG2)
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
host:
|
||||
name: host
|
||||
description: 'Host, if it is a remote user.'
|
||||
required: true
|
||||
example: '%'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
username: dignissimos
|
||||
password: OK+XEG2)
|
||||
host: '%'
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"username":"amya.nitzsche","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 31hgfcvEb6Pkaa48D6dZ5Ve'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/database-users/{databaseUser_id}'
|
||||
metadata:
|
||||
groupName: database-users
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: show
|
||||
description: 'Get a database user by ID.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
databaseUser_id:
|
||||
name: databaseUser_id
|
||||
description: 'The ID of the databaseUser.'
|
||||
required: true
|
||||
example: 4
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
databaseUser_id: 4
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"username":"bergstrom.ericka","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer aDv48631h5af6EdkcVbPZeg'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/database-users/{databaseUser_id}/link'
|
||||
metadata:
|
||||
groupName: database-users
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: link
|
||||
description: 'Link to databases'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
databaseUser_id:
|
||||
name: databaseUser_id
|
||||
description: 'The ID of the databaseUser.'
|
||||
required: true
|
||||
example: 4
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
databaseUser_id: 4
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
databases:
|
||||
name: databases
|
||||
description: 'Array of database names to link to the user.'
|
||||
required: true
|
||||
example: accusantium
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
databases: accusantium
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"username":"fmurray","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer cf8ZPhV1k3d5DaEva46beg6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/database-users/{databaseUser_id}'
|
||||
metadata:
|
||||
groupName: database-users
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: delete
|
||||
description: 'Delete database user.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
databaseUser_id:
|
||||
name: databaseUser_id
|
||||
description: 'The ID of the databaseUser.'
|
||||
required: true
|
||||
example: 4
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
databaseUser_id: 4
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: 'null'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer hdEvkbaPVf4cZ65a8631eDg'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
332
.scribe/endpoints/03.yaml
Normal file
332
.scribe/endpoints/03.yaml
Normal file
@ -0,0 +1,332 @@
|
||||
name: firewall-rules
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/firewall-rules'
|
||||
metadata:
|
||||
groupName: firewall-rules
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: list
|
||||
description: 'Get all firewall rules.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":null,"server_id":null,"type":"allow","protocol":"tcp","port":18074,"source":"189.27.156.82","mask":24,"note":"test","status":null,"created_at":null,"updated_at":null},{"id":null,"server_id":null,"type":"allow","protocol":"tcp","port":41088,"source":"86.177.121.87","mask":24,"note":"test","status":null,"created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer vhkc4aPa6ZdeV8D3Ef156gb'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/firewall-rules'
|
||||
metadata:
|
||||
groupName: firewall-rules
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: create
|
||||
description: 'Create a new firewall rule.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
type:
|
||||
name: type
|
||||
description: ''
|
||||
required: true
|
||||
example: allow
|
||||
type: string
|
||||
enumValues:
|
||||
- allow
|
||||
- deny
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
protocol:
|
||||
name: protocol
|
||||
description: ''
|
||||
required: true
|
||||
example: udp
|
||||
type: string
|
||||
enumValues:
|
||||
- tcp
|
||||
- udp
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
port:
|
||||
name: port
|
||||
description: ''
|
||||
required: true
|
||||
example: voluptates
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
source:
|
||||
name: source
|
||||
description: ''
|
||||
required: true
|
||||
example: saepe
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
mask:
|
||||
name: mask
|
||||
description: 'Mask for source IP.'
|
||||
required: true
|
||||
example: '0'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
type: allow
|
||||
protocol: udp
|
||||
port: voluptates
|
||||
source: saepe
|
||||
mask: '0'
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"type":"allow","protocol":"tcp","port":61992,"source":"47.222.76.48","mask":24,"note":"test","status":null,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 1cEb5P66VeDkf8aahg3Zdv4'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/firewall-rules/{firewallRule_id}'
|
||||
metadata:
|
||||
groupName: firewall-rules
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: show
|
||||
description: 'Get a firewall rule by ID.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
firewallRule_id:
|
||||
name: firewallRule_id
|
||||
description: 'The ID of the firewallRule.'
|
||||
required: true
|
||||
example: 7
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
firewallRule_id: 7
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"type":"allow","protocol":"tcp","port":43107,"source":"135.73.216.16","mask":24,"note":"test","status":null,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6VaPhkD5vd1Z8e6E3cba4gf'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/firewall-rules/{firewallRule_id}'
|
||||
metadata:
|
||||
groupName: firewall-rules
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: delete
|
||||
description: 'Delete firewall rule.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
firewallRule_id:
|
||||
name: firewallRule_id
|
||||
description: 'The ID of the firewallRule.'
|
||||
required: true
|
||||
example: 7
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
firewallRule_id: 7
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: 'null'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer v81d5Efch636aVgZebaPkD4'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
44
.scribe/endpoints/04.yaml
Normal file
44
.scribe/endpoints/04.yaml
Normal file
@ -0,0 +1,44 @@
|
||||
name: general
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: api/health
|
||||
metadata:
|
||||
groupName: general
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: health-check
|
||||
description: ''
|
||||
authenticated: false
|
||||
custom: []
|
||||
headers:
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"success":true,"version":"2.0.0"}'
|
||||
headers:
|
||||
cache-control: 'no-cache, private'
|
||||
content-type: application/json
|
||||
x-ratelimit-limit: '60'
|
||||
x-ratelimit-remaining: '59'
|
||||
access-control-allow-origin: '*'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth: []
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
258
.scribe/endpoints/05.yaml
Normal file
258
.scribe/endpoints/05.yaml
Normal file
@ -0,0 +1,258 @@
|
||||
name: projects
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: api/projects
|
||||
metadata:
|
||||
groupName: projects
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: list
|
||||
description: 'Get all projects.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":29,"name":"Zachary Lueilwitz","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"},{"id":30,"name":"Mrs. Kiarra Heller IV","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer eb14DEPv6cdah65VfZgka38'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: api/projects
|
||||
metadata:
|
||||
groupName: projects
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: create
|
||||
description: 'Create a new project.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
name:
|
||||
name: name
|
||||
description: 'The name of the project.'
|
||||
required: true
|
||||
example: quos
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
name: quos
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":29,"name":"Hershel Spinka","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer V1E3566Pf4gkvh8dDZabeca'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{id}'
|
||||
metadata:
|
||||
groupName: projects
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: show
|
||||
description: 'Get a project by ID.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":29,"name":"Emery Kiehn","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer haD6e36VZbkf4P8aEcvd15g'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- PUT
|
||||
uri: 'api/projects/{id}'
|
||||
metadata:
|
||||
groupName: projects
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: update
|
||||
description: 'Update project.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
name:
|
||||
name: name
|
||||
description: 'The name of the project.'
|
||||
required: true
|
||||
example: ut
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
name: ut
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":29,"name":"Mable Prohaska","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer V14kPa5deva8Ebgc36f6hDZ'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/projects/{project_id}'
|
||||
metadata:
|
||||
groupName: projects
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: delete
|
||||
description: 'Delete project.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: 'null'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer k1D68d5ePavVZag6h4fb3cE'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
514
.scribe/endpoints/06.yaml
Normal file
514
.scribe/endpoints/06.yaml
Normal file
@ -0,0 +1,514 @@
|
||||
name: servers
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers'
|
||||
metadata:
|
||||
groupName: servers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: list
|
||||
description: 'Get all servers in a project.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":null,"project_id":null,"user_id":null,"provider_id":null,"name":"Dorthy Toy","ssh_user":"vito","ip":"172.132.95.155","local_ip":"118.57.197.65","port":22,"os":"ubuntu_22","type":"regular","type_data":null,"provider":"custom","provider_data":null,"public_key":"test","status":"ready","auto_update":null,"available_updates":0,"security_updates":null,"progress":100,"progress_step":null,"updates":null,"last_update_check":null,"created_at":null,"updated_at":null},{"id":null,"project_id":null,"user_id":null,"provider_id":null,"name":"Carrie Sporer","ssh_user":"vito","ip":"184.242.162.173","local_ip":"135.244.50.22","port":22,"os":"ubuntu_22","type":"regular","type_data":null,"provider":"custom","provider_data":null,"public_key":"test","status":"ready","auto_update":null,"available_updates":0,"security_updates":null,"progress":100,"progress_step":null,"updates":null,"last_update_check":null,"created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 8VE41PdZcvb6kgafD635ahe'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers'
|
||||
metadata:
|
||||
groupName: servers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: create
|
||||
description: 'Create a new server.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
provider:
|
||||
name: provider
|
||||
description: 'The server provider type'
|
||||
required: true
|
||||
example: et
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_provider:
|
||||
name: server_provider
|
||||
description: 'If the provider is not custom, the ID of the server provider profile'
|
||||
required: true
|
||||
example: digitalocean
|
||||
type: string
|
||||
enumValues:
|
||||
- custom
|
||||
- hetzner
|
||||
- digitalocean
|
||||
- linode
|
||||
- vultr
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
region:
|
||||
name: region
|
||||
description: 'Provider region if the provider is not custom'
|
||||
required: true
|
||||
example: inventore
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
plan:
|
||||
name: plan
|
||||
description: 'Provider plan if the provider is not custom'
|
||||
required: true
|
||||
example: atque
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
ip:
|
||||
name: ip
|
||||
description: 'SSH IP address if the provider is custom'
|
||||
required: true
|
||||
example: quam
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
port:
|
||||
name: port
|
||||
description: 'SSH Port if the provider is custom'
|
||||
required: true
|
||||
example: nemo
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
name:
|
||||
name: name
|
||||
description: 'The name of the server.'
|
||||
required: true
|
||||
example: perspiciatis
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
os:
|
||||
name: os
|
||||
description: 'The os of the server'
|
||||
required: true
|
||||
example: similique
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
type:
|
||||
name: type
|
||||
description: 'Server type'
|
||||
required: true
|
||||
example: regular
|
||||
type: string
|
||||
enumValues:
|
||||
- regular
|
||||
- database
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
webserver:
|
||||
name: webserver
|
||||
description: 'Web server'
|
||||
required: true
|
||||
example: none
|
||||
type: string
|
||||
enumValues:
|
||||
- none
|
||||
- nginx
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
database:
|
||||
name: database
|
||||
description: Database
|
||||
required: true
|
||||
example: none
|
||||
type: string
|
||||
enumValues:
|
||||
- none
|
||||
- mysql57
|
||||
- mysql80
|
||||
- mariadb103
|
||||
- mariadb104
|
||||
- mariadb103
|
||||
- postgresql12
|
||||
- postgresql13
|
||||
- postgresql14
|
||||
- postgresql15
|
||||
- postgresql16
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
php:
|
||||
name: php
|
||||
description: 'PHP version'
|
||||
required: true
|
||||
example: '8.1'
|
||||
type: string
|
||||
enumValues:
|
||||
- '7.0'
|
||||
- '7.1'
|
||||
- '7.2'
|
||||
- '7.3'
|
||||
- '7.4'
|
||||
- '8.0'
|
||||
- '8.1'
|
||||
- '8.2'
|
||||
- '8.3'
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
provider: et
|
||||
server_provider: digitalocean
|
||||
region: inventore
|
||||
plan: atque
|
||||
ip: quam
|
||||
port: nemo
|
||||
name: perspiciatis
|
||||
os: similique
|
||||
type: regular
|
||||
webserver: none
|
||||
database: none
|
||||
php: '8.1'
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"project_id":null,"user_id":null,"provider_id":null,"name":"Flo Beer PhD","ssh_user":"vito","ip":"168.238.14.230","local_ip":"40.232.73.41","port":22,"os":"ubuntu_22","type":"regular","type_data":null,"provider":"custom","provider_data":null,"public_key":"test","status":"ready","auto_update":null,"available_updates":0,"security_updates":null,"progress":100,"progress_step":null,"updates":null,"last_update_check":null,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer Z8g36aaV4E1bdcPfehDv65k'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{id}'
|
||||
metadata:
|
||||
groupName: servers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: show
|
||||
description: 'Get a server by ID.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"project_id":null,"user_id":null,"provider_id":null,"name":"Stephany Ankunding","ssh_user":"vito","ip":"145.28.94.46","local_ip":"69.133.44.100","port":22,"os":"ubuntu_22","type":"regular","type_data":null,"provider":"custom","provider_data":null,"public_key":"test","status":"ready","auto_update":null,"available_updates":0,"security_updates":null,"progress":100,"progress_step":null,"updates":null,"last_update_check":null,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer adD3EfP5hZ4vgbkV861eca6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/reboot'
|
||||
metadata:
|
||||
groupName: servers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: reboot
|
||||
description: 'Reboot a server.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: 'null'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer P3ec6aagD4hbdV5fEk168vZ'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/upgrade'
|
||||
metadata:
|
||||
groupName: servers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: upgrade
|
||||
description: 'Upgrade server.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: 'null'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer P34ZV6D1bEegdvac8f5kh6a'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}'
|
||||
metadata:
|
||||
groupName: servers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: delete
|
||||
description: 'Delete server.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: 'null'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer ha6v5V41afkdPgcZbDEe386'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
370
.scribe/endpoints/07.yaml
Normal file
370
.scribe/endpoints/07.yaml
Normal file
@ -0,0 +1,370 @@
|
||||
name: server-providers
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/server-providers'
|
||||
metadata:
|
||||
groupName: server-providers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: list
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":2,"project_id":null,"global":true,"name":"dolor","provider":"digitalocean","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"},{"id":3,"project_id":null,"global":true,"name":"enim","provider":"digitalocean","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 1a6kb58vEP3fZdVhcea64gD'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/server-providers'
|
||||
metadata:
|
||||
groupName: server-providers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: create
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
provider:
|
||||
name: provider
|
||||
description: 'The provider (aws, linode, hetzner, digitalocean, vultr, ...)'
|
||||
required: true
|
||||
example: autem
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
name:
|
||||
name: name
|
||||
description: 'The name of the server provider.'
|
||||
required: true
|
||||
example: enim
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
token:
|
||||
name: token
|
||||
description: 'The token if provider requires api token'
|
||||
required: true
|
||||
example: culpa
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
key:
|
||||
name: key
|
||||
description: 'The key if provider requires key'
|
||||
required: true
|
||||
example: sit
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
secret:
|
||||
name: secret
|
||||
description: 'The secret if provider requires key'
|
||||
required: true
|
||||
example: voluptates
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
provider: autem
|
||||
name: enim
|
||||
token: culpa
|
||||
key: sit
|
||||
secret: voluptates
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":2,"project_id":null,"global":true,"name":"eligendi","provider":"aws","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer PD3ZcaVdvgfa5k4be8E6h16'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/server-providers/{serverProvider_id}'
|
||||
metadata:
|
||||
groupName: server-providers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: show
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
serverProvider_id:
|
||||
name: serverProvider_id
|
||||
description: 'The ID of the serverProvider.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
serverProvider_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":2,"project_id":null,"global":true,"name":"architecto","provider":"digitalocean","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer DP45bg1aEadh8Z6Vke63fcv'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- PUT
|
||||
uri: 'api/projects/{project_id}/server-providers/{serverProvider_id}'
|
||||
metadata:
|
||||
groupName: server-providers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: update
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
serverProvider_id:
|
||||
name: serverProvider_id
|
||||
description: 'The ID of the serverProvider.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
serverProvider_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
name:
|
||||
name: name
|
||||
description: 'The name of the server provider.'
|
||||
required: true
|
||||
example: minus
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
global:
|
||||
name: global
|
||||
description: 'Accessible in all projects'
|
||||
required: true
|
||||
example: false
|
||||
type: string
|
||||
enumValues:
|
||||
- true
|
||||
- false
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
name: minus
|
||||
global: false
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":2,"project_id":null,"global":true,"name":"reiciendis","provider":"hetzner","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer bv1kdegh6fP8V56ZE4acaD3'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/projects/{project_id}/server-providers/{serverProvider_id}'
|
||||
metadata:
|
||||
groupName: server-providers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: delete
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
serverProvider_id:
|
||||
name: serverProvider_id
|
||||
description: 'The ID of the serverProvider.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
serverProvider_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: 'null'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer k6hb43Vf5Z1dv8aaeEDcg6P'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
233
.scribe/endpoints/08.yaml
Normal file
233
.scribe/endpoints/08.yaml
Normal file
@ -0,0 +1,233 @@
|
||||
name: ssh-keys
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/ssh-keys'
|
||||
metadata:
|
||||
groupName: ssh-keys
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: list
|
||||
description: 'Get all ssh keys.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":null,"user":null,"name":"Dr. Reanna Braun","created_at":null,"updated_at":null},{"id":null,"user":null,"name":"Norene Fritsch","created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer dV1gcvfZ46Eh8ebaP5Da63k'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/ssh-keys'
|
||||
metadata:
|
||||
groupName: ssh-keys
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: create
|
||||
description: 'Deploy ssh key to server.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
key_id:
|
||||
name: key_id
|
||||
description: 'The ID of the key.'
|
||||
required: true
|
||||
example: vero
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
name:
|
||||
name: name
|
||||
description: 'Key name, required if key_id is not provided.'
|
||||
required: true
|
||||
example: voluptates
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
public_key:
|
||||
name: public_key
|
||||
description: 'Public Key, required if key_id is not provided.'
|
||||
required: true
|
||||
example: dolor
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
key_id: vero
|
||||
name: voluptates
|
||||
public_key: dolor
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"user":null,"name":"Sophia D''Amore","created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer gkadV36a5f8E6vhb14ZceDP'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/ssh-keys/{sshKey_id}'
|
||||
metadata:
|
||||
groupName: ssh-keys
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: delete
|
||||
description: 'Delete ssh key from server.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
sshKey_id:
|
||||
name: sshKey_id
|
||||
description: 'The ID of the sshKey.'
|
||||
required: true
|
||||
example: 4
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
sshKey_id: 4
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: 'null'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer PfchD4Zge386abadE5kV61v'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
576
.scribe/endpoints/09.yaml
Normal file
576
.scribe/endpoints/09.yaml
Normal file
@ -0,0 +1,576 @@
|
||||
name: services
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/services'
|
||||
metadata:
|
||||
groupName: services
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: list
|
||||
description: 'Get all services.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":null,"server_id":null,"type":null,"type_data":null,"name":null,"version":null,"unit":null,"status":null,"is_default":null,"created_at":null,"updated_at":null},{"id":null,"server_id":null,"type":null,"type_data":null,"name":null,"version":null,"unit":null,"status":null,"is_default":null,"created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer h6bDec51ak84ZVafgv3PE6d'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/services/{id}'
|
||||
metadata:
|
||||
groupName: services
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: show
|
||||
description: 'Get a service by ID.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the service.'
|
||||
required: true
|
||||
example: 27
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
id: 27
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"type":null,"type_data":null,"name":null,"version":null,"unit":null,"status":null,"is_default":null,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer da4V3kfgZ6a86PchevED5b1'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/services/{service_id}/start'
|
||||
metadata:
|
||||
groupName: services
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: start
|
||||
description: 'Start service.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
service_id:
|
||||
name: service_id
|
||||
description: 'The ID of the service.'
|
||||
required: true
|
||||
example: 27
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
service_id: 27
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: 'null'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 86fdV5D6gv1E3ekaPZac4hb'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/services/{service_id}/stop'
|
||||
metadata:
|
||||
groupName: services
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: stop
|
||||
description: 'Stop service.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
service_id:
|
||||
name: service_id
|
||||
description: 'The ID of the service.'
|
||||
required: true
|
||||
example: 27
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
service_id: 27
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: 'null'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer kPZ563E1Vfgh4cbDad8vae6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/services/{service_id}/restart'
|
||||
metadata:
|
||||
groupName: services
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: restart
|
||||
description: 'Restart service.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
service_id:
|
||||
name: service_id
|
||||
description: 'The ID of the service.'
|
||||
required: true
|
||||
example: 27
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
service_id: 27
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: 'null'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer fd14PaDb58gchv3ZVeaEk66'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/services/{service_id}/enable'
|
||||
metadata:
|
||||
groupName: services
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: enable
|
||||
description: 'Enable service.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
service_id:
|
||||
name: service_id
|
||||
description: 'The ID of the service.'
|
||||
required: true
|
||||
example: 27
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
service_id: 27
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: 'null'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer Dv1aVe6hZfkagdE356b4cP8'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/services/{service_id}/disable'
|
||||
metadata:
|
||||
groupName: services
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: disable
|
||||
description: 'Disable service.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
service_id:
|
||||
name: service_id
|
||||
description: 'The ID of the service.'
|
||||
required: true
|
||||
example: 27
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
service_id: 27
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: 'null'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6bdDc4Eah3ZV18kf6Pveag5'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/services/{service_id}'
|
||||
metadata:
|
||||
groupName: services
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: delete
|
||||
description: 'Delete service.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
service_id:
|
||||
name: service_id
|
||||
description: 'The ID of the service.'
|
||||
required: true
|
||||
example: 27
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
service_id: 27
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: 'null'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 36kf84v6bVhE5gdPDeZ1caa'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
390
.scribe/endpoints/10.yaml
Normal file
390
.scribe/endpoints/10.yaml
Normal file
@ -0,0 +1,390 @@
|
||||
name: sites
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/sites'
|
||||
metadata:
|
||||
groupName: sites
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: list
|
||||
description: 'Get all sites.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":null,"server_id":null,"source_control_id":null,"type":"laravel","type_data":null,"domain":"test.com","aliases":null,"web_directory":"\/","path":"\/home","php_version":"8.2","repository":null,"branch":"main","status":"ready","port":null,"progress":100,"created_at":null,"updated_at":null},{"id":null,"server_id":null,"source_control_id":null,"type":"laravel","type_data":null,"domain":"test.com","aliases":null,"web_directory":"\/","path":"\/home","php_version":"8.2","repository":null,"branch":"main","status":"ready","port":null,"progress":100,"created_at":null,"updated_at":null}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer gaeE86fd1aZP53Vvc6Dhbk4'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/sites'
|
||||
metadata:
|
||||
groupName: sites
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: create
|
||||
description: 'Create a new site.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
type:
|
||||
name: type
|
||||
description: ''
|
||||
required: true
|
||||
example: wordpress
|
||||
type: string
|
||||
enumValues:
|
||||
- php
|
||||
- php-blank
|
||||
- phpmyadmin
|
||||
- laravel
|
||||
- wordpress
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
domain:
|
||||
name: domain
|
||||
description: ''
|
||||
required: true
|
||||
example: quo
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
aliases:
|
||||
name: aliases
|
||||
description: ''
|
||||
required: true
|
||||
example:
|
||||
- dolorum
|
||||
type: 'string[]'
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
php_version:
|
||||
name: php_version
|
||||
description: 'One of the installed PHP Versions'
|
||||
required: true
|
||||
example: '7.4'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
web_directory:
|
||||
name: web_directory
|
||||
description: 'Required for PHP and Laravel sites'
|
||||
required: true
|
||||
example: public
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
source_control:
|
||||
name: source_control
|
||||
description: 'Source control ID, Required for Sites which support source control'
|
||||
required: true
|
||||
example: explicabo
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
repository:
|
||||
name: repository
|
||||
description: 'Repository, Required for Sites which support source control'
|
||||
required: true
|
||||
example: organization/repository
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
branch:
|
||||
name: branch
|
||||
description: 'Branch, Required for Sites which support source control'
|
||||
required: true
|
||||
example: main
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
composer:
|
||||
name: composer
|
||||
description: 'Run composer if site supports composer'
|
||||
required: true
|
||||
example: true
|
||||
type: boolean
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
version:
|
||||
name: version
|
||||
description: 'Version, if the site type requires a version like PHPMyAdmin'
|
||||
required: true
|
||||
example: 5.2.1
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
type: wordpress
|
||||
domain: quo
|
||||
aliases:
|
||||
- dolorum
|
||||
php_version: '7.4'
|
||||
web_directory: public
|
||||
source_control: explicabo
|
||||
repository: organization/repository
|
||||
branch: main
|
||||
composer: true
|
||||
version: 5.2.1
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"source_control_id":null,"type":"laravel","type_data":null,"domain":"test.com","aliases":null,"web_directory":"\/","path":"\/home","php_version":"8.2","repository":null,"branch":"main","status":"ready","port":null,"progress":100,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer efDd36cab6vZEaV4hkP851g'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/sites/{id}'
|
||||
metadata:
|
||||
groupName: sites
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: show
|
||||
description: 'Get a site by ID.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the site.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"server_id":null,"source_control_id":null,"type":"laravel","type_data":null,"domain":"test.com","aliases":null,"web_directory":"\/","path":"\/home","php_version":"8.2","repository":null,"branch":"main","status":"ready","port":null,"progress":100,"created_at":null,"updated_at":null}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer bVkf841ava5gE6DPch36Zde'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/projects/{project_id}/servers/{server_id}/sites/{site_id}'
|
||||
metadata:
|
||||
groupName: sites
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: delete
|
||||
description: 'Delete site.'
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
server_id:
|
||||
name: server_id
|
||||
description: 'The ID of the server.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
site_id:
|
||||
name: site_id
|
||||
description: 'The ID of the site.'
|
||||
required: true
|
||||
example: 8
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
server_id: 3
|
||||
site_id: 8
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: 'null'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer gfVZbEP5Ddah6k13ae6c8v4'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
428
.scribe/endpoints/11.yaml
Normal file
428
.scribe/endpoints/11.yaml
Normal file
@ -0,0 +1,428 @@
|
||||
name: source-controls
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/source-controls'
|
||||
metadata:
|
||||
groupName: source-controls
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: list
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":5,"project_id":null,"global":true,"name":"Jaiden Kling","provider":"github","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"},{"id":6,"project_id":null,"global":true,"name":"Ms. Brianne Bosco","provider":"github","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer PfaEg1eZh66cd5V4v8bD3ak'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/source-controls'
|
||||
metadata:
|
||||
groupName: source-controls
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: create
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
provider:
|
||||
name: provider
|
||||
description: 'The provider'
|
||||
required: true
|
||||
example: bitbucket
|
||||
type: string
|
||||
enumValues:
|
||||
- gitlab
|
||||
- github
|
||||
- bitbucket
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
name:
|
||||
name: name
|
||||
description: 'The name of the storage provider.'
|
||||
required: true
|
||||
example: eos
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
token:
|
||||
name: token
|
||||
description: 'The token if provider requires api token'
|
||||
required: true
|
||||
example: et
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
url:
|
||||
name: url
|
||||
description: 'The URL if the provider is Gitlab and it is self-hosted'
|
||||
required: true
|
||||
example: 'https://lueilwitz.com/nostrum-et-porro-atque-sint.html'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
username:
|
||||
name: username
|
||||
description: 'The username if the provider is Bitbucket'
|
||||
required: true
|
||||
example: consectetur
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
password:
|
||||
name: password
|
||||
description: 'The password if the provider is Bitbucket'
|
||||
required: true
|
||||
example: 'PL.P?{06\ECi0'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
provider: bitbucket
|
||||
name: eos
|
||||
token: et
|
||||
url: 'https://lueilwitz.com/nostrum-et-porro-atque-sint.html'
|
||||
username: consectetur
|
||||
password: 'PL.P?{06\ECi0'
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":5,"project_id":null,"global":true,"name":"Toby Parker","provider":"github","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer V5Zf3a1ve6d6kP4cbgha8DE'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/source-controls/{sourceControl_id}'
|
||||
metadata:
|
||||
groupName: source-controls
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: show
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
sourceControl_id:
|
||||
name: sourceControl_id
|
||||
description: 'The ID of the sourceControl.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
sourceControl_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":5,"project_id":null,"global":true,"name":"Prof. Bartholome Graham IV","provider":"github","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer k1b5hac6veZ36P8gDV4fadE'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- PUT
|
||||
uri: 'api/projects/{project_id}/source-controls/{sourceControl_id}'
|
||||
metadata:
|
||||
groupName: source-controls
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: update
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
sourceControl_id:
|
||||
name: sourceControl_id
|
||||
description: 'The ID of the sourceControl.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
sourceControl_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
name:
|
||||
name: name
|
||||
description: 'The name of the storage provider.'
|
||||
required: true
|
||||
example: quaerat
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
token:
|
||||
name: token
|
||||
description: 'The token if provider requires api token'
|
||||
required: true
|
||||
example: consectetur
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
url:
|
||||
name: url
|
||||
description: 'The URL if the provider is Gitlab and it is self-hosted'
|
||||
required: true
|
||||
example: 'http://www.hudson.biz/rerum-voluptatem-debitis-accusamus'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
username:
|
||||
name: username
|
||||
description: 'The username if the provider is Bitbucket'
|
||||
required: true
|
||||
example: voluptatem
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
password:
|
||||
name: password
|
||||
description: 'The password if the provider is Bitbucket'
|
||||
required: true
|
||||
example: '\p/el>)3#~E?kI'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
global:
|
||||
name: global
|
||||
description: 'Accessible in all projects'
|
||||
required: true
|
||||
example: false
|
||||
type: string
|
||||
enumValues:
|
||||
- true
|
||||
- false
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
name: quaerat
|
||||
token: consectetur
|
||||
url: 'http://www.hudson.biz/rerum-voluptatem-debitis-accusamus'
|
||||
username: voluptatem
|
||||
password: '\p/el>)3#~E?kI'
|
||||
global: false
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":5,"project_id":null,"global":true,"name":"Cicero Smitham","provider":"github","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6dkE6h8a5eg3f14acVvbPDZ'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/projects/{project_id}/source-controls/{sourceControl_id}'
|
||||
metadata:
|
||||
groupName: source-controls
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: delete
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
sourceControl_id:
|
||||
name: sourceControl_id
|
||||
description: 'The ID of the sourceControl.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
sourceControl_id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: 'null'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer fb6Zk4EP318eva5hDdcV6ga'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
370
.scribe/endpoints/12.yaml
Normal file
370
.scribe/endpoints/12.yaml
Normal file
@ -0,0 +1,370 @@
|
||||
name: storage-providers
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/storage-providers'
|
||||
metadata:
|
||||
groupName: storage-providers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: list
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":3,"project_id":null,"global":true,"name":"et","provider":"local","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"},{"id":4,"project_id":null,"global":true,"name":"sed","provider":"local","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next »","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 1dbV3vkh6EPD5g48cafeZ6a'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/projects/{project_id}/storage-providers'
|
||||
metadata:
|
||||
groupName: storage-providers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: create
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
provider:
|
||||
name: provider
|
||||
description: 'The provider (aws, linode, hetzner, digitalocean, vultr, ...)'
|
||||
required: true
|
||||
example: quod
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
name:
|
||||
name: name
|
||||
description: 'The name of the storage provider.'
|
||||
required: true
|
||||
example: commodi
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
token:
|
||||
name: token
|
||||
description: 'The token if provider requires api token'
|
||||
required: true
|
||||
example: ipsum
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
key:
|
||||
name: key
|
||||
description: 'The key if provider requires key'
|
||||
required: true
|
||||
example: ratione
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
secret:
|
||||
name: secret
|
||||
description: 'The secret if provider requires key'
|
||||
required: true
|
||||
example: iste
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
provider: quod
|
||||
name: commodi
|
||||
token: ipsum
|
||||
key: ratione
|
||||
secret: iste
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":3,"project_id":null,"global":true,"name":"est","provider":"dropbox","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer abehv36kP4D658VafgdZE1c'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/projects/{project_id}/storage-providers/{storageProvider_id}'
|
||||
metadata:
|
||||
groupName: storage-providers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: show
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
storageProvider_id:
|
||||
name: storageProvider_id
|
||||
description: 'The ID of the storageProvider.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
storageProvider_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":3,"project_id":null,"global":true,"name":"officia","provider":"ftp","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer bda64P5c1gEDe8V3Z6vhkaf'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- PUT
|
||||
uri: 'api/projects/{project_id}/storage-providers/{storageProvider_id}'
|
||||
metadata:
|
||||
groupName: storage-providers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: update
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
storageProvider_id:
|
||||
name: storageProvider_id
|
||||
description: 'The ID of the storageProvider.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
storageProvider_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
name:
|
||||
name: name
|
||||
description: 'The name of the storage provider.'
|
||||
required: true
|
||||
example: iusto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
global:
|
||||
name: global
|
||||
description: 'Accessible in all projects'
|
||||
required: true
|
||||
example: true
|
||||
type: string
|
||||
enumValues:
|
||||
- true
|
||||
- false
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
name: iusto
|
||||
global: true
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":3,"project_id":null,"global":true,"name":"rerum","provider":"ftp","created_at":"2024-11-01T15:40:48.000000Z","updated_at":"2024-11-01T15:40:48.000000Z"}'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer aEP35hVakDdf814eZvg66cb'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/projects/{project_id}/storage-providers/{storageProvider_id}'
|
||||
metadata:
|
||||
groupName: storage-providers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: delete
|
||||
description: ''
|
||||
authenticated: true
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer YOUR-API-KEY'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
project_id:
|
||||
name: project_id
|
||||
description: 'The ID of the project.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
storageProvider_id:
|
||||
name: storageProvider_id
|
||||
description: 'The ID of the storageProvider.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
project_id: 1
|
||||
storageProvider_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 204
|
||||
content: 'null'
|
||||
headers: []
|
||||
description: ''
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer Dah3PgE5d64fcbe8a16VkvZ'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
53
.scribe/endpoints/custom.0.yaml
Normal file
53
.scribe/endpoints/custom.0.yaml
Normal file
@ -0,0 +1,53 @@
|
||||
# To include an endpoint that isn't a part of your Laravel app (or belongs to a vendor package),
|
||||
# you can define it in a custom.*.yaml file, like this one.
|
||||
# Each custom file should contain an array of endpoints. Here's an example:
|
||||
# See https://scribe.knuckles.wtf/laravel/documenting/custom-endpoints#extra-sorting-groups-in-custom-endpoint-files for more options
|
||||
|
||||
#- httpMethods:
|
||||
# - POST
|
||||
# uri: api/doSomething/{param}
|
||||
# metadata:
|
||||
# groupName: The group the endpoint belongs to. Can be a new group or an existing group.
|
||||
# groupDescription: A description for the group. You don't need to set this for every endpoint; once is enough.
|
||||
# subgroup: You can add a subgroup, too.
|
||||
# title: Do something
|
||||
# description: 'This endpoint allows you to do something.'
|
||||
# authenticated: false
|
||||
# headers:
|
||||
# Content-Type: application/json
|
||||
# Accept: application/json
|
||||
# urlParameters:
|
||||
# param:
|
||||
# name: param
|
||||
# description: A URL param for no reason.
|
||||
# required: true
|
||||
# example: 2
|
||||
# type: integer
|
||||
# queryParameters:
|
||||
# speed:
|
||||
# name: speed
|
||||
# description: How fast the thing should be done. Can be `slow` or `fast`.
|
||||
# required: false
|
||||
# example: fast
|
||||
# type: string
|
||||
# bodyParameters:
|
||||
# something:
|
||||
# name: something
|
||||
# description: The things we should do.
|
||||
# required: true
|
||||
# example:
|
||||
# - string 1
|
||||
# - string 2
|
||||
# type: 'string[]'
|
||||
# responses:
|
||||
# - status: 200
|
||||
# description: 'When the thing was done smoothly.'
|
||||
# content: # Your response content can be an object, an array, a string or empty.
|
||||
# {
|
||||
# "hey": "ho ho ho"
|
||||
# }
|
||||
# responseFields:
|
||||
# hey:
|
||||
# name: hey
|
||||
# description: Who knows?
|
||||
# type: string # This is optional
|
13
.scribe/intro.md
Normal file
13
.scribe/intro.md
Normal file
@ -0,0 +1,13 @@
|
||||
# Introduction
|
||||
|
||||
VitoDeploy's API documentation.
|
||||
|
||||
<aside>
|
||||
<strong>Base URL</strong>: <code>https://your-vito-url</code>
|
||||
</aside>
|
||||
|
||||
This documentation aims to provide all the information you need to work with our API.
|
||||
|
||||
<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
|
||||
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
class CreateCronJob
|
||||
{
|
||||
public function create(Server $server, array $input): void
|
||||
public function create(Server $server, array $input): CronJob
|
||||
{
|
||||
$cronJob = new CronJob([
|
||||
'server_id' => $server->id,
|
||||
@ -23,6 +23,8 @@ 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;
|
||||
}
|
||||
|
||||
public static function rules(array $input): array
|
||||
|
@ -20,7 +20,7 @@ public function create(Server $server, array $input, array $links = []): Databas
|
||||
'server_id' => $server->id,
|
||||
'username' => $input['username'],
|
||||
'password' => $input['password'],
|
||||
'host' => isset($input['remote']) && $input['remote'] ? $input['host'] : 'localhost',
|
||||
'host' => (isset($input['remote']) && $input['remote']) || isset($input['host']) ? $input['host'] : 'localhost',
|
||||
'databases' => $links,
|
||||
]);
|
||||
/** @var Database $databaseHandler */
|
||||
|
@ -13,7 +13,7 @@ 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'] = [];
|
||||
@ -43,6 +43,10 @@ public function link(DatabaseUser $databaseUser, array $input): void
|
||||
);
|
||||
|
||||
$databaseUser->save();
|
||||
|
||||
$databaseUser->refresh();
|
||||
|
||||
return $databaseUser;
|
||||
}
|
||||
|
||||
public static function rules(Server $server, array $input): array
|
||||
|
@ -6,28 +6,28 @@
|
||||
use App\Enums\ServerProvider;
|
||||
use App\Enums\ServerStatus;
|
||||
use App\Facades\Notifier;
|
||||
use App\Models\Project;
|
||||
use App\Models\Server;
|
||||
use App\Models\User;
|
||||
use App\Notifications\ServerInstallationFailed;
|
||||
use App\Notifications\ServerInstallationSucceed;
|
||||
use App\ValidationRules\RestrictedIPAddressesRule;
|
||||
use Exception;
|
||||
use Illuminate\Database\Query\Builder;
|
||||
use Illuminate\Support\Facades\Bus;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Validation\Rule;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
use Throwable;
|
||||
|
||||
class CreateServer
|
||||
{
|
||||
/**
|
||||
* @throws Throwable
|
||||
*/
|
||||
public function create(User $creator, array $input): Server
|
||||
public function create(User $creator, Project $project, array $input): Server
|
||||
{
|
||||
$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']],
|
||||
@ -76,7 +76,9 @@ public function create(User $creator, array $input): Server
|
||||
} catch (Exception $e) {
|
||||
$server->provider()->delete();
|
||||
DB::rollBack();
|
||||
throw $e;
|
||||
throw ValidationException::withMessages([
|
||||
'provider' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -112,7 +114,7 @@ function () use ($server) {
|
||||
$bus->onConnection('ssh')->dispatch();
|
||||
}
|
||||
|
||||
public static function rules(array $input): array
|
||||
public static function rules(Project $project, array $input): array
|
||||
{
|
||||
$rules = [
|
||||
'provider' => [
|
||||
@ -132,15 +134,18 @@ public static function rules(array $input): array
|
||||
],
|
||||
'server_provider' => [
|
||||
Rule::when(function () use ($input) {
|
||||
return $input['provider'] != ServerProvider::CUSTOM;
|
||||
return isset($input['provider']) && $input['provider'] != ServerProvider::CUSTOM;
|
||||
}, [
|
||||
'required',
|
||||
'exists:server_providers,id,user_id,'.auth()->user()->id,
|
||||
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 $input['provider'] == ServerProvider::CUSTOM;
|
||||
return isset($input['provider']) && $input['provider'] == ServerProvider::CUSTOM;
|
||||
}, [
|
||||
'required',
|
||||
new RestrictedIPAddressesRule,
|
||||
@ -148,7 +153,7 @@ public static function rules(array $input): array
|
||||
],
|
||||
'port' => [
|
||||
Rule::when(function () use ($input) {
|
||||
return $input['provider'] == ServerProvider::CUSTOM;
|
||||
return isset($input['provider']) && $input['provider'] == ServerProvider::CUSTOM;
|
||||
}, [
|
||||
'required',
|
||||
'numeric',
|
||||
@ -176,6 +181,7 @@ 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
|
||||
) {
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Actions\ServerProvider;
|
||||
|
||||
use App\Models\Project;
|
||||
use App\Models\ServerProvider;
|
||||
use App\Models\User;
|
||||
use App\ServerProviders\ServerProvider as ServerProviderContract;
|
||||
@ -14,7 +15,7 @@ class CreateServerProvider
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
public function create(User $user, array $input): ServerProvider
|
||||
public function create(User $user, Project $project, array $input): ServerProvider
|
||||
{
|
||||
$provider = static::getProvider($input['provider']);
|
||||
|
||||
@ -33,7 +34,7 @@ public function create(User $user, array $input): ServerProvider
|
||||
$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;
|
||||
@ -46,9 +47,9 @@ private static function getProvider($name): ServerProviderContract
|
||||
return new $providerClass;
|
||||
}
|
||||
|
||||
public static function rules(): array
|
||||
public static function rules(array $input): array
|
||||
{
|
||||
return [
|
||||
$rules = [
|
||||
'name' => [
|
||||
'required',
|
||||
],
|
||||
@ -58,10 +59,16 @@ public static function rules(): array
|
||||
Rule::notIn('custom'),
|
||||
],
|
||||
];
|
||||
|
||||
return array_merge($rules, static::providerRules($input));
|
||||
}
|
||||
|
||||
public static function providerRules(array $input): array
|
||||
private static function providerRules(array $input): array
|
||||
{
|
||||
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,17 +2,19 @@
|
||||
|
||||
namespace App\Actions\ServerProvider;
|
||||
|
||||
use App\Models\Project;
|
||||
use App\Models\ServerProvider;
|
||||
use App\Models\User;
|
||||
|
||||
class EditServerProvider
|
||||
{
|
||||
public function edit(ServerProvider $serverProvider, User $user, array $input): void
|
||||
public function edit(ServerProvider $serverProvider, Project $project, array $input): ServerProvider
|
||||
{
|
||||
$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;
|
||||
}
|
||||
|
||||
public static function rules(): array
|
||||
|
@ -8,6 +8,9 @@
|
||||
|
||||
class Uninstall
|
||||
{
|
||||
/*
|
||||
* @TODO: Implement the uninstaller for all service handlers
|
||||
*/
|
||||
public function uninstall(Service $service): void
|
||||
{
|
||||
Validator::make([
|
||||
|
@ -19,9 +19,6 @@
|
||||
|
||||
class CreateSite
|
||||
{
|
||||
/**
|
||||
* @throws SourceControlIsNotConnected
|
||||
*/
|
||||
public function create(Server $server, array $input): Site
|
||||
{
|
||||
DB::beginTransaction();
|
||||
@ -88,13 +85,12 @@ 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
|
||||
*/
|
||||
public static function rules(Server $server, array $input): array
|
||||
{
|
||||
$rules = [
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Actions\SourceControl;
|
||||
|
||||
use App\Models\Project;
|
||||
use App\Models\SourceControl;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Arr;
|
||||
@ -10,13 +11,13 @@
|
||||
|
||||
class ConnectSourceControl
|
||||
{
|
||||
public function connect(User $user, array $input): void
|
||||
public function connect(User $user, Project $project, array $input): SourceControl
|
||||
{
|
||||
$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,
|
||||
]);
|
||||
|
||||
$sourceControl->provider_data = $sourceControl->provider()->createData($input);
|
||||
@ -29,6 +30,8 @@ public function connect(User $user, array $input): void
|
||||
}
|
||||
|
||||
$sourceControl->save();
|
||||
|
||||
return $sourceControl;
|
||||
}
|
||||
|
||||
public static function rules(array $input): array
|
||||
|
@ -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,59 +2,47 @@
|
||||
|
||||
namespace App\Actions\SourceControl;
|
||||
|
||||
use App\Models\Project;
|
||||
use App\Models\SourceControl;
|
||||
use App\Models\User;
|
||||
use Illuminate\Validation\Rule;
|
||||
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
|
||||
{
|
||||
$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;
|
||||
|
||||
$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;
|
||||
}
|
||||
|
||||
public static function rules(array $input): array
|
||||
public static function rules(SourceControl $sourceControl, array $input): array
|
||||
{
|
||||
$rules = [
|
||||
'name' => [
|
||||
'required',
|
||||
],
|
||||
'provider' => [
|
||||
'required',
|
||||
Rule::in(config('core.source_control_providers')),
|
||||
],
|
||||
];
|
||||
|
||||
return array_merge($rules, static::providerRules($input));
|
||||
return array_merge($rules, static::providerRules($sourceControl, $input));
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
private static function providerRules(array $input): array
|
||||
private static function providerRules(SourceControl $sourceControl, array $input): array
|
||||
{
|
||||
if (! isset($input['provider'])) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$sourceControl = new SourceControl([
|
||||
'provider' => $input['provider'],
|
||||
]);
|
||||
|
||||
return $sourceControl->provider()->createRules($input);
|
||||
return $sourceControl->provider()->editRules($input);
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Actions\StorageProvider;
|
||||
|
||||
use App\Models\Project;
|
||||
use App\Models\StorageProvider;
|
||||
use App\Models\User;
|
||||
use Illuminate\Validation\Rule;
|
||||
@ -12,13 +13,13 @@ class CreateStorageProvider
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
public function create(User $user, array $input): void
|
||||
public function create(User $user, Project $project, array $input): StorageProvider
|
||||
{
|
||||
$storageProvider = new StorageProvider([
|
||||
'user_id' => $user->id,
|
||||
'provider' => $input['provider'],
|
||||
'profile' => $input['name'],
|
||||
'project_id' => isset($input['global']) && $input['global'] ? null : $user->current_project_id,
|
||||
'project_id' => isset($input['global']) && $input['global'] ? null : $project->id,
|
||||
]);
|
||||
|
||||
$storageProvider->credentials = $storageProvider->provider()->credentialData($input);
|
||||
@ -36,6 +37,8 @@ public function create(User $user, array $input): void
|
||||
}
|
||||
|
||||
$storageProvider->save();
|
||||
|
||||
return $storageProvider;
|
||||
}
|
||||
|
||||
public static function rules(array $input): array
|
||||
|
@ -3,17 +3,16 @@
|
||||
namespace App\Actions\StorageProvider;
|
||||
|
||||
use App\Models\StorageProvider;
|
||||
use Exception;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
class DeleteStorageProvider
|
||||
{
|
||||
/**
|
||||
* @throws Exception
|
||||
*/
|
||||
public function delete(StorageProvider $storageProvider): void
|
||||
{
|
||||
if ($storageProvider->backups()->exists()) {
|
||||
throw new Exception('This storage provider is being used by a backup.');
|
||||
throw ValidationException::withMessages([
|
||||
'provider' => __('This storage provider is being used by a backup.'),
|
||||
]);
|
||||
}
|
||||
|
||||
$storageProvider->delete();
|
||||
|
@ -2,18 +2,20 @@
|
||||
|
||||
namespace App\Actions\StorageProvider;
|
||||
|
||||
use App\Models\Project;
|
||||
use App\Models\StorageProvider;
|
||||
use App\Models\User;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
class EditStorageProvider
|
||||
{
|
||||
public function edit(StorageProvider $storageProvider, User $user, array $input): void
|
||||
public function edit(StorageProvider $storageProvider, Project $project, array $input): StorageProvider
|
||||
{
|
||||
$storageProvider->profile = $input['name'];
|
||||
$storageProvider->project_id = isset($input['global']) && $input['global'] ? null : $user->current_project_id;
|
||||
$storageProvider->project_id = isset($input['global']) && $input['global'] ? null : $project->id;
|
||||
|
||||
$storageProvider->save();
|
||||
|
||||
return $storageProvider;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,61 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\Tag;
|
||||
|
||||
use App\Models\Server;
|
||||
use App\Models\Site;
|
||||
use App\Models\Tag;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
class AttachTag
|
||||
{
|
||||
public function attach(User $user, array $input): Tag
|
||||
{
|
||||
$this->validate($input);
|
||||
|
||||
/** @var Server|Site $taggable */
|
||||
$taggable = $input['taggable_type']::findOrFail($input['taggable_id']);
|
||||
|
||||
$tag = Tag::query()->where('name', $input['name'])->first();
|
||||
if ($tag) {
|
||||
if (! $taggable->tags->contains($tag->id)) {
|
||||
$taggable->tags()->attach($tag->id);
|
||||
}
|
||||
|
||||
return $tag;
|
||||
}
|
||||
|
||||
$tag = new Tag([
|
||||
'project_id' => $user->currentProject->id,
|
||||
'name' => $input['name'],
|
||||
'color' => config('core.tag_colors')[array_rand(config('core.tag_colors'))],
|
||||
]);
|
||||
$tag->save();
|
||||
|
||||
$taggable->tags()->attach($tag->id);
|
||||
|
||||
return $tag;
|
||||
}
|
||||
|
||||
private function validate(array $input): void
|
||||
{
|
||||
Validator::make($input, [
|
||||
'name' => [
|
||||
'required',
|
||||
],
|
||||
'taggable_id' => [
|
||||
'required',
|
||||
'integer',
|
||||
],
|
||||
'taggable_type' => [
|
||||
'required',
|
||||
Rule::in(config('core.taggable_types')),
|
||||
],
|
||||
])->validate();
|
||||
}
|
||||
}
|
@ -1,39 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\Tag;
|
||||
|
||||
use App\Models\Server;
|
||||
use App\Models\Site;
|
||||
use App\Models\Tag;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
class DetachTag
|
||||
{
|
||||
public function detach(Tag $tag, array $input): void
|
||||
{
|
||||
$this->validate($input);
|
||||
|
||||
/** @var Server|Site $taggable */
|
||||
$taggable = $input['taggable_type']::findOrFail($input['taggable_id']);
|
||||
|
||||
$taggable->tags()->detach($tag->id);
|
||||
}
|
||||
|
||||
private function validate(array $input): void
|
||||
{
|
||||
Validator::make($input, [
|
||||
'taggable_id' => [
|
||||
'required',
|
||||
'integer',
|
||||
],
|
||||
'taggable_type' => [
|
||||
'required',
|
||||
Rule::in(config('core.taggable_types')),
|
||||
],
|
||||
])->validate();
|
||||
}
|
||||
}
|
@ -21,13 +21,15 @@ public function handle(): void
|
||||
return;
|
||||
}
|
||||
|
||||
User::query()->create([
|
||||
$user = User::query()->create([
|
||||
'name' => $this->argument('name'),
|
||||
'email' => $this->argument('email'),
|
||||
'password' => bcrypt($this->argument('password')),
|
||||
'role' => $this->option('role'),
|
||||
]);
|
||||
|
||||
$user->createDefaultProject();
|
||||
|
||||
$this->info('User created!');
|
||||
}
|
||||
}
|
||||
|
@ -2,8 +2,12 @@
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use App\Traits\Enum;
|
||||
|
||||
final class Database
|
||||
{
|
||||
use Enum;
|
||||
|
||||
const NONE = 'none';
|
||||
|
||||
const MYSQL57 = 'mysql57';
|
||||
|
30
app/Enums/PHP.php
Normal file
30
app/Enums/PHP.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use App\Traits\Enum;
|
||||
|
||||
final class PHP
|
||||
{
|
||||
use Enum;
|
||||
|
||||
const NONE = 'none';
|
||||
|
||||
const V70 = '7.0';
|
||||
|
||||
const V71 = '7.1';
|
||||
|
||||
const V72 = '7.2';
|
||||
|
||||
const V73 = '7.3';
|
||||
|
||||
const V74 = '7.4';
|
||||
|
||||
const V80 = '8.0';
|
||||
|
||||
const V81 = '8.1';
|
||||
|
||||
const V82 = '8.2';
|
||||
|
||||
const V83 = '8.3';
|
||||
}
|
@ -2,7 +2,9 @@
|
||||
|
||||
namespace App\Exceptions;
|
||||
|
||||
use Illuminate\Database\Eloquent\ModelNotFoundException;
|
||||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Throwable;
|
||||
|
||||
class Handler extends ExceptionHandler
|
||||
@ -10,7 +12,7 @@ class Handler extends ExceptionHandler
|
||||
/**
|
||||
* A list of exception types with their corresponding custom log levels.
|
||||
*
|
||||
* @var array<class-string<\Throwable>, \Psr\Log\LogLevel::*>
|
||||
* @var array<class-string<Throwable>, \Psr\Log\LogLevel::*>
|
||||
*/
|
||||
protected $levels = [
|
||||
//
|
||||
@ -19,7 +21,7 @@ class Handler extends ExceptionHandler
|
||||
/**
|
||||
* A list of the exception types that are not reported.
|
||||
*
|
||||
* @var array<int, class-string<\Throwable>>
|
||||
* @var array<int, class-string<Throwable>>
|
||||
*/
|
||||
protected $dontReport = [
|
||||
//
|
||||
@ -45,4 +47,13 @@ public function register(): void
|
||||
//
|
||||
});
|
||||
}
|
||||
|
||||
public function render($request, Throwable $e): Response
|
||||
{
|
||||
if ($e instanceof ModelNotFoundException) {
|
||||
abort(404, class_basename($e->getModel()).' not found.');
|
||||
}
|
||||
|
||||
return parent::render($request, $e);
|
||||
}
|
||||
}
|
||||
|
@ -7,9 +7,11 @@
|
||||
use App\Models\Service;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Spatie\RouteAttributes\Attributes\Post;
|
||||
|
||||
class AgentController extends Controller
|
||||
{
|
||||
#[Post('api/servers/{server}/agent/{id}', name: 'api.servers.agent')]
|
||||
public function __invoke(Request $request, Server $server, int $id): JsonResponse
|
||||
{
|
||||
$validated = $this->validate($request, [
|
||||
|
97
app/Http/Controllers/API/CronJobController.php
Normal file
97
app/Http/Controllers/API/CronJobController.php
Normal file
@ -0,0 +1,97 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\API;
|
||||
|
||||
use App\Actions\CronJob\CreateCronJob;
|
||||
use App\Actions\CronJob\DeleteCronJob;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Resources\CronJobResource;
|
||||
use App\Models\CronJob;
|
||||
use App\Models\Project;
|
||||
use App\Models\Server;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\ResourceCollection;
|
||||
use Knuckles\Scribe\Attributes\BodyParam;
|
||||
use Knuckles\Scribe\Attributes\Endpoint;
|
||||
use Knuckles\Scribe\Attributes\Group;
|
||||
use Knuckles\Scribe\Attributes\Response;
|
||||
use Knuckles\Scribe\Attributes\ResponseFromApiResource;
|
||||
use Spatie\RouteAttributes\Attributes\Delete;
|
||||
use Spatie\RouteAttributes\Attributes\Get;
|
||||
use Spatie\RouteAttributes\Attributes\Middleware;
|
||||
use Spatie\RouteAttributes\Attributes\Post;
|
||||
use Spatie\RouteAttributes\Attributes\Prefix;
|
||||
|
||||
#[Prefix('api/projects/{project}/servers/{server}/cron-jobs')]
|
||||
#[Middleware(['auth:sanctum', 'can-see-project'])]
|
||||
#[Group(name: 'cron-jobs')]
|
||||
class CronJobController extends Controller
|
||||
{
|
||||
#[Get('/', name: 'api.projects.servers.cron-jobs', middleware: 'ability:read')]
|
||||
#[Endpoint(title: 'list', description: 'Get all cron jobs.')]
|
||||
#[ResponseFromApiResource(CronJobResource::class, CronJob::class, collection: true, paginate: 25)]
|
||||
public function index(Project $project, Server $server): ResourceCollection
|
||||
{
|
||||
$this->authorize('viewAny', [CronJob::class, $server]);
|
||||
|
||||
$this->validateRoute($project, $server);
|
||||
|
||||
return CronJobResource::collection($server->cronJobs()->simplePaginate(25));
|
||||
}
|
||||
|
||||
#[Post('/', name: 'api.projects.servers.cron-jobs.create', middleware: 'ability:write')]
|
||||
#[Endpoint(title: 'create', description: 'Create a new cron job.')]
|
||||
#[BodyParam(name: 'command', required: true)]
|
||||
#[BodyParam(name: 'user', required: true, enum: ['root', 'vito'])]
|
||||
#[BodyParam(name: 'frequency', description: 'Frequency of the cron job.', required: true, example: '* * * * *')]
|
||||
#[ResponseFromApiResource(CronJobResource::class, CronJob::class)]
|
||||
public function create(Request $request, Project $project, Server $server): CronJobResource
|
||||
{
|
||||
$this->authorize('create', [CronJob::class, $server]);
|
||||
|
||||
$this->validateRoute($project, $server);
|
||||
|
||||
$this->validate($request, CreateCronJob::rules($request->all()));
|
||||
|
||||
$cronJob = app(CreateCronJob::class)->create($server, $request->all());
|
||||
|
||||
return new CronJobResource($cronJob);
|
||||
}
|
||||
|
||||
#[Get('{cronJob}', name: 'api.projects.servers.cron-jobs.show', middleware: 'ability:read')]
|
||||
#[Endpoint(title: 'show', description: 'Get a cron job by ID.')]
|
||||
#[ResponseFromApiResource(CronJobResource::class, CronJob::class)]
|
||||
public function show(Project $project, Server $server, CronJob $cronJob): CronJobResource
|
||||
{
|
||||
$this->authorize('view', [$cronJob, $server]);
|
||||
|
||||
$this->validateRoute($project, $server, $cronJob);
|
||||
|
||||
return new CronJobResource($cronJob);
|
||||
}
|
||||
|
||||
#[Delete('{cronJob}', name: 'api.projects.servers.cron-jobs.delete', middleware: 'ability:write')]
|
||||
#[Endpoint(title: 'delete', description: 'Delete cron job.')]
|
||||
#[Response(status: 204)]
|
||||
public function delete(Project $project, Server $server, CronJob $cronJob)
|
||||
{
|
||||
$this->authorize('delete', [$cronJob, $server]);
|
||||
|
||||
$this->validateRoute($project, $server, $cronJob);
|
||||
|
||||
app(DeleteCronJob::class)->delete($server, $cronJob);
|
||||
|
||||
return response()->noContent();
|
||||
}
|
||||
|
||||
private function validateRoute(Project $project, Server $server, ?CronJob $cronJob = null): void
|
||||
{
|
||||
if ($project->id !== $server->project_id) {
|
||||
abort(404, 'Server not found in project');
|
||||
}
|
||||
|
||||
if ($cronJob && $cronJob->server_id !== $server->id) {
|
||||
abort(404, 'Firewall rule not found in server');
|
||||
}
|
||||
}
|
||||
}
|
94
app/Http/Controllers/API/DatabaseController.php
Normal file
94
app/Http/Controllers/API/DatabaseController.php
Normal file
@ -0,0 +1,94 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\API;
|
||||
|
||||
use App\Actions\Database\CreateDatabase;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Resources\DatabaseResource;
|
||||
use App\Models\Database;
|
||||
use App\Models\Project;
|
||||
use App\Models\Server;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\ResourceCollection;
|
||||
use Knuckles\Scribe\Attributes\BodyParam;
|
||||
use Knuckles\Scribe\Attributes\Endpoint;
|
||||
use Knuckles\Scribe\Attributes\Group;
|
||||
use Knuckles\Scribe\Attributes\Response;
|
||||
use Knuckles\Scribe\Attributes\ResponseFromApiResource;
|
||||
use Spatie\RouteAttributes\Attributes\Delete;
|
||||
use Spatie\RouteAttributes\Attributes\Get;
|
||||
use Spatie\RouteAttributes\Attributes\Middleware;
|
||||
use Spatie\RouteAttributes\Attributes\Post;
|
||||
use Spatie\RouteAttributes\Attributes\Prefix;
|
||||
|
||||
#[Prefix('api/projects/{project}/servers/{server}/databases')]
|
||||
#[Middleware(['auth:sanctum', 'can-see-project'])]
|
||||
#[Group(name: 'databases')]
|
||||
class DatabaseController extends Controller
|
||||
{
|
||||
#[Get('/', name: 'api.projects.servers.databases', middleware: 'ability:read')]
|
||||
#[Endpoint(title: 'list', description: 'Get all databases.')]
|
||||
#[ResponseFromApiResource(DatabaseResource::class, Database::class, collection: true, paginate: 25)]
|
||||
public function index(Project $project, Server $server): ResourceCollection
|
||||
{
|
||||
$this->authorize('viewAny', [Database::class, $server]);
|
||||
|
||||
$this->validateRoute($project, $server);
|
||||
|
||||
return DatabaseResource::collection($server->databases()->simplePaginate(25));
|
||||
}
|
||||
|
||||
#[Post('/', name: 'api.projects.servers.databases.create', middleware: 'ability:write')]
|
||||
#[Endpoint(title: 'create', description: 'Create a new database.')]
|
||||
#[BodyParam(name: 'name', required: true)]
|
||||
#[ResponseFromApiResource(DatabaseResource::class, Database::class)]
|
||||
public function create(Request $request, Project $project, Server $server): DatabaseResource
|
||||
{
|
||||
$this->authorize('create', [Database::class, $server]);
|
||||
|
||||
$this->validateRoute($project, $server);
|
||||
|
||||
$this->validate($request, CreateDatabase::rules($server, $request->input()));
|
||||
|
||||
$database = app(CreateDatabase::class)->create($server, $request->all());
|
||||
|
||||
return new DatabaseResource($database);
|
||||
}
|
||||
|
||||
#[Get('{database}', name: 'api.projects.servers.databases.show', middleware: 'ability:read')]
|
||||
#[Endpoint(title: 'show', description: 'Get a database by ID.')]
|
||||
#[ResponseFromApiResource(DatabaseResource::class, Database::class)]
|
||||
public function show(Project $project, Server $server, Database $database): DatabaseResource
|
||||
{
|
||||
$this->authorize('view', [$database, $server]);
|
||||
|
||||
$this->validateRoute($project, $server, $database);
|
||||
|
||||
return new DatabaseResource($database);
|
||||
}
|
||||
|
||||
#[Delete('{database}', name: 'api.projects.servers.databases.delete', middleware: 'ability:write')]
|
||||
#[Endpoint(title: 'delete', description: 'Delete database.')]
|
||||
#[Response(status: 204)]
|
||||
public function delete(Project $project, Server $server, Database $database)
|
||||
{
|
||||
$this->authorize('delete', [$database, $server]);
|
||||
|
||||
$this->validateRoute($project, $server, $database);
|
||||
|
||||
$database->delete();
|
||||
|
||||
return response()->noContent();
|
||||
}
|
||||
|
||||
private function validateRoute(Project $project, Server $server, ?Database $database = null): void
|
||||
{
|
||||
if ($project->id !== $server->project_id) {
|
||||
abort(404, 'Server not found in project');
|
||||
}
|
||||
|
||||
if ($database && $database->server_id !== $server->id) {
|
||||
abort(404, 'Database not found in server');
|
||||
}
|
||||
}
|
||||
}
|
114
app/Http/Controllers/API/DatabaseUserController.php
Normal file
114
app/Http/Controllers/API/DatabaseUserController.php
Normal file
@ -0,0 +1,114 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\API;
|
||||
|
||||
use App\Actions\Database\CreateDatabaseUser;
|
||||
use App\Actions\Database\LinkUser;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Resources\DatabaseUserResource;
|
||||
use App\Models\DatabaseUser;
|
||||
use App\Models\Project;
|
||||
use App\Models\Server;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\ResourceCollection;
|
||||
use Knuckles\Scribe\Attributes\BodyParam;
|
||||
use Knuckles\Scribe\Attributes\Endpoint;
|
||||
use Knuckles\Scribe\Attributes\Group;
|
||||
use Knuckles\Scribe\Attributes\Response;
|
||||
use Knuckles\Scribe\Attributes\ResponseFromApiResource;
|
||||
use Spatie\RouteAttributes\Attributes\Delete;
|
||||
use Spatie\RouteAttributes\Attributes\Get;
|
||||
use Spatie\RouteAttributes\Attributes\Middleware;
|
||||
use Spatie\RouteAttributes\Attributes\Post;
|
||||
use Spatie\RouteAttributes\Attributes\Prefix;
|
||||
|
||||
#[Prefix('api/projects/{project}/servers/{server}/database-users')]
|
||||
#[Middleware(['auth:sanctum', 'can-see-project'])]
|
||||
#[Group(name: 'database-users')]
|
||||
class DatabaseUserController extends Controller
|
||||
{
|
||||
#[Get('/', name: 'api.projects.servers.database-users', middleware: 'ability:read')]
|
||||
#[Endpoint(title: 'list', description: 'Get all database users.')]
|
||||
#[ResponseFromApiResource(DatabaseUserResource::class, DatabaseUser::class, collection: true, paginate: 25)]
|
||||
public function index(Project $project, Server $server): ResourceCollection
|
||||
{
|
||||
$this->authorize('viewAny', [DatabaseUser::class, $server]);
|
||||
|
||||
$this->validateRoute($project, $server);
|
||||
|
||||
return DatabaseUserResource::collection($server->databaseUsers()->simplePaginate(25));
|
||||
}
|
||||
|
||||
#[Post('/', name: 'api.projects.servers.database-users.create', middleware: 'ability:write')]
|
||||
#[Endpoint(title: 'create', description: 'Create a new database user.')]
|
||||
#[BodyParam(name: 'username', required: true)]
|
||||
#[BodyParam(name: 'password', required: true)]
|
||||
#[BodyParam(name: 'host', description: 'Host, if it is a remote user.', example: '%')]
|
||||
#[ResponseFromApiResource(DatabaseUserResource::class, DatabaseUser::class)]
|
||||
public function create(Request $request, Project $project, Server $server): DatabaseUserResource
|
||||
{
|
||||
$this->authorize('create', [DatabaseUser::class, $server]);
|
||||
|
||||
$this->validateRoute($project, $server);
|
||||
|
||||
$this->validate($request, CreateDatabaseUser::rules($server, $request->input()));
|
||||
|
||||
$databaseUser = app(CreateDatabaseUser::class)->create($server, $request->all());
|
||||
|
||||
return new DatabaseUserResource($databaseUser);
|
||||
}
|
||||
|
||||
#[Get('{databaseUser}', name: 'api.projects.servers.database-users.show', middleware: 'ability:read')]
|
||||
#[Endpoint(title: 'show', description: 'Get a database user by ID.')]
|
||||
#[ResponseFromApiResource(DatabaseUserResource::class, DatabaseUser::class)]
|
||||
public function show(Project $project, Server $server, DatabaseUser $databaseUser): DatabaseUserResource
|
||||
{
|
||||
$this->authorize('view', [$databaseUser, $server]);
|
||||
|
||||
$this->validateRoute($project, $server, $databaseUser);
|
||||
|
||||
return new DatabaseUserResource($databaseUser);
|
||||
}
|
||||
|
||||
#[Post('{databaseUser}/link', name: 'api.projects.servers.database-users.link', middleware: 'ability:write')]
|
||||
#[Endpoint(title: 'link', description: 'Link to databases')]
|
||||
#[BodyParam(name: 'databases', description: 'Array of database names to link to the user.', required: true)]
|
||||
#[ResponseFromApiResource(DatabaseUserResource::class, DatabaseUser::class)]
|
||||
public function link(Request $request, Project $project, Server $server, DatabaseUser $databaseUser): DatabaseUserResource
|
||||
{
|
||||
$this->authorize('update', [$databaseUser, $server]);
|
||||
|
||||
$this->validateRoute($project, $server, $databaseUser);
|
||||
|
||||
$this->validate($request, LinkUser::rules($server, $request->all()));
|
||||
|
||||
$databaseUser = app(LinkUser::class)->link($databaseUser, $request->all());
|
||||
|
||||
return new DatabaseUserResource($databaseUser);
|
||||
}
|
||||
|
||||
#[Delete('{databaseUser}', name: 'api.projects.servers.database-users.delete', middleware: 'ability:write')]
|
||||
#[Endpoint(title: 'delete', description: 'Delete database user.')]
|
||||
#[Response(status: 204)]
|
||||
public function delete(Project $project, Server $server, DatabaseUser $databaseUser)
|
||||
{
|
||||
$this->authorize('delete', [$databaseUser, $server]);
|
||||
|
||||
$this->validateRoute($project, $server, $databaseUser);
|
||||
|
||||
$databaseUser->delete();
|
||||
|
||||
return response()->noContent();
|
||||
}
|
||||
|
||||
private function validateRoute(Project $project, Server $server, ?DatabaseUser $databaseUser = null): void
|
||||
{
|
||||
if ($project->id !== $server->project_id) {
|
||||
abort(404, 'Server not found in project');
|
||||
}
|
||||
|
||||
if ($databaseUser && $databaseUser->server_id !== $server->id) {
|
||||
abort(404, 'Database user not found in server');
|
||||
}
|
||||
}
|
||||
}
|
99
app/Http/Controllers/API/FirewallRuleController.php
Normal file
99
app/Http/Controllers/API/FirewallRuleController.php
Normal file
@ -0,0 +1,99 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\API;
|
||||
|
||||
use App\Actions\FirewallRule\CreateRule;
|
||||
use App\Actions\FirewallRule\DeleteRule;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Resources\FirewallRuleResource;
|
||||
use App\Models\FirewallRule;
|
||||
use App\Models\Project;
|
||||
use App\Models\Server;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\ResourceCollection;
|
||||
use Knuckles\Scribe\Attributes\BodyParam;
|
||||
use Knuckles\Scribe\Attributes\Endpoint;
|
||||
use Knuckles\Scribe\Attributes\Group;
|
||||
use Knuckles\Scribe\Attributes\Response;
|
||||
use Knuckles\Scribe\Attributes\ResponseFromApiResource;
|
||||
use Spatie\RouteAttributes\Attributes\Delete;
|
||||
use Spatie\RouteAttributes\Attributes\Get;
|
||||
use Spatie\RouteAttributes\Attributes\Middleware;
|
||||
use Spatie\RouteAttributes\Attributes\Post;
|
||||
use Spatie\RouteAttributes\Attributes\Prefix;
|
||||
|
||||
#[Prefix('api/projects/{project}/servers/{server}/firewall-rules')]
|
||||
#[Middleware(['auth:sanctum', 'can-see-project'])]
|
||||
#[Group(name: 'firewall-rules')]
|
||||
class FirewallRuleController extends Controller
|
||||
{
|
||||
#[Get('/', name: 'api.projects.servers.firewall-rules', middleware: 'ability:read')]
|
||||
#[Endpoint(title: 'list', description: 'Get all firewall rules.')]
|
||||
#[ResponseFromApiResource(FirewallRuleResource::class, FirewallRule::class, collection: true, paginate: 25)]
|
||||
public function index(Project $project, Server $server): ResourceCollection
|
||||
{
|
||||
$this->authorize('viewAny', [FirewallRule::class, $server]);
|
||||
|
||||
$this->validateRoute($project, $server);
|
||||
|
||||
return FirewallRuleResource::collection($server->firewallRules()->simplePaginate(25));
|
||||
}
|
||||
|
||||
#[Post('/', name: 'api.projects.servers.firewall-rules.create', middleware: 'ability:write')]
|
||||
#[Endpoint(title: 'create', description: 'Create a new firewall rule.')]
|
||||
#[BodyParam(name: 'type', required: true, enum: ['allow', 'deny'])]
|
||||
#[BodyParam(name: 'protocol', required: true, enum: ['tcp', 'udp'])]
|
||||
#[BodyParam(name: 'port', required: true)]
|
||||
#[BodyParam(name: 'source', required: true)]
|
||||
#[BodyParam(name: 'mask', description: 'Mask for source IP.', example: '0')]
|
||||
#[ResponseFromApiResource(FirewallRuleResource::class, FirewallRule::class)]
|
||||
public function create(Request $request, Project $project, Server $server): FirewallRuleResource
|
||||
{
|
||||
$this->authorize('create', [FirewallRule::class, $server]);
|
||||
|
||||
$this->validateRoute($project, $server);
|
||||
|
||||
$this->validate($request, CreateRule::rules());
|
||||
|
||||
$firewallRule = app(CreateRule::class)->create($server, $request->all());
|
||||
|
||||
return new FirewallRuleResource($firewallRule);
|
||||
}
|
||||
|
||||
#[Get('{firewallRule}', name: 'api.projects.servers.firewall-rules.show', middleware: 'ability:read')]
|
||||
#[Endpoint(title: 'show', description: 'Get a firewall rule by ID.')]
|
||||
#[ResponseFromApiResource(FirewallRuleResource::class, FirewallRule::class)]
|
||||
public function show(Project $project, Server $server, FirewallRule $firewallRule): FirewallRuleResource
|
||||
{
|
||||
$this->authorize('view', [$firewallRule, $server]);
|
||||
|
||||
$this->validateRoute($project, $server, $firewallRule);
|
||||
|
||||
return new FirewallRuleResource($firewallRule);
|
||||
}
|
||||
|
||||
#[Delete('{firewallRule}', name: 'api.projects.servers.firewall-rules.delete', middleware: 'ability:write')]
|
||||
#[Endpoint(title: 'delete', description: 'Delete firewall rule.')]
|
||||
#[Response(status: 204)]
|
||||
public function delete(Project $project, Server $server, FirewallRule $firewallRule)
|
||||
{
|
||||
$this->authorize('delete', [$firewallRule, $server]);
|
||||
|
||||
$this->validateRoute($project, $server, $firewallRule);
|
||||
|
||||
app(DeleteRule::class)->delete($server, $firewallRule);
|
||||
|
||||
return response()->noContent();
|
||||
}
|
||||
|
||||
private function validateRoute(Project $project, Server $server, ?FirewallRule $firewallRule = null): void
|
||||
{
|
||||
if ($project->id !== $server->project_id) {
|
||||
abort(404, 'Server not found in project');
|
||||
}
|
||||
|
||||
if ($firewallRule && $firewallRule->server_id !== $server->id) {
|
||||
abort(404, 'Firewall rule not found in server');
|
||||
}
|
||||
}
|
||||
}
|
@ -11,10 +11,12 @@
|
||||
use App\Notifications\SourceControlDisconnected;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Spatie\RouteAttributes\Attributes\Any;
|
||||
use Throwable;
|
||||
|
||||
class GitHookController extends Controller
|
||||
{
|
||||
#[Any('api/git-hooks', name: 'api.git-hooks')]
|
||||
public function __invoke(Request $request)
|
||||
{
|
||||
if (! $request->input('secret')) {
|
||||
|
@ -3,9 +3,17 @@
|
||||
namespace App\Http\Controllers\API;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Knuckles\Scribe\Attributes\Endpoint;
|
||||
use Knuckles\Scribe\Attributes\Group;
|
||||
use Knuckles\Scribe\Attributes\Unauthenticated;
|
||||
use Spatie\RouteAttributes\Attributes\Get;
|
||||
|
||||
#[Group(name: 'general')]
|
||||
class HealthController extends Controller
|
||||
{
|
||||
#[Get('api/health', name: 'api.health')]
|
||||
#[Unauthenticated]
|
||||
#[Endpoint(title: 'health-check')]
|
||||
public function __invoke()
|
||||
{
|
||||
return response()->json([
|
||||
|
89
app/Http/Controllers/API/ProjectController.php
Normal file
89
app/Http/Controllers/API/ProjectController.php
Normal file
@ -0,0 +1,89 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\API;
|
||||
|
||||
use App\Actions\Projects\CreateProject;
|
||||
use App\Actions\Projects\DeleteProject;
|
||||
use App\Actions\Projects\UpdateProject;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Resources\ProjectResource;
|
||||
use App\Models\Project;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\ResourceCollection;
|
||||
use Illuminate\Http\Response;
|
||||
use Knuckles\Scribe\Attributes\BodyParam;
|
||||
use Knuckles\Scribe\Attributes\Endpoint;
|
||||
use Knuckles\Scribe\Attributes\Group;
|
||||
use Knuckles\Scribe\Attributes\ResponseFromApiResource;
|
||||
use Spatie\RouteAttributes\Attributes\Delete;
|
||||
use Spatie\RouteAttributes\Attributes\Get;
|
||||
use Spatie\RouteAttributes\Attributes\Middleware;
|
||||
use Spatie\RouteAttributes\Attributes\Post;
|
||||
use Spatie\RouteAttributes\Attributes\Put;
|
||||
|
||||
#[Middleware('auth:sanctum')]
|
||||
#[Group(name: 'projects')]
|
||||
class ProjectController extends Controller
|
||||
{
|
||||
#[Get('api/projects', name: 'api.projects.index', middleware: 'ability:read')]
|
||||
#[Endpoint(title: 'list', description: 'Get all projects.')]
|
||||
#[ResponseFromApiResource(ProjectResource::class, Project::class, collection: true, paginate: 25)]
|
||||
public function index(): ResourceCollection
|
||||
{
|
||||
$this->authorize('viewAny', Project::class);
|
||||
|
||||
return ProjectResource::collection(Project::all());
|
||||
}
|
||||
|
||||
#[Post('api/projects', name: 'api.projects.create', middleware: 'ability:write')]
|
||||
#[Endpoint(title: 'create', description: 'Create a new project.')]
|
||||
#[BodyParam(name: 'name', description: 'The name of the project.', required: true)]
|
||||
#[ResponseFromApiResource(ProjectResource::class, Project::class)]
|
||||
public function create(Request $request): ProjectResource
|
||||
{
|
||||
$this->authorize('create', Project::class);
|
||||
|
||||
$this->validate($request, CreateProject::rules());
|
||||
|
||||
$project = app(CreateProject::class)->create(auth()->user(), $request->all());
|
||||
|
||||
return new ProjectResource($project);
|
||||
}
|
||||
|
||||
#[Get('api/projects/{project}', name: 'api.projects.show', middleware: 'ability:read')]
|
||||
#[Endpoint(title: 'show', description: 'Get a project by ID.')]
|
||||
#[ResponseFromApiResource(ProjectResource::class, Project::class)]
|
||||
public function show(Project $project): ProjectResource
|
||||
{
|
||||
$this->authorize('view', $project);
|
||||
|
||||
return new ProjectResource($project);
|
||||
}
|
||||
|
||||
#[Put('api/projects/{project}', name: 'api.projects.update', middleware: 'ability:write')]
|
||||
#[Endpoint(title: 'update', description: 'Update project.')]
|
||||
#[BodyParam(name: 'name', description: 'The name of the project.', required: true)]
|
||||
#[ResponseFromApiResource(ProjectResource::class, Project::class)]
|
||||
public function update(Request $request, Project $project): ProjectResource
|
||||
{
|
||||
$this->authorize('update', $project);
|
||||
|
||||
$this->validate($request, UpdateProject::rules($project));
|
||||
|
||||
$project = app(UpdateProject::class)->update($project, $request->all());
|
||||
|
||||
return new ProjectResource($project);
|
||||
}
|
||||
|
||||
#[Delete('api/projects/{project}', name: 'api.projects.delete', middleware: 'ability:write')]
|
||||
#[Endpoint(title: 'delete', description: 'Delete project.')]
|
||||
#[\Knuckles\Scribe\Attributes\Response(status: 204)]
|
||||
public function delete(Project $project): Response
|
||||
{
|
||||
$this->authorize('delete', $project);
|
||||
|
||||
app(DeleteProject::class)->delete(auth()->user(), $project);
|
||||
|
||||
return response()->noContent();
|
||||
}
|
||||
}
|
131
app/Http/Controllers/API/ServerController.php
Normal file
131
app/Http/Controllers/API/ServerController.php
Normal file
@ -0,0 +1,131 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\API;
|
||||
|
||||
use App\Actions\Server\CreateServer;
|
||||
use App\Actions\Server\RebootServer;
|
||||
use App\Actions\Server\Update;
|
||||
use App\Enums\Database;
|
||||
use App\Enums\PHP;
|
||||
use App\Enums\ServerProvider;
|
||||
use App\Enums\ServerType;
|
||||
use App\Enums\Webserver;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Resources\ServerResource;
|
||||
use App\Models\Project;
|
||||
use App\Models\Server;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\ResourceCollection;
|
||||
use Knuckles\Scribe\Attributes\BodyParam;
|
||||
use Knuckles\Scribe\Attributes\Endpoint;
|
||||
use Knuckles\Scribe\Attributes\Group;
|
||||
use Knuckles\Scribe\Attributes\Response;
|
||||
use Knuckles\Scribe\Attributes\ResponseFromApiResource;
|
||||
use Spatie\RouteAttributes\Attributes\Delete;
|
||||
use Spatie\RouteAttributes\Attributes\Get;
|
||||
use Spatie\RouteAttributes\Attributes\Middleware;
|
||||
use Spatie\RouteAttributes\Attributes\Post;
|
||||
use Spatie\RouteAttributes\Attributes\Prefix;
|
||||
|
||||
#[Prefix('api/projects/{project}/servers')]
|
||||
#[Middleware(['auth:sanctum', 'can-see-project'])]
|
||||
#[Group(name: 'servers')]
|
||||
class ServerController extends Controller
|
||||
{
|
||||
#[Get('/', name: 'api.projects.servers', middleware: 'ability:read')]
|
||||
#[Endpoint(title: 'list', description: 'Get all servers in a project.')]
|
||||
#[ResponseFromApiResource(ServerResource::class, Server::class, collection: true, paginate: 25)]
|
||||
public function index(Project $project): ResourceCollection
|
||||
{
|
||||
$this->authorize('viewAny', [Server::class, $project]);
|
||||
|
||||
return ServerResource::collection($project->servers()->simplePaginate(25));
|
||||
}
|
||||
|
||||
#[Post('/', name: 'api.projects.servers.create', middleware: 'ability:write')]
|
||||
#[Endpoint(title: 'create', description: 'Create a new server.')]
|
||||
#[BodyParam(name: 'provider', description: 'The server provider type', required: true)]
|
||||
#[BodyParam(name: 'server_provider', description: 'If the provider is not custom, the ID of the server provider profile', enum: [ServerProvider::CUSTOM, ServerProvider::HETZNER, ServerProvider::DIGITALOCEAN, ServerProvider::LINODE, ServerProvider::VULTR])]
|
||||
#[BodyParam(name: 'region', description: 'Provider region if the provider is not custom')]
|
||||
#[BodyParam(name: 'plan', description: 'Provider plan if the provider is not custom')]
|
||||
#[BodyParam(name: 'ip', description: 'SSH IP address if the provider is custom')]
|
||||
#[BodyParam(name: 'port', description: 'SSH Port if the provider is custom')]
|
||||
#[BodyParam(name: 'name', description: 'The name of the server.', required: true)]
|
||||
#[BodyParam(name: 'os', description: 'The os of the server', required: true)]
|
||||
#[BodyParam(name: 'type', description: 'Server type', required: true, enum: [ServerType::REGULAR, ServerType::DATABASE])]
|
||||
#[BodyParam(name: 'webserver', description: 'Web server', required: true, enum: [Webserver::NONE, Webserver::NGINX])]
|
||||
#[BodyParam(name: 'database', description: 'Database', required: true, enum: [Database::NONE, Database::MYSQL57, Database::MYSQL80, Database::MARIADB103, Database::MARIADB104, Database::MARIADB103, Database::POSTGRESQL12, Database::POSTGRESQL13, Database::POSTGRESQL14, Database::POSTGRESQL15, Database::POSTGRESQL16], )]
|
||||
#[BodyParam(name: 'php', description: 'PHP version', required: true, enum: [PHP::V70, PHP::V71, PHP::V72, PHP::V73, PHP::V74, PHP::V80, PHP::V81, PHP::V82, PHP::V83])]
|
||||
#[ResponseFromApiResource(ServerResource::class, Server::class)]
|
||||
public function create(Request $request, Project $project): ServerResource
|
||||
{
|
||||
$this->authorize('create', [Server::class, $project]);
|
||||
|
||||
$this->validate($request, CreateServer::rules($project, $request->input()));
|
||||
|
||||
$server = app(CreateServer::class)->create(auth()->user(), $project, $request->all());
|
||||
|
||||
return new ServerResource($server);
|
||||
}
|
||||
|
||||
#[Get('{server}', name: 'api.projects.servers.show', middleware: 'ability:read')]
|
||||
#[Endpoint(title: 'show', description: 'Get a server by ID.')]
|
||||
#[ResponseFromApiResource(ServerResource::class, Server::class)]
|
||||
public function show(Project $project, Server $server): ServerResource
|
||||
{
|
||||
$this->authorize('view', [$server, $project]);
|
||||
|
||||
$this->validateRoute($project, $server);
|
||||
|
||||
return new ServerResource($server);
|
||||
}
|
||||
|
||||
#[Post('{server}/reboot', name: 'api.projects.servers.reboot', middleware: 'ability:write')]
|
||||
#[Endpoint(title: 'reboot', description: 'Reboot a server.')]
|
||||
#[Response(status: 204)]
|
||||
public function reboot(Project $project, Server $server)
|
||||
{
|
||||
$this->authorize('update', [$server, $project]);
|
||||
|
||||
$this->validateRoute($project, $server);
|
||||
|
||||
app(RebootServer::class)->reboot($server);
|
||||
|
||||
return response()->noContent();
|
||||
}
|
||||
|
||||
#[Post('{server}/upgrade', name: 'api.projects.servers.upgrade', middleware: 'ability:write')]
|
||||
#[Endpoint(title: 'upgrade', description: 'Upgrade server.')]
|
||||
#[Response(status: 204)]
|
||||
public function upgrade(Project $project, Server $server)
|
||||
{
|
||||
$this->authorize('update', [$server, $project]);
|
||||
|
||||
$this->validateRoute($project, $server);
|
||||
|
||||
app(Update::class)->update($server);
|
||||
|
||||
return response()->noContent();
|
||||
}
|
||||
|
||||
#[Delete('{server}', name: 'api.projects.servers.delete', middleware: 'ability:write')]
|
||||
#[Endpoint(title: 'delete', description: 'Delete server.')]
|
||||
#[Response(status: 204)]
|
||||
public function delete(Project $project, Server $server)
|
||||
{
|
||||
$this->authorize('delete', [$server, $project]);
|
||||
|
||||
$this->validateRoute($project, $server);
|
||||
|
||||
$server->delete();
|
||||
|
||||
return response()->noContent();
|
||||
}
|
||||
|
||||
private function validateRoute(Project $project, Server $server): void
|
||||
{
|
||||
if ($project->id !== $server->project_id) {
|
||||
abort(404, 'Server not found in project');
|
||||
}
|
||||
}
|
||||
}
|
116
app/Http/Controllers/API/ServerProviderController.php
Normal file
116
app/Http/Controllers/API/ServerProviderController.php
Normal file
@ -0,0 +1,116 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\API;
|
||||
|
||||
use App\Actions\ServerProvider\CreateServerProvider;
|
||||
use App\Actions\ServerProvider\DeleteServerProvider;
|
||||
use App\Actions\ServerProvider\EditServerProvider;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Resources\ServerProviderResource;
|
||||
use App\Models\Project;
|
||||
use App\Models\ServerProvider;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\ResourceCollection;
|
||||
use Knuckles\Scribe\Attributes\BodyParam;
|
||||
use Knuckles\Scribe\Attributes\Endpoint;
|
||||
use Knuckles\Scribe\Attributes\Group;
|
||||
use Knuckles\Scribe\Attributes\Response;
|
||||
use Knuckles\Scribe\Attributes\ResponseFromApiResource;
|
||||
use Spatie\RouteAttributes\Attributes\Delete;
|
||||
use Spatie\RouteAttributes\Attributes\Get;
|
||||
use Spatie\RouteAttributes\Attributes\Middleware;
|
||||
use Spatie\RouteAttributes\Attributes\Post;
|
||||
use Spatie\RouteAttributes\Attributes\Prefix;
|
||||
use Spatie\RouteAttributes\Attributes\Put;
|
||||
|
||||
#[Prefix('api/projects/{project}/server-providers')]
|
||||
#[Middleware(['auth:sanctum', 'can-see-project'])]
|
||||
#[Group(name: 'server-providers')]
|
||||
class ServerProviderController extends Controller
|
||||
{
|
||||
#[Get('/', name: 'api.projects.server-providers', middleware: 'ability:read')]
|
||||
#[Endpoint(title: 'list')]
|
||||
#[ResponseFromApiResource(ServerProviderResource::class, ServerProvider::class, collection: true, paginate: 25)]
|
||||
public function index(Project $project): ResourceCollection
|
||||
{
|
||||
$this->authorize('viewAny', ServerProvider::class);
|
||||
|
||||
$serverProviders = ServerProvider::getByProjectId($project->id)->simplePaginate(25);
|
||||
|
||||
return ServerProviderResource::collection($serverProviders);
|
||||
}
|
||||
|
||||
#[Post('/', name: 'api.projects.server-providers.create', middleware: 'ability:write')]
|
||||
#[Endpoint(title: 'create')]
|
||||
#[BodyParam(name: 'provider', description: 'The provider (aws, linode, hetzner, digitalocean, vultr, ...)', required: true)]
|
||||
#[BodyParam(name: 'name', description: 'The name of the server provider.', required: true)]
|
||||
#[BodyParam(name: 'token', description: 'The token if provider requires api token')]
|
||||
#[BodyParam(name: 'key', description: 'The key if provider requires key')]
|
||||
#[BodyParam(name: 'secret', description: 'The secret if provider requires key')]
|
||||
#[ResponseFromApiResource(ServerProviderResource::class, ServerProvider::class)]
|
||||
public function create(Request $request, Project $project): ServerProviderResource
|
||||
{
|
||||
$this->authorize('create', ServerProvider::class);
|
||||
|
||||
$this->validate($request, CreateServerProvider::rules($request->all()));
|
||||
|
||||
$serverProvider = app(CreateServerProvider::class)->create(auth()->user(), $project, $request->all());
|
||||
|
||||
return new ServerProviderResource($serverProvider);
|
||||
}
|
||||
|
||||
#[Get('{serverProvider}', name: 'api.projects.server-providers.show', middleware: 'ability:read')]
|
||||
#[Endpoint(title: 'show')]
|
||||
#[ResponseFromApiResource(ServerProviderResource::class, ServerProvider::class)]
|
||||
public function show(Project $project, ServerProvider $serverProvider)
|
||||
{
|
||||
$this->authorize('view', $serverProvider);
|
||||
|
||||
$this->validateRoute($project, $serverProvider);
|
||||
|
||||
return new ServerProviderResource($serverProvider);
|
||||
}
|
||||
|
||||
#[Put('{serverProvider}', name: 'api.projects.server-providers.update', middleware: 'ability:write')]
|
||||
#[Endpoint(title: 'update')]
|
||||
#[BodyParam(name: 'name', description: 'The name of the server provider.', required: true)]
|
||||
#[BodyParam(name: 'global', description: 'Accessible in all projects', enum: [true, false])]
|
||||
#[ResponseFromApiResource(ServerProviderResource::class, ServerProvider::class)]
|
||||
public function update(Request $request, Project $project, ServerProvider $serverProvider)
|
||||
{
|
||||
$this->authorize('update', $serverProvider);
|
||||
|
||||
$this->validateRoute($project, $serverProvider);
|
||||
|
||||
$this->validate($request, EditServerProvider::rules());
|
||||
|
||||
$serverProvider = app(EditServerProvider::class)->edit($serverProvider, $project, $request->all());
|
||||
|
||||
return new ServerProviderResource($serverProvider);
|
||||
}
|
||||
|
||||
#[Delete('{serverProvider}', name: 'api.projects.server-providers.delete', middleware: 'ability:write')]
|
||||
#[Endpoint(title: 'delete')]
|
||||
#[Response(status: 204)]
|
||||
public function delete(Project $project, ServerProvider $serverProvider)
|
||||
{
|
||||
$this->authorize('delete', $serverProvider);
|
||||
|
||||
$this->validateRoute($project, $serverProvider);
|
||||
|
||||
app(DeleteServerProvider::class)->delete($serverProvider);
|
||||
|
||||
return response()->noContent();
|
||||
}
|
||||
|
||||
private function validateRoute(Project $project, ServerProvider $serverProvider): void
|
||||
{
|
||||
if (! $serverProvider->project_id) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($project->id !== $serverProvider->project_id) {
|
||||
abort(404, 'Server provider not found in project');
|
||||
}
|
||||
}
|
||||
}
|
92
app/Http/Controllers/API/ServerSSHKeyController.php
Normal file
92
app/Http/Controllers/API/ServerSSHKeyController.php
Normal file
@ -0,0 +1,92 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\API;
|
||||
|
||||
use App\Actions\SshKey\CreateSshKey;
|
||||
use App\Actions\SshKey\DeleteKeyFromServer;
|
||||
use App\Actions\SshKey\DeployKeyToServer;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Resources\SshKeyResource;
|
||||
use App\Models\Project;
|
||||
use App\Models\Server;
|
||||
use App\Models\SshKey;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\ResourceCollection;
|
||||
use Knuckles\Scribe\Attributes\BodyParam;
|
||||
use Knuckles\Scribe\Attributes\Endpoint;
|
||||
use Knuckles\Scribe\Attributes\Group;
|
||||
use Knuckles\Scribe\Attributes\Response;
|
||||
use Knuckles\Scribe\Attributes\ResponseFromApiResource;
|
||||
use Spatie\RouteAttributes\Attributes\Delete;
|
||||
use Spatie\RouteAttributes\Attributes\Get;
|
||||
use Spatie\RouteAttributes\Attributes\Middleware;
|
||||
use Spatie\RouteAttributes\Attributes\Post;
|
||||
use Spatie\RouteAttributes\Attributes\Prefix;
|
||||
|
||||
#[Prefix('api/projects/{project}/servers/{server}/ssh-keys')]
|
||||
#[Middleware(['auth:sanctum', 'can-see-project'])]
|
||||
#[Group(name: 'ssh-keys')]
|
||||
class ServerSSHKeyController extends Controller
|
||||
{
|
||||
#[Get('/', name: 'api.projects.servers.ssh-keys', middleware: 'ability:read')]
|
||||
#[Endpoint(title: 'list', description: 'Get all ssh keys.')]
|
||||
#[ResponseFromApiResource(SshKeyResource::class, SshKey::class, collection: true, paginate: 25)]
|
||||
public function index(Project $project, Server $server): ResourceCollection
|
||||
{
|
||||
$this->authorize('viewAnyServer', [SshKey::class, $server]);
|
||||
|
||||
$this->validateRoute($project, $server);
|
||||
|
||||
return SshKeyResource::collection($server->sshKeys()->simplePaginate(25));
|
||||
}
|
||||
|
||||
#[Post('/', name: 'api.projects.servers.ssh-keys.create', middleware: 'ability:write')]
|
||||
#[Endpoint(title: 'create', description: 'Deploy ssh key to server.')]
|
||||
#[BodyParam(name: 'key_id', description: 'The ID of the key.')]
|
||||
#[BodyParam(name: 'name', description: 'Key name, required if key_id is not provided.')]
|
||||
#[BodyParam(name: 'public_key', description: 'Public Key, required if key_id is not provided.')]
|
||||
#[ResponseFromApiResource(SshKeyResource::class, SshKey::class)]
|
||||
public function create(Request $request, Project $project, Server $server): SshKeyResource
|
||||
{
|
||||
$this->authorize('create', [SshKey::class, $server]);
|
||||
|
||||
$this->validateRoute($project, $server);
|
||||
|
||||
$sshKey = null;
|
||||
if ($request->has('key_id')) {
|
||||
$this->validate($request, DeployKeyToServer::rules($request->user(), $server));
|
||||
|
||||
$sshKey = $request->user()->sshKeys()->findOrFail($request->key_id);
|
||||
}
|
||||
|
||||
if (! $sshKey) {
|
||||
$this->validate($request, CreateSshKey::rules());
|
||||
$sshKey = app(CreateSshKey::class)->create($request->user(), $request->all());
|
||||
}
|
||||
|
||||
app(DeployKeyToServer::class)->deploy($server, ['key_id' => $sshKey->id]);
|
||||
|
||||
return new SshKeyResource($sshKey);
|
||||
}
|
||||
|
||||
#[Delete('{sshKey}', name: 'api.projects.servers.ssh-keys.delete', middleware: 'ability:write')]
|
||||
#[Endpoint(title: 'delete', description: 'Delete ssh key from server.')]
|
||||
#[Response(status: 204)]
|
||||
public function delete(Project $project, Server $server, SshKey $sshKey)
|
||||
{
|
||||
$this->authorize('delete', [$sshKey, $server]);
|
||||
|
||||
$this->validateRoute($project, $server);
|
||||
|
||||
app(DeleteKeyFromServer::class)->delete($server, $sshKey);
|
||||
|
||||
return response()->noContent();
|
||||
}
|
||||
|
||||
private function validateRoute(Project $project, Server $server): void
|
||||
{
|
||||
if ($project->id !== $server->project_id) {
|
||||
abort(404, 'Server not found in project');
|
||||
}
|
||||
}
|
||||
}
|
146
app/Http/Controllers/API/ServiceController.php
Normal file
146
app/Http/Controllers/API/ServiceController.php
Normal file
@ -0,0 +1,146 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\API;
|
||||
|
||||
use App\Actions\Service\Manage;
|
||||
use App\Actions\Service\Uninstall;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Resources\ServiceResource;
|
||||
use App\Models\Project;
|
||||
use App\Models\Server;
|
||||
use App\Models\Service;
|
||||
use Illuminate\Http\Resources\Json\ResourceCollection;
|
||||
use Knuckles\Scribe\Attributes\Endpoint;
|
||||
use Knuckles\Scribe\Attributes\Group;
|
||||
use Knuckles\Scribe\Attributes\Response;
|
||||
use Knuckles\Scribe\Attributes\ResponseFromApiResource;
|
||||
use Spatie\RouteAttributes\Attributes\Delete;
|
||||
use Spatie\RouteAttributes\Attributes\Get;
|
||||
use Spatie\RouteAttributes\Attributes\Middleware;
|
||||
use Spatie\RouteAttributes\Attributes\Post;
|
||||
use Spatie\RouteAttributes\Attributes\Prefix;
|
||||
|
||||
#[Prefix('api/projects/{project}/servers/{server}/services')]
|
||||
#[Middleware(['auth:sanctum', 'can-see-project'])]
|
||||
#[Group(name: 'services')]
|
||||
class ServiceController extends Controller
|
||||
{
|
||||
#[Get('/', name: 'api.projects.servers.services', middleware: 'ability:read')]
|
||||
#[Endpoint(title: 'list', description: 'Get all services.')]
|
||||
#[ResponseFromApiResource(ServiceResource::class, Service::class, collection: true, paginate: 25)]
|
||||
public function index(Project $project, Server $server): ResourceCollection
|
||||
{
|
||||
$this->authorize('viewAny', [Service::class, $server]);
|
||||
|
||||
$this->validateRoute($project, $server);
|
||||
|
||||
return ServiceResource::collection($server->services()->simplePaginate(25));
|
||||
}
|
||||
|
||||
#[Get('{service}', name: 'api.projects.servers.services.show', middleware: 'ability:read')]
|
||||
#[Endpoint(title: 'show', description: 'Get a service by ID.')]
|
||||
#[ResponseFromApiResource(ServiceResource::class, Service::class)]
|
||||
public function show(Project $project, Server $server, Service $service): ServiceResource
|
||||
{
|
||||
$this->authorize('view', [$service, $server]);
|
||||
|
||||
$this->validateRoute($project, $server, $service);
|
||||
|
||||
return new ServiceResource($service);
|
||||
}
|
||||
|
||||
#[Post('{service}/start', name: 'api.projects.servers.services.start', middleware: 'ability:write')]
|
||||
#[Endpoint(title: 'start', description: 'Start service.')]
|
||||
#[Response(status: 204)]
|
||||
public function start(Project $project, Server $server, Service $service): \Illuminate\Http\Response
|
||||
{
|
||||
$this->authorize('update', [$service, $server]);
|
||||
|
||||
$this->validateRoute($project, $server, $service);
|
||||
|
||||
app(Manage::class)->start($service);
|
||||
|
||||
return response()->noContent();
|
||||
}
|
||||
|
||||
#[Post('{service}/stop', name: 'api.projects.servers.services.stop', middleware: 'ability:write')]
|
||||
#[Endpoint(title: 'stop', description: 'Stop service.')]
|
||||
#[Response(status: 204)]
|
||||
public function stop(Project $project, Server $server, Service $service): \Illuminate\Http\Response
|
||||
{
|
||||
$this->authorize('update', [$service, $server]);
|
||||
|
||||
$this->validateRoute($project, $server, $service);
|
||||
|
||||
app(Manage::class)->stop($service);
|
||||
|
||||
return response()->noContent();
|
||||
}
|
||||
|
||||
#[Post('{service}/restart', name: 'api.projects.servers.services.restart', middleware: 'ability:write')]
|
||||
#[Endpoint(title: 'restart', description: 'Restart service.')]
|
||||
#[Response(status: 204)]
|
||||
public function restart(Project $project, Server $server, Service $service): \Illuminate\Http\Response
|
||||
{
|
||||
$this->authorize('update', [$service, $server]);
|
||||
|
||||
$this->validateRoute($project, $server, $service);
|
||||
|
||||
app(Manage::class)->restart($service);
|
||||
|
||||
return response()->noContent();
|
||||
}
|
||||
|
||||
#[Post('{service}/enable', name: 'api.projects.servers.services.enable', middleware: 'ability:write')]
|
||||
#[Endpoint(title: 'enable', description: 'Enable service.')]
|
||||
#[Response(status: 204)]
|
||||
public function enable(Project $project, Server $server, Service $service): \Illuminate\Http\Response
|
||||
{
|
||||
$this->authorize('update', [$service, $server]);
|
||||
|
||||
$this->validateRoute($project, $server, $service);
|
||||
|
||||
app(Manage::class)->enable($service);
|
||||
|
||||
return response()->noContent();
|
||||
}
|
||||
|
||||
#[Post('{service}/disable', name: 'api.projects.servers.services.disable', middleware: 'ability:write')]
|
||||
#[Endpoint(title: 'disable', description: 'Disable service.')]
|
||||
#[Response(status: 204)]
|
||||
public function disable(Project $project, Server $server, Service $service): \Illuminate\Http\Response
|
||||
{
|
||||
$this->authorize('update', [$service, $server]);
|
||||
|
||||
$this->validateRoute($project, $server, $service);
|
||||
|
||||
app(Manage::class)->disable($service);
|
||||
|
||||
return response()->noContent();
|
||||
}
|
||||
|
||||
#[Delete('{service}', name: 'api.projects.servers.services.uninstall', middleware: 'ability:write')]
|
||||
#[Endpoint(title: 'delete', description: 'Delete service.')]
|
||||
#[Response(status: 204)]
|
||||
public function uninstall(Project $project, Server $server, Service $service): \Illuminate\Http\Response
|
||||
{
|
||||
$this->authorize('delete', [$service, $server]);
|
||||
|
||||
$this->validateRoute($project, $server, $service);
|
||||
|
||||
app(Uninstall::class)->uninstall($service);
|
||||
|
||||
return response()->noContent();
|
||||
}
|
||||
|
||||
private function validateRoute(Project $project, Server $server, ?Service $service = null): void
|
||||
{
|
||||
if ($project->id !== $server->project_id) {
|
||||
abort(404, 'Server not found in project');
|
||||
}
|
||||
|
||||
if ($service && $service->server_id !== $server->id) {
|
||||
abort(404, 'Service not found in server');
|
||||
}
|
||||
}
|
||||
}
|
105
app/Http/Controllers/API/SiteController.php
Normal file
105
app/Http/Controllers/API/SiteController.php
Normal file
@ -0,0 +1,105 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\API;
|
||||
|
||||
use App\Actions\Site\CreateSite;
|
||||
use App\Enums\SiteType;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Resources\ServerResource;
|
||||
use App\Http\Resources\SiteResource;
|
||||
use App\Models\Project;
|
||||
use App\Models\Server;
|
||||
use App\Models\Site;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\ResourceCollection;
|
||||
use Knuckles\Scribe\Attributes\BodyParam;
|
||||
use Knuckles\Scribe\Attributes\Endpoint;
|
||||
use Knuckles\Scribe\Attributes\Group;
|
||||
use Knuckles\Scribe\Attributes\Response;
|
||||
use Knuckles\Scribe\Attributes\ResponseFromApiResource;
|
||||
use Spatie\RouteAttributes\Attributes\Delete;
|
||||
use Spatie\RouteAttributes\Attributes\Get;
|
||||
use Spatie\RouteAttributes\Attributes\Middleware;
|
||||
use Spatie\RouteAttributes\Attributes\Post;
|
||||
use Spatie\RouteAttributes\Attributes\Prefix;
|
||||
|
||||
#[Prefix('api/projects/{project}/servers/{server}/sites')]
|
||||
#[Middleware(['auth:sanctum', 'can-see-project'])]
|
||||
#[Group(name: 'sites')]
|
||||
class SiteController extends Controller
|
||||
{
|
||||
#[Get('/', name: 'api.projects.servers.sites', middleware: 'ability:read')]
|
||||
#[Endpoint(title: 'list', description: 'Get all sites.')]
|
||||
#[ResponseFromApiResource(SiteResource::class, Site::class, collection: true, paginate: 25)]
|
||||
public function index(Project $project, Server $server): ResourceCollection
|
||||
{
|
||||
$this->authorize('viewAny', [Site::class, $server]);
|
||||
|
||||
$this->validateRoute($project, $server);
|
||||
|
||||
return SiteResource::collection($server->sites()->simplePaginate(25));
|
||||
}
|
||||
|
||||
#[Post('/', name: 'api.projects.servers.sites.create', middleware: 'ability:write')]
|
||||
#[Endpoint(title: 'create', description: 'Create a new site.')]
|
||||
#[BodyParam(name: 'type', required: true, enum: [SiteType::PHP, SiteType::PHP_BLANK, SiteType::PHPMYADMIN, SiteType::LARAVEL, SiteType::WORDPRESS])]
|
||||
#[BodyParam(name: 'domain', required: true)]
|
||||
#[BodyParam(name: 'aliases', type: 'array')]
|
||||
#[BodyParam(name: 'php_version', description: 'One of the installed PHP Versions', required: true, example: '7.4')]
|
||||
#[BodyParam(name: 'web_directory', description: 'Required for PHP and Laravel sites', example: 'public')]
|
||||
#[BodyParam(name: 'source_control', description: 'Source control ID, Required for Sites which support source control')]
|
||||
#[BodyParam(name: 'repository', description: 'Repository, Required for Sites which support source control', example: 'organization/repository')]
|
||||
#[BodyParam(name: 'branch', description: 'Branch, Required for Sites which support source control', example: 'main')]
|
||||
#[BodyParam(name: 'composer', type: 'boolean', description: 'Run composer if site supports composer', example: true)]
|
||||
#[BodyParam(name: 'version', description: 'Version, if the site type requires a version like PHPMyAdmin', example: '5.2.1')]
|
||||
#[ResponseFromApiResource(SiteResource::class, Site::class)]
|
||||
public function create(Request $request, Project $project, Server $server): SiteResource
|
||||
{
|
||||
$this->authorize('create', [Site::class, $server]);
|
||||
|
||||
$this->validateRoute($project, $server);
|
||||
|
||||
$this->validate($request, CreateSite::rules($server, $request->input()));
|
||||
|
||||
$site = app(CreateSite::class)->create($server, $request->all());
|
||||
|
||||
return new SiteResource($site);
|
||||
}
|
||||
|
||||
#[Get('{site}', name: 'api.projects.servers.sites.show', middleware: 'ability:read')]
|
||||
#[Endpoint(title: 'show', description: 'Get a site by ID.')]
|
||||
#[ResponseFromApiResource(SiteResource::class, Site::class)]
|
||||
public function show(Project $project, Server $server, Site $site): ServerResource
|
||||
{
|
||||
$this->authorize('view', [$site, $server]);
|
||||
|
||||
$this->validateRoute($project, $server, $site);
|
||||
|
||||
return new ServerResource($server);
|
||||
}
|
||||
|
||||
#[Delete('{site}', name: 'api.projects.servers.sites.delete', middleware: 'ability:write')]
|
||||
#[Endpoint(title: 'delete', description: 'Delete site.')]
|
||||
#[Response(status: 204)]
|
||||
public function delete(Project $project, Server $server, Site $site)
|
||||
{
|
||||
$this->authorize('delete', [$site, $server]);
|
||||
|
||||
$this->validateRoute($project, $server, $site);
|
||||
|
||||
$site->delete();
|
||||
|
||||
return response()->noContent();
|
||||
}
|
||||
|
||||
private function validateRoute(Project $project, Server $server, ?Site $site = null): void
|
||||
{
|
||||
if ($project->id !== $server->project_id) {
|
||||
abort(404, 'Server not found in project');
|
||||
}
|
||||
|
||||
if ($site && $site->server_id !== $server->id) {
|
||||
abort(404, 'Site not found in server');
|
||||
}
|
||||
}
|
||||
}
|
121
app/Http/Controllers/API/SourceControlController.php
Normal file
121
app/Http/Controllers/API/SourceControlController.php
Normal file
@ -0,0 +1,121 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\API;
|
||||
|
||||
use App\Actions\SourceControl\ConnectSourceControl;
|
||||
use App\Actions\SourceControl\DeleteSourceControl;
|
||||
use App\Actions\SourceControl\EditSourceControl;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Resources\SourceControlResource;
|
||||
use App\Models\Project;
|
||||
use App\Models\SourceControl;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\ResourceCollection;
|
||||
use Knuckles\Scribe\Attributes\BodyParam;
|
||||
use Knuckles\Scribe\Attributes\Endpoint;
|
||||
use Knuckles\Scribe\Attributes\Group;
|
||||
use Knuckles\Scribe\Attributes\Response;
|
||||
use Knuckles\Scribe\Attributes\ResponseFromApiResource;
|
||||
use Spatie\RouteAttributes\Attributes\Delete;
|
||||
use Spatie\RouteAttributes\Attributes\Get;
|
||||
use Spatie\RouteAttributes\Attributes\Middleware;
|
||||
use Spatie\RouteAttributes\Attributes\Post;
|
||||
use Spatie\RouteAttributes\Attributes\Prefix;
|
||||
use Spatie\RouteAttributes\Attributes\Put;
|
||||
|
||||
#[Prefix('api/projects/{project}/source-controls')]
|
||||
#[Middleware(['auth:sanctum', 'can-see-project'])]
|
||||
#[Group(name: 'source-controls')]
|
||||
class SourceControlController extends Controller
|
||||
{
|
||||
#[Get('/', name: 'api.projects.source-controls', middleware: 'ability:read')]
|
||||
#[Endpoint(title: 'list')]
|
||||
#[ResponseFromApiResource(SourceControlResource::class, SourceControl::class, collection: true, paginate: 25)]
|
||||
public function index(Project $project): ResourceCollection
|
||||
{
|
||||
$this->authorize('viewAny', SourceControl::class);
|
||||
|
||||
$sourceControls = SourceControl::getByProjectId($project->id)->simplePaginate(25);
|
||||
|
||||
return SourceControlResource::collection($sourceControls);
|
||||
}
|
||||
|
||||
#[Post('/', name: 'api.projects.source-controls.create', middleware: 'ability:write')]
|
||||
#[Endpoint(title: 'create')]
|
||||
#[BodyParam(name: 'provider', description: 'The provider', required: true, enum: [\App\Enums\SourceControl::GITLAB, \App\Enums\SourceControl::GITHUB, \App\Enums\SourceControl::BITBUCKET])]
|
||||
#[BodyParam(name: 'name', description: 'The name of the storage provider.', required: true)]
|
||||
#[BodyParam(name: 'token', description: 'The token if provider requires api token')]
|
||||
#[BodyParam(name: 'url', description: 'The URL if the provider is Gitlab and it is self-hosted')]
|
||||
#[BodyParam(name: 'username', description: 'The username if the provider is Bitbucket')]
|
||||
#[BodyParam(name: 'password', description: 'The password if the provider is Bitbucket')]
|
||||
#[ResponseFromApiResource(SourceControlResource::class, SourceControl::class)]
|
||||
public function create(Request $request, Project $project): SourceControlResource
|
||||
{
|
||||
$this->authorize('create', SourceControl::class);
|
||||
|
||||
$this->validate($request, ConnectSourceControl::rules($request->all()));
|
||||
|
||||
$sourceControl = app(ConnectSourceControl::class)->connect(auth()->user(), $project, $request->all());
|
||||
|
||||
return new SourceControlResource($sourceControl);
|
||||
}
|
||||
|
||||
#[Get('{sourceControl}', name: 'api.projects.source-controls.show', middleware: 'ability:read')]
|
||||
#[Endpoint(title: 'show')]
|
||||
#[ResponseFromApiResource(SourceControlResource::class, SourceControl::class)]
|
||||
public function show(Project $project, SourceControl $sourceControl)
|
||||
{
|
||||
$this->authorize('view', $sourceControl);
|
||||
|
||||
$this->validateRoute($project, $sourceControl);
|
||||
|
||||
return new SourceControlResource($sourceControl);
|
||||
}
|
||||
|
||||
#[Put('{sourceControl}', name: 'api.projects.source-controls.update', middleware: 'ability:write')]
|
||||
#[Endpoint(title: 'update')]
|
||||
#[BodyParam(name: 'name', description: 'The name of the storage provider.', required: true)]
|
||||
#[BodyParam(name: 'token', description: 'The token if provider requires api token')]
|
||||
#[BodyParam(name: 'url', description: 'The URL if the provider is Gitlab and it is self-hosted')]
|
||||
#[BodyParam(name: 'username', description: 'The username if the provider is Bitbucket')]
|
||||
#[BodyParam(name: 'password', description: 'The password if the provider is Bitbucket')]
|
||||
#[BodyParam(name: 'global', description: 'Accessible in all projects', enum: [true, false])]
|
||||
#[ResponseFromApiResource(SourceControlResource::class, SourceControl::class)]
|
||||
public function update(Request $request, Project $project, SourceControl $sourceControl)
|
||||
{
|
||||
$this->authorize('update', $sourceControl);
|
||||
|
||||
$this->validateRoute($project, $sourceControl);
|
||||
|
||||
$this->validate($request, EditSourceControl::rules($sourceControl, $request->all()));
|
||||
|
||||
$sourceControl = app(EditSourceControl::class)->edit($sourceControl, $project, $request->all());
|
||||
|
||||
return new SourceControlResource($sourceControl);
|
||||
}
|
||||
|
||||
#[Delete('{sourceControl}', name: 'api.projects.source-controls.delete', middleware: 'ability:write')]
|
||||
#[Endpoint(title: 'delete')]
|
||||
#[Response(status: 204)]
|
||||
public function delete(Project $project, SourceControl $sourceControl)
|
||||
{
|
||||
$this->authorize('delete', $sourceControl);
|
||||
|
||||
$this->validateRoute($project, $sourceControl);
|
||||
|
||||
app(DeleteSourceControl::class)->delete($sourceControl);
|
||||
|
||||
return response()->noContent();
|
||||
}
|
||||
|
||||
private function validateRoute(Project $project, SourceControl $sourceControl): void
|
||||
{
|
||||
if (! $sourceControl->project_id) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($project->id !== $sourceControl->project_id) {
|
||||
abort(404, 'Source Control not found in project');
|
||||
}
|
||||
}
|
||||
}
|
116
app/Http/Controllers/API/StorageProviderController.php
Normal file
116
app/Http/Controllers/API/StorageProviderController.php
Normal file
@ -0,0 +1,116 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\API;
|
||||
|
||||
use App\Actions\StorageProvider\CreateStorageProvider;
|
||||
use App\Actions\StorageProvider\DeleteStorageProvider;
|
||||
use App\Actions\StorageProvider\EditStorageProvider;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Resources\StorageProviderResource;
|
||||
use App\Models\Project;
|
||||
use App\Models\StorageProvider;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\ResourceCollection;
|
||||
use Knuckles\Scribe\Attributes\BodyParam;
|
||||
use Knuckles\Scribe\Attributes\Endpoint;
|
||||
use Knuckles\Scribe\Attributes\Group;
|
||||
use Knuckles\Scribe\Attributes\Response;
|
||||
use Knuckles\Scribe\Attributes\ResponseFromApiResource;
|
||||
use Spatie\RouteAttributes\Attributes\Delete;
|
||||
use Spatie\RouteAttributes\Attributes\Get;
|
||||
use Spatie\RouteAttributes\Attributes\Middleware;
|
||||
use Spatie\RouteAttributes\Attributes\Post;
|
||||
use Spatie\RouteAttributes\Attributes\Prefix;
|
||||
use Spatie\RouteAttributes\Attributes\Put;
|
||||
|
||||
#[Prefix('api/projects/{project}/storage-providers')]
|
||||
#[Middleware(['auth:sanctum', 'can-see-project'])]
|
||||
#[Group(name: 'storage-providers')]
|
||||
class StorageProviderController extends Controller
|
||||
{
|
||||
#[Get('/', name: 'api.projects.storage-providers', middleware: 'ability:read')]
|
||||
#[Endpoint(title: 'list')]
|
||||
#[ResponseFromApiResource(StorageProviderResource::class, StorageProvider::class, collection: true, paginate: 25)]
|
||||
public function index(Project $project): ResourceCollection
|
||||
{
|
||||
$this->authorize('viewAny', StorageProvider::class);
|
||||
|
||||
$storageProviders = StorageProvider::getByProjectId($project->id)->simplePaginate(25);
|
||||
|
||||
return StorageProviderResource::collection($storageProviders);
|
||||
}
|
||||
|
||||
#[Post('/', name: 'api.projects.storage-providers.create', middleware: 'ability:write')]
|
||||
#[Endpoint(title: 'create')]
|
||||
#[BodyParam(name: 'provider', description: 'The provider (aws, linode, hetzner, digitalocean, vultr, ...)', required: true)]
|
||||
#[BodyParam(name: 'name', description: 'The name of the storage provider.', required: true)]
|
||||
#[BodyParam(name: 'token', description: 'The token if provider requires api token')]
|
||||
#[BodyParam(name: 'key', description: 'The key if provider requires key')]
|
||||
#[BodyParam(name: 'secret', description: 'The secret if provider requires key')]
|
||||
#[ResponseFromApiResource(StorageProviderResource::class, StorageProvider::class)]
|
||||
public function create(Request $request, Project $project): StorageProviderResource
|
||||
{
|
||||
$this->authorize('create', StorageProvider::class);
|
||||
|
||||
$this->validate($request, CreateStorageProvider::rules($request->all()));
|
||||
|
||||
$storageProvider = app(CreateStorageProvider::class)->create(auth()->user(), $project, $request->all());
|
||||
|
||||
return new StorageProviderResource($storageProvider);
|
||||
}
|
||||
|
||||
#[Get('{storageProvider}', name: 'api.projects.storage-providers.show', middleware: 'ability:read')]
|
||||
#[Endpoint(title: 'show')]
|
||||
#[ResponseFromApiResource(StorageProviderResource::class, StorageProvider::class)]
|
||||
public function show(Project $project, StorageProvider $storageProvider)
|
||||
{
|
||||
$this->authorize('view', $storageProvider);
|
||||
|
||||
$this->validateRoute($project, $storageProvider);
|
||||
|
||||
return new StorageProviderResource($storageProvider);
|
||||
}
|
||||
|
||||
#[Put('{storageProvider}', name: 'api.projects.storage-providers.update', middleware: 'ability:write')]
|
||||
#[Endpoint(title: 'update')]
|
||||
#[BodyParam(name: 'name', description: 'The name of the storage provider.', required: true)]
|
||||
#[BodyParam(name: 'global', description: 'Accessible in all projects', enum: [true, false])]
|
||||
#[ResponseFromApiResource(StorageProviderResource::class, StorageProvider::class)]
|
||||
public function update(Request $request, Project $project, StorageProvider $storageProvider)
|
||||
{
|
||||
$this->authorize('update', $storageProvider);
|
||||
|
||||
$this->validateRoute($project, $storageProvider);
|
||||
|
||||
$this->validate($request, EditStorageProvider::rules());
|
||||
|
||||
$storageProvider = app(EditStorageProvider::class)->edit($storageProvider, $project, $request->all());
|
||||
|
||||
return new StorageProviderResource($storageProvider);
|
||||
}
|
||||
|
||||
#[Delete('{storageProvider}', name: 'api.projects.storage-providers.delete', middleware: 'ability:write')]
|
||||
#[Endpoint(title: 'delete')]
|
||||
#[Response(status: 204)]
|
||||
public function delete(Project $project, StorageProvider $storageProvider)
|
||||
{
|
||||
$this->authorize('delete', $storageProvider);
|
||||
|
||||
$this->validateRoute($project, $storageProvider);
|
||||
|
||||
app(DeleteStorageProvider::class)->delete($storageProvider);
|
||||
|
||||
return response()->noContent();
|
||||
}
|
||||
|
||||
private function validateRoute(Project $project, StorageProvider $storageProvider): void
|
||||
{
|
||||
if (! $storageProvider->project_id) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($project->id !== $storageProvider->project_id) {
|
||||
abort(404, 'Storage provider not found in project');
|
||||
}
|
||||
}
|
||||
}
|
@ -5,9 +5,13 @@
|
||||
use App\Models\Server;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Validation\Rule;
|
||||
use Spatie\RouteAttributes\Attributes\Middleware;
|
||||
use Spatie\RouteAttributes\Attributes\Post;
|
||||
|
||||
#[Middleware('auth')]
|
||||
class ConsoleController extends Controller
|
||||
{
|
||||
#[Post('/{server}/console', name: 'servers.console.run')]
|
||||
public function run(Server $server, Request $request)
|
||||
{
|
||||
$this->authorize('update', $server);
|
||||
|
@ -62,5 +62,9 @@ class Kernel extends HttpKernel
|
||||
'signed' => \App\Http\Middleware\ValidateSignature::class,
|
||||
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
|
||||
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
|
||||
'abilities' => \Laravel\Sanctum\Http\Middleware\CheckAbilities::class,
|
||||
'ability' => \Laravel\Sanctum\Http\Middleware\CheckForAnyAbility::class,
|
||||
'has-project' => \App\Http\Middleware\HasProjectMiddleware::class,
|
||||
'can-see-project' => \App\Http\Middleware\CanSeeProjectMiddleware::class,
|
||||
];
|
||||
}
|
||||
|
@ -12,6 +12,6 @@ class Authenticate extends Middleware
|
||||
*/
|
||||
protected function redirectTo(Request $request): ?string
|
||||
{
|
||||
return $request->expectsJson() ? null : route('login');
|
||||
return $request->expectsJson() ? null : url('/');
|
||||
}
|
||||
}
|
||||
|
26
app/Http/Middleware/CanSeeProjectMiddleware.php
Normal file
26
app/Http/Middleware/CanSeeProjectMiddleware.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use App\Models\Project;
|
||||
use App\Models\User;
|
||||
use Closure;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class CanSeeProjectMiddleware
|
||||
{
|
||||
public function handle(Request $request, Closure $next)
|
||||
{
|
||||
/** @var User $user */
|
||||
$user = $request->user();
|
||||
|
||||
/** @var Project $project */
|
||||
$project = $request->route('project');
|
||||
|
||||
if (! $user->can('view', $project)) {
|
||||
abort(403, 'You do not have permission to view this project.');
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
}
|
32
app/Http/Middleware/HasProjectMiddleware.php
Normal file
32
app/Http/Middleware/HasProjectMiddleware.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use App\Models\User;
|
||||
use Closure;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class HasProjectMiddleware
|
||||
{
|
||||
public function handle(Request $request, Closure $next)
|
||||
{
|
||||
/** @var ?User $user */
|
||||
$user = $request->user();
|
||||
if (! $user) {
|
||||
return $next($request);
|
||||
}
|
||||
|
||||
if (! $user->currentProject) {
|
||||
if ($user->allProjects()->count() > 0) {
|
||||
$user->current_project_id = $user->projects->first()->id;
|
||||
$user->save();
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
|
||||
abort(403, 'You must have a project to access the panel.');
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
}
|
25
app/Http/Resources/CronJobResource.php
Normal file
25
app/Http/Resources/CronJobResource.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use App\Models\CronJob;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
/** @mixin CronJob */
|
||||
class CronJobResource extends JsonResource
|
||||
{
|
||||
public function toArray(Request $request): array
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'server_id' => $this->server_id,
|
||||
'command' => $this->command,
|
||||
'user' => $this->user,
|
||||
'frequency' => $this->frequency,
|
||||
'status' => $this->status,
|
||||
'created_at' => $this->created_at,
|
||||
'updated_at' => $this->updated_at,
|
||||
];
|
||||
}
|
||||
}
|
23
app/Http/Resources/DatabaseResource.php
Normal file
23
app/Http/Resources/DatabaseResource.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use App\Models\Database;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
/** @mixin Database */
|
||||
class DatabaseResource extends JsonResource
|
||||
{
|
||||
public function toArray(Request $request): array
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'server_id' => $this->server_id,
|
||||
'name' => $this->name,
|
||||
'status' => $this->status,
|
||||
'created_at' => $this->created_at,
|
||||
'updated_at' => $this->updated_at,
|
||||
];
|
||||
}
|
||||
}
|
25
app/Http/Resources/DatabaseUserResource.php
Normal file
25
app/Http/Resources/DatabaseUserResource.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use App\Models\DatabaseUser;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
/** @mixin DatabaseUser */
|
||||
class DatabaseUserResource extends JsonResource
|
||||
{
|
||||
public function toArray(Request $request): array
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'server_id' => $this->server_id,
|
||||
'username' => $this->username,
|
||||
'databases' => $this->databases,
|
||||
'host' => $this->host,
|
||||
'status' => $this->status,
|
||||
'created_at' => $this->created_at,
|
||||
'updated_at' => $this->updated_at,
|
||||
];
|
||||
}
|
||||
}
|
28
app/Http/Resources/FirewallRuleResource.php
Normal file
28
app/Http/Resources/FirewallRuleResource.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use App\Models\FirewallRule;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
/** @mixin FirewallRule */
|
||||
class FirewallRuleResource extends JsonResource
|
||||
{
|
||||
public function toArray(Request $request): array
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'server_id' => $this->server_id,
|
||||
'type' => $this->type,
|
||||
'protocol' => $this->protocol,
|
||||
'port' => $this->port,
|
||||
'source' => $this->source,
|
||||
'mask' => $this->mask,
|
||||
'note' => $this->note,
|
||||
'status' => $this->status,
|
||||
'created_at' => $this->created_at,
|
||||
'updated_at' => $this->updated_at,
|
||||
];
|
||||
}
|
||||
}
|
21
app/Http/Resources/ProjectResource.php
Normal file
21
app/Http/Resources/ProjectResource.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use App\Models\Project;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
/** @mixin Project */
|
||||
class ProjectResource extends JsonResource
|
||||
{
|
||||
public function toArray(Request $request): array
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'name' => $this->name,
|
||||
'created_at' => $this->created_at,
|
||||
'updated_at' => $this->updated_at,
|
||||
];
|
||||
}
|
||||
}
|
24
app/Http/Resources/ServerProviderResource.php
Normal file
24
app/Http/Resources/ServerProviderResource.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use App\Models\ServerProvider;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
/** @mixin ServerProvider */
|
||||
class ServerProviderResource extends JsonResource
|
||||
{
|
||||
public function toArray(Request $request): array
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'project_id' => $this->project_id,
|
||||
'global' => is_null($this->project_id),
|
||||
'name' => $this->profile,
|
||||
'provider' => $this->provider,
|
||||
'created_at' => $this->created_at,
|
||||
'updated_at' => $this->updated_at,
|
||||
];
|
||||
}
|
||||
}
|
42
app/Http/Resources/ServerResource.php
Normal file
42
app/Http/Resources/ServerResource.php
Normal file
@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use App\Models\Server;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
/** @mixin Server */
|
||||
class ServerResource extends JsonResource
|
||||
{
|
||||
public function toArray(Request $request): array
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'project_id' => $this->project_id,
|
||||
'user_id' => $this->user_id,
|
||||
'provider_id' => $this->provider_id,
|
||||
'name' => $this->name,
|
||||
'ssh_user' => $this->ssh_user,
|
||||
'ip' => $this->ip,
|
||||
'local_ip' => $this->local_ip,
|
||||
'port' => $this->port,
|
||||
'os' => $this->os,
|
||||
'type' => $this->type,
|
||||
'type_data' => $this->type_data,
|
||||
'provider' => $this->provider,
|
||||
'provider_data' => $this->provider_data,
|
||||
'public_key' => $this->public_key,
|
||||
'status' => $this->status,
|
||||
'auto_update' => $this->auto_update,
|
||||
'available_updates' => $this->available_updates,
|
||||
'security_updates' => $this->security_updates,
|
||||
'progress' => $this->progress,
|
||||
'progress_step' => $this->progress_step,
|
||||
'updates' => $this->updates,
|
||||
'last_update_check' => $this->last_update_check,
|
||||
'created_at' => $this->created_at,
|
||||
'updated_at' => $this->updated_at,
|
||||
];
|
||||
}
|
||||
}
|
28
app/Http/Resources/ServiceResource.php
Normal file
28
app/Http/Resources/ServiceResource.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use App\Models\Service;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
/** @mixin Service */
|
||||
class ServiceResource extends JsonResource
|
||||
{
|
||||
public function toArray(Request $request): array
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'server_id' => $this->server_id,
|
||||
'type' => $this->type,
|
||||
'type_data' => $this->type_data,
|
||||
'name' => $this->name,
|
||||
'version' => $this->version,
|
||||
'unit' => $this->unit,
|
||||
'status' => $this->status,
|
||||
'is_default' => $this->is_default,
|
||||
'created_at' => $this->created_at,
|
||||
'updated_at' => $this->updated_at,
|
||||
];
|
||||
}
|
||||
}
|
34
app/Http/Resources/SiteResource.php
Normal file
34
app/Http/Resources/SiteResource.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use App\Models\Site;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
/** @mixin Site */
|
||||
class SiteResource extends JsonResource
|
||||
{
|
||||
public function toArray(Request $request): array
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'server_id' => $this->server_id,
|
||||
'source_control_id' => $this->source_control_id,
|
||||
'type' => $this->type,
|
||||
'type_data' => $this->type_data,
|
||||
'domain' => $this->domain,
|
||||
'aliases' => $this->aliases,
|
||||
'web_directory' => $this->web_directory,
|
||||
'path' => $this->path,
|
||||
'php_version' => $this->php_version,
|
||||
'repository' => $this->repository,
|
||||
'branch' => $this->branch,
|
||||
'status' => $this->status,
|
||||
'port' => $this->port,
|
||||
'progress' => $this->progress,
|
||||
'created_at' => $this->created_at,
|
||||
'updated_at' => $this->updated_at,
|
||||
];
|
||||
}
|
||||
}
|
24
app/Http/Resources/SourceControlResource.php
Normal file
24
app/Http/Resources/SourceControlResource.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use App\Models\SourceControl;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
/** @mixin SourceControl */
|
||||
class SourceControlResource extends JsonResource
|
||||
{
|
||||
public function toArray(Request $request): array
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'project_id' => $this->project_id,
|
||||
'global' => is_null($this->project_id),
|
||||
'name' => $this->profile,
|
||||
'provider' => $this->provider,
|
||||
'created_at' => $this->created_at,
|
||||
'updated_at' => $this->updated_at,
|
||||
];
|
||||
}
|
||||
}
|
22
app/Http/Resources/SshKeyResource.php
Normal file
22
app/Http/Resources/SshKeyResource.php
Normal file
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use App\Models\SshKey;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
/** @mixin SshKey */
|
||||
class SshKeyResource extends JsonResource
|
||||
{
|
||||
public function toArray(Request $request): array
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'user' => $this->user_id ? new UserResource($this->user) : null,
|
||||
'name' => $this->name,
|
||||
'created_at' => $this->created_at,
|
||||
'updated_at' => $this->updated_at,
|
||||
];
|
||||
}
|
||||
}
|
24
app/Http/Resources/StorageProviderResource.php
Normal file
24
app/Http/Resources/StorageProviderResource.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use App\Models\StorageProvider;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
/** @mixin StorageProvider */
|
||||
class StorageProviderResource extends JsonResource
|
||||
{
|
||||
public function toArray(Request $request): array
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'project_id' => $this->project_id,
|
||||
'global' => is_null($this->project_id),
|
||||
'name' => $this->profile,
|
||||
'provider' => $this->provider,
|
||||
'created_at' => $this->created_at,
|
||||
'updated_at' => $this->updated_at,
|
||||
];
|
||||
}
|
||||
}
|
22
app/Http/Resources/UserResource.php
Normal file
22
app/Http/Resources/UserResource.php
Normal file
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
/** @mixin User */
|
||||
class UserResource extends JsonResource
|
||||
{
|
||||
public function toArray(Request $request): array
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'name' => $this->name,
|
||||
'email' => $this->email,
|
||||
'created_at' => $this->created_at,
|
||||
'updated_at' => $this->updated_at,
|
||||
];
|
||||
}
|
||||
}
|
23
app/Models/PersonalAccessToken.php
Normal file
23
app/Models/PersonalAccessToken.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Traits\HasTimezoneTimestamps;
|
||||
use Carbon\Carbon;
|
||||
use Laravel\Sanctum\PersonalAccessToken as SanctumPersonalAccessToken;
|
||||
|
||||
/**
|
||||
* @property int $id
|
||||
* @property string $tokenable_type
|
||||
* @property int $tokenable_id
|
||||
* @property string $name
|
||||
* @property string $token
|
||||
* @property array $abilities
|
||||
* @property Carbon $last_used_at
|
||||
* @property Carbon $created_at
|
||||
* @property Carbon $updated_at
|
||||
*/
|
||||
class PersonalAccessToken extends SanctumPersonalAccessToken
|
||||
{
|
||||
use HasTimezoneTimestamps;
|
||||
}
|
@ -16,6 +16,7 @@
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Illuminate\Support\Collection;
|
||||
use Laravel\Fortify\TwoFactorAuthenticatable;
|
||||
use Laravel\Sanctum\HasApiTokens;
|
||||
|
||||
/**
|
||||
* @property int $id
|
||||
@ -43,6 +44,7 @@
|
||||
*/
|
||||
class User extends Authenticatable implements FilamentUser
|
||||
{
|
||||
use HasApiTokens;
|
||||
use HasFactory;
|
||||
use HasTimezoneTimestamps;
|
||||
use Notifiable;
|
||||
@ -67,22 +69,6 @@ class User extends Authenticatable implements FilamentUser
|
||||
protected $appends = [
|
||||
];
|
||||
|
||||
public static function boot(): void
|
||||
{
|
||||
parent::boot();
|
||||
|
||||
static::created(function (User $user) {
|
||||
if ($user->projects()->count() === 0) {
|
||||
$user->createDefaultProject();
|
||||
$user->refresh();
|
||||
}
|
||||
if (! $user->currentProject) {
|
||||
$user->current_project_id = $user->projects()->first()->id;
|
||||
$user->save();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public function servers(): HasMany
|
||||
{
|
||||
return $this->hasMany(Server::class);
|
||||
@ -118,9 +104,19 @@ public function storageProvider(string $provider): HasOne
|
||||
return $this->hasOne(StorageProvider::class)->where('provider', $provider);
|
||||
}
|
||||
|
||||
public function allProjects(): Builder|BelongsToMany
|
||||
{
|
||||
if ($this->isAdmin()) {
|
||||
return Project::query();
|
||||
}
|
||||
|
||||
return $this->projects();
|
||||
}
|
||||
|
||||
public function projects(): BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(Project::class, 'user_project')->withTimestamps();
|
||||
return $this->belongsToMany(Project::class, 'user_project')
|
||||
->withTimestamps();
|
||||
}
|
||||
|
||||
public function currentProject(): HasOne
|
||||
|
42
app/Policies/PersonalAccessTokenPolicy.php
Normal file
42
app/Policies/PersonalAccessTokenPolicy.php
Normal file
@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
namespace App\Policies;
|
||||
|
||||
use App\Models\PersonalAccessToken;
|
||||
use App\Models\User;
|
||||
use Illuminate\Auth\Access\HandlesAuthorization;
|
||||
|
||||
class PersonalAccessTokenPolicy
|
||||
{
|
||||
use HandlesAuthorization;
|
||||
|
||||
public function viewAny(User $user): bool
|
||||
{
|
||||
return $user->isAdmin();
|
||||
}
|
||||
|
||||
public function view(User $user, PersonalAccessToken $personalAccessToken): bool
|
||||
{
|
||||
return $user->isAdmin();
|
||||
}
|
||||
|
||||
public function create(User $user): bool
|
||||
{
|
||||
return $user->isAdmin();
|
||||
}
|
||||
|
||||
public function update(User $user, PersonalAccessToken $personalAccessToken): bool
|
||||
{
|
||||
return $user->isAdmin();
|
||||
}
|
||||
|
||||
public function delete(User $user, PersonalAccessToken $personalAccessToken): bool
|
||||
{
|
||||
return $user->isAdmin();
|
||||
}
|
||||
|
||||
public function deleteMany(User $user): bool
|
||||
{
|
||||
return $user->isAdmin();
|
||||
}
|
||||
}
|
@ -2,14 +2,15 @@
|
||||
|
||||
namespace App\Policies;
|
||||
|
||||
use App\Models\Project;
|
||||
use App\Models\Server;
|
||||
use App\Models\User;
|
||||
|
||||
class ServerPolicy
|
||||
{
|
||||
public function viewAny(User $user): bool
|
||||
public function viewAny(User $user, Project $project): bool
|
||||
{
|
||||
return $user->isAdmin() || $user->currentProject?->users->contains($user);
|
||||
return $user->isAdmin() || $project->users->contains($user);
|
||||
}
|
||||
|
||||
public function view(User $user, Server $server): bool
|
||||
@ -17,9 +18,9 @@ public function view(User $user, Server $server): bool
|
||||
return $user->isAdmin() || $server->project->users->contains($user);
|
||||
}
|
||||
|
||||
public function create(User $user): bool
|
||||
public function create(User $user, Project $project): bool
|
||||
{
|
||||
return $user->isAdmin() || $user->currentProject?->users->contains($user);
|
||||
return $user->isAdmin() || $project->users->contains($user);
|
||||
}
|
||||
|
||||
public function update(User $user, Server $server): bool
|
||||
|
@ -12,26 +12,29 @@ class ServerProviderPolicy
|
||||
|
||||
public function viewAny(User $user): bool
|
||||
{
|
||||
return $user->isAdmin();
|
||||
return true;
|
||||
}
|
||||
|
||||
public function view(User $user, ServerProvider $serverProvider): bool
|
||||
{
|
||||
return $user->isAdmin();
|
||||
return $user->isAdmin() ||
|
||||
$user->id === $serverProvider->user_id ||
|
||||
$serverProvider->project_id === null ||
|
||||
$serverProvider->project?->users()->where('user_id', $user->id)->exists();
|
||||
}
|
||||
|
||||
public function create(User $user): bool
|
||||
{
|
||||
return $user->isAdmin();
|
||||
return true;
|
||||
}
|
||||
|
||||
public function update(User $user, ServerProvider $serverProvider): bool
|
||||
{
|
||||
return $user->isAdmin();
|
||||
return $user->isAdmin() || $user->id === $serverProvider->user_id;
|
||||
}
|
||||
|
||||
public function delete(User $user, ServerProvider $serverProvider): bool
|
||||
{
|
||||
return $user->isAdmin();
|
||||
return $user->isAdmin() || $user->id === $serverProvider->user_id;
|
||||
}
|
||||
}
|
||||
|
@ -5,9 +5,11 @@
|
||||
use App\Helpers\FTP;
|
||||
use App\Helpers\Notifier;
|
||||
use App\Helpers\SSH;
|
||||
use App\Models\PersonalAccessToken;
|
||||
use Illuminate\Http\Resources\Json\ResourceCollection;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Laravel\Fortify\Fortify;
|
||||
use Laravel\Sanctum\Sanctum;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
@ -33,5 +35,7 @@ public function boot(): void
|
||||
$this->app->bind('ftp', function () {
|
||||
return new FTP;
|
||||
});
|
||||
|
||||
Sanctum::usePersonalAccessTokenModel(PersonalAccessToken::class);
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,6 @@
|
||||
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\RateLimiter;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
class RouteServiceProvider extends ServiceProvider
|
||||
{
|
||||
@ -25,15 +24,6 @@ class RouteServiceProvider extends ServiceProvider
|
||||
public function boot(): void
|
||||
{
|
||||
$this->configureRateLimiting();
|
||||
|
||||
$this->routes(function () {
|
||||
Route::middleware('api')
|
||||
->prefix('api')
|
||||
->group(base_path('routes/api.php'));
|
||||
|
||||
Route::middleware('web')
|
||||
->group(base_path('routes/web.php'));
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use App\Http\Middleware\HasProjectMiddleware;
|
||||
use App\Web\Pages\Settings\Projects\Widgets\SelectProject;
|
||||
use Exception;
|
||||
use Filament\Facades\Filament;
|
||||
@ -102,6 +103,7 @@ public function panel(Panel $panel): Panel
|
||||
])
|
||||
->authMiddleware([
|
||||
Authenticate::class,
|
||||
HasProjectMiddleware::class,
|
||||
])
|
||||
->login()
|
||||
->spa()
|
||||
|
@ -24,8 +24,6 @@ public function uninstall(): void
|
||||
$this->getScript('supervisor/uninstall-supervisor.sh'),
|
||||
'uninstall-supervisor'
|
||||
);
|
||||
$status = $this->service->server->systemd()->status($this->service->unit);
|
||||
$this->service->validateInstall($status);
|
||||
$this->service->server->os()->cleanup();
|
||||
}
|
||||
|
||||
|
@ -21,11 +21,6 @@ public function createRules(array $input): array
|
||||
{
|
||||
return [
|
||||
'token' => 'required',
|
||||
'url' => [
|
||||
'nullable',
|
||||
'url:http,https',
|
||||
'ends_with:/',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
@ -36,6 +31,16 @@ public function createData(array $input): array
|
||||
];
|
||||
}
|
||||
|
||||
public function editRules(array $input): array
|
||||
{
|
||||
return $this->createRules($input);
|
||||
}
|
||||
|
||||
public function editData(array $input): array
|
||||
{
|
||||
return $this->createData($input);
|
||||
}
|
||||
|
||||
public function data(): array
|
||||
{
|
||||
// support for older data
|
||||
|
@ -14,6 +14,18 @@ class Gitlab extends AbstractSourceControlProvider
|
||||
|
||||
protected string $apiVersion = 'api/v4';
|
||||
|
||||
public function createRules(array $input): array
|
||||
{
|
||||
return [
|
||||
'token' => 'required',
|
||||
'url' => [
|
||||
'nullable',
|
||||
'url:http,https',
|
||||
'ends_with:/',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function connect(): bool
|
||||
{
|
||||
$res = Http::withToken($this->data()['token'])
|
||||
|
@ -8,6 +8,10 @@ public function createRules(array $input): array;
|
||||
|
||||
public function createData(array $input): array;
|
||||
|
||||
public function editRules(array $input): array;
|
||||
|
||||
public function editData(array $input): array;
|
||||
|
||||
public function data(): array;
|
||||
|
||||
public function connect(): bool;
|
||||
|
@ -38,12 +38,7 @@ function htmx(): HtmxResponse
|
||||
|
||||
function vito_version(): string
|
||||
{
|
||||
$version = exec('git describe --tags');
|
||||
if (str($version)->contains('-')) {
|
||||
return str($version)->before('-').' (dev)';
|
||||
}
|
||||
|
||||
return $version;
|
||||
return config('app.version');
|
||||
}
|
||||
|
||||
function convert_time_format($string): string
|
||||
|
13
app/Traits/Enum.php
Normal file
13
app/Traits/Enum.php
Normal file
@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace App\Traits;
|
||||
|
||||
trait Enum
|
||||
{
|
||||
public static function all(): array
|
||||
{
|
||||
$reflection = new \ReflectionClass(self::class);
|
||||
|
||||
return $reflection->getConstants();
|
||||
}
|
||||
}
|
@ -34,7 +34,7 @@ public static function getNavigationItemActiveRoutePattern(): string
|
||||
|
||||
public function mount(): void
|
||||
{
|
||||
$this->authorize('viewAny', Server::class);
|
||||
$this->authorize('viewAny', [Server::class, auth()->user()->currentProject]);
|
||||
}
|
||||
|
||||
public function getWidgets(): array
|
||||
@ -50,6 +50,8 @@ protected function getHeaderActions(): array
|
||||
'public_key' => get_public_key_content(),
|
||||
]);
|
||||
|
||||
$project = auth()->user()->currentProject;
|
||||
|
||||
return [
|
||||
\Filament\Actions\Action::make('read-the-docs')
|
||||
->label('Read the Docs')
|
||||
@ -60,7 +62,7 @@ protected function getHeaderActions(): array
|
||||
\Filament\Actions\Action::make('create')
|
||||
->label('Create a Server')
|
||||
->icon('heroicon-o-plus')
|
||||
->authorize('create', Server::class)
|
||||
->authorize('create', [Server::class, auth()->user()->currentProject])
|
||||
->modalWidth(MaxWidth::FiveExtraLarge)
|
||||
->slideOver()
|
||||
->form([
|
||||
@ -74,7 +76,7 @@ protected function getHeaderActions(): array
|
||||
$set('region', null);
|
||||
$set('plan', null);
|
||||
})
|
||||
->rules(fn ($get) => CreateServerAction::rules($get())['provider']),
|
||||
->rules(fn ($get) => CreateServerAction::rules($project, $get())['provider']),
|
||||
AlertField::make('alert')
|
||||
->warning()
|
||||
->message(__('servers.create.public_key_warning'))
|
||||
@ -82,7 +84,7 @@ protected function getHeaderActions(): array
|
||||
Select::make('server_provider')
|
||||
->visible(fn ($get) => $get('provider') !== ServerProvider::CUSTOM)
|
||||
->label('Server provider connection')
|
||||
->rules(fn ($get) => CreateServerAction::rules($get())['server_provider'])
|
||||
->rules(fn ($get) => CreateServerAction::rules($project, $get())['server_provider'])
|
||||
->options(function ($get) {
|
||||
return \App\Models\ServerProvider::getByProjectId(auth()->user()->current_project_id)
|
||||
->where('provider', $get('provider'))
|
||||
@ -109,7 +111,7 @@ protected function getHeaderActions(): array
|
||||
->schema([
|
||||
Select::make('region')
|
||||
->label('Region')
|
||||
->rules(fn ($get) => CreateServerAction::rules($get())['region'])
|
||||
->rules(fn ($get) => CreateServerAction::rules($project, $get())['region'])
|
||||
->live()
|
||||
->reactive()
|
||||
->options(function ($get) {
|
||||
@ -125,7 +127,7 @@ protected function getHeaderActions(): array
|
||||
->searchable(),
|
||||
Select::make('plan')
|
||||
->label('Plan')
|
||||
->rules(fn ($get) => CreateServerAction::rules($get())['plan'])
|
||||
->rules(fn ($get) => CreateServerAction::rules($project, $get())['plan'])
|
||||
->reactive()
|
||||
->options(function ($get) {
|
||||
if (! $get('server_provider') || ! $get('region')) {
|
||||
@ -162,15 +164,15 @@ protected function getHeaderActions(): array
|
||||
->visible(fn ($get) => $get('provider') === ServerProvider::CUSTOM),
|
||||
TextInput::make('name')
|
||||
->label('Name')
|
||||
->rules(fn ($get) => CreateServerAction::rules($get())['name']),
|
||||
->rules(fn ($get) => CreateServerAction::rules($project, $get())['name']),
|
||||
Grid::make()
|
||||
->schema([
|
||||
TextInput::make('ip')
|
||||
->label('SSH IP Address')
|
||||
->rules(fn ($get) => CreateServerAction::rules($get())['ip']),
|
||||
->rules(fn ($get) => CreateServerAction::rules($project, $get())['ip']),
|
||||
TextInput::make('port')
|
||||
->label('SSH Port')
|
||||
->rules(fn ($get) => CreateServerAction::rules($get())['port']),
|
||||
->rules(fn ($get) => CreateServerAction::rules($project, $get())['port']),
|
||||
])
|
||||
->visible(fn ($get) => $get('provider') === ServerProvider::CUSTOM),
|
||||
Grid::make()
|
||||
@ -178,7 +180,7 @@ protected function getHeaderActions(): array
|
||||
Select::make('os')
|
||||
->label('OS')
|
||||
->native(false)
|
||||
->rules(fn ($get) => CreateServerAction::rules($get())['os'])
|
||||
->rules(fn ($get) => CreateServerAction::rules($project, $get())['os'])
|
||||
->options(
|
||||
collect(config('core.operating_systems'))
|
||||
->mapWithKeys(fn ($value) => [$value => $value])
|
||||
@ -187,7 +189,7 @@ protected function getHeaderActions(): array
|
||||
->label('Server Type')
|
||||
->native(false)
|
||||
->selectablePlaceholder(false)
|
||||
->rules(fn ($get) => CreateServerAction::rules($get())['type'])
|
||||
->rules(fn ($get) => CreateServerAction::rules($project, $get())['type'])
|
||||
->options(
|
||||
collect(config('core.server_types'))
|
||||
->mapWithKeys(fn ($value) => [$value => $value])
|
||||
@ -200,7 +202,7 @@ protected function getHeaderActions(): array
|
||||
->label('Webserver')
|
||||
->native(false)
|
||||
->selectablePlaceholder(false)
|
||||
->rules(fn ($get) => CreateServerAction::rules($get())['webserver'] ?? [])
|
||||
->rules(fn ($get) => CreateServerAction::rules($project, $get())['webserver'] ?? [])
|
||||
->options(
|
||||
collect(config('core.webservers'))->mapWithKeys(fn ($value) => [$value => $value])
|
||||
),
|
||||
@ -208,7 +210,7 @@ protected function getHeaderActions(): array
|
||||
->label('Database')
|
||||
->native(false)
|
||||
->selectablePlaceholder(false)
|
||||
->rules(fn ($get) => CreateServerAction::rules($get())['database'] ?? [])
|
||||
->rules(fn ($get) => CreateServerAction::rules($project, $get())['database'] ?? [])
|
||||
->options(
|
||||
collect(config('core.databases_name'))
|
||||
->mapWithKeys(fn ($value, $key) => [
|
||||
@ -219,7 +221,7 @@ protected function getHeaderActions(): array
|
||||
->label('PHP')
|
||||
->native(false)
|
||||
->selectablePlaceholder(false)
|
||||
->rules(fn ($get) => CreateServerAction::rules($get())['php'] ?? [])
|
||||
->rules(fn ($get) => CreateServerAction::rules($project, $get())['php'] ?? [])
|
||||
->options(
|
||||
collect(config('core.php_versions'))
|
||||
->mapWithKeys(fn ($value) => [$value => $value])
|
||||
@ -229,7 +231,7 @@ protected function getHeaderActions(): array
|
||||
->modalSubmitActionLabel('Create')
|
||||
->action(function (array $data) {
|
||||
run_action($this, function () use ($data) {
|
||||
$server = app(CreateServerAction::class)->create(auth()->user(), $data);
|
||||
$server = app(CreateServerAction::class)->create(auth()->user(), auth()->user()->currentProject, $data);
|
||||
|
||||
$this->redirect(View::getUrl(['server' => $server]));
|
||||
});
|
||||
|
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