Last active
November 12, 2016 01:07
-
-
Save deoxxa/b831632b5fd33c2317f81617bff56417 to your computer and use it in GitHub Desktop.
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: Live Table API | |
description: Interact with and configure a Siphon.IO Live Table | |
version: "1.0.0" | |
host: api.uber.com | |
schemes: | |
- https | |
basePath: /api/v1 | |
produces: | |
- application/json | |
paths: | |
/issuers: | |
get: | |
summary: Issuer summaries | |
description: | | |
The issuers endpoint returns a list of OpenID issuer summaries. This is | |
useful for choosing the issuer IDs to be used for a stream. | |
tags: | |
- Issuers | |
responses: | |
200: | |
description: An array of issuer summaries | |
schema: | |
type: array | |
items: | |
type: object | |
properties: | |
id: { type: string } | |
name: { type: string } | |
icon: { type: string } | |
clientId: { type: string } | |
authorizationEndpoint: { type: string } | |
tokenEndpoint: { type: string } | |
500: | |
description: Unexpected error | |
post: | |
summary: Create or update issuers | |
description: | | |
This endpoint is used to create or update OpenID Connect issuer records. | |
If an issuer already exists with the specified issuer and clientId | |
fields, it will be updated. Otherwise a new record will be created. | |
tags: | |
- Issuers | |
parameters: | |
- name: issuer | |
in: body | |
required: true | |
schema: | |
type: object | |
required: [ name, issuer, clientId, clientSecret ] | |
properties: | |
name: { type: string } | |
icon: { type: string } | |
issuer: { type: string } | |
clientId: { type: string } | |
clientSecret: { type: string } | |
authorizationEndpoint: { type: string } | |
tokenEndpoint: { type: string } | |
responses: | |
303: | |
description: Redirect to the created or updated issuer | |
headers: | |
Location: | |
type: string | |
description: Location of the updated or created issuer | |
406: | |
description: Invalid parameters sent, e.g. missing fields | |
500: | |
description: Unexpected error | |
/issuers/{id}: | |
get: | |
summary: Issuer summaries | |
description: | | |
The issuers endpoint returns a list of OpenID issuer summaries. This is | |
useful for choosing the issuers IDs to be used for a stream. | |
tags: | |
- Issuers | |
parameters: | |
- name: id | |
required: true | |
type: string | |
in: path | |
responses: | |
200: | |
description: An issuer summary | |
schema: | |
type: object | |
properties: | |
id: { type: string } | |
name: { type: string } | |
icon: { type: string } | |
clientId: { type: string } | |
authorizationEndpoint: { type: string } | |
tokenEndpoint: { type: string } | |
404: | |
description: Issuer not found | |
500: | |
description: Unexpected error | |
/streams: | |
get: | |
summary: List available streams | |
description: | | |
This endpoint is used to discover streams that are available to the | |
user. It will return all public streams (i.e. those without issuers set), | |
along with all private streams that the user is allowed to view. | |
tags: | |
- Streams | |
responses: | |
200: | |
description: Stream summaries | |
schema: | |
type: array | |
items: | |
type: object | |
properties: | |
id: { type: string } | |
name: { type: string } | |
slug: { type: string } | |
approved: { type: boolean } | |
500: | |
description: Unexpected error | |
post: | |
summary: Create or update stream records | |
description: | | |
This endpoint is used to create or update stream records. If a stream | |
already exists with the specified slug, it will be updated with the | |
supplied parameters. Otherwise a new record will be created. | |
tags: | |
- Streams | |
consumes: | |
- application/json | |
- application/yaml | |
parameters: | |
- name: stream | |
in: body | |
schema: | |
type: object | |
required: [ slug, index ] | |
properties: | |
name: { type: string } | |
slug: { type: string } | |
index: { type: string } | |
issuers: | |
description: | | |
If supplied, this stream will only be accessible to users who | |
can log into one of the provided OpenID issuers. | |
type: array | |
items: | |
type: object | |
properties: | |
id: { type: string } | |
autoApproveUser: { type: boolean } | |
fields: | |
type: array | |
items: { type: string } | |
description: | | |
A list of fields to restrict this stream to from the source | |
data. This will be validated upon submission. | |
query: | |
type: object | |
description: | | |
An elasticsearch query to enforce in addition to any | |
user-supplied queries for this stream. This will be validated | |
upon submission. | |
responses: | |
303: | |
description: Redirect to the created record | |
headers: | |
Location: | |
type: string | |
description: Location of the updated or created stream | |
406: | |
description: | | |
Invalid parameters sent, e.g. missing fields, or an invalid query or | |
field list | |
500: | |
description: Unexpected error | |
/streams/{id}: | |
get: | |
summary: Stream configuration | |
tags: | |
- Streams | |
parameters: | |
- name: id | |
required: true | |
in: path | |
type: string | |
responses: | |
200: | |
description: Stream configuration required by the client | |
schema: | |
type: object | |
properties: | |
id: { type: string } | |
name: { type: string } | |
slug: { type: string } | |
issuers: | |
type: array | |
items: | |
type: object | |
properties: | |
id: { type: string } | |
autoApproveUser: { type: boolean } | |
fields: | |
type: array | |
items: | |
type: object | |
properties: | |
name: { type: string } | |
type: { type: string } | |
show: { type: boolean } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment