mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-08 01:12:34 +00:00
Add endpoint for reading and updating site .env file (#564)
* feat(api): Add endpoint for reading site .env file - Add GET /api/projects/{project}/servers/{server}/sites/{site}/env endpoint - Add feature tests with SSH mocking * added updating env * fix coding style * generate docs --------- Co-authored-by: Saeed Vaziry <mr.saeedvaziry@gmail.com>
This commit is contained in:
@ -41,7 +41,7 @@ endpoints:
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"data":[{"id":null,"project_id":null,"user_id":null,"provider_id":null,"name":"Marcelino Rodriguez","ssh_user":"vito","ip":"128.182.22.13","local_ip":"19.119.134.124","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":"Everardo Conn","ssh_user":"vito","ip":"62.215.59.124","local_ip":"32.153.141.12","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}}'
|
||||
content: '{"data":[{"id":null,"project_id":null,"user_id":null,"provider_id":null,"name":"Miss Bonita Vandervort IV","ssh_user":"vito","ip":"120.222.195.212","local_ip":"138.119.37.248","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":"Dr. Shanie Batz IV","ssh_user":"vito","ip":"241.88.138.163","local_ip":"138.226.232.93","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: []
|
||||
@ -49,7 +49,7 @@ endpoints:
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 8V6gP6cZk143he5EadfbDva'
|
||||
- 'Bearer Pg1Vk6cvadD8eb3ZhaEf564'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
@ -91,7 +91,7 @@ endpoints:
|
||||
name: provider
|
||||
description: 'The server provider type'
|
||||
required: true
|
||||
example: ut
|
||||
example: fugiat
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
@ -101,7 +101,7 @@ endpoints:
|
||||
name: server_provider
|
||||
description: 'If the provider is not custom, the ID of the server provider profile'
|
||||
required: true
|
||||
example: hetzner
|
||||
example: digitalocean
|
||||
type: string
|
||||
enumValues:
|
||||
- custom
|
||||
@ -116,7 +116,7 @@ endpoints:
|
||||
name: region
|
||||
description: 'Provider region if the provider is not custom'
|
||||
required: true
|
||||
example: consectetur
|
||||
example: itaque
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
@ -136,7 +136,7 @@ endpoints:
|
||||
name: ip
|
||||
description: 'SSH IP address if the provider is custom'
|
||||
required: true
|
||||
example: quisquam
|
||||
example: ut
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
@ -146,7 +146,7 @@ endpoints:
|
||||
name: port
|
||||
description: 'SSH Port if the provider is custom'
|
||||
required: true
|
||||
example: sapiente
|
||||
example: reiciendis
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
@ -156,7 +156,7 @@ endpoints:
|
||||
name: name
|
||||
description: 'The name of the server.'
|
||||
required: true
|
||||
example: itaque
|
||||
example: et
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
@ -166,7 +166,7 @@ endpoints:
|
||||
name: os
|
||||
description: 'The os of the server'
|
||||
required: true
|
||||
example: aut
|
||||
example: vel
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
@ -188,7 +188,7 @@ endpoints:
|
||||
name: database
|
||||
description: Database
|
||||
required: true
|
||||
example: postgresql13
|
||||
example: mysql80
|
||||
type: string
|
||||
enumValues:
|
||||
- none
|
||||
@ -209,7 +209,7 @@ endpoints:
|
||||
name: php
|
||||
description: 'PHP version'
|
||||
required: true
|
||||
example: '7.4'
|
||||
example: '7.2'
|
||||
type: string
|
||||
enumValues:
|
||||
- '7.0'
|
||||
@ -225,22 +225,22 @@ endpoints:
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
provider: ut
|
||||
server_provider: hetzner
|
||||
region: consectetur
|
||||
provider: fugiat
|
||||
server_provider: digitalocean
|
||||
region: itaque
|
||||
plan: voluptatum
|
||||
ip: quisquam
|
||||
port: sapiente
|
||||
name: itaque
|
||||
os: aut
|
||||
ip: ut
|
||||
port: reiciendis
|
||||
name: et
|
||||
os: vel
|
||||
webserver: nginx
|
||||
database: postgresql13
|
||||
php: '7.4'
|
||||
database: mysql80
|
||||
php: '7.2'
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"project_id":null,"user_id":null,"provider_id":null,"name":"Sidney Grant","ssh_user":"vito","ip":"22.232.10.97","local_ip":"107.107.187.150","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}'
|
||||
content: '{"id":null,"project_id":null,"user_id":null,"provider_id":null,"name":"Jeromy Mann","ssh_user":"vito","ip":"128.70.209.89","local_ip":"150.217.250.187","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: []
|
||||
@ -248,7 +248,7 @@ endpoints:
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer Pg86vcedaD3V5EbZh4a61fk'
|
||||
- 'Bearer 5E61e4vfcgDbVkZd68aah3P'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
@ -302,7 +302,7 @@ endpoints:
|
||||
responses:
|
||||
-
|
||||
status: 200
|
||||
content: '{"id":null,"project_id":null,"user_id":null,"provider_id":null,"name":"Maria Zemlak","ssh_user":"vito","ip":"4.166.233.247","local_ip":"92.197.44.184","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}'
|
||||
content: '{"id":null,"project_id":null,"user_id":null,"provider_id":null,"name":"Miss Maya Schaden I","ssh_user":"vito","ip":"44.57.83.39","local_ip":"46.22.92.58","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: []
|
||||
@ -310,7 +310,7 @@ endpoints:
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer ka4ebad163EchfgV6v8ZP5D'
|
||||
- 'Bearer hV3debf65aPD4E1ckag8Z6v'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
@ -372,7 +372,7 @@ endpoints:
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer VP68EZbe351gf64avDdhkac'
|
||||
- 'Bearer b61aD6538PacZEkeghfvV4d'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
@ -434,7 +434,7 @@ endpoints:
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 64dDea1v3g6aVZc5b8fEkPh'
|
||||
- 'Bearer dEZaa6cePVf3k86g45vbD1h'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
@ -496,7 +496,7 @@ endpoints:
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 5Pg3vec6Zbh1f8VD6Ea4dak'
|
||||
- 'Bearer 6aDkZEfdP16V58gb43avhec'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
|
Reference in New Issue
Block a user