@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api httpbin.org
@base https://httpbin.org/
@version 0.9.2
@auth ApiKey Authorization in header
@endpoints 73
@hint download_for_search
@toc absolute-redirect(1), anything(10), base64(1), basic-auth(1), bearer(1), brotli(1), bytes(1), cache(2), cookies(4), deflate(1), delay(5), delete(1), deny(1), digest-auth(3), drip(1), encoding(1), etag(1), get(1), gzip(1), headers(1), hidden-basic-auth(1), html(1), image(5), ip(1), json(1), links(1), patch(1), post(1), put(1), range(1), redirect-to(5), redirect(1), relative-redirect(1), response-headers(2), robots.txt(1), status(5), stream-bytes(1), stream(1), user-agent(1), uuid(1), xml(1)

@group absolute-redirect
@endpoint GET /absolute-redirect/{n}
@desc Absolutely 302 Redirects n times.
@optional {n: any}
@errors {302: A redirection.}

@endgroup

@group anything
@endpoint DELETE /anything
@desc Returns anything passed in request data.
@returns(200) Anything passed in request

@endpoint GET /anything
@desc Returns anything passed in request data.
@returns(200) Anything passed in request

@endpoint PATCH /anything
@desc Returns anything passed in request data.
@returns(200) Anything passed in request

@endpoint POST /anything
@desc Returns anything passed in request data.
@returns(200) Anything passed in request

@endpoint PUT /anything
@desc Returns anything passed in request data.
@returns(200) Anything passed in request

@endpoint DELETE /anything/{anything}
@desc Returns anything passed in request data.
@returns(200) Anything passed in request

@endpoint GET /anything/{anything}
@desc Returns anything passed in request data.
@returns(200) Anything passed in request

@endpoint PATCH /anything/{anything}
@desc Returns anything passed in request data.
@returns(200) Anything passed in request

@endpoint POST /anything/{anything}
@desc Returns anything passed in request data.
@returns(200) Anything passed in request

@endpoint PUT /anything/{anything}
@desc Returns anything passed in request data.
@returns(200) Anything passed in request

@endgroup

@group base64
@endpoint GET /base64/{value}
@desc Decodes base64url-encoded string.
@optional {value: any}
@returns(200) Decoded base64 content.

@endgroup

@group basic-auth
@endpoint GET /basic-auth/{user}/{passwd}
@desc Prompts the user for authorization using HTTP Basic Auth.
@optional {user: any, passwd: any}
@returns(200) Sucessful authentication.
@errors {401: Unsuccessful authentication.}

@endgroup

@group bearer
@endpoint GET /bearer
@desc Prompts the user for authorization using bearer authentication.
@optional {Authorization: str}
@returns(200) Sucessful authentication.
@errors {401: Unsuccessful authentication.}

@endgroup

@group brotli
@endpoint GET /brotli
@desc Returns Brotli-encoded data.
@returns(200) Brotli-encoded data.

@endgroup

@group bytes
@endpoint GET /bytes/{n}
@desc Returns n random bytes generated with given seed
@optional {n: any}
@returns(200) Bytes.

@endgroup

@group cache
@endpoint GET /cache
@desc Returns a 304 if an If-Modified-Since header or If-None-Match is present. Returns the same as a GET otherwise.
@optional {If-Modified-Since: any, If-None-Match: any}
@returns(200) Cached response
@errors {304: Modified}

@endpoint GET /cache/{value}
@desc Sets a Cache-Control header for n seconds.
@optional {value: any}
@returns(200) Cache control set

@endgroup

@group cookies
@endpoint GET /cookies
@desc Returns cookie data.
@returns(200) Set cookies.

@endpoint GET /cookies/delete
@desc Deletes cookie(s) as provided by the query string and redirects to cookie list.
@optional {freeform: map}
@returns(200) Redirect to cookie list

@endpoint GET /cookies/set
@desc Sets cookie(s) as provided by the query string and redirects to cookie list.
@optional {freeform: map}
@returns(200) Redirect to cookie list

@endpoint GET /cookies/set/{name}/{value}
@desc Sets a cookie and redirects to cookie list.
@optional {name: any, value: any}
@returns(200) Set cookies and redirects to cookie list.

@endgroup

@group deflate
@endpoint GET /deflate
@desc Returns Deflate-encoded data.
@returns(200) Defalte-encoded data.

@endgroup

@group delay
@endpoint DELETE /delay/{delay}
@desc Returns a delayed response (max of 10 seconds).
@optional {delay: any}
@returns(200) A delayed response.

@endpoint GET /delay/{delay}
@desc Returns a delayed response (max of 10 seconds).
@optional {delay: any}
@returns(200) A delayed response.

@endpoint PATCH /delay/{delay}
@desc Returns a delayed response (max of 10 seconds).
@optional {delay: any}
@returns(200) A delayed response.

@endpoint POST /delay/{delay}
@desc Returns a delayed response (max of 10 seconds).
@optional {delay: any}
@returns(200) A delayed response.

@endpoint PUT /delay/{delay}
@desc Returns a delayed response (max of 10 seconds).
@optional {delay: any}
@returns(200) A delayed response.

@endgroup

@group delete
@endpoint DELETE /delete
@desc The request's DELETE parameters.
@returns(200) The request's DELETE parameters.

@endgroup

@group deny
@endpoint GET /deny
@desc Returns page denied by robots.txt rules.
@returns(200) Denied message

@endgroup

@group digest-auth
@endpoint GET /digest-auth/{qop}/{user}/{passwd}
@desc Prompts the user for authorization using Digest Auth.
@optional {qop: any # auth or auth-int, user: any, passwd: any}
@returns(200) Sucessful authentication.
@errors {401: Unsuccessful authentication.}

@endpoint GET /digest-auth/{qop}/{user}/{passwd}/{algorithm}
@desc Prompts the user for authorization using Digest Auth + Algorithm.
@optional {qop: any # auth or auth-int, user: any, passwd: any, algorithm: any # MD5, SHA-256, SHA-512}
@returns(200) Sucessful authentication.
@errors {401: Unsuccessful authentication.}

@endpoint GET /digest-auth/{qop}/{user}/{passwd}/{algorithm}/{stale_after}
@desc Prompts the user for authorization using Digest Auth + Algorithm.
@optional {qop: any # auth or auth-int, user: any, passwd: any, algorithm: any # MD5, SHA-256, SHA-512, stale_after: any}
@returns(200) Sucessful authentication.
@errors {401: Unsuccessful authentication.}

@endgroup

@group drip
@endpoint GET /drip
@desc Drips data over a duration after an optional initial delay.
@optional {duration: any # The amount of time (in seconds) over which to drip each byte, numbytes: any # The number of bytes to respond with, code: any # The response code that will be returned, delay: any # The amount of time (in seconds) to delay before responding}
@returns(200) A dripped response.

@endgroup

@group encoding
@endpoint GET /encoding/utf8
@desc Returns a UTF-8 encoded body.
@returns(200) Encoded UTF-8 content.

@endgroup

@group etag
@endpoint GET /etag/{etag}
@desc Assumes the resource has the given etag and responds to If-None-Match and If-Match headers appropriately.
@optional {If-None-Match: any, If-Match: any}
@returns(200) Normal response
@errors {412: match}

@endgroup

@group get
@endpoint GET /get
@desc The request's query parameters.
@returns(200) The request's query parameters.

@endgroup

@group gzip
@endpoint GET /gzip
@desc Returns GZip-encoded data.
@returns(200) GZip-encoded data.

@endgroup

@group headers
@endpoint GET /headers
@desc Return the incoming request's HTTP headers.
@returns(200) The request's headers.

@endgroup

@group hidden-basic-auth
@endpoint GET /hidden-basic-auth/{user}/{passwd}
@desc Prompts the user for authorization using HTTP Basic Auth.
@optional {user: any, passwd: any}
@returns(200) Sucessful authentication.
@errors {404: Unsuccessful authentication.}

@endgroup

@group html
@endpoint GET /html
@desc Returns a simple HTML document.
@returns(200) An HTML page.

@endgroup

@group image
@endpoint GET /image
@desc Returns a simple image of the type suggest by the Accept header.
@returns(200) An image.

@endpoint GET /image/jpeg
@desc Returns a simple JPEG image.
@returns(200) A JPEG image.

@endpoint GET /image/png
@desc Returns a simple PNG image.
@returns(200) A PNG image.

@endpoint GET /image/svg
@desc Returns a simple SVG image.
@returns(200) An SVG image.

@endpoint GET /image/webp
@desc Returns a simple WEBP image.
@returns(200) A WEBP image.

@endgroup

@group ip
@endpoint GET /ip
@desc Returns the requester's IP Address.
@returns(200) The Requester's IP Address.

@endgroup

@group json
@endpoint GET /json
@desc Returns a simple JSON document.
@returns(200) An JSON document.

@endgroup

@group links
@endpoint GET /links/{n}/{offset}
@desc Generate a page containing n links to other pages which do the same.
@optional {n: any, offset: any}
@returns(200) HTML links.

@endgroup

@group patch
@endpoint PATCH /patch
@desc The request's PATCH parameters.
@returns(200) The request's PATCH parameters.

@endgroup

@group post
@endpoint POST /post
@desc The request's POST parameters.
@returns(200) The request's POST parameters.

@endgroup

@group put
@endpoint PUT /put
@desc The request's PUT parameters.
@returns(200) The request's PUT parameters.

@endgroup

@group range
@endpoint GET /range/{numbytes}
@desc Streams n random bytes generated with given seed, at given chunk size per packet.
@optional {numbytes: any}
@returns(200) Bytes.

@endgroup

@group redirect-to
@endpoint DELETE /redirect-to
@desc 302/3XX Redirects to the given URL.
@errors {302: A redirection.}

@endpoint GET /redirect-to
@desc 302/3XX Redirects to the given URL.
@required {url: any}
@optional {status_code: any}
@errors {302: A redirection.}

@endpoint PATCH /redirect-to
@desc 302/3XX Redirects to the given URL.
@errors {302: A redirection.}

@endpoint POST /redirect-to
@desc 302/3XX Redirects to the given URL.
@required {url: any}
@optional {status_code: any}
@errors {302: A redirection.}

@endpoint PUT /redirect-to
@desc 302/3XX Redirects to the given URL.
@required {url: any}
@optional {status_code: any}
@errors {302: A redirection.}

@endgroup

@group redirect
@endpoint GET /redirect/{n}
@desc 302 Redirects n times.
@optional {n: any}
@errors {302: A redirection.}

@endgroup

@group relative-redirect
@endpoint GET /relative-redirect/{n}
@desc Relatively 302 Redirects n times.
@optional {n: any}
@errors {302: A redirection.}

@endgroup

@group response-headers
@endpoint GET /response-headers
@desc Returns a set of response headers from the query string.
@optional {freeform: map}
@returns(200) Response headers

@endpoint POST /response-headers
@desc Returns a set of response headers from the query string.
@optional {freeform: map}
@returns(200) Response headers

@endgroup

@group robots.txt
@endpoint GET /robots.txt
@desc Returns some robots.txt rules.
@returns(200) Robots file

@endgroup

@group status
@endpoint DELETE /status/{codes}
@desc Return status code or random status code if more than one are given
@optional {codes: any}
@returns(200) Success
@errors {100: Informational responses, 300: Redirection, 400: Client Errors, 500: Server Errors}

@endpoint GET /status/{codes}
@desc Return status code or random status code if more than one are given
@optional {codes: any}
@returns(200) Success
@errors {100: Informational responses, 300: Redirection, 400: Client Errors, 500: Server Errors}

@endpoint PATCH /status/{codes}
@desc Return status code or random status code if more than one are given
@optional {codes: any}
@returns(200) Success
@errors {100: Informational responses, 300: Redirection, 400: Client Errors, 500: Server Errors}

@endpoint POST /status/{codes}
@desc Return status code or random status code if more than one are given
@optional {codes: any}
@returns(200) Success
@errors {100: Informational responses, 300: Redirection, 400: Client Errors, 500: Server Errors}

@endpoint PUT /status/{codes}
@desc Return status code or random status code if more than one are given
@optional {codes: any}
@returns(200) Success
@errors {100: Informational responses, 300: Redirection, 400: Client Errors, 500: Server Errors}

@endgroup

@group stream-bytes
@endpoint GET /stream-bytes/{n}
@desc Streams n random bytes generated with given seed, at given chunk size per packet.
@optional {n: any}
@returns(200) Bytes.

@endgroup

@group stream
@endpoint GET /stream/{n}
@desc Stream n JSON responses
@optional {n: any}
@returns(200) Streamed JSON responses.

@endgroup

@group user-agent
@endpoint GET /user-agent
@desc Return the incoming requests's User-Agent header.
@returns(200) The request's User-Agent header.

@endgroup

@group uuid
@endpoint GET /uuid
@desc Return a UUID4.
@returns(200) A UUID4.

@endgroup

@group xml
@endpoint GET /xml
@desc Returns a simple XML document.
@returns(200) An XML document.

@endgroup

@end
