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

373 lines
9.8 KiB
YAML

## Autogenerated by Scribe. DO NOT MODIFY.
name: storage-providers
description: ''
endpoints:
-
httpMethods:
- GET
uri: 'api/projects/{project_id}/storage-providers'
metadata:
groupName: storage-providers
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: list
description: ''
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"data":[{"id":5,"project_id":null,"global":true,"name":"veritatis","provider":"ftp","created_at":"2025-04-05T17:48:03.000000Z","updated_at":"2025-04-05T17:48:03.000000Z"},{"id":6,"project_id":null,"global":true,"name":"voluptas","provider":"dropbox","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 fgh4eV31dP58kvaDEaZbc66'
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: ab
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
name:
name: name
description: 'The name of the storage provider.'
required: true
example: quo
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
token:
name: token
description: 'The token if provider requires api token'
required: true
example: in
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
key:
name: key
description: 'The key if provider requires key'
required: true
example: sunt
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
secret:
name: secret
description: 'The secret if provider requires key'
required: true
example: molestias
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanBodyParameters:
provider: ab
name: quo
token: in
key: sunt
secret: molestias
fileParameters: []
responses:
-
status: 200
content: '{"id":5,"project_id":null,"global":true,"name":"asperiores","provider":"dropbox","created_at":"2025-04-05T17:48:03.000000Z","updated_at":"2025-04-05T17:48:03.000000Z"}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer e584613dkZaPDEVvgcahbf6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/projects/{project_id}/storage-providers/{storageProvider_id}'
metadata:
groupName: storage-providers
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: show
description: ''
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
storageProvider_id:
name: storageProvider_id
description: 'The ID of the storageProvider.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
storageProvider_id: 3
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"id":5,"project_id":null,"global":true,"name":"ipsum","provider":"local","created_at":"2025-04-05T17:48:03.000000Z","updated_at":"2025-04-05T17:48:03.000000Z"}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer h6Zk6834dDce5fbPa1VvagE'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- PUT
uri: 'api/projects/{project_id}/storage-providers/{storageProvider_id}'
metadata:
groupName: storage-providers
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: update
description: ''
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
storageProvider_id:
name: storageProvider_id
description: 'The ID of the storageProvider.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
storageProvider_id: 3
queryParameters: []
cleanQueryParameters: []
bodyParameters:
name:
name: name
description: 'The name of the storage provider.'
required: true
example: voluptas
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: voluptas
global: true
fileParameters: []
responses:
-
status: 200
content: '{"id":5,"project_id":null,"global":true,"name":"minima","provider":"ftp","created_at":"2025-04-05T17:48:03.000000Z","updated_at":"2025-04-05T17:48:03.000000Z"}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer ak6fgd1Eba48chvPV3e5Z6D'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- DELETE
uri: 'api/projects/{project_id}/storage-providers/{storageProvider_id}'
metadata:
groupName: storage-providers
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: delete
description: ''
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
storageProvider_id:
name: storageProvider_id
description: 'The ID of the storageProvider.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
storageProvider_id: 3
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 204
content: null
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer PcaDbh6ZE4aV1e8fdv56k3g'
controller: null
method: null
route: null
custom: []