CreateManagedServicesPlan Method

Description

Creates a Managed Services Plan.

HTTP Request

POST https://api.skeddly.com/api/ManagedServices/Plans/

Body

The body is a JSON structure with the following properties.

isEnabled

Indicates whether the plan is enabled.

Type: bool

Required: No

Default Value: false

name

Friendly name for the plan.

Type: string

Required: Yes

parameters

Additional parameters for the plan. The object value is dependent on the value of planType.

Type: ManagedServicesPlanParameters object.

Required: Yes

planType

Type of plan being registered.

Type: string

Required: Yes

Valid Values:

  • backup-plan

  • start-stop-plan

projectId

The ID of the project in which to create the plan.

Type: string

Required: Recommended for future compatability

Default Value: The account's default project.

schedule

Indicates the schedule for the plan

Type: ManagedServicesPlanSchedule object.

Required: Yes

Returns

A ManagedServicesPlan object.

Sample Request

POST /api/ManagedServices/Plans HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
Content-Type: application/json

{
    "projectId": "proj-00000001",
    "planType": "start-stop-plan",
    "name": "Start Development Environment",
    "isEnabled": true,
    
    "schedule": {
        "scheduleType": "daily",
        "timeOfDay": "08:00:00",
        "timeZoneId": "Eastern Standard Time",
        "parameters": {
            "days": [
                "monday",
                "tuesday",
                "wednesday",
                "thursday",
                "friday"
            ]
        }
    },
    
    "parameters": {
        "startStopMode": "start-stop-combined",
        "stopTimeInSeconds": 43200
    }
}

Sample Response

{
    "planId": "plan-00000001",
    "projectId": "proj-00000001",
    "planType": "start-stop-plan",
    "name": "Start Development Environment",
    
    "state": "active",
    "isEnabled": true,
    "isDeleted": false,
    
    "createdDate": "2023-02-13T00:00:00Z",
    "lastModifiedDate": "2023-02-14T00:00:00Z",
    "lastModifiedBy": "u-00000001",
    
    "schedule": {
        "scheduleType": "daily",
        "timeOfDay": "08:00:00",
        "timeZoneId": "Eastern Standard Time",
        "parameters": {
            "days": [
                "monday",
                "tuesday",
                "wednesday",
                "thursday",
                "friday"
            ]
        }
    },
    
    "parameters": {
        "startStopMode": "start-stop-combined",
        "stopTimeInSeconds": 43200
    }
}

Last updated