# Read Workload

`GET /planning/people/{person_id}/workload` · Planning · server http://localhost:3000/api/v1

Send an API key with every call: `Authorization: Bearer tiko_…`. See https://docs.tiko.run/api-keys/.

The operation from the OpenAPI schema, with its schemas inlined:

```json
{
  "description": "A person's stages per week, from the Monday of `from`, as Settings shows them. A stage\non a board the key does not reach keeps only its dates.",
  "security": [
    {
      "API key": []
    }
  ],
  "parameters": [
    {
      "name": "person_id",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "title": "Person Id"
      }
    },
    {
      "name": "from",
      "in": "query",
      "required": false,
      "schema": {
        "anyOf": [
          {
            "type": "string",
            "format": "date"
          },
          {
            "type": "null"
          }
        ],
        "title": "From"
      }
    },
    {
      "name": "weeks",
      "in": "query",
      "required": false,
      "schema": {
        "type": "integer",
        "maximum": 26,
        "minimum": 1,
        "default": 12,
        "title": "Weeks"
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {
            "properties": {
              "person": {
                "properties": {
                  "id": {
                    "type": "string",
                    "title": "Id"
                  },
                  "name": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Name"
                  }
                },
                "type": "object",
                "required": [
                  "id",
                  "name"
                ],
                "title": "Named"
              },
              "weeks": {
                "items": {
                  "properties": {
                    "start": {
                      "type": "string",
                      "format": "date",
                      "title": "Start"
                    },
                    "stages": {
                      "type": "integer",
                      "title": "Stages"
                    },
                    "overlap": {
                      "type": "boolean",
                      "title": "Overlap"
                    },
                    "off": {
                      "type": "boolean",
                      "title": "Off"
                    }
                  },
                  "type": "object",
                  "required": [
                    "start",
                    "stages",
                    "overlap",
                    "off"
                  ],
                  "title": "WorkloadWeek"
                },
                "type": "array",
                "title": "Weeks"
              },
              "stages": {
                "items": {
                  "properties": {
                    "board": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "title": "Board"
                    },
                    "board_name": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "title": "Board Name"
                    },
                    "row": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "title": "Row"
                    },
                    "type": {
                      "anyOf": [
                        {
                          "properties": {
                            "id": {
                              "type": "string",
                              "title": "Id"
                            },
                            "name": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "title": "Name"
                            }
                          },
                          "type": "object",
                          "required": [
                            "id",
                            "name"
                          ],
                          "title": "Named"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "start": {
                      "type": "string",
                      "format": "date",
                      "title": "Start"
                    },
                    "end": {
                      "type": "string",
                      "format": "date",
                      "title": "End"
                    }
                  },
                  "type": "object",
                  "required": [
                    "board",
                    "board_name",
                    "row",
                    "type",
                    "start",
                    "end"
                  ],
                  "title": "StageLoad"
                },
                "type": "array",
                "title": "Stages"
              }
            },
            "type": "object",
            "required": [
              "person",
              "weeks",
              "stages"
            ],
            "title": "WorkloadOut"
          }
        }
      }
    },
    "401": {
      "description": "No key, or a key that stopped working",
      "content": {
        "application/json": {
          "schema": {
            "properties": {
              "error": {
                "properties": {
                  "code": {
                    "type": "string",
                    "title": "Code"
                  },
                  "message": {
                    "type": "string",
                    "title": "Message"
                  }
                },
                "type": "object",
                "required": [
                  "code",
                  "message"
                ],
                "title": "ErrorDetail"
              }
            },
            "type": "object",
            "required": [
              "error"
            ],
            "title": "Error",
            "description": "Every error of v1; clients must ignore codes they do not know."
          }
        }
      }
    },
    "403": {
      "description": "The key may not do this, or keys are switched off",
      "content": {
        "application/json": {
          "schema": {
            "properties": {
              "error": {
                "properties": {
                  "code": {
                    "type": "string",
                    "title": "Code"
                  },
                  "message": {
                    "type": "string",
                    "title": "Message"
                  }
                },
                "type": "object",
                "required": [
                  "code",
                  "message"
                ],
                "title": "ErrorDetail"
              }
            },
            "type": "object",
            "required": [
              "error"
            ],
            "title": "Error",
            "description": "Every error of v1; clients must ignore codes they do not know."
          }
        }
      }
    },
    "404": {
      "description": "Not found, or not among what the key reaches",
      "content": {
        "application/json": {
          "schema": {
            "properties": {
              "error": {
                "properties": {
                  "code": {
                    "type": "string",
                    "title": "Code"
                  },
                  "message": {
                    "type": "string",
                    "title": "Message"
                  }
                },
                "type": "object",
                "required": [
                  "code",
                  "message"
                ],
                "title": "ErrorDetail"
              }
            },
            "type": "object",
            "required": [
              "error"
            ],
            "title": "Error",
            "description": "Every error of v1; clients must ignore codes they do not know."
          }
        }
      }
    },
    "422": {
      "description": "The request does not match the schema",
      "content": {
        "application/json": {
          "schema": {
            "properties": {
              "error": {
                "properties": {
                  "code": {
                    "type": "string",
                    "title": "Code"
                  },
                  "message": {
                    "type": "string",
                    "title": "Message"
                  }
                },
                "type": "object",
                "required": [
                  "code",
                  "message"
                ],
                "title": "ErrorDetail"
              }
            },
            "type": "object",
            "required": [
              "error"
            ],
            "title": "Error",
            "description": "Every error of v1; clients must ignore codes they do not know."
          }
        }
      }
    },
    "429": {
      "description": "Over a budget; see Retry-After",
      "content": {
        "application/json": {
          "schema": {
            "properties": {
              "error": {
                "properties": {
                  "code": {
                    "type": "string",
                    "title": "Code"
                  },
                  "message": {
                    "type": "string",
                    "title": "Message"
                  }
                },
                "type": "object",
                "required": [
                  "code",
                  "message"
                ],
                "title": "ErrorDetail"
              }
            },
            "type": "object",
            "required": [
              "error"
            ],
            "title": "Error",
            "description": "Every error of v1; clients must ignore codes they do not know."
          }
        }
      }
    }
  }
}
```
