Skip to content

Instantly share code, notes, and snippets.

@ChristineP2
Last active December 29, 2021 22:23
Show Gist options
  • Select an option

  • Save ChristineP2/e749ff006545fbad77577e824d2ceda5 to your computer and use it in GitHub Desktop.

Select an option

Save ChristineP2/e749ff006545fbad77577e824d2ceda5 to your computer and use it in GitHub Desktop.
OpenAPI for postman-echo
// Based on: https://github.com/api-evangelist/postman/blob/master/postman-echo-openapi.json
{
"openapi": "3.0.0",
"info": {
"version": "1.0",
"title": "Postman Echo",
"description": "Postman Echo is service you can use to test your REST clients and make sample API calls. It provides endpoints for `GET`, `POST`, `PUT`, various auth mechanisms and other utility endpoints.\n\nThe documentation for the endpoints as well as example responses can be found at [https:\/\/echo.getpostman.com](https:\/\/echo.getpostman.com?source=echo-collection-app-onboarding)",
"termsOfService": "http:\/\/exmple.com\/license\/"
},
"servers": [ {
"url" : "https://postman-echo.com"
}],
"paths": {
"\/digest-auth": {
"get": {
"summary": "DigestAuth Request",
"description": "Performing a simple `GET` request to this endpoint returns status code `401 Unauthorized` with `WWW-Authenticate` header containing information to successfully authenticate subsequent requests.\nThe `WWW-Authenticate` header must be processed to extract `realm` and `nonce` values to hash subsequent requests.\n\nWhen this request is executed within Postman, the script attached with this request does the hard work of extracting realm and nonce from the header and set it as [global variables](https:\/\/",
"operationId": "DigestAuthGet",
"deprecated": false,
"parameters": [],
"responses": {
"200": {
"description": "",
"content": {
"application\/json; charset=utf-8": {
"schema": {
"$ref": "#\/components\/schemas\/200"
}
}
}
}
}
}
},
"\/basic-auth": {
"get": {
"summary": "Basic Auth",
"description": "This endpoint simulates a **basic-auth** protected endpoint. \nThe endpoint accepts a default username and password and returns a status code of `200 ok` only if the same is provided. \nOtherwise it will return a status code `401 unauthorized`.\n\n> Username: `postman`\n> \n> Password: `password`\n\nTo use this endpoint, send a request with the header `Authorization: Basic cG9zdG1hbjpwYXNzd29yZA==`. \nThe cryptic latter half of the header value is a base64 encoded concatenation of the default username an",
"operationId": "BasicAuthGet",
"deprecated": false,
"parameters": [],
"responses": {
"200": {
"description": "",
"content": {
"application\/json; charset=utf-8": {
"schema": {
"$ref": "#\/components\/schemas\/200"
}
}
}
}
}
}
},
"\/oauth1": {
"get": {
"summary": "OAuth1.0 Verify Signature",
"description": "OAuth1.0a is a specification that defines a protocol that can be used by one\nservice to access \"protected\" resources (endpoints) on another service. A\nmajor part of OAuth1.0 is HTTP Request Signing. This endpoint allows you to \ncheck whether the request calculation works properly in the client. \n\nThe endpoint supports the HTTP ``Authorization`` header. In case the signature\nverification fails, the endpoint provides the four debug values,\n\n* ``base_uri``\n* ``normalized_param_string``\n* ``base_str",
"operationId": "Oauth1Get",
"deprecated": false,
"parameters": [],
"responses": {
"200": {
"description": "",
"content": {
"application\/json; charset=utf-8": {
"schema": {
"$ref": "#\/components\/schemas\/200"
}
}
}
}
}
}
},
"\/auth\/hawk": {
"get": {
"summary": "Hawk Auth",
"description": "This endpoint is a Hawk Authentication protected endpoint. [Hawk authentication](https:\/\/github.com\/hueniverse\/hawk) is a widely used protocol for protecting API endpoints. One of Hawk's main goals is to enable HTTP authentication for services that do not use TLS (although it can be used in conjunction with TLS as well).\n\nIn order to use this endpoint, select the \"Hawk Auth\" helper inside Postman, and set the following values:\n\nHawk Auth ID: `dh37fgj492je`\n\nHawk Auth Key: `werxhqb98rpaxn39848xru",
"operationId": "AuthHawkGet",
"deprecated": false,
"parameters": [],
"responses": {
"200": {
"description": "",
"content": {
"application\/json; charset=utf-8": {
"schema": {
"$ref": "#\/components\/schemas\/200"
}
}
}
}
}
}
},
"\/cookies\/set": {
"get": {
"summary": "Set Cookies",
"description": "The cookie setter endpoint accepts a list of cookies and their values as part of URL parameters of a `GET` request. These cookies are saved and can be subsequently retrieved or deleted. The response of this request returns a JSON with all cookies listed.\n\nTo set your own set of cookies, simply replace the URL parameters \"foo1=bar1&foo2=bar2\" with your own set of key-value pairs.",
"operationId": "CookiesSetGet",
"deprecated": false,
"parameters": [ {
"name": "foo1",
"in": "query",
"description": "",
"schema" : {
"type": "string"
}
},
{
"name": "foo2",
"in": "query",
"description": "",
"schema" : {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application\/json; charset=utf-8": {
"schema": {
"$ref": "#\/components\/schemas\/200"
}
}
}
}
}
}
},
"\/cookies\/delete": {
"get": {
"summary": "Delete Cookies",
"description": "One or more cookies that has been set for this domain can be deleted by providing the cookie names as part of the URL parameter. The response of this request is a JSON containing the list of currently set cookies.",
"operationId": "CookiesDeleteGet",
"deprecated": false,
"parameters": [
{
"name": "foo1",
"in": "query",
"description": "",
"schema" : {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application\/json; charset=utf-8": {
"schema": {
"$ref": "#\/components\/schemas\/200"
}
}
}
}
}
}
},
"\/cookies": {
"get": {
"summary": "Get Cookies",
"description": "Use this endpoint to get a list of all cookies that are stored with respect to this domain. Whatever key-value pairs that has been previously set by calling the \"Set Cookies\" endpoint, will be returned as response JSON.",
"operationId": "CookiesGet",
"deprecated": false,
"parameters": [],
"responses": {
"200": {
"description": "",
"content": {
"application\/json; charset=utf-8": {
"schema": {
"$ref": "#\/components\/schemas\/200"
}
}
}
}
}
}
},
"\/headers": {
"get": {
"summary": "Request Headers",
"description": "A `GET` request to this endpoint returns the list of all request headers as part of the response JSON.\nIn Postman, sending your own set of headers through the [Headers tab](https:\/\/www.getpostman.com\/docs\/requests#headers?source=echo-collection-app-onboarding) will reveal the headers as part of the response.",
"operationId": "HeadersGet",
"deprecated": false,
"parameters": [],
"responses": {
"200": {
"description": "",
"content": {
"application\/json; charset=utf-8": {
"schema": {
"$ref": "#\/components\/schemas\/200"
}
}
}
}
}
}
},
"\/response-headers": {
"get": {
"summary": "Response Headers",
"description": "This endpoint causes the server to send custom set of response headers. Providing header values as part of the URL parameters of a `GET` request to this endpoint returns the same as part of response header.\n\nTo send your own set of headers, simply add or replace the the URL parameters with your own set.",
"operationId": "ResponseHeadersGet",
"deprecated": false,
"parameters": [
{
"name": "Content-Type",
"in": "query",
"description": "",
"schema" : {
"type": "string"
}
},
{
"name": "test",
"in": "query",
"description": "",
"schema" : {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application\/json; charset=utf-8": {
"schema": {
"$ref": "#\/components\/schemas\/200"
}
}
}
}
}
}
},
"\/get": {
"get": {
"summary": "GET Request",
"description": "The HTTP `GET` request method is meant to retrieve data from a server. The data\nis identified by a unique URI (Uniform Resource Identifier). \n\nA `GET` request can pass parameters to the server using \"Query String \nParameters\". For example, in the following request,\n\n> http:\/\/example.com\/hi\/there?hand=wave\n\nThe parameter \"hand\" has the value \"wave\".\n\nThis endpoint echoes the HTTP headers, request parameters and the complete\nURI requested.",
"operationId": "GetGet",
"deprecated": false,
"parameters": [ {
"name": "test",
"in": "query",
"description": "",
"schema" : {
"type": "string"
}
} ],
"responses": {
"200": {
"description": "",
"content": {
"application\/json; charset=utf-8": {
"schema": {
"$ref": "#\/components\/schemas\/200"
}
}
}
}
}
}
},
"\/post": {
"post": {
"summary": "POST Request",
"description": "The HTTP `POST` request method is meant to transfer data to a server \n(and elicit a response). What data is returned depends on the implementation\nof the server.\n\nA `POST` request can pass parameters to the server using \"Query String \nParameters\", as well as the Request Body. For example, in the following request,\n\n> POST \/hi\/there?hand=wave\n>\n> <request-body>\n\nThe parameter \"hand\" has the value \"wave\". The request body can be in multiple\nformats. These formats are defined by the MIME type of th",
"operationId": "PostPost",
"deprecated": false,
"parameters": [],
"responses": {
"200": {
"description": "",
"content": {
"application\/json; charset=utf-8": {
"schema": {
"$ref": "#\/components\/schemas\/200"
}
}
}
}
}
}
},
"\/put": {
"put": {
"summary": "PUT Request",
"description": "The HTTP `PUT` request method is similar to HTTP `POST`. It too is meant to \ntransfer data to a server (and elicit a response). What data is returned depends on the implementation\nof the server.\n\nA `PUT` request can pass parameters to the server using \"Query String \nParameters\", as well as the Request Body. For example, in the following \nraw HTTP request,\n\n> PUT \/hi\/there?hand=wave\n>\n> <request-body>\n\n\n",
"operationId": "PutPut",
"deprecated": false,
"parameters": [],
"responses": {
"200": {
"description": "",
"content": {
"application\/json; charset=utf-8": {
"schema": {
"$ref": "#\/components\/schemas\/200"
}
}
}
}
}
}
},
"\/patch": {
"patch": {
"summary": "PATCH Request",
"description": "The HTTP `PATCH` method is used to update resources on a server. The exact\nuse of `PATCH` requests depends on the server in question. There are a number\nof server implementations which handle `PATCH` differently. Technically, \n`PATCH` supports both Query String parameters and a Request Body.\n\nThis endpoint accepts an HTTP `PATCH` request and provides debug information\nsuch as the HTTP headers, Query String arguments, and the Request Body.",
"operationId": "PatchPatch",
"deprecated": false,
"parameters": [],
"responses": {
"200": {
"description": "",
"content": {
"application\/json; charset=utf-8": {
"schema": {
"$ref": "#\/components\/schemas\/200"
}
}
}
}
}
}
},
"\/delete": {
"delete": {
"summary": "DELETE Request",
"description": "The HTTP `DELETE` method is used to delete resources on a server. The exact\nuse of `DELETE` requests depends on the server implementation. In general, \n`DELETE` requests support both, Query String parameters as well as a Request \nBody.\n\nThis endpoint accepts an HTTP `DELETE` request and provides debug information\nsuch as the HTTP headers, Query String arguments, and the Request Body.",
"operationId": "DeleteDelete",
"deprecated": false,
"parameters": [],
"responses": {
"200": {
"description": "",
"content": {
"application\/json; charset=utf-8": {
"schema": {
"$ref": "#\/components\/schemas\/200"
}
}
}
}
}
}
},
"\/status\/200": {
"get": {
"summary": "Response Status Code",
"description": "This endpoint allows one to instruct the server which status code to respond with.\n\nEvery response is accompanied by a status code. The status code provides a summary of the nature of response sent by the server. For example, a status code of `200` means everything is okay with the response and a code of `404` implies that the requested URL does not exist on server. \nA list of all valid HTTP status code can be found at the [List of Status Codes](https:\/\/en.wikipedia.org\/wiki\/List_of_HTTP_status_",
"operationId": "Status200Get",
"deprecated": false,
"parameters": [],
"responses": {
"200": {
"description": "",
"content": {
"application\/json; charset=utf-8": {
"schema": {
"$ref": "#\/components\/schemas\/200"
}
}
}
}
}
}
},
"\/stream\/10": {
"get": {
"summary": "Streamed Response",
"description": "This endpoint allows one to recieve streaming http response using [chunked transfer encoding](https:\/\/en.wikipedia.org\/wiki\/Chunked_transfer_encoding) of a configurable length.\n\nA streaming response does not wait for the entire response to be generated on server before flushing it out. This implies that for a fairly large response, parts of it can be streamed to the requestee as and when it is generated on server. The client can then take actions of processing this partially received data.",
"operationId": "Stream10Get",
"deprecated": false,
"parameters": [],
"responses": {
"200": {
"description": "",
"content": {
"application\/json; charset=utf-8": {
"schema": {
"$ref": "#\/components\/schemas\/200"
}
}
}
}
}
}
},
"\/delay\/3": {
"get": {
"summary": "Delay Response",
"description": "Using this endpoint one can configure how long it takes for the server to come back with a response. Appending a number to the URL defines the time (in seconds) the server will wait before responding.\n\nNote that a maximum delay of 10 seconds is accepted by the server.",
"operationId": "Delay3Get",
"deprecated": false,
"parameters": [],
"responses": {
"200": {
"description": "",
"content": {
"application\/json; charset=utf-8": {
"schema": {
"$ref": "#\/components\/schemas\/200"
}
}
}
}
}
}
},
"\/encoding\/utf8": {
"get": {
"summary": "Get UTF8 Encoded Response",
"description": "If a response of an endpoint requires to send data beyond the basic English \/ ASCII character set, the `charset` parameter in the `Content-Type` response header defines the character encoding policy.\n\nThis endpoint returns an `UTF8` character encoded response body with text in various languages such as Greek, Latin, East Asian, etc. Postman can interpret the character encoding and use appropriate methods to display the character set in responses.",
"operationId": "EncodingUtf8Get",
"deprecated": false,
"parameters": [],
"responses": {
"200": {
"description": "",
"content": {
"application\/json; charset=utf-8": {
"schema": {
"$ref": "#\/components\/schemas\/200"
}
}
}
}
}
}
},
"\/gzip": {
"get": {
"summary": "GZip Compressed Response",
"description": "This endpoint returns the response using [gzip compression algoritm](https:\/\/en.wikipedia.org\/wiki\/Gzip).\nThe uncompressed response is a JSON string containing the details of the request sent by the client. For this endpoint to work, one should request with `Accept-encoding` header containing `gzip` as part of its value. Postman supports gzip, deflate and SDCH decoding and automatically sends them as part of the request.\n\nHTTP Compression allows the server to send responses in a compressed forma",
"operationId": "GzipGet",
"deprecated": false,
"parameters": [],
"responses": {
"200": {
"description": "",
"content": {
"application\/json; charset=utf-8": {
"schema": {
"$ref": "#\/components\/schemas\/200"
}
}
}
}
}
}
},
"\/deflate": {
"get": {
"summary": "Deflate Compressed Response",
"description": "This endpoint returns the response using [deflate compression algoritm](https:\/\/en.wikipedia.org\/wiki\/DEFLATE). \nThe uncompressed response is a JSON string containing the details of the request sent by the client. For this endpoint to work, one should request with `Accept-encoding` header containing `deflate` as part of its value. Postman supports gzip, deflate and SDCH decoding and automatically sends them as part of the request.\n\nHTTP Compression allows the server to send responses in a compre",
"operationId": "DeflateGet",
"deprecated": false,
"parameters": [],
"responses": {
"200": {
"description": "",
"content": {
"application\/json; charset=utf-8": {
"schema": {
"$ref": "#\/components\/schemas\/200"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"200": {
"type": "object",
"properties": {
"authenticated": {
"description": "",
"type": "boolean"
}
}
},
"Success": {
"type": "object",
"properties": {
"status": {
"description": "",
"type": "string"
},
"message": {
"description": "",
"type": "string"
}
}
},
"Cookies": {
"type": "object",
"properties": {
"cookies": {
"description": "",
"type": "string"
}
}
},
"cookies": {
"type": "object"
},
"Cookies1": {
"type": "object",
"properties": {
"foo1": {
"description": "",
"type": "string"
},
"foo2": {
"description": "",
"type": "string"
}
}
},
"CookiesResponse": {
"type": "object",
"properties": {
"cookies": {
"description": "",
"type": "string"
}
}
},
"Cookies2": {
"type": "object",
"properties": {
"foo2": {
"description": "",
"type": "string"
}
}
},
"Cookies3": {
"type": "object",
"properties": {
"Cookies2": {
"description": "",
"type": "object"
},
"cookies": {
"description": "",
"type": "string"
}
}
},
"my-sample-header": {
"type": "object",
"properties": {
"headers": {
"description": "",
"type": "string"
}
}
},
"headers": {
"type": "object",
"properties": {
"host": {
"description": "",
"type": "string"
},
"accept": {
"description": "",
"type": "string"
},
"accept-encoding": {
"description": "",
"type": "string"
},
"accept-language": {
"description": "",
"type": "string"
},
"cache-control": {
"description": "",
"type": "string"
},
"my-sample-header": {
"description": "",
"type": "string"
},
"postman-token": {
"description": "",
"type": "string"
},
"user-agent": {
"description": "",
"type": "string"
},
"x-forwarded-port": {
"description": "",
"type": "string"
},
"x-forwarded-proto": {
"description": "",
"type": "string"
}
}
},
"Responseheaders": {
"type": "object",
"properties": {
"Content-Type": {
"description": "",
"type": "string"
},
"test": {
"description": "",
"type": "string"
}
}
},
"2002": {
"type": "object",
"properties": {
"status": {
"description": "",
"type": "integer"
}
}
},
"sampledelayresponse": {
"type": "object",
"properties": {
"delay": {
"description": "",
"type": "string"
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment