Plans
List Plans
GET
/v1/organizations/plans/list
<Description of the endpoint>
Headers
Content-Type
application/json
Authorization
Bearer <token>
QueryString
action=list_plans
string
The action (will not be needed soon)
org_id
string
The Organization ID
Response
{
"status": 200,
"plans": [
{
"pauses": [
{
},
"id": "string",
"name": "string",
"schedule": {
"start": "string",
"duration": "string",
"timezone": "string",
"days": ["string", "string"]
}
],
"resources": number
}
]
}
Describe Plan
GET
/v1/organizations/plans/describe
<Description of the endpoint>
Headers
Content-Type
application/json
Authorization
Bearer <token>
QueryString
action=describe_plan
string
The action (will not be needed soon)
org_id
string
The Organization ID
plan_id
string
The Plan ID
Response
{
"status": 200,
"plan": {
"id": "string",
"name": "string",
"schedule": {
"duration": "string",
"start": "string",
"timezone": "string",
"days": ["M", "T", "X".....]
}
"resources": [
"id": "string",
"resource_name": "string",
"type": "string",
"status": "string",
"credential": "string",
"index": number
],
"dependencies": true/false,
"state": "string"
}
}
Create Plan
POST
/v1/organizations/plans/create?action=create_plan
<Description of the endpoint>
Headers
Content-Type
application/json
Authorization
Bearer <token>
Body
org_id
string
The Organization ID
name
string
Plan name
description
string
Description
timezone
string
UTC; UTC +1; etc
schedule
map
{
"days": ["M", "T", "X".....],
"duration": number,
"start": "string"
}
state
string
active / inactive
Response
{
"status": 200
}
Update Plan
POST
/organizations/plans/update?action=update_plan
<Description of the endpoint>
Headers
Content-Type
application/json
Authorization
Bearer <token>
Payload
org_id
string
The Organization ID
plan_id
string
The Plan ID
name
string
updates
map
{ "timezone": ,
"schedule": {
"days": [],
"duration": 1-23,
"start": 1-23,
} }
dependancy
bool
If the resources will respect a order and are dependant on the previous
state
string
The Plan State
Response
{
"state": 200
}
Add Resource
POST
/organizations/plans/resources/add?action=add_resource_to_plan
<Description of the endpoint>
Headers
Content-Type
application/json
Authorization
Bearer <token>
Payload
org_id
string
The Organization ID
plan_id
string
The Plan ID
resource
map
{ "resource_id": "string", "resource_name": "string", "instanceName": "string", "type": "string", "credential": "string", "status": "string", "reason": "string", "region": for AWS only (string), "resource_group": for Azure only (string) }
Response
{
"id": 1,
"name": "John",
"age": 30
}
Update Resources Order in Plan
POST
/organizations/plans/resources/change-order?action=update_order
<Description of the endpoint>
Headers
Content-Type
application/json
Authorization
Bearer <token>
Payload
org_id
string
The Organization ID
plan_id
string
The Plan ID
new_sorted_list
list
A sorted list of resources IDs
Response
{
"status": 200
}
Delete Resource
POST
/v1/organizations/plans/resources/remove?action=delete_resource
<Description of the endpoint>
Headers
Content-Type
application/json
Authorization
Bearer <token>
Payload
org_id
string
The Organization ID
plan_id
string
The Plan ID
resource_id
string
The Resource ID
Response
{
"status": 200
}
Update Resource
POST
/v1/organizations/plans/resources/update?action=update_resource_in_plan
<Description of the endpoint>
Headers
Content-Type
application/json
Authorization
Bearer <token>
Payload
org_id
string
The Organization ID
plan_id
string
The Plan ID
resource_id
string
The Resource ID
resource_name
string
The Resource Name
region
string
Optional, in case it is AWS
resource_group
string
Optional, in case it is Azure
status
string
Status
credential
string
The Credential ID
Response
{
"status": 200
}
Pause Plan
POST
/v1/organizations/plans/update?action=pause_plan
<Description of the endpoint>
Headers
Content-Type
application/json
Authorization
Bearer <token>
Payload
org_id
string
The Organization ID
plan_id
string
The Plan ID
pause_start
string
DD/MM/YYYY
pause_end
string
DD/MM/YYYY
reason
string
The reason
Response
{
"status": 200
}
Remove Plan Pause
POST
/v1/organizations/plans/update?action=remove_pause
<Description of the endpoint>
Headers
Content-Type
application/json
Authorization
Bearer <token>
Body
org_id
string
The Organization ID
plan_id
string
The Plan ID
pause_id
string
The Pause ID
Response
{
"status": 200
}
Last updated