Browse Source

Oh hey it compiles now. Has all endpoints & params. Needs grouping

pull/2/head
David Riordan 9 years ago
parent
commit
81d74ae24f
  1. 118
      swagger-docs/pelias-v1-api-swagger.yml

118
swagger-docs/pelias-v1-api-swagger.yml

@ -123,7 +123,7 @@ paths:
type: string type: string
format: string format: string
description: | description: |
For more than one layer, accepts a comma separated list of valid layers. If any of those layers is invalid, the request will still be honored, but a warning will be thrown in the `geocoding` block of the response. For more than one layer, accepts a comma separated list of valid layers. If any of those layers is invalid, the request will still be honored, but a warning will be noted in the `geocoding` block of the response.
required: false required: false
collectionFormat: csv collectionFormat: csv
@ -157,25 +157,29 @@ paths:
type: number type: number
format: float format: float
description: Maximum distance in meters from the centroid to search from. Forms the radius of a bounding circle. description: Maximum distance in meters from the centroid to search from. Forms the radius of a bounding circle.
# BOUNDARY RECTANGLE # BOUNDARY RECTANGLE
- name: boundary.rect.min_lon - name: boundary.rect.min_lon
in: query in: query
type: number type: number
format: float format: float
required: false
- name: boundary.rect.min_lat - name: boundary.rect.min_lat
in: query in: query
type: number type: number
format: float format: float
required: false
- name: boundary.rect.max_lon - name: boundary.rect.max_lon
in: query in: query
type: number type: number
format: float format: float
required: false
- name: boundary.rect.max_lat - name: boundary.rect.max_lat
in: query in: query
type: number type: number
format: float format: float
required: false
- name: boundary.country - name: boundary.country
in: query in: query
@ -184,7 +188,7 @@ paths:
description: | description: |
Limits search to only return matches within a specific country. Accepts 2 or 3 letter country codes based on ISO [Alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Current_codes) or [Alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Current_codes) abbreviations. Limits search to only return matches within a specific country. Accepts 2 or 3 letter country codes based on ISO [Alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Current_codes) or [Alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Current_codes) abbreviations.
- name: size - name: size
in: query in: query
@ -195,9 +199,9 @@ paths:
default: 10 default: 10
required: false required: false
description: Maximum number of possible matching places to be returned description: Maximum number of possible matching places to be returned
## VIEW NOT BEING IMPLEMENTED AT THIS TIME ## VIEW NOT BEING IMPLEMENTED AT THIS TIME
# - name: view # - name: view
# in: query # in: query
# type: string # type: string
@ -205,7 +209,7 @@ paths:
# enum: # enum:
# - "standard" # - "standard"
# - "mobile" # - "mobile"
- name: private - name: private
in: query in: query
type: boolean type: boolean
@ -224,15 +228,15 @@ paths:
description: invalid request. Check that you are passing along valid parameters description: invalid request. Check that you are passing along valid parameters
403: 403:
description: invalid API key. Register for a valid API key at the [Mapzen Developer Portal](https://mapzen.com/developer). description: invalid API key. Register for a valid API key at the [Mapzen Developer Portal](https://mapzen.com/developer).
/autocomplete: /autocomplete:
get: get:
summary: Fast response endpoint to provide an end-user suggestions of matching places as they're typing the search string. Returns 10 matching places. Intended for use while the user is typing a response. For searching a complete query (if autocomplete doesn't deliver a match), use the /search endpoint. summary: Fast response endpoint to provide an end-user suggestions of matching places as they're typing the search string. Returns 10 matching places. Intended for use while the user is typing a response. For searching a complete query (if autocomplete doesn't deliver a match), use the /search endpoint.
tags: [search, forward geocoding] tags: [search, forward geocoding]
parameters: parameters:
- name: text - name: text
in: query in: query
@ -254,51 +258,56 @@ paths:
required: false required: false
type: number type: number
format: float format: float
security: security:
- api_key: [] - api_key: []
responses: responses:
200: 200:
description: A GeoJSON FeatureCollection array of geocoded places. description: A GeoJSON FeatureCollection array of geocoded places.
400: 400:
description: Invalid request. Check that you are passing along valid parameters without conflicting options. description: Invalid request. Check that you are passing along valid parameters without conflicting options.
/reverse: /reverse:
get: get:
summary: Takes the coordinates of a location and searches for the name or address of the place it's from. summary: Searches for the name of a place based on a lon/lat location. Used for address reverse geocoding, point of interest (POI) reverse geocoding, and reverse coarse geocoding.
parameters: parameters:
- name: point.lon - name: point.lon
in: query in: query
format: float description: tk
required: true required: true
min: -180 type: number
max: 180 format: float
minimum: -180
maximum: 180
- name: point.lat - name: point.lat
in: query in: query
format: float description: tk
required: true required: true
min: -90 type: number
max: 90 format: float
minimum: -90
maximum: 90
- name: boundary.circle.lon - name: boundary.circle.lon
in: query in: query
description: tk
type: number type: number
format: float format: float
required: false required: true
min: -180 minimum: -180
max: 180 maximum: 180
- name: boundary.circle.lat - name: boundary.circle.lat
in: query in: query
type: number type: number
format: float format: float
required: false required: false
min: -90 minimum: -90
max: 180 maximum: 180
- name: boundary.circle.radius - name: boundary.circle.radius
in: query in: query
@ -306,6 +315,7 @@ paths:
format: float format: float
required: false required: false
description: bounding circle radius (in KM). description: bounding circle radius (in KM).
minimum: 0.001
- name: boundary.country - name: boundary.country
in: query in: query
@ -314,40 +324,58 @@ paths:
required: false required: false
description: Limits search to only return matches within a specific country. Accepts 2 or 3 letter country codes based on ISO [Alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Current_codes) or [Alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Current_codes) abbreviations. description: Limits search to only return matches within a specific country. Accepts 2 or 3 letter country codes based on ISO [Alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Current_codes) or [Alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Current_codes) abbreviations.
- name: layer - name: layers
in: query in: query
type: string
required: false
description: tk
collectionFormat: csv
- name: sources
in: query
type: string
required: false
description: tk
collectionFormat: csv
- name: size
in: query
type: integer
format: int32
required: false
default: 10
responses: responses:
200: 200:
description: All Good. description: GeoJSON FeatureCollection
security: security:
- api_key: [] - api_key: []
/place: /place:
get: get:
summary: Retrieves the full GeoJSON record for a given place. ID determined from the results of a `/search`, `/autocomplete`, or `/reverse` response. summary: Retrieves the full GeoJSON record for a given place. ID determined from the results of a `/search`, `/autocomplete`, or `/reverse` response.
parameters: parameters:
- name: ids - name: ids
in: query in: query
format: string format: string
type: string type: string
description: Place ID from Mapzen Search. description: Place ID from Mapzen Search.
responses: responses:
200: 200:
description: ok description: ok
security: security:
- api_key: [] - api_key: []
################################################################################ ################################################################################

Loading…
Cancel
Save