Dimitar Yanakiev 7882d2022c
Add endpoint for reading & updating site deployment script (#562)
* feat(api): Add endpoint for updating site deployment script

- Add PUT /api/projects/{project}/servers/{server}/sites/{site}/deployment-script endpoint
- Add feature tests for successful and failed updates

* added reading deployment script as well

* generate docs

---------

Co-authored-by: Saeed Vaziry <mr.saeedvaziry@gmail.com>
2025-03-29 21:49:28 +01:00

371 lines
9.8 KiB
YAML

name: server-providers
description: ''
endpoints:
-
httpMethods:
- GET
uri: 'api/projects/{project_id}/server-providers'
metadata:
groupName: server-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":3,"project_id":null,"global":true,"name":"quaerat","provider":"aws","created_at":"2025-03-29T20:43:56.000000Z","updated_at":"2025-03-29T20:43:56.000000Z"},{"id":4,"project_id":null,"global":true,"name":"quas","provider":"vultr","created_at":"2025-03-29T20:43:56.000000Z","updated_at":"2025-03-29T20:43:56.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 aVP8e63k5D6ab1vdgEc4Zhf'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/projects/{project_id}/server-providers'
metadata:
groupName: server-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: exercitationem
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
name:
name: name
description: 'The name of the server provider.'
required: true
example: similique
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
token:
name: token
description: 'The token if provider requires api token'
required: true
example: nisi
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
key:
name: key
description: 'The key if provider requires key'
required: true
example: tempora
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
secret:
name: secret
description: 'The secret if provider requires key'
required: true
example: earum
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanBodyParameters:
provider: exercitationem
name: similique
token: nisi
key: tempora
secret: earum
fileParameters: []
responses:
-
status: 200
content: '{"id":3,"project_id":null,"global":true,"name":"iure","provider":"hetzner","created_at":"2025-03-29T20:43:56.000000Z","updated_at":"2025-03-29T20:43:56.000000Z"}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer b6DZavf4c3gk8PEda1e5hV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/projects/{project_id}/server-providers/{serverProvider_id}'
metadata:
groupName: server-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: []
serverProvider_id:
name: serverProvider_id
description: 'The ID of the serverProvider.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
serverProvider_id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"id":3,"project_id":null,"global":true,"name":"et","provider":"vultr","created_at":"2025-03-29T20:43:56.000000Z","updated_at":"2025-03-29T20:43:56.000000Z"}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6b6aVEPkfvZ81c3dD5ea4hg'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- PUT
uri: 'api/projects/{project_id}/server-providers/{serverProvider_id}'
metadata:
groupName: server-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: []
serverProvider_id:
name: serverProvider_id
description: 'The ID of the serverProvider.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
serverProvider_id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters:
name:
name: name
description: 'The name of the server provider.'
required: true
example: porro
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
global:
name: global
description: 'Accessible in all projects'
required: true
example: false
type: string
enumValues:
- true
- false
exampleWasSpecified: false
nullable: false
custom: []
cleanBodyParameters:
name: porro
global: false
fileParameters: []
responses:
-
status: 200
content: '{"id":3,"project_id":null,"global":true,"name":"aliquam","provider":"hetzner","created_at":"2025-03-29T20:43:56.000000Z","updated_at":"2025-03-29T20:43:56.000000Z"}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer fgVkbe8ZhPa1c4v5E6Da36d'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- DELETE
uri: 'api/projects/{project_id}/server-providers/{serverProvider_id}'
metadata:
groupName: server-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: []
serverProvider_id:
name: serverProvider_id
description: 'The ID of the serverProvider.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
serverProvider_id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 204
content: null
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 66Pfb5hE8gDVaZvkd1ec43a'
controller: null
method: null
route: null
custom: []