Update Cronjob
PATCH
/v1/cronjobs/{cronjobId}Update the details of a cronjob.
Request
Path Params
cronjobId
integer
required
Header Params
Accept
string
required
Example:
application/json
Content-Type
string
required
Example:
application/json
Body Params application/json
data
object
required
attributes
object
required
relationships
object
required
Example
{
"data": {
"attributes": {
"schedule": "* * * * *",
"command": "bash myscript.sh",
"comment": "my script",
"notifications": "none",
"active": false
},
"relationships": {
"environment": {
"data": {
"id": 1785,
"type": "environments"
}
}
}
}
}
Request samples
Responses
OK(200)
HTTP Code: 200
Content Type : JSONapplication/json
Data Schema
data
object
required
type
string
required
id
string
required
attributes
object
required
relationships
object
required
links
object
required
Example
{
"data": {
"type": "cronjobs",
"id": "283",
"attributes": {
"active": false,
"disabled": false,
"command": "bash myscript.sh",
"comment": "my script",
"schedule": "* * * * *",
"notifications": "none"
},
"relationships": {
"environment": {
"links": {
"related": "https://xxx/v1/environments/1785"
},
"data": {
"type": "environments",
"id": "1785"
}
}
},
"links": {
"self": "https://xxx/v1/cronjobs/283"
}
}
}
Modified at 4 months ago