This contains APIs to manage fixed schedules for the AutoStopping Rules.
Creates an AutoStopping rule to run resources based on the schedule.
successful operation
Invalid
curl -i -X POST \ 'https://app.harness.io/gateway/lw/api/accounts/{account_id}/schedules?cloud_account_id=string&accountIdentifier=string' \ -H 'Content-Type: */*' \ -H 'x-api-key: YOUR_API_KEY_HERE' \ -d '[object Object]'
{- "name": "string",
- "id": 0,
- "account": "string",
- "description": "string",
- "resources": [
- {
- "id": "string",
- "type": "autostop_rule"
}
], - "details": {
- "uptime": {
- "period": {
- "start": "2021-10-19T08:35:00.927Z",
- "end": "2021-10-19T08:37:58.927Z"
}, - "days": {
- "days": [
- 0
], - "all_day": true,
- "start_time": {
- "hour": 0,
- "min": 0
}, - "end_time": {
- "hour": 0,
- "min": 0
}
}
}, - "downtime": {
- "period": {
- "start": "2021-10-19T08:35:00.927Z",
- "end": "2021-10-19T08:37:58.927Z"
}, - "days": {
- "days": [
- 0
], - "all_day": true,
- "start_time": {
- "hour": 0,
- "min": 0
}, - "end_time": {
- "hour": 0,
- "min": 0
}
}
}, - "timezone": "string"
}
}
Deletes a fixed schedule for the given AutoStopping Rule.
read
write
) successful operation
curl -i -X DELETE \ 'https://app.harness.io/gateway/lw/api/accounts/{account_id}/schedules/{schedule_id}?accountIdentifier=string' \ -H 'x-api-key: YOUR_API_KEY_HERE'
{- "response": "string"
}
Returns all the AutoStopping Rule fixed schedules for the given identifier.
read
write
) successful operation
Invalid
curl -i -X GET \ 'https://app.harness.io/gateway/lw/api/accounts/{account_id}/schedules?cloud_account_id=string&accountIdentifier=string&res_id=string&res_type=autostop_rule' \ -H 'x-api-key: YOUR_API_KEY_HERE'
{- "response": [
- {
- "name": "string",
- "id": 0,
- "account": "string",
- "description": "string",
- "resources": [
- {
- "id": "string",
- "type": "autostop_rule"
}
], - "details": {
- "uptime": {
- "period": {
- "start": "2021-10-19T08:35:00.927Z",
- "end": "2021-10-19T08:37:58.927Z"
}, - "days": {
- "days": [
- 0
], - "all_day": true,
- "start_time": {
- "hour": 0,
- "min": 0
}, - "end_time": {
- "hour": 0,
- "min": 0
}
}
}, - "downtime": {
- "period": {
- "start": "2021-10-19T08:35:00.927Z",
- "end": "2021-10-19T08:37:58.927Z"
}, - "days": {
- "days": [
- 0
], - "all_day": true,
- "start_time": {
- "hour": 0,
- "min": 0
}, - "end_time": {
- "hour": 0,
- "min": 0
}
}
}, - "timezone": "string"
}
}
]
}