1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
|
swagger: "2.0"
info:
title: "Configurable HTTP Proxy"
description: "The REST API for configurable-http-proxy.\n\n Find out more: https://github.com/jupyterhub/configurable-http-proxy/blob/HEAD/README.md"
version: "1.1.0"
securityDefinitions:
token:
type: "apiKey"
name: "Authorization"
in: "header"
security:
- token: []
basePath: "/api/"
produces:
- "application/json"
tags:
- name: "routes"
description: "Everything about configured routes"
schemes:
- "http"
- "https"
paths:
/routes:
get:
tags:
- "routes"
summary: "Fetches the routing table"
description: "All routes currently in the proxy's routing table, excluding the default route."
parameters:
- name: "inactive_since"
in: "query"
description: "Only return routes with last_activity before this time"
required: false
type: "string"
format: "ISO8601 Timestamp"
responses:
200:
description: "The routing table"
schema:
$ref: "#/definitions/RoutingTable"
400:
description: "Invalid timestamp provided"
404:
description: "Routing table missing"
/routes/{route_spec}:
post:
tags:
- "routes"
summary: "Create a new route"
parameters:
- name: "route_spec"
description: "Route specification to create - a path prefix if the proxy is in path mode (default) or '/' followed by hostname if it is in host mode."
in: "path"
required: true
type: "string"
format: "Path"
- name: "body"
in: "body"
schema:
$ref: "#/definitions/RouteTarget"
required: true
responses:
201:
description: "Successfully created"
delete:
tags:
- "routes"
summary: "Delete the given route"
parameters:
- name: "route_spec"
in: "path"
required: true
type: "string"
format: "Path"
description: >-
Route specification to create - a path prefix if the proxy is in
path mode (default) or '/' followed by hostname if it is in host
mode.
responses:
204:
description: "Successfully deleted"
definitions:
RoutingTable:
type: "object"
description: "Maps keys (route path prefixes / hostnames) to their targets"
additionalProperties:
$ref: "#/definitions/RouteTarget"
RouteTarget:
type: "object"
properties:
target:
type: "string"
format: "URI"
description: >-
Fully qualified URL that will be the target of proxied requests that
match this route
last_activity:
type: "string"
format: "ISO8601 Timestamp"
readOnly: true
description: "ISO8601 Timestamp of when this route was last used to route a request"
|