POST
/
api
/
proxy
Proxy API request
curl --request POST \
  --url https://{tenant}/api/proxy \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "method": "GET",
  "url": "http://localhost:8181/test-oas/get",
  "headers": {
    "test": "tyk",
    "Content-Type": "application/json"
  },
  "body": {
    "name": "New Resource",
    "description": "Description of the resource."
  }
}'
{
  "status_code": 200,
  "headers": {
    "Access-Control-Allow-Credentials": "true",
    "Access-Control-Allow-Origin": "*",
    "Content-Length": "364",
    "Content-Type": "application/json",
    "Date": "Thu, 19 Dec 2024 14:10:48 GMT",
    "Server": "gunicorn/19.9.0",
    "X-Ratelimit-Limit": "0",
    "X-Ratelimit-Remaining": "0",
    "X-Ratelimit-Reset": "0"
  },
  "body": {
    "args": {},
    "headers": {
      "Accept-Encoding": "gzip",
      "Content-Length": "83",
      "Content-Type": "application/json",
      "Host": "httpbin.org",
      "Test": "tyk",
      "User-Agent": "Go-http-client/1.1",
      "X-Amzn-Trace-Id": "Root=1-67642968-11206636527acf9a25d230c3"
    },
    "origin": "::1, 81.18.84.15",
    "url": "http://httpbin.org/get"
  }
}

Authorizations

Authorization
string
header
required

The Tyk Dashboard API Access Credentials

Body

application/json
method
string
required

HTTP method for the proxy request (GET, POST, PUT, DELETE, etc.)

url
string
required

Full URL for the proxy request (valid Gateway url), including scheme, host, and path

headers
object

Headers to be sent with the proxy request

body
object

Body of the proxy request, typically used for POST or PUT requests

Response

Successful response

status_code
integer

HTTP status code of the proxied response

headers
object

Headers received from the proxied response

body
object

Body of the proxied response, parsed as JSON if possible