{"files":{"SKILL.md":"---\nname: wega-api\ndescription: \"WeGA API skill. Use when working with WeGA for documents, search, code. Covers 10 endpoints.\"\nversion: 1.0.0\ngenerator: lapsh\n---\n\n# WeGA API\nAPI version: 1.0.0\n\n## Auth\nNo authentication required.\n\n## Base URL\nhttp://localhost:8080/exist/apps/WeGA-WebApp/api/v1\n\n## Setup\n1. No auth setup needed\n2. GET /documents -- lists all documents\n3. Explore available endpoints below\n\n## Endpoints\n10 endpoints across 5 groups. See references/api-spec.lap for full details.\n\n### Documents\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /documents | Lists all documents |\n| GET | /documents/{docID} | Returns documents by ID |\n| GET | /documents/findByDate | Finds documents by date |\n| GET | /documents/findByMention/{docID} | Finds documents by reference |\n| GET | /documents/findByAuthor/{authorID} | Finds documents by author |\n\n### Search\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /search/entity | Search for a WeGA entity |\n\n### Code\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /code/findByElement/{element} | Finds code samples by XML element |\n\n### Application\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /application/status | Get status information about the running WeGA-WebApp |\n| GET | /application/newID | Create a new WeGA ID |\n\n### Facets\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /facets/{facet} | Returns facets |\n\n## Common Questions\nMatch user requests to endpoints in references/api-spec.lap. Key patterns:\n- \"List all documents?\" -> GET /documents\n- \"Search entity?\" -> GET /search/entity\n- \"Get document details?\" -> GET /documents/{docID}\n- \"List all findByDate?\" -> GET /documents/findByDate\n- \"Get findByMention details?\" -> GET /documents/findByMention/{docID}\n- \"Get findByAuthor details?\" -> GET /documents/findByAuthor/{authorID}\n- \"Get findByElement details?\" -> GET /code/findByElement/{element}\n- \"List all status?\" -> GET /application/status\n- \"List all newID?\" -> GET /application/newID\n- \"Get facet details?\" -> GET /facets/{facet}\n\n## Response Tips\n- Check response schemas in references/api-spec.lap for field details\n- Paginated endpoints accept limit/offset or cursor parameters\n- Error responses include status codes and descriptions in the spec\n\n## References\n- Full spec: See references/api-spec.lap for complete endpoint details, parameter tables, and response schemas\n\n> Generated from the official API spec by [LAP](https://lap.sh)\n","references/api-spec.lap":"@lap v0.3\n# Machine-readable API spec. Each @endpoint block is one API call.\n@api WeGA API\n@base http://localhost:8080/exist/apps/WeGA-WebApp/api/v1\n@version 1.0.0\n@endpoints 10\n@toc documents(5), search(1), code(1), application(2), facets(1)\n\n@group documents\n@endpoint GET /documents\n@desc Lists all documents\n@optional {docType: any # The WeGA document type, offset: any # Position of first item to retrieve (starting from 1), limit: any # Number of items to retrieve (200 max)}\n@returns(200) An array of documents\n\n@endgroup\n\n@group search\n@endpoint GET /search/entity\n@desc Search for a WeGA entity\n@optional {docType: any # The WeGA document type, q: any # The query string, offset: any # Position of first item to retrieve (starting from 1), limit: any # Number of items to retrieve (200 max)}\n@returns(200) An array of documents\n\n@endgroup\n\n@group documents\n@endpoint GET /documents/{docID}\n@desc Returns documents by ID\n@required {docID: any # The document identifier to search for}\n@returns(200) An array of documents\n\n@endpoint GET /documents/findByDate\n@desc Finds documents by date\n@required {fromDate: any # The min date to search for}\n@optional {toDate: any # The max date to search for, docType: any # The WeGA document type, offset: any # Position of first item to retrieve (starting from 1), limit: any # Number of items to retrieve (200 max)}\n@returns(200) An array of documents\n\n@endpoint GET /documents/findByMention/{docID}\n@desc Finds documents by reference\n@required {docID: any # The document ID that is to be mentioned. Accepted ID formats are WeGA, e.g. A002068 or http://weber-gesamtausgabe.de/A002068, VIAF, e.g. http://viaf.org/viaf/14959938, or  GND, e.g. http://d-nb.info/gnd/118629662}\n@optional {docType: any # The WeGA document type, offset: any # Position of first item to retrieve (starting from 1), limit: any # Number of items to retrieve (200 max)}\n@returns(200) An array of documents\n\n@endpoint GET /documents/findByAuthor/{authorID}\n@desc Finds documents by author\n@required {authorID: any # The author ID to search for. Accepted ID formats are WeGA, e.g. A002068 or http://weber-gesamtausgabe.de/A002068, VIAF, e.g. http://viaf.org/viaf/14959938, or  GND, e.g. http://d-nb.info/gnd/118629662}\n@optional {docType: any # The WeGA document type, offset: any # Position of first item to retrieve (starting from 1), limit: any # Number of items to retrieve (200 max)}\n@returns(200) An array of documents\n\n@endgroup\n\n@group code\n@endpoint GET /code/findByElement/{element}\n@desc Finds code samples by XML element\n@required {element: any # The XML element to search for}\n@optional {namespace: any # The element namespace. Defaults to the TEI namespace, docType: any # The WeGA document type, offset: any # Position of first item to retrieve (starting from 1), limit: any # Number of items to retrieve (200 max)}\n@returns(200) An array of documents\n\n@endgroup\n\n@group application\n@endpoint GET /application/status\n@desc Get status information about the running WeGA-WebApp\n@returns(200) Healthy – A single object with status information\n@errors {500: Unhealthy – A single object with status information}\n\n@endpoint GET /application/newID\n@desc Create a new WeGA ID\n@required {docType: any # The WeGA document type}\n@returns(200) A single object with a fresh WeGA ID\n@errors {403: The creation of new IDs is only available in the development environment}\n\n@endgroup\n\n@group facets\n@endpoint GET /facets/{facet}\n@desc Returns facets\n@required {facet: any # The facet to search for, scope: any # The scope of the result set, i.e. 'indices' or a WeGA ID, docType: any # The WeGA document type}\n@optional {term: any # The search term to be looked for in the facet's label, offset: any # Position of first item to retrieve (starting from 1), limit: any # Number of items to retrieve (200 max)}\n@returns(200) An array of facets\n\n@endgroup\n\n@end\n"}}