{ "openapi": "3.0.0", "servers": [ { "url": "http://www.bclaws.ca/civix" }, { "url": "https://www.bclaws.ca/civix" } ], "info": { "title": "BC Laws", "description": "BC Laws is an electronic library providing free public access to the laws of British Columbia. BC Laws is hosted by the Queen's Printer of British Columbia and published in partnership with the Ministry of Justice and the Law Clerk of the Legislative Assembly.BC Laws contains a comprehensive collection of BC legislation and related materials. It is available on the internet in two forms:First: The library is available as a web site in which users can browse and search the laws of British Columbia.Second: The library is available as a portal to legislation in raw XML data format, accessible via the BC Laws API2. This direct access to raw data is intended to enable third parties to build or add their own custom applications based on the structure of the data and all the associated search functionality inherent in that structure. The BC Laws website itself is an example of one such application. \n\nPlease note that you may experience issues when submitting requests to the delivery or test environment if using this [OpenAPI specification](https://github.com/bcgov/api-specs) in other API console viewers.", "version": "1.0.0", "license": { "name": "Queen's Printer License", "url": "http://www.bclaws.ca/standards/2014/QP-License_1.0.html" }, "termsOfService": "http://www2.gov.bc.ca/gov/content?id=D1EE0A405E584363B205CD4353E02C88" }, "externalDocs": { "description": "Additional API Documentation", "url": "ttp://www.bclaws.ca/civix/template/complete/api/index.html" }, "tags": [ { "name": "content" }, { "name": "document" }, { "name": "search" } ], "paths": { "/content/{aspectId}": { "get": { "summary": "Describes the documents and directories available within a specific 'aspect' (content group) of the BCLaws library", "tags": [ "content" ], "parameters": [ { "name": "aspectId", "in": "path", "description": "The identifier of the 'aspect' (content group) to search", "required": true, "schema": { "type": "string", "enum": [ "complete", "corpreg", "bcgaz1", "bcgaz2", "oic", "psl", "ecb", "hscr", "arch_oic" ], "default": "complete" } } ], "responses": { "200": { "description": "List documents and directories within the aspect." } } } }, "/content/{aspectId}/{civixDocumentId}": { "get": { "summary": "Lists the metadata available for the specified index or directory from the BCLaws legislative respository", "tags": [ "content" ], "parameters": [ { "name": "aspectId", "in": "path", "description": "The identifier of the 'aspect' (content group) to search", "required": true, "schema": { "type": "string", "enum": [ "complete", "corpreg", "bcgaz1", "bcgaz2", "oic", "psl", "ecb", "hscr", "arch_oic" ], "default": "complete" } }, { "name": "civixDocumentId", "in": "path", "description": "The document identification code for an index or directory", "required": true, "schema": { "type": "string", "default": "statreg" } } ], "responses": { "200": { "description": "List documents and directories within the aspect." } } } }, "/document/id/{aspectId}/{civixIndexId}/{civixDocumentId}": { "get": { "summary": "Retrieves a specific document from the BCLaws legislative repository (HTML format)", "description": "The /document API allows you to retrieve actual documents from the BCLaws legislative repository. To retrieve a document from the repository you need the aspect identifier and two other specific pieces of information about the document: the index identifier and the document identifier. These unique identifiers can be retrieved from the /content API.", "tags": [ "document" ], "parameters": [ { "name": "aspectId", "in": "path", "description": "The identifier of the 'aspect' (content group) to search", "required": true, "schema": { "type": "string", "enum": [ "complete", "corpreg", "bcgaz1", "bcgaz2", "oic", "psl", "ecb", "hscr", "arch_oic" ], "default": "complete" } }, { "name": "civixIndexId", "in": "path", "description": "Index identification code", "required": true, "schema": { "type": "string", "default": "statreg" } }, { "name": "civixDocumentId", "in": "path", "description": "The document identification code for an index or directory", "required": true, "schema": { "type": "string", "default": "01009_01" } } ], "responses": { "200": { "description": "List documents and directories within the aspect." } } } }, "/document/id/{aspectId}/{civixIndexId}/{civixDocumentId}/xml": { "get": { "summary": "Retrieves a specific document from the BCLaws legislative repository (XML format)", "description": "The /document API allows you to retrieve actual documents from the BCLaws legislative repository. To retrieve a document from the repository you need the aspect identifier and two other specific pieces of information about the document: the index identifier and the document identifier. These unique identifiers can be retrieved from the /content API.", "tags": [ "document" ], "parameters": [ { "name": "aspectId", "in": "path", "description": "The identifier of the 'aspect' (content group) to search", "required": true, "schema": { "type": "string", "enum": [ "complete", "corpreg", "bcgaz1", "bcgaz2", "oic", "psl", "ecb", "hscr", "arch_oic" ], "default": "complete" } }, { "name": "civixIndexId", "in": "path", "description": "Index identification code", "required": true, "schema": { "type": "string", "default": "statreg" } }, { "name": "civixDocumentId", "in": "path", "description": "The document identification code for an index or directory", "required": true, "schema": { "type": "string", "default": "01009_01" } } ], "responses": { "200": { "description": "List documents and directories within the aspect." } } } }, "/document/id/{aspectId}/{civixIndexId}/{civixDocumentId}/search/{searchString}": { "get": { "summary": "Retrieves a specific document from the BCLaws legislative repository with search text highlighted (HTML format)", "description": "The /document API allows you to retrieve actual documents from the BCLaws legislative repository. To retrieve a document from the repository you need the aspect identifier and two other specific pieces of information about the document: the index identifier and the document identifier. These unique identifiers can be retrieved from the /content API.", "tags": [ "document" ], "parameters": [ { "name": "aspectId", "in": "path", "description": "The identifier of the 'aspect' (content group) to search", "required": true, "schema": { "type": "string", "enum": [ "complete", "corpreg", "bcgaz1", "bcgaz2", "oic", "psl", "ecb", "hscr", "arch_oic" ], "default": "complete" } }, { "name": "civixIndexId", "in": "path", "description": "Index identification code", "required": true, "schema": { "type": "string", "default": "statreg" } }, { "name": "civixDocumentId", "in": "path", "description": "The document identification code for an index or directory", "required": true, "schema": { "type": "string", "default": "01009_01" } }, { "name": "searchString", "in": "path", "description": "The text to search for within the document", "required": true, "schema": { "type": "string", "default": "water" } } ], "responses": { "200": { "description": "List documents and directories within the aspect." } } } }, "/document/id/{aspectId}/{civixIndexId}/{civixDocumentId}/xml/search/{searchString}": { "get": { "summary": "Retrieves a specific document from the BCLaws legislative repository with search text highlighted (XML format)", "description": "The /document API allows you to retrieve actual documents from the BCLaws legislative repository. To retrieve a document from the repository you need the aspect identifier and two other specific pieces of information about the document: the index identifier and the document identifier. These unique identifiers can be retrieved from the /content API.", "tags": [ "document" ], "parameters": [ { "name": "aspectId", "in": "path", "description": "The identifier of the 'aspect' (content group) to search", "required": true, "schema": { "type": "string", "enum": [ "complete", "corpreg", "bcgaz1", "bcgaz2", "oic", "psl", "ecb", "hscr", "arch_oic" ], "default": "complete" } }, { "name": "civixIndexId", "in": "path", "description": "Index identification code", "required": true, "schema": { "type": "string", "default": "statreg" } }, { "name": "civixDocumentId", "in": "path", "description": "The document identification code for an index or directory", "required": true, "schema": { "type": "string", "default": "01009_01" } }, { "name": "searchString", "in": "path", "description": "The text to search for within the document", "required": true, "schema": { "type": "string", "default": "water" } } ], "responses": { "200": { "description": "List documents and directories within the aspect." } } } }, "/search/{aspectId}/fullsearch": { "get": { "summary": "A listing of metadata available for the specified aspect and search term from the BCLaws legislative repository", "tags": [ "search" ], "parameters": [ { "name": "aspectId", "in": "path", "description": "The identifier of the 'aspect' (content group) to search", "required": true, "schema": { "type": "string", "enum": [ "complete", "corpreg", "bcgaz1", "bcgaz2", "oic", "psl", "ecb", "hscr", "arch_oic" ], "default": "complete" } }, { "name": "q", "in": "query", "description": "query term", "required": true, "schema": { "type": "string", "default": "water" } }, { "name": "s", "in": "query", "description": "first hit (start index)", "required": true, "schema": { "type": "string", "default": "0" } }, { "name": "e", "in": "query", "description": "last hit (end index)", "required": true, "schema": { "type": "integer", "default": 20 } }, { "name": "nFrag", "in": "query", "description": "number of fragment snippets to return (< 10)", "required": true, "schema": { "type": "integer", "default": 5 } }, { "name": "lFrag", "in": "query", "description": "length of fragment snippets (< 200)", "required": true, "schema": { "type": "integer", "default": 100 } } ], "responses": { "200": { "description": "List of metadata available for the specified aspect and search term" } } } } }, "components": { "schemas": {} } }