Skip to main content
PATCH
/
api
/
apis
/
oas
/
{apiId}
curl --request PATCH \
  --url https://{tenant}/api/apis/oas/{apiId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "https://gist.githubusercontent.com/lghiur/385183f81d0878e5806fffab843d2ef2/raw/1da0aa8b08b496e6c8c84c4996fad6c4877218a0/Petstore%2520Tyk%2520OAS%2520API%2520Definition"
}
'
{
  "Message": "API updated",
  "Meta": null,
  "Status": "OK"
}

Authorizations

Authorization
string
header
required

The Tyk Dashboard API Access Credentials

Path Parameters

apiId
string
required

ID of the API you want to patch.

Query Parameters

upstreamURL
string

Upstream URL for the API.

listenPath
string

Listen path for the API.

customDomain
string

Custom domain for the API.

allowList
enum<boolean>

Enable allowList middleware for all endpoints.

Available options:
true,
false
Example:

true

validateRequest
enum<boolean>

Enable validateRequest middleware for all endpoints having a request body with media type application/json.

Available options:
true,
false
Example:

true

mockResponse
enum<boolean>

Enable mockResponse middleware for all endpoints having responses configured.

Available options:
true,
false
Example:

true

authentication
enum<boolean>

Enable/disable the authentication mechanism in your Tyk Gateway for your OAS API.

Available options:
true,
false
Example:

true

Body

The content of the file should be the OpenAPI document in JSON or YAML format.

url
string

Response

Patched API.

ID
string
Message
string
Meta
any
Status
string