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

393 lines
10 KiB
YAML

## Autogenerated by Scribe. DO NOT MODIFY.
name: database-users
description: ''
endpoints:
-
httpMethods:
- GET
uri: 'api/projects/{project_id}/servers/{server_id}/database-users'
metadata:
groupName: database-users
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: list
description: 'Get all database users.'
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: []
cleanUrlParameters:
project_id: 1
server_id: 29
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"data":[{"id":null,"server_id":null,"username":"lehner.eloy","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null},{"id":null,"server_id":null,"username":"rlowe","databases":[],"host":"%","status":null,"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 3Da5E66PfZgdb81vkceah4V'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/projects/{project_id}/servers/{server_id}/database-users'
metadata:
groupName: database-users
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: create
description: 'Create a new database user.'
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: []
cleanUrlParameters:
project_id: 1
server_id: 29
queryParameters: []
cleanQueryParameters: []
bodyParameters:
username:
name: username
description: ''
required: true
example: voluptas
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
password:
name: password
description: ''
required: true
example: ':D+e=/;H,'
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
host:
name: host
description: 'Host, if it is a remote user.'
required: true
example: '%'
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanBodyParameters:
username: voluptas
password: ':D+e=/;H,'
host: '%'
fileParameters: []
responses:
-
status: 200
content: '{"id":null,"server_id":null,"username":"fahey.joseph","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer DvPa3c6f5Edbagh8kVe41Z6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/projects/{project_id}/servers/{server_id}/database-users/{databaseUser_id}'
metadata:
groupName: database-users
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: show
description: 'Get a database user by ID.'
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: []
databaseUser_id:
name: databaseUser_id
description: 'The ID of the databaseUser.'
required: true
example: 19
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 29
databaseUser_id: 19
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: '{"id":null,"server_id":null,"username":"szboncak","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer VvDgd431cbE68heZ5fa6kaP'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/projects/{project_id}/servers/{server_id}/database-users/{databaseUser_id}/link'
metadata:
groupName: database-users
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: link
description: 'Link to databases'
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: []
databaseUser_id:
name: databaseUser_id
description: 'The ID of the databaseUser.'
required: true
example: 11
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 29
databaseUser_id: 11
queryParameters: []
cleanQueryParameters: []
bodyParameters:
databases:
name: databases
description: 'Array of database names to link to the user.'
required: true
example: accusantium
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanBodyParameters:
databases: accusantium
fileParameters: []
responses:
-
status: 200
content: '{"id":null,"server_id":null,"username":"smith.liliana","databases":[],"host":"%","status":null,"created_at":null,"updated_at":null}'
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 1ZaahDcVeEvf6kd58P346gb'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- DELETE
uri: 'api/projects/{project_id}/servers/{server_id}/database-users/{databaseUser_id}'
metadata:
groupName: database-users
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: delete
description: 'Delete database user.'
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: []
databaseUser_id:
name: databaseUser_id
description: 'The ID of the databaseUser.'
required: true
example: 18
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 29
databaseUser_id: 18
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 204
content: null
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g31ZcdV68bDfEaak54vePh'
controller: null
method: null
route: null
custom: []