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

273 lines
6.9 KiB
YAML

## Autogenerated by Scribe. DO NOT MODIFY.
name: redirects
description: ''
endpoints:
-
httpMethods:
- GET
uri: 'api/projects/{project_id}/servers/{server_id}/sites/{site_id}/redirects'
metadata:
groupName: redirects
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: index
description: 'Get all redirects.'
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: 29
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
site_id:
name: site_id
description: 'The ID of the site.'
required: true
example: 44
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 29
site_id: 44
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"data":[{"id":null,"site_id":null,"mode":307,"from":"ipsum","to":"http:\/\/fritsch.biz\/","status":"ready","created_at":null,"updated_at":null},{"id":null,"site_id":null,"mode":302,"from":"culpa","to":"http:\/\/www.huels.net\/aut-ut-ut-porro-non-rerum-voluptatum.html","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: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer cV16fevgEZhPadD43685akb'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/projects/{project_id}/servers/{server_id}/sites/{site_id}/redirects'
metadata:
groupName: redirects
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: create
description: 'Create a new redirect.'
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: 29
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
site_id:
name: site_id
description: 'The ID of the site.'
required: true
example: 44
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 29
site_id: 44
queryParameters: []
cleanQueryParameters: []
bodyParameters:
from:
name: from
description: ''
required: true
example: odit
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
to:
name: to
description: ''
required: true
example: incidunt
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
mode:
name: mode
description: ''
required: true
example: 301
type: string
enumValues:
- 301
- 302
- 307
- 308
exampleWasSpecified: false
nullable: false
custom: []
cleanBodyParameters:
from: odit
to: incidunt
mode: 301
fileParameters: []
responses:
-
status: 200
content: null
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer ZD45hPk638abev61EVcagdf'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- DELETE
uri: 'api/projects/{project_id}/servers/{server_id}/sites/{site_id}/redirects/{redirect_id}'
metadata:
groupName: redirects
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: delete
description: 'Delete a redirect.'
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: 29
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
site_id:
name: site_id
description: 'The ID of the site.'
required: true
example: 44
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
redirect_id:
name: redirect_id
description: 'The ID of the redirect.'
required: true
example: 9
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 29
site_id: 44
redirect_id: 9
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 204
content: null
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer Ec3fDgdbae615aPh8k6vV4Z'
controller: null
method: null
route: null
custom: []