{"files":{"SKILL.md":"---\nname: bc-laws\ndescription: \"BC Laws API skill. Use when working with BC Laws for content, document, search. Covers 7 endpoints.\"\nversion: 1.0.0\ngenerator: lapsh\n---\n\n# BC Laws\nAPI version: 1.0.0\n\n## Auth\nNo authentication required.\n\n## Base URL\nhttp://www.bclaws.ca/civix\n\n## Setup\n1. No auth setup needed\n2. GET /content/{aspectId} -- describes the documents and directories available within a specific 'aspect' (content group) of the bclaws library\n3. Explore available endpoints below\n\n## Endpoints\n7 endpoints across 3 groups. See references/api-spec.lap for full details.\n\n### Content\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /content/{aspectId} | Describes the documents and directories available within a specific 'aspect' (content group) of the BCLaws library |\n| GET | /content/{aspectId}/{civixDocumentId} | Lists the metadata available for the specified index or directory from the BCLaws legislative respository |\n\n### Document\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /document/id/{aspectId}/{civixIndexId}/{civixDocumentId} | Retrieves a specific document from the BCLaws legislative repository (HTML format) |\n| GET | /document/id/{aspectId}/{civixIndexId}/{civixDocumentId}/xml | Retrieves a specific document from the BCLaws legislative repository (XML format) |\n| GET | /document/id/{aspectId}/{civixIndexId}/{civixDocumentId}/search/{searchString} | Retrieves a specific document from the BCLaws legislative repository with search text highlighted (HTML format) |\n| GET | /document/id/{aspectId}/{civixIndexId}/{civixDocumentId}/xml/search/{searchString} | Retrieves a specific document from the BCLaws legislative repository with search text highlighted (XML format) |\n\n### Search\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /search/{aspectId}/fullsearch | A listing of metadata available for the specified aspect and search term from the BCLaws legislative repository |\n\n## Common Questions\nMatch user requests to endpoints in references/api-spec.lap. Key patterns:\n- \"Get content details?\" -> GET /content/{aspectId}\n- \"Get id details?\" -> GET /document/id/{aspectId}/{civixIndexId}/{civixDocumentId}\n- \"List all xml?\" -> GET /document/id/{aspectId}/{civixIndexId}/{civixDocumentId}/xml\n- \"Get search details?\" -> GET /document/id/{aspectId}/{civixIndexId}/{civixDocumentId}/search/{searchString}\n- \"Search fullsearch?\" -> GET /search/{aspectId}/fullsearch\n\n## Response Tips\n- Check response schemas in references/api-spec.lap for field details\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 BC Laws\n@base http://www.bclaws.ca/civix\n@version 1.0.0\n@common_fields {aspectId: str(complete/corpreg/bcgaz1/bcgaz2/oic/psl/ecb/hscr/arch_oic)=complete # The identifier of the 'aspect' (content group) to search}\n@endpoints 7\n@toc content(2), document(4), search(1)\n\n@group content\n@endpoint GET /content/{aspectId}\n@desc Describes the documents and directories available within a specific 'aspect' (content group) of the BCLaws library\n@returns(200) List documents and directories within the aspect.\n\n@endpoint GET /content/{aspectId}/{civixDocumentId}\n@desc Lists the metadata available for the specified index or directory from the BCLaws legislative respository\n@required {civixDocumentId: str=statreg # The document identification code for an index or directory}\n@returns(200) List documents and directories within the aspect.\n\n@endgroup\n\n@group document\n@endpoint GET /document/id/{aspectId}/{civixIndexId}/{civixDocumentId}\n@desc Retrieves a specific document from the BCLaws legislative repository (HTML format)\n@required {civixIndexId: str=statreg # Index identification code, civixDocumentId: str=01009_01 # The document identification code for an index or directory}\n@returns(200) List documents and directories within the aspect.\n\n@endpoint GET /document/id/{aspectId}/{civixIndexId}/{civixDocumentId}/xml\n@desc Retrieves a specific document from the BCLaws legislative repository (XML format)\n@required {civixIndexId: str=statreg # Index identification code, civixDocumentId: str=01009_01 # The document identification code for an index or directory}\n@returns(200) List documents and directories within the aspect.\n\n@endpoint GET /document/id/{aspectId}/{civixIndexId}/{civixDocumentId}/search/{searchString}\n@desc Retrieves a specific document from the BCLaws legislative repository with search text highlighted (HTML format)\n@required {civixIndexId: str=statreg # Index identification code, civixDocumentId: str=01009_01 # The document identification code for an index or directory, searchString: str=water # The text to search for within the document}\n@returns(200) List documents and directories within the aspect.\n\n@endpoint GET /document/id/{aspectId}/{civixIndexId}/{civixDocumentId}/xml/search/{searchString}\n@desc Retrieves a specific document from the BCLaws legislative repository with search text highlighted (XML format)\n@required {civixIndexId: str=statreg # Index identification code, civixDocumentId: str=01009_01 # The document identification code for an index or directory, searchString: str=water # The text to search for within the document}\n@returns(200) List documents and directories within the aspect.\n\n@endgroup\n\n@group search\n@endpoint GET /search/{aspectId}/fullsearch\n@desc A listing of metadata available for the specified aspect and search term from the BCLaws legislative repository\n@required {q: str=water # query term, s: str=0 # first hit (start index), e: int=20 # last hit (end index), nFrag: int=5 # number of fragment snippets to return (< 10), lFrag: int=100 # length of fragment snippets (< 200)}\n@returns(200) List of metadata available for the specified aspect and search term\n\n@endgroup\n\n@end\n"}}