Dimitar Yanakiev e98e974e20
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>
2025-04-05 19:59:57 +02:00

261 lines
6.6 KiB
YAML

## Autogenerated by Scribe. DO NOT MODIFY.
name: projects
description: ''
endpoints:
-
httpMethods:
- GET
uri: api/projects
metadata:
groupName: projects
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: list
description: 'Get all projects.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"data":[{"id":3,"name":"Mr. Drake Nader","created_at":"2025-04-05T17:48:03.000000Z","updated_at":"2025-04-05T17:48:03.000000Z"},{"id":4,"name":"Wilhelmine Jacobson","created_at":"2025-04-05T17:48:03.000000Z","updated_at":"2025-04-05T17:48:03.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":"&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: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer fbPE6haeDZ8v1gV5ak463dc'
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: dignissimos
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanBodyParameters:
name: dignissimos
fileParameters: []
responses:
-
status: 200
content: '{"id":3,"name":"Pattie Cole","created_at":"2025-04-05T17:48:03.000000Z","updated_at":"2025-04-05T17:48:03.000000Z"}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6ZkedcEfa5V6Dv4ab8P3g1h'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/projects/{id}'
metadata:
groupName: projects
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: show
description: 'Get a project by ID.'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"id":3,"name":"Mr. Elias Bauch","created_at":"2025-04-05T17:48:03.000000Z","updated_at":"2025-04-05T17:48:03.000000Z"}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer P6ka4Zaefgh8Ec3dV15v6bD'
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: sunt
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanBodyParameters:
name: sunt
fileParameters: []
responses:
-
status: 200
content: '{"id":3,"name":"Elfrieda Jakubowski","created_at":"2025-04-05T17:48:03.000000Z","updated_at":"2025-04-05T17:48:03.000000Z"}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer ecaDZkf5E4vgP1V86d6hb3a'
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 h5gZ63DPVbcevE4faka86d1'
controller: null
method: null
route: null
custom: []