# Get Calendar

Reads an automation date-rule calendar, its settings, dependencies and computed dates for a year. Defaults to the current year.

## Input schema:

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "minimum": 1
    },
    "year": {
      "type": [
        "null",
        "integer"
      ],
      "default": null,
      "minimum": 1971,
      "maximum": 9998
    },
    "accountId": {
      "type": [
        "null",
        "integer"
      ],
      "default": null,
      "minimum": 1
    }
  },
  "required": [
    "id"
  ],
  "additionalProperties": false
}
```

## Output schema:

```json
{
  "type": "object",
  "required": [
    "accountId",
    "id",
    "settings",
    "ui",
    "year",
    "dates",
    "editLink",
    "dependencies"
  ],
  "properties": {
    "accountId": {
      "type": "integer"
    },
    "id": {
      "type": "integer"
    },
    "settings": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "entries": {
          "type": "array",
          "items": {
            "type": "object",
            "description": "One entry rule with the fields of create-calendar entries."
          }
        },
        "countries": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "businessdays": {
          "type": "array",
          "items": {
            "type": [
              "integer",
              "string"
            ]
          }
        },
        "metalabels": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "ui": {
      "type": "object",
      "properties": {
        "id": {
          "type": [
            "integer",
            "string"
          ]
        },
        "name": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "entries": {
          "type": "array",
          "items": {
            "type": "object",
            "description": "One entry rule with the fields of create-calendar entries."
          }
        },
        "countries": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "businessdays": {
          "type": "array",
          "items": {
            "type": [
              "integer",
              "string"
            ]
          }
        },
        "holidays": {
          "type": "object",
          "description": "Holiday ID => holiday of the requested year; the IDs are what entries holidays accept."
        },
        "isEditable": {
          "type": "integer",
          "enum": [
            0,
            1
          ]
        },
        "metalabels": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "year": {
      "type": "integer"
    },
    "dates": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "integer",
              "string"
            ],
            "description": "ID of the entry that produced the date."
          },
          "name": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "format": "date"
          }
        }
      }
    },
    "editLink": {
      "type": "string"
    },
    "dependencies": {
      "type": [
        "object",
        "array"
      ],
      "description": "Empty list when nothing references the calendar; otherwise dependency category => automation ID => {id, type, name, editLink}."
    }
  }
}
```

