Skip to Content
Daemons

Update an existing Daemon

PUT
/daemons/{daemon_id}

Path Parameters

daemon_id*integer

The ID of the daemon.

Range1 <= value

Header Parameters

Accept*string

application/json

Authorization*string

Bearer {{access_token}}

Content-Type*string

application/json

Request Body

A JSON object containing the resource data

application/json
  1. body
id*integer

The unique ID of the given Daemon.

command*string

The command line to be executed to start the daemon. Must not be greater than 255 characters.

process_count*integer

The number of daemon process instances of the program to run simultaneously. Must be at least 1. Must not be greater than 99.

working_directory*|

The working directory where the Daemon command will be executed. If the Daemon is linked to an application, the path must be a relative path to the application root directory. If the Daemon is not linked to an application, the value must be an absolute path. Must start with one of / Must not be greater than 255 characters.

run_as_user*string

The name of the Unix user on behalf of which the daemon will run. Must not be greater than 60 characters.

name*string

The name entered by the user (or auto-generated by devopness) to uniquely identify the daemon. Must contain only letters, numbers, dashes and underscores. Must not be greater than 60 characters.

application_id?|

The ID of the application to be linked to the daemon. The value of working_directory will be relative to the application directory.

Response Body

No Content

Example Request
curl -X PUT 'https://api.devopness.com/daemons/123' \  -H 'Accept: application/json' \  -H 'Authorization: Bearer <your_api_token>' \  -H 'Content-Type: application/json' \  -H 'Content-Type: application/json' \  -d '{  "id": 1,  "command": "/usr/bin/example --parameter=%(ENV_VAR_TO_GET_PARAM_VALUE_FROM)s",  "process_count": 3,  "working_directory": "relative-path/within/application/folder",  "run_as_user": "root-of-all-evil",  "name": "we-all-have-daemons-inside"}'
Example Response
Empty