CreateAction Method

Description

Creates a new action.

HTTP Request

POST https://api.skeddly.com/api/Actions/

Body

The body is a JSON structure with the following properties.

actionType

Type of action to create.

Type: string

Valid Values: One of the codes listed in the Action Types table.

Required: Yes

comments

User notes for the action.

Type: string

Required: No

isEnabled

True to indicate that the action is executable. False otherwise.

Type: boolean

Required: No

Default: false

isTriggerBySns

True to indicate that the action should be triggerable by an SNS topic.

Type: boolean

Required: No

Default: false

name

Name of the action.

Type: string

Required: Yes

parameters

Additional action parameters specific to the action type.

Type: ActionParameters object.

Required: Yes

projectId

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

Type: string

Required: Recommended for future compatability

Default Value: The account's default project.

schedule

Schedule for the action.

Type: ActionSchedule object

Required: Yes

tags

Tags for the action.

Type: array of string

Required: No

Returns

An Action object.

Sample Request

POST /api/Actions/ HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>

{
    "name": "My action",
    "actionType": "amazon-backup-ec2-instances",
    "isEnabled": true,
    "schedule": {
        "scheduleType": "daily",
        "startDate": "2018-02-26",
        "timeOfDay": "12:05:00",
        "endDate": "2018-02-28",
        "timeZoneId": "Eastern Standard Time",
        "parameters": {
            "days": [
                "monday", "friday"
            ]
        }
    },
    "parameters": {    
        "credentialIds": [ "cred-4d1a201c" ],
        "regionNames": [ "us-east-1" ],

        "instanceIdentificationMethod": "all-instances",
        "ConsistencyMethod": "none",
        "Description": "backups-$(DATE)"
    }
}

Sample Response

{
    "actionId": "a-00000001",
    "actionType": "amazon-backup-ec2-instances",
    "actionVersionId": "av-00000001",
    "isCurrentVersion": true,
    "isEnabled": true,
    "lastModifiedBy": "u-00000001",
    "lastModifiedDate": "2016-06-09T12:21:00Z",
    "name": "My action",
    "nextExecutionDate": "2016-06-10T12:23:00Z",
    "schedule": {
        "scheduleType": "daily",
        "startDate": "2016-06-10",
        "timeOfDay": "12:23:00",
        "timeZoneId": "Eastern Standard Time",
        "parameters": {
            "days": [
                "monday",
                "friday"
            ]
        }
    },
    "parameters": {    
        "credentialIds": [ "cred-4d1a201c" ],
        "regionNames": [ "us-east-1" ],

        "instanceIdentificationMethod": "all-instances",
        "ConsistencyMethod": "none",
        "Description": "backups-$(DATE)"
    }
}

Last updated