/script/add/postgresql
Add user script
Request
HTTP Method: POST
Content Type: application/json
Parameters
Property | Type | Description | Required |
---|---|---|---|
| integer(int64) | configuration ID (non-negative) | required |
| string | host name to add script for | required |
| string | script to add |
|
{
"params": {
"configuration_id": 1,
"host": "string",
"script": "string"
}
}
Response
HTTP Status: 200
Content Type: application/json
Response
Property | Type | Description |
---|---|---|
| object of type | error response |
| object of type | response of adding user scripts |
| boolean | response with error or not |
error_response
Property | Type | Description |
---|---|---|
| string | error message |
script_add_response
Property | Type | Description |
---|---|---|
| map of array of | map from host name to list of user scripts; host names are the primary and standby hosts for the configuration |
| string | included if the added script could not be validated |
user_script
Property | Type | Description |
---|---|---|
| string | full path to the script |
{
"error": {
"message": "string"
},
"result": {
"scripts_by_host": {
"host_name1": [
{
"script": "string"
}
],
"host_name2": [
{
"script": "string"
}
]
},
"warning": "string"
},
"successful": true
}
HTTP Status: 400
Content Type: application/json
Response
Property | Type | Description |
---|---|---|
| object of type | error response |
| boolean | always false |
error_response
Property | Type | Description |
---|---|---|
| string | error message |
{
"error": {
"message": "string"
},
"successful": false
}