openapi: 3.0.0 info: title: 'LBH & CoL Directory of Services: Gateway API' description: >- Provides an API gateway for developers to ingest. version: "1.0.1" paths: /: get: tags: - metadata responses: '200': description: Returns a list of data store service resource endpoints content: application/json: schema: $ref: '#/components/schemas/Resources' default: $ref: '#/components/responses/Error' /versions: get: tags: - metadata operationId: listVersions summary: List API versions responses: 200: $ref: '#/components/responses/Versions' default: $ref: '#/components/responses/Error' /health/alive: get: description: "This endpoint returns a 200 status code when the HTTP server is up running.\nThis status does currently not include checks whether the database connection is working.\nThis endpoint does not require the `X-Forwarded-Proto` header when TLS termination is set.\n\nBe aware that if you are running multiple nodes, the health status will never refer to the cluster state, only to a single instance." tags: - health summary: "Check the Alive Status" operationId: isInstanceAlive responses: 200: description: "Health Status" content: application/json: schema: $ref: '#/components/schemas/HealthStatus' 500: $ref: '#/components/responses/Error' /health/ready: get: description: "This endpoint returns a 200 status code when the HTTP server is up running and the environment dependencies (e.g.\nthe database) are responsive as well.\n\nThis status does currently not include checks whether the database connection is working.\nThis endpoint does not require the `X-Forwarded-Proto` header when TLS termination is set.\n\nBe aware that if you are running multiple nodes of ORY Hydra, the health status will never refer to the cluster state, only to a single instance." tags: - health summary: "Check the Readiness Status" operationId: isInstanceReady responses: 200: description: 'Health status' content: application/json: schema: $ref: '#/components/schemas/HealthStatus' 503: description: 'Health Not Ready status' content: application/json: schema: $ref: '#/components/schemas/HealthNotReadyStatus' /providers: get: description: "This endpoint returns all providers." tags: - providers summary: "Return all providers" responses: 200: description: "All providers" content: application/json: schema: $ref: '#/components/schemas/Providers' 404: description: "No providers found" post: description: "Add a new provider" tags: - providers summary: "Add a new provider" requestBody: description: 'Data required for a provider' required: true content: application/json: schema: $ref: '#/components/schemas/AddProvider' responses: 201: description: "Succesfully added a new provider" content: application/json: schema: $ref: '#/components/schemas/Providers' /providers/{id}: get: description: 'Get a specific provider' tags: - providers summary: 'Get a specific provider' parameters: - name: id in: path description: The UUID of the provider required: true schema: type: string responses: 200: description: 'Provider found' content: application/json: schema: $ref: '#/components/schemas/Providers' 404: description: 'Provider not found' put: description: 'Update a specific provider' tags: - providers summary: 'Update a specific provider' parameters: - name: id in: path description: The UUID of the provider required: true schema: type: string requestBody: description: 'Data required for a provider' required: true content: application/json: schema: $ref: '#/components/schemas/AddProvider' responses: 200: description: 'Provider udpated' content: application/json: schema: $ref: '#/components/schemas/Providers' delete: description: 'Delete a provider' tags: - providers summary: 'Delete a provider' parameters: - name: id in: path description: The UUID of the provider required: true schema: type: string responses: 410: description: 'Provider deleted' /services: get: description: "This endpoint returns all services." tags: - services summary: "Return all services" responses: 200: description: "All services" content: application/json: schema: $ref: '#/components/schemas/Service' 404: description: "No services found" post: description: "Add a new service" tags: - services summary: "Add a new service" requestBody: description: 'Data required for a service' required: true content: application/json: schema: $ref: '#/components/schemas/AddService' responses: 201: description: "Succesfully added a new service" content: application/json: schema: $ref: '#/components/schemas/Service' /services/{id}: get: description: 'Get a specific service' tags: - services summary: 'Get a specific service' parameters: - name: id in: path description: The UUID of the service required: true schema: type: string responses: 200: description: 'Service found' content: application/json: schema: $ref: '#/components/schemas/Service' 404: description: 'Service not found' put: description: 'Update a specific service' tags: - services summary: 'Update a specific service' parameters: - name: id in: path description: The UUID of the service required: true schema: type: string requestBody: description: 'Data required for a service' required: true content: application/json: schema: $ref: '#/components/schemas/AddService' responses: 200: description: 'Provider udpated' content: application/json: schema: $ref: '#/components/schemas/Service' delete: description: 'Delete a service' tags: - services summary: 'Delete a service' parameters: - name: id in: path description: The UUID of the service required: true schema: type: string responses: 410: description: 'Service deleted' /taxonomy: get: description: "This endpoint returns all terms." tags: - taxonomy summary: "Return all terms" responses: 200: description: "All terms" content: application/json: schema: $ref: '#/components/schemas/Term' 404: description: "No taxonomy found" post: description: "Add a new term" tags: - taxonomy summary: "Add a new term" requestBody: description: 'Data required for a term' required: true content: application/json: schema: $ref: '#/components/schemas/AddTerm' responses: 201: description: "Succesfully added a new term" content: application/json: schema: $ref: '#/components/schemas/Term' /taxonomy/{id}: get: description: 'Get a specific term' tags: - taxonomy summary: 'Get a specific term' parameters: - name: id in: path description: The UUID of the term required: true schema: type: string responses: 200: description: 'term found' content: application/json: schema: $ref: '#/components/schemas/Term' 404: description: 'term not found' put: description: 'Update a specific term' tags: - taxonomy summary: 'Update a specific term' parameters: - name: id in: path description: The UUID of the term required: true schema: type: string requestBody: description: 'Data required for a term' required: true content: application/json: schema: $ref: '#/components/schemas/AddTerm' responses: 200: description: 'Provider udpated' content: application/json: schema: $ref: '#/components/schemas/Term' delete: description: 'Delete a term' tags: - taxonomy summary: 'Delete a term' parameters: - name: id in: path description: The UUID of the term required: true schema: type: string responses: 410: description: 'Term deleted' /events: get: description: "This endpoint returns all events." tags: - events summary: "Return all events" responses: 200: description: "All events" content: application/json: schema: $ref: '#/components/schemas/Event' 404: description: "No events found" post: description: "Add a new event" tags: - events summary: "Add a new event" requestBody: description: 'Data required for an event' required: true content: application/json: schema: $ref: '#/components/schemas/AddEvent' responses: 201: description: "Succesfully added a new event" content: application/json: schema: $ref: '#/components/schemas/Event' /events/{id}: get: description: 'Get a specific event' tags: - events summary: 'Get a specific event' parameters: - name: id in: path description: The UUID of the event required: true schema: type: string responses: 200: description: 'event found' content: application/json: schema: $ref: '#/components/schemas/Event' 404: description: 'event not found' put: description: 'Update a specific event' tags: - events summary: 'Update a specific event' parameters: - name: id in: path description: The UUID of the event required: true schema: type: string requestBody: description: 'Data required for a event' required: true content: application/json: schema: $ref: '#/components/schemas/AddEvent' responses: 200: description: 'Provider udpated' content: application/json: schema: $ref: '#/components/schemas/Event' delete: description: 'Delete a event' tags: - events summary: 'Delete a event' parameters: - name: id in: path description: The UUID of the event required: true schema: type: string responses: 410: description: 'Event deleted' /venues: get: description: "This endpoint returns all venues." tags: - venues summary: "Return all venues" responses: 200: description: "All venues" content: application/json: schema: $ref: '#/components/schemas/Venue' 404: description: "No venues found" post: description: "Add a new venue" tags: - venues summary: "Add a new venue" requestBody: description: 'Data required for an venue' required: true content: application/json: schema: $ref: '#/components/schemas/AddVenue' responses: 201: description: "Succesfully added a new venue" content: application/json: schema: $ref: '#/components/schemas/Venue' /venues/{id}: get: description: 'Get a specific venue' tags: - venues summary: 'Get a specific venue' parameters: - name: id in: path description: The UUID of the venue required: true schema: type: string responses: 200: description: 'venue found' content: application/json: schema: $ref: '#/components/schemas/Venue' 404: description: 'Venue not found' put: description: 'Update a specific venue' tags: - venues summary: 'Update a specific venue' parameters: - name: id in: path description: The UUID of the venue required: true schema: type: string requestBody: description: 'Data required for a venue' required: true content: application/json: schema: $ref: '#/components/schemas/AddVenue' responses: 200: description: 'Provider udpated' content: application/json: schema: $ref: '#/components/schemas/Venue' delete: description: 'Delete a venue' tags: - venues summary: 'Delete a venue' parameters: - name: id in: path description: The UUID of the venue required: true schema: type: string responses: 410: description: 'Venue deleted' /contacts: get: description: "This endpoint returns all contacts." tags: - contacts summary: "Return all contacts" responses: 200: description: "All contacts" content: application/json: schema: $ref: '#/components/schemas/Contact' 404: description: "No contacts found" post: description: "Add a new contact" tags: - contacts summary: "Add a new contact" requestBody: description: 'Data required for an contact' required: true content: application/json: schema: $ref: '#/components/schemas/AddContact' responses: 201: description: "Succesfully added a new contact" content: application/json: schema: $ref: '#/components/schemas/Contact' /contacts/{id}: get: description: 'Get a specific contact' tags: - contacts summary: 'Get a specific contact' parameters: - name: id in: path description: The UUID of the contact required: true schema: type: string responses: 200: description: 'contact found' content: application/json: schema: $ref: '#/components/schemas/Contact' 404: description: 'Contact not found' put: description: 'Update a specific contact' tags: - contacts summary: 'Update a specific contact' parameters: - name: id in: path description: The UUID of the contact required: true schema: type: string requestBody: description: 'Data required for a contact' required: true content: application/json: schema: $ref: '#/components/schemas/AddContact' responses: 200: description: 'Provider udpated' content: application/json: schema: $ref: '#/components/schemas/Contact' delete: description: 'Delete a contact' tags: - contacts summary: 'Delete a contact' parameters: - name: id in: path description: The UUID of the contact required: true schema: type: string responses: 410: description: 'Contact deleted' /costoptions: get: description: "This endpoint returns all cost options." tags: - costoptions summary: "Return all cost options" responses: 200: description: "All cost options" content: application/json: schema: $ref: '#/components/schemas/CostOption' 404: description: "No cost options found" post: description: "Add a new cost option" tags: - costoptions summary: "Add a new cost option" requestBody: description: 'Data required for an cost option' required: true content: application/json: schema: $ref: '#/components/schemas/AddCostOption' responses: 201: description: "Succesfully added a new cost option" content: application/json: schema: $ref: '#/components/schemas/CostOption' /costoptions/{id}: get: description: 'Get a specific cost option' tags: - costoptions summary: 'Get a specific cost option' parameters: - name: id in: path description: The UUID of the cost option required: true schema: type: string responses: 200: description: 'cost option found' content: application/json: schema: $ref: '#/components/schemas/CostOption' 404: description: 'CostOption not found' put: description: 'Update a specific cost option' tags: - costoptions summary: 'Update a specific cost option' parameters: - name: id in: path description: The UUID of the cost option required: true schema: type: string requestBody: description: 'Data required for a cost option' required: true content: application/json: schema: $ref: '#/components/schemas/AddCostOption' responses: 200: description: 'Provider udpated' content: application/json: schema: $ref: '#/components/schemas/CostOption' delete: description: 'Delete a cost option' tags: - costoptions summary: 'Delete a cost option' parameters: - name: id in: path description: The UUID of the cost option required: true schema: type: string responses: 410: description: 'Cost option deleted' /eligibilities: get: description: "This endpoint returns all eligibilities." tags: - eligibilities summary: "Return all eligibilities" responses: 200: description: "All eligibilities" content: application/json: schema: $ref: '#/components/schemas/Eligibility' 404: description: "No eligibilities found" post: description: "Add a new eligibilities" tags: - eligibilities summary: "Add a new eligibility" requestBody: description: 'Data required for an eligibility' required: true content: application/json: schema: $ref: '#/components/schemas/AddEligibility' responses: 201: description: "Succesfully added a new eligibility" content: application/json: schema: $ref: '#/components/schemas/Eligibility' /eligibilities/{id}: get: description: 'Get a specific eligibility' tags: - eligibilities summary: 'Get a specific eligibility' parameters: - name: id in: path description: The UUID of the eligibility required: true schema: type: string responses: 200: description: 'Eligibility found' content: application/json: schema: $ref: '#/components/schemas/Eligibility' 404: description: 'Eligibility not found' put: description: 'Update a specific eligibility' tags: - eligibilities summary: 'Update a specific eligibility' parameters: - name: id in: path description: The UUID of the eligibility required: true schema: type: string requestBody: description: 'Data required for an eligibility' required: true content: application/json: schema: $ref: '#/components/schemas/AddEligibility' responses: 200: description: 'Provider udpated' content: application/json: schema: $ref: '#/components/schemas/Eligibility' delete: description: 'Delete an eligibility' tags: - eligibilities summary: 'Delete an eligibility' parameters: - name: id in: path description: The UUID of the eligibility required: true schema: type: string responses: 410: description: 'Cost option deleted' components: responses: Versions: description: |- 200 response content: application/json: schema: $ref: '#/components/schemas/Versions' Error: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' schemas: Error: required: - code - message properties: code: type: integer format: int32 message: type: string Resources: title: Resources items: $ref: '#/components/schemas/Resource' Resource: required: - apiPath - description - apiVersionNumber - apiUrl - apiDocumentationUrl properties: apiPath: type: string example: "/versions" description: type: string example: "List of API versions" apiVersionNumber: type: number example: 1.1 apiUrl: type: string example: "https://data.lbhc.weareconvivio.com/versions" apiDocumentationUrl: type: string example: "https://developer.lbhc.weareconvivio.com/data/api/versions" Versions: title: Versions items: $ref: '#/components/schemas/Version' Version: required: - version - id - updated - current - deprecated properties: version: type: number example: 1.1 id: type: string example: "v1.1" updated: type: string example: "2018-09-13T16:52:11" current: type: boolean example: true deprecated: type: boolean example: false HealthNotReadyStatus: properties: errors: description: 'Errors contains a list of errors that caused the not ready status.' type: object example: code: 503 message: "Internal server error" additionalProperties: type: string example: "Nginx" HealthStatus: properties: status: description: 'Status always contains "ok".' type: string example: "ok" Providers: properties: id: description: 'UUID of provider' type: string example: '7a52060d-be2d-482e-bd9e-0f8041554925' name: description: 'The name of the provider' type: string example: 'Hackney Quest' published: description: 'Boolean if provider is published' type: integer example: 1 venue_id: description: 'ID of the providers venue' type: string example: '5308687a-aec7-4ec3-9f56-1ebbd275a161' contact_id: description: 'ID of the providers contact' type: string example: '22632363-e326-4991-8f10-5483e5047758' created: description: 'The date-time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z' type: string format: date-time example: '2017-07-21T17:32:28Z' updated: description: 'The date-time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z' type: string format: date-time example: '2017-07-21T18:38:30Z' flagged: description: 'Should this content be reivewed?' type: boolean example: false AddProvider: required: - name - published properties: name: description: 'The name of the provider' type: string example: 'Hackney Quest' published: description: 'Is provider published?' type: integer example: 0 venue_id: description: 'ID of the providers venue' type: string example: '5308687a-aec7-4ec3-9f56-1ebbd275a161' contact_id: description: 'ID of the providers contact' type: string example: '22632363-e326-4991-8f10-5483e5047758' flagged: description: 'Should this content be reivewed?' type: boolean example: false Service: properties: id: description: 'UUID of service' type: string example: '7a52060d-be2d-482e-bd9e-0f8041554925' name: description: 'The name of the service' type: string example: 'POSITIVE YOUTH ENGAGEMENT PROGRAMME (PYEP)' desc: description: 'Description of the service' type: string example: 'The PYEP provides a huge number of events for youth in your area' published: description: 'Boolean if service is published' type: integer example: 1 provider_id: description: 'ID of the provider' type: string example: 'dd06b31c-61f6-4612-abca-fd3de120f419S' event_id: description: 'ID of the event' type: string example: '71209163-8f71-49a1-9959-4fbd75a79ac1' contact_id: description: 'ID of the service contact' type: string example: '22632363-e326-4991-8f10-5483e5047758' eligibility_id: description: 'ID of eligibility object' type: string example: 'bcd76798-d811-46d7-b7aa-64bdde71c18c' costoption_id: description: 'ID of cost option object' type: string example: '03b0a53f-0994-4a30-8988-8aed0dfbb560' created: description: 'The date-time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z' type: string format: date-time example: '2017-07-21T17:32:28Z' updated: description: 'The date-time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z' type: string format: date-time example: '2017-07-21T18:38:30Z' flagged: description: 'Should this content be reivewed?' type: boolean example: false AddService: required: - name - published - desc properties: name: description: 'The name of the service' type: string example: 'POSITIVE YOUTH ENGAGEMENT PROGRAMME (PYEP)' desc: description: 'Description of the service' type: string example: 'The PYEP provides a huge number of events for youth in your area' published: description: 'Boolean if service is published' type: integer example: 0 provider_id: description: 'ID of the provider' type: string example: 'dd06b31c-61f6-4612-abca-fd3de120f419S' event_id: description: 'ID of the event' type: string example: '71209163-8f71-49a1-9959-4fbd75a79ac1' contact_id: description: 'ID of the service contact' type: string example: '22632363-e326-4991-8f10-5483e5047758' eligibility_id: description: 'ID of eligibility object' type: string example: 'bcd76798-d811-46d7-b7aa-64bdde71c18c' costoption_id: description: 'ID of cost option object' type: string example: '03b0a53f-0994-4a30-8988-8aed0dfbb560' flagged: description: 'Should this content be reivewed?' type: boolean example: false Term: properties: id: description: 'UUID of term' type: string example: '7a52060d-be2d-482e-bd9e-0f8041554925' term: description: 'The name of the term' type: string example: 'Community group' AddTerm: required: - name properties: term: description: 'The name of the term' type: string example: 'Community group' Event: properties: id: description: 'UUID of event' type: string example: 'fd2da797-faa8-4cb3-b4a8-45ff0174ab51' details: description: 'Details of the event' type: string example: 'Community group run on the first and second Thursday of the month' time: description: 'Time the event is run' type: string example: 'Every first and second Thursday of the month' venue_id: description: 'UUID of the venue' type: string example: '8769812b-d077-4008-bce7-31deb1f82e97' created: description: 'The date-time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z' type: string format: date-time example: '2017-07-21T17:32:28Z' updated: description: 'The date-time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z' type: string format: date-time example: '2017-07-21T18:38:30Z' AddEvent: required: - details properties: details: description: 'Details of the event' type: string example: 'Community group run on the first and second Thursday of the month' venue_id: description: 'UUID of the venue' type: string example: '8769812b-d077-4008-bce7-31deb1f82e97' time: description: 'Time the event is run' type: string example: 'Every first and second Thursday of the month' Venue: properties: id: description: 'UUID of venue' type: string example: 'a30f7cae-9db6-4347-a35f-4ff202fe7dde' service_id: description: 'UUID of the provider' type: string example: '8bfd9405-70cd-407d-a9af-8830a7c719c4' provider_id: description: 'UUID of the provider' type: string example: '27e6bfc8-176c-4a46-b564-91dd19d64de5' name: description: 'Name of the venue' type: string example: 'Hackney Community Centre' address: description: 'Address of the venue' type: string example: '1 Hillman St, London, E8 1DY' details: description: 'Details of the venue' type: string example: 'This is an awesome venue but hard to find' created: description: 'The date-time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z' type: string format: date-time example: '2017-07-21T17:32:28Z' updated: description: 'The date-time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z' type: string format: date-time example: '2017-07-21T18:38:30Z' flagged: description: 'Should this content be reivewed?' type: boolean example: false AddVenue: required: - name - address properties: provider_id: description: 'UUID of the provider' type: string example: '27e6bfc8-176c-4a46-b564-91dd19d64de5' name: description: 'Name of the venue' type: string example: 'Hackney Community Centre' address: description: 'Address of the venue' type: string example: '1 Hillman St, London, E8 1DY' details: description: 'Details of the venue' type: string example: 'This is an awesome venue but hard to find' Contact: properties: id: description: 'UUID of contact' type: string example: '24ad0d03-cb05-4539-845d-d30fecf774cd' url: description: 'Url of the contact' type: string example: 'https://www.hackney.gov.uk/' email: description: 'Email address of the contact' type: string example: 'bob@hackney.gov.uk' name: description: 'Name of the contact' type: string example: 'Bob Smith' position: description: 'Position of the contact' type: string example: 'CEO' social_facebook: description: 'Link to facebook profile' type: string example: 'https://facebook.com' social_twitter: description: 'Link to twitter profile' type: string example: 'https://twitter.com' phonenumber: description: 'Phone number of the contact' type: string example: '020 8356 3000' created: description: 'The date-time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z' type: string format: date-time example: '2017-07-21T17:32:28Z' updated: description: 'The date-time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z' type: string format: date-time example: '2017-07-21T18:38:30Z' flagged: description: 'Should this content be reivewed?' type: boolean example: false AddContact: required: - url - name properties: url: description: 'Url of the contact' type: string example: 'https://www.hackney.gov.uk/' email: description: 'Email address of the contact' type: string example: 'bob@hackney.gov.uk' name: description: 'Name of the contact' type: string example: 'Bob Smith' position: description: 'Position of the contact' type: string example: 'CEO' social_facebook: description: 'Link to facebook profile' type: string example: 'https://facebook.com' social_twitter: description: 'Link to twitter profile' type: string example: 'https://twitter.com' phonenumber: description: 'Phone number of the contact' type: string example: '020 8356 3000' CostOption: properties: id: description: 'UUID of cost option' type: string example: 'f3ca08a9-197e-4b9b-9f30-72267ed0d921' option: description: 'Detail of the cost option' type: string example: '£8.50 an hour' AddCostOption: required: - option properties: option: description: 'Detail of the cost option' type: string example: '£8.50 an hour' Eligibility: properties: id: description: 'UUID of eligibility' type: string example: '3c9247ac-9a69-4855-b0b0-2c308eb5ff30' eligibility: description: 'Detail of the eligibility' type: string example: 'Over 60s only' AddEligibility: required: - eligibility properties: eligibility: description: 'Detail of the eligibility' type: string example: 'Over 60s only' # Added by API Auto Mocking Plugin servers: - description: SwaggerHub API Auto Mocking url: https://virtserver.swaggerhub.com/LBHC/lbh-co_l_directory_of_services_gateway_api/1.0.1