# Search

`POST /tasks/search` · Tasks · 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": "Tasks of one tracker, with the person's own credentials.",
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "properties": {
            "source": {
              "type": "string",
              "enum": [
                "jira",
                "demo",
                "caldav",
                "github",
                "linear"
              ],
              "title": "Source"
            },
            "query": {
              "type": "string",
              "maxLength": 2000,
              "title": "Query",
              "default": ""
            },
            "done": {
              "type": "boolean",
              "title": "Done",
              "default": false
            },
            "limit": {
              "anyOf": [
                {
                  "type": "integer",
                  "maximum": 100,
                  "minimum": 1
                },
                {
                  "type": "null"
                }
              ],
              "title": "Limit"
            }
          },
          "type": "object",
          "required": [
            "source"
          ],
          "title": "SearchIn"
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {
            "properties": {
              "tasks": {
                "items": {
                  "properties": {
                    "source": {
                      "type": "string",
                      "title": "Source"
                    },
                    "key": {
                      "type": "string",
                      "title": "Key"
                    },
                    "title": {
                      "type": "string",
                      "title": "Title"
                    },
                    "status": {
                      "type": "string",
                      "title": "Status"
                    },
                    "assignee": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "title": "Assignee"
                    },
                    "due": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "title": "Due"
                    },
                    "url": {
                      "type": "string",
                      "title": "Url"
                    },
                    "fetched_at": {
                      "type": "string",
                      "title": "Fetched At"
                    }
                  },
                  "type": "object",
                  "required": [
                    "source",
                    "key",
                    "title",
                    "status",
                    "assignee",
                    "due",
                    "url",
                    "fetched_at"
                  ],
                  "title": "FoundTask"
                },
                "type": "array",
                "title": "Tasks"
              },
              "total": {
                "type": "integer",
                "title": "Total"
              },
              "estimated": {
                "type": "boolean",
                "title": "Estimated",
                "default": false
              }
            },
            "type": "object",
            "required": [
              "tasks",
              "total"
            ],
            "title": "SearchOut"
          }
        }
      }
    },
    "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."
          }
        }
      }
    }
  },
  "security": [
    {
      "API key": []
    }
  ]
}
```
