Created
October 7, 2018 00:32
-
-
Save kinlane/5ba7df7901473fd39e89f1183328eddd to your computer and use it in GitHub Desktop.
location-at-a-service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
swagger: '2.0' | |
info: | |
title: "Human Services Data API" | |
description: "This is a specification describing the Human Services Data API, using the Human Services Data Specification (HSDS). This has been extracted from the Ohana API deployment, but will be standardized to refer to the universal standard that will apply to any HSDS/A compliant API." | |
termsOfService: "https://openreferral.org/documentation/" | |
contact: | |
name: Open Referral | |
url: https://openreferral.org/ | |
email: info@openreferral.org | |
license: | |
name: Creative Commons Attribution Share-Alike 4.0 | |
url: https://creativecommons.org/licenses/by-sa/4.0/ | |
version: v1.2 | |
host: example.com | |
basePath: / | |
schemes: | |
- http | |
produces: | |
- application/json | |
- application/xml | |
- text/csv | |
paths: | |
/services/{service_id}/locations/: | |
get: | |
summary: Get locations for service | |
description: Returns a list of locations for a specific service | |
operationId: listServiceocations | |
parameters: | |
- in: path | |
required: true | |
type: string | |
name: service_id | |
description: 'The unique service id.' | |
responses: | |
'200': | |
description: Location Response | |
schema: | |
type: array | |
items: | |
$ref: "#/definitions/location" | |
'500': | |
description: Error Response | |
schema: | |
type: array | |
items: | |
$ref: "#/definitions/error_response" | |
tags: | |
- Services | |
post: | |
summary: Add locations for service | |
description: Creates new location entries for a specific service | |
operationId: addServicelocation | |
parameters: | |
- in: path | |
required: true | |
type: string | |
name: service_id | |
description: 'The unique service id.' | |
- in: body | |
name: body | |
schema: | |
$ref: '#/definitions/location' | |
security: | |
- appid: [] | |
- appkey: [] | |
responses: | |
'200': | |
description: location Response | |
schema: | |
type: array | |
items: | |
$ref: "#/definitions/location" | |
'403': | |
description: No Access Response | |
schema: | |
type: array | |
items: | |
$ref: "#/definitions/error_response" | |
'500': | |
description: Error Response | |
schema: | |
type: array | |
items: | |
$ref: "#/definitions/error_response" | |
tags: | |
- Services | |
/services/{service_id}/locations/{location_id}/: | |
get: | |
summary: Get location for service | |
description: Returns a location entry for a specific service | |
operationId: getServicelocation | |
parameters: | |
- in: path | |
required: true | |
type: string | |
name: service_id | |
description: 'The unique service id.' | |
- in: path | |
required: true | |
type: string | |
name: location_id | |
description: 'The unique location id.' | |
responses: | |
'200': | |
description: Location Response | |
schema: | |
type: array | |
items: | |
$ref: "#/definitions/location" | |
'500': | |
description: Error Response | |
schema: | |
type: array | |
items: | |
$ref: "#/definitions/error_response" | |
tags: | |
- Services | |
put: | |
summary: Update location for service | |
description: Updates a location entry for a specific service | |
operationId: updateServicelocation | |
parameters: | |
- in: path | |
required: true | |
type: string | |
name: service_id | |
description: 'The unique service id.' | |
- in: path | |
required: true | |
type: string | |
name: location_id | |
description: 'The unique location id.' | |
- in: body | |
name: body | |
schema: | |
$ref: '#/definitions/location' | |
security: | |
- appid: [] | |
- appkey: [] | |
responses: | |
'200': | |
description: location Response | |
schema: | |
type: array | |
items: | |
$ref: "#/definitions/location" | |
'403': | |
description: No Access Response | |
schema: | |
type: array | |
items: | |
$ref: "#/definitions/error_response" | |
'500': | |
description: Error Response | |
schema: | |
type: array | |
items: | |
$ref: "#/definitions/error_response" | |
tags: | |
- Services | |
delete: | |
summary: Delete location for service | |
description: Deletes a location entry for a specific service | |
operationId: deleteServicelocation | |
parameters: | |
- in: path | |
required: true | |
type: string | |
name: service_id | |
description: 'The unique service id.' | |
- in: path | |
required: true | |
type: string | |
name: location_id | |
description: 'The unique location id.' | |
security: | |
- appid: [] | |
- appkey: [] | |
responses: | |
'200': | |
description: location Response | |
schema: | |
type: array | |
items: | |
$ref: "#/definitions/location" | |
'403': | |
description: No Access Response | |
schema: | |
type: array | |
items: | |
$ref: "#/definitions/error_response" | |
'500': | |
description: Error Response | |
schema: | |
type: array | |
items: | |
$ref: "#/definitions/error_response" | |
tags: | |
- Services | |
securityDefinitions: | |
appid: | |
type: apiKey | |
in: header | |
name: x-appid | |
appkey: | |
type: apiKey | |
in: header | |
name: x-appkey | |
definitions: | |
location: | |
description: 'Details of the locations where organizations operate. Locations may be virtual, and one organization may have many locations.' | |
type: object | |
properties: | |
id: | |
description: 'Each location must have a unique identifier.' | |
type: string | |
organization_id: | |
description: 'Each location must belong to a single organization. The identifier of the organization should be given here.' | |
type: string | |
name: | |
description: 'The name of the location.' | |
type: string | |
alternate_name: | |
description: 'An alternative name for the location.' | |
type: string | |
description: | |
description: 'A description of this location.' | |
type: string | |
transportation: | |
description: 'A description of the access to public or private transportation to and from the location.' | |
type: string | |
latitude: | |
description: 'Y coordinate of location expressed in decimal degrees in WGS84 datum.' | |
type: string | |
longitude: | |
description: 'X coordinate of location expressed in decimal degrees in WGS84 datum.' | |
type: string | |
required: | |
- id | |
- name | |
error_response: | |
description: 'Describes an HTTP error returned by the service' | |
properties: | |
code: | |
description: 'Repeat the HTTP status code' | |
type: integer | |
message: | |
description: 'A plain location message explaining the error' | |
type: integer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment