Weekly Schedules

Represents a weekly VM execution schedules. Associates Timespans events with different days of the week.

Attributes

This resource has no attributes

Relationships

  • monday - (List<Timespan>) List of timespan execution events. Each timespan defines the type of action to take at what time on this day of the week.
  • tuesday - (List<Timespan>) List of timespan execution events. Each timespan defines the type of action to take at what time on this day of the week.
  • wednesday - (List<Timespan>) List of timespan execution events. Each timespan defines the type of action to take at what time on this day of the week.
  • thursday - (List<Timespan>) List of timespan execution events. Each timespan defines the type of action to take at what time on this day of the week.
  • friday - (List<Timespan>) List of timespan execution events. Each timespan defines the type of action to take at what time on this day of the week.
  • saturday - (List<Timespan>) List of timespan execution events. Each timespan defines the type of action to take at what time on this day of the week.
  • sunday - (List<Timespan>) List of timespan execution events. Each timespan defines the type of action to take at what time on this day of the week.

Operations

GET /weekly-schedules/:id

Retrieves a single Weekly Schedule based on a Weekly Schedule Id (:id)

{
    "links": {
        "self": "http://localhost:3000/weekly-schedules/59d31cde52fcc91f1e5a563c"
    },
    "data": {
        "type": "weekly-schedules",
        "id": "59d31cde52fcc91f1e5a563c",
        "attributes": {},
        "links": {
            "self": "https://api.vmpower.io/weekly-schedules/59d31cde52fcc91f1e5a563c"
        },
        "relationships": {
            "monday": {
                "data": [
                    {
                        "type": "timespans",
                        "id": "59d31cde52fcc91f1e5a5639"
                    }
                ],
                "links": {
                    "self": "https://api.vmpower.io/timespans/59d31cde52fcc91f1e5a5639"
                }
            },
            "tuesday": {
                "data": [],
                "links": {
                    "self": "https://api.vmpower.io//"
                }
            },
            "wednesday": {
                "data": [
                    {
                        "type": "timespans",
                        "id": "59d31cde52fcc91f1e5a563b"
                    }
                ],
                "links": {
                    "self": "https://api.vmpower.io/timespans/59d31cde52fcc91f1e5a563b"
                }
            },
            "thursday": {
                "data": [
                    {
                        "type": "timespans",
                        "id": "59d31cde52fcc91f1e5a563a"
                    }
                ],
                "links": {
                    "self": "https://api.vmpower.io/timespans/59d31cde52fcc91f1e5a563a"
                }
            },
            "friday": {
                "data": [],
                "links": {
                    "self": "https://api.vmpower.io//"
                }
            },
            "saturday": {
                "data": [],
                "links": {
                    "self": "https://api.vmpower.io//"
                }
            },
            "sunday": {
                "data": [],
                "links": {
                    "self": "https://api.vmpower.io//"
                }
            }
        }
    }
}

PATCH /weekly-schedule/:id

Updates an existing VM Schedule with the Id of id

Sample Request Body:

{
    "links": {
        "self": "http://localhost:3000/weekly-schedules/59d31cde52fcc91f1e5a563c"
    },
    "data": {
        "type": "weekly-schedules",
        "id": "59d31cde52fcc91f1e5a563c",
        "attributes": {},
        "links": {
            "self": "https://api.vmpower.io/weekly-schedules/59d31cde52fcc91f1e5a563c"
        },
        "relationships": {
            "monday": {
                "data": [
                    {
                        "type": "timespans",
                        "id": "59d31cde52fcc91f1e5a5639"
                    }
                ],
                "links": {
                    "self": "https://api.vmpower.io/timespans/59d31cde52fcc91f1e5a5639"
                }
            },
            "tuesday": {
                "data": [],
                "links": {
                    "self": "https://api.vmpower.io//"
                }
            },
            "wednesday": {
                "data": [
                    {
                        "type": "timespans",
                        "id": "59d31cde52fcc91f1e5a563b"
                    }
                ],
                "links": {
                    "self": "https://api.vmpower.io/timespans/59d31cde52fcc91f1e5a563b"
                }
            },
            "thursday": {
                "data": [
                    {
                        "type": "timespans",
                        "id": "59d31cde52fcc91f1e5a563a"
                    }
                ],
                "links": {
                    "self": "https://api.vmpower.io/timespans/59d31cde52fcc91f1e5a563a"
                }
            },
            "friday": {
                "data": [],
                "links": {
                    "self": "https://api.vmpower.io//"
                }
            },
            "saturday": {
                "data": [],
                "links": {
                    "self": "https://api.vmpower.io//"
                }
            },
            "sunday": {
                "data": [],
                "links": {
                    "self": "https://api.vmpower.io//"
                }
            }
        }
    }
}

POST /weekly-schedule

Creates a new VM Schedule with automation events on every Monday, Wednesday and Thursday.

Sample Request Body:

{
    "data": {
        "type": "weekly-schedules",
        "attributes": {},
        "relationships": {
            "monday": {
                "data": [
                    {
                        "type": "timespans",
                        "id": "59d31cde52fcc91f1e5a5639"
                    }
                ]
            },
            "tuesday": {
                "data": []
            },
            "wednesday": {
                "data": [
                    {
                        "type": "timespans",
                        "id": "59d31cde52fcc91f1e5a563b"
                    }
                ]
            },
            "thursday": {
                "data": [
                    {
                        "type": "timespans",
                        "id": "59d31cde52fcc91f1e5a563a"
                    }
                ]
            },
            "friday": {
                "data": []
            },
            "saturday": {
                "data": []
            },
            "sunday": {
                "data": []
            }
        }
    }
}