Created
April 27, 2020 15:36
-
-
Save notthatbreezy/97cc681ec528f93f6d156ebffbeb6666 to your computer and use it in GitHub Desktop.
Sample Franklin Server API Specification
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
openapi: 3.0.1 | |
info: | |
title: Franklin | |
version: 0.0.1 | |
paths: | |
/conformance: | |
get: | |
description: A list of all conformance classes specified in a standard that | |
the server conforms to | |
operationId: conformance | |
parameters: | |
- name: Accept | |
in: header | |
required: true | |
schema: | |
type: string | |
responses: | |
'200': | |
description: '' | |
headers: | |
content-type: | |
required: true | |
schema: | |
type: string | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Json' | |
/: | |
get: | |
description: STAC Service Provided via [franklin](https://github.com/azavea/franklin) | |
operationId: landingPage | |
parameters: | |
- name: Accept | |
in: header | |
required: true | |
schema: | |
type: string | |
responses: | |
'200': | |
description: '' | |
headers: | |
content-type: | |
required: true | |
schema: | |
type: string | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Json' | |
/collections: | |
get: | |
description: A list of collections | |
operationId: collections | |
parameters: | |
- name: Accept | |
in: header | |
required: true | |
schema: | |
type: string | |
responses: | |
'200': | |
description: '' | |
headers: | |
content-type: | |
required: true | |
schema: | |
type: string | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Json' | |
/collections/{p1}: | |
get: | |
description: A single collection | |
operationId: collectionUnique | |
parameters: | |
- name: Accept | |
in: header | |
required: true | |
schema: | |
type: string | |
- name: p1 | |
in: path | |
required: true | |
schema: | |
type: string | |
responses: | |
'200': | |
description: '' | |
headers: | |
content-type: | |
required: true | |
schema: | |
type: string | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Json' | |
'404': | |
description: not found | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/NotFound' | |
/collections/{p1}/tiles: | |
get: | |
description: A collection's tile endpoints | |
operationId: collectionTiles | |
parameters: | |
- name: p1 | |
in: path | |
required: true | |
schema: | |
type: string | |
responses: | |
'200': | |
description: '' | |
headers: | |
ETag: | |
required: true | |
schema: | |
type: string | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Json' | |
'404': | |
description: not found | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/NotFound' | |
/collections/{p1}/items: | |
get: | |
description: A feature collection of collection items | |
operationId: collectionItems | |
parameters: | |
- name: p1 | |
in: path | |
required: true | |
schema: | |
type: string | |
- name: Accept | |
in: header | |
required: true | |
schema: | |
type: string | |
responses: | |
'200': | |
description: '' | |
headers: | |
content-type: | |
required: true | |
schema: | |
type: string | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Json' | |
post: | |
description: Create a new feature in a collection | |
operationId: postItem | |
parameters: | |
- name: p1 | |
in: path | |
required: true | |
schema: | |
type: string | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Json' | |
required: true | |
responses: | |
'200': | |
description: '' | |
headers: | |
ETag: | |
required: true | |
schema: | |
type: string | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Json' | |
'400': | |
description: Collection in route did not match collection in item | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ValidationError' | |
/collections/{p1}/items/{p2}: | |
get: | |
description: A single feature | |
operationId: collectionItemUnique | |
parameters: | |
- name: p1 | |
in: path | |
required: true | |
schema: | |
type: string | |
- name: p2 | |
in: path | |
required: true | |
schema: | |
type: string | |
- name: Accept | |
in: header | |
required: true | |
schema: | |
type: string | |
responses: | |
'200': | |
description: '' | |
headers: | |
content-type: | |
required: true | |
schema: | |
type: string | |
ETag: | |
required: true | |
schema: | |
type: string | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Json' | |
'404': | |
description: not found | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/NotFound' | |
put: | |
operationId: putCollectionsP1ItemsP2 | |
parameters: | |
- name: p1 | |
in: path | |
required: true | |
schema: | |
type: string | |
- name: p2 | |
in: path | |
required: true | |
schema: | |
type: string | |
- name: If-Match | |
in: header | |
required: true | |
schema: | |
type: string | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Json' | |
required: true | |
responses: | |
'200': | |
description: '' | |
headers: | |
ETag: | |
required: true | |
schema: | |
type: string | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Json' | |
'400': | |
description: Something was wrong with the body of the request | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ValidationError' | |
'404': | |
description: not found | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/NotFound' | |
'412': | |
description: Your state of the item is stale. Refresh the item and try again. | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/MidAirCollision' | |
delete: | |
operationId: deleteCollectionsP1ItemsP2 | |
parameters: | |
- name: p1 | |
in: path | |
required: true | |
schema: | |
type: string | |
- name: p2 | |
in: path | |
required: true | |
schema: | |
type: string | |
responses: | |
'204': | |
description: '' | |
patch: | |
operationId: patchCollectionsP1ItemsP2 | |
parameters: | |
- name: p1 | |
in: path | |
required: true | |
schema: | |
type: string | |
- name: p2 | |
in: path | |
required: true | |
schema: | |
type: string | |
- name: If-Match | |
in: header | |
required: true | |
schema: | |
type: string | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Json' | |
required: true | |
responses: | |
'200': | |
description: '' | |
headers: | |
ETag: | |
required: true | |
schema: | |
type: string | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Json' | |
'412': | |
description: Your state of the item is stale. Refresh the item and try again. | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/MidAirCollision' | |
'404': | |
description: not found | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/NotFound' | |
'400': | |
description: Applying this patch would result in an invalid STAC Item | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Json' | |
/collections/{p1}/items/{p2}/tiles: | |
get: | |
description: An item's tile endpoints | |
operationId: collectionItemTiles | |
parameters: | |
- name: p1 | |
in: path | |
required: true | |
schema: | |
type: string | |
- name: p2 | |
in: path | |
required: true | |
schema: | |
type: string | |
- name: Accept | |
in: header | |
required: true | |
schema: | |
type: string | |
responses: | |
'200': | |
description: '' | |
headers: | |
content-type: | |
required: true | |
schema: | |
type: string | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Json' | |
'404': | |
description: not found | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/NotFound' | |
/search: | |
get: | |
description: Search endpoint for all collections | |
operationId: search-get | |
parameters: | |
- name: datetime | |
in: query | |
required: false | |
schema: | |
type: string | |
- name: bbox | |
in: query | |
required: false | |
schema: | |
type: string | |
- name: collections | |
in: query | |
required: false | |
schema: | |
type: string | |
- name: ids | |
in: query | |
required: false | |
schema: | |
type: string | |
- name: limit | |
in: query | |
required: false | |
schema: | |
type: integer | |
- name: next | |
in: query | |
required: false | |
schema: | |
type: string | |
responses: | |
'200': | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Json' | |
post: | |
description: Search endpoint using POST for all collections | |
operationId: search-post | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/SearchFilters' | |
required: true | |
responses: | |
'200': | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Json' | |
/tiles/collections/{p1}/items/{p2}/WebMercatorQuad/{p3}/{p4}/{p5}: | |
get: | |
description: Raster Tile endpoint for Collection Item | |
operationId: collectionItemTiles | |
parameters: | |
- name: p1 | |
in: path | |
required: true | |
schema: | |
type: string | |
- name: p2 | |
in: path | |
required: true | |
schema: | |
type: string | |
- name: p3 | |
in: path | |
required: true | |
schema: | |
type: integer | |
- name: p4 | |
in: path | |
required: true | |
schema: | |
type: integer | |
- name: p5 | |
in: path | |
required: true | |
schema: | |
type: integer | |
- name: asset | |
in: query | |
required: true | |
schema: | |
type: string | |
- name: redBand | |
in: query | |
required: false | |
schema: | |
type: integer | |
- name: greenBand | |
in: query | |
required: false | |
schema: | |
type: integer | |
- name: blueBand | |
in: query | |
required: false | |
schema: | |
type: integer | |
- name: upperQuantile | |
in: query | |
required: false | |
schema: | |
type: integer | |
- name: lowerQuantile | |
in: query | |
required: false | |
schema: | |
type: integer | |
responses: | |
'200': | |
description: '' | |
headers: | |
content-type: | |
required: true | |
schema: | |
type: string | |
content: | |
application/octet-stream: | |
schema: | |
type: string | |
format: binary | |
'404': | |
description: not found | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/NotFound' | |
/tiles/collections/{p1}/footprint/WebMercatorQuad/{p2}/{p3}/{p4}: | |
get: | |
description: MVT endpoint for a collection's footprint | |
operationId: collectionFootprintTiles | |
parameters: | |
- name: p1 | |
in: path | |
required: true | |
schema: | |
type: string | |
- name: p2 | |
in: path | |
required: true | |
schema: | |
type: integer | |
- name: p3 | |
in: path | |
required: true | |
schema: | |
type: integer | |
- name: p4 | |
in: path | |
required: true | |
schema: | |
type: integer | |
responses: | |
'200': | |
description: '' | |
headers: | |
content-type: | |
required: true | |
schema: | |
type: string | |
content: | |
application/octet-stream: | |
schema: | |
type: string | |
format: binary | |
'404': | |
description: not found | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/NotFound' | |
/tiles/collections/{p1}/footprint/tile-json: | |
get: | |
description: TileJSON representation of this collection's footprint tiles | |
operationId: collectionFootprintTileJSON | |
parameters: | |
- name: p1 | |
in: path | |
required: true | |
schema: | |
type: string | |
responses: | |
'200': | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Json' | |
'404': | |
description: not found | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/NotFound' | |
components: | |
schemas: | |
Json: {} | |
NotFound: | |
required: | |
- msg | |
type: object | |
properties: | |
msg: | |
type: string | |
ValidationError: | |
required: | |
- msg | |
type: object | |
properties: | |
msg: | |
type: string | |
MidAirCollision: | |
required: | |
- msg | |
type: object | |
properties: | |
msg: | |
type: string | |
SearchFilters: | |
type: object | |
properties: | |
bbox: | |
$ref: '#/components/schemas/Bbox' | |
datetime: | |
$ref: '#/components/schemas/Json' | |
intersects: | |
$ref: '#/components/schemas/Json' | |
collections: | |
type: array | |
items: | |
type: string | |
items: | |
type: array | |
items: | |
type: string | |
limit: | |
type: integer | |
next: | |
type: string | |
Bbox: | |
oneOf: | |
- $ref: '#/components/schemas/ThreeDimBbox' | |
- $ref: '#/components/schemas/TwoDimBbox' | |
ThreeDimBbox: | |
required: | |
- xmin | |
- ymin | |
- zmin | |
- xmax | |
- ymax | |
- zmax | |
type: object | |
properties: | |
xmin: | |
type: number | |
format: double | |
ymin: | |
type: number | |
format: double | |
zmin: | |
type: number | |
format: double | |
xmax: | |
type: number | |
format: double | |
ymax: | |
type: number | |
format: double | |
zmax: | |
type: number | |
format: double | |
TwoDimBbox: | |
required: | |
- xmin | |
- ymin | |
- xmax | |
- ymax | |
type: object | |
properties: | |
xmin: | |
type: number | |
format: double | |
ymin: | |
type: number | |
format: double | |
xmax: | |
type: number | |
format: double | |
ymax: | |
type: number | |
format: double |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment