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:
Dimitar Yanakiev
2025-04-05 20:59:57 +03:00
committed by GitHub
parent 2a670146d8
commit e98e974e20
31 changed files with 2404 additions and 1395 deletions

View File

@ -52,7 +52,7 @@ endpoints:
responses:
-
status: 200
content: '{"data":[{"id":null,"server_id":null,"name":"conn.bridget","status":"ready","created_at":null,"updated_at":null},{"id":null,"server_id":null,"name":"aiden47","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":"&laquo; Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next &raquo;","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
content: '{"data":[{"id":null,"server_id":null,"name":"leffler.esther","status":"ready","created_at":null,"updated_at":null},{"id":null,"server_id":null,"name":"rhoda.rutherford","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":"&laquo; Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next &raquo;","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
headers: []
description: ''
custom: []
@ -60,7 +60,7 @@ endpoints:
auth:
- headers
- Authorization
- 'Bearer 5vVfe3hcg1akP6Z8ba64dDE'
- 'Bearer E1VdfegZah4k86b53Dc6Pva'
controller: null
method: null
route: null
@ -113,7 +113,7 @@ endpoints:
name: name
description: ''
required: true
example: vel
example: quisquam
type: string
enumValues: []
exampleWasSpecified: false
@ -123,7 +123,7 @@ endpoints:
name: charset
description: ''
required: true
example: qui
example: omnis
type: string
enumValues: []
exampleWasSpecified: false
@ -133,21 +133,21 @@ endpoints:
name: collation
description: ''
required: true
example: autem
example: at
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanBodyParameters:
name: vel
charset: qui
collation: autem
name: quisquam
charset: omnis
collation: at
fileParameters: []
responses:
-
status: 200
content: '{"id":null,"server_id":null,"name":"rodolfo.bradtke","status":"ready","created_at":null,"updated_at":null}'
content: '{"id":null,"server_id":null,"name":"csawayn","status":"ready","created_at":null,"updated_at":null}'
headers: []
description: ''
custom: []
@ -155,7 +155,7 @@ endpoints:
auth:
- headers
- Authorization
- 'Bearer 3gf6ahcav1kb546DZeE8PdV'
- 'Bearer PVgkZ35ca4afd1EbD8ehv66'
controller: null
method: null
route: null
@ -202,7 +202,7 @@ endpoints:
name: id
description: 'The ID of the database.'
required: true
example: 17
example: 8
type: integer
enumValues: []
exampleWasSpecified: false
@ -211,7 +211,7 @@ endpoints:
cleanUrlParameters:
project_id: 1
server_id: 29
id: 17
id: 8
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
@ -220,7 +220,7 @@ endpoints:
responses:
-
status: 200
content: '{"id":null,"server_id":null,"name":"rhane","status":"ready","created_at":null,"updated_at":null}'
content: '{"id":null,"server_id":null,"name":"sandrine43","status":"ready","created_at":null,"updated_at":null}'
headers: []
description: ''
custom: []
@ -228,7 +228,7 @@ endpoints:
auth:
- headers
- Authorization
- 'Bearer VEvk3dP685Zahcf6a41bgDe'
- 'Bearer EP64D8g51adf6hbceavVZ3k'
controller: null
method: null
route: null
@ -275,7 +275,7 @@ endpoints:
name: database_id
description: 'The ID of the database.'
required: true
example: 5
example: 8
type: integer
enumValues: []
exampleWasSpecified: false
@ -284,7 +284,7 @@ endpoints:
cleanUrlParameters:
project_id: 1
server_id: 29
database_id: 5
database_id: 8
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
@ -301,7 +301,7 @@ endpoints:
auth:
- headers
- Authorization
- 'Bearer dPZ8bga4DEh6V16ce35avfk'
- 'Bearer 8dgEk3Zv1eaVP66bDhf4ac5'
controller: null
method: null
route: null