Cloud Cost AutoStopping Fixed Schedules

This contains APIs to manage fixed schedules for the AutoStopping Rules.

Create a fixed schedule for an AutoStopping Rule

Creates an AutoStopping rule to run resources based on the schedule.

Request
Security:
ApiKey (readwrite)
path Parameters
account_id
required
string

Account Identifier for the Entity

query Parameters
cloud_account_id
required
string

Connector ID

accountIdentifier
required
string

Account Identifier for the Entity

Request Body schema: */*

Fixed schedule payload

object (FixedSchedule)
id
number
Responses
200

successful operation

400

Invalid

post/lw/api/accounts/{account_id}/schedules
Request samples
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]'
Response samples
application/json
{
  • "name": "string",
  • "id": 0,
  • "account": "string",
  • "description": "string",
  • "resources": [
    ],
  • "details": {
    }
}

Delete a fixed schedule for AutoStopping Rule.

Deletes a fixed schedule for the given AutoStopping Rule.

Request
Security:
ApiKey (readwrite)
path Parameters
account_id
required
string

Account Identifier for the Entity

schedule_id
required
number

ID of a fixed schedule added to an AutoStopping rule

query Parameters
accountIdentifier
required
string

Account Identifier for the Entity

Responses
200

successful operation

delete/lw/api/accounts/{account_id}/schedules/{schedule_id}
Request samples
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 samples
application/json
{
  • "response": "string"
}

Return all the AutoStopping Rule fixed schedules

Returns all the AutoStopping Rule fixed schedules for the given identifier.

Request
Security:
ApiKey (readwrite)
path Parameters
account_id
required
string

Account Identifier for the Entity

query Parameters
cloud_account_id
required
string

Connector ID

accountIdentifier
required
string

Account Identifier for the Entity

res_id
required
string

IDs of resources whose fixed schedules are to be fetched. This can be an AutoStopping rule ID if the res_type is "autostop_rule"

res_type
required
string

Type of resource to which schedules are attached

Value: "autostop_rule"
Responses
200

successful operation

400

Invalid

get/lw/api/accounts/{account_id}/schedules
Request samples
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 samples
application/json
{
  • "response": [
    ]
}