PUT
/
api
/
apis
/
oas
/
{apiId}
Update OAS API.
curl --request PUT \
  --url https://{tenant}/api/apis/oas/{apiId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "description": "The API Access Credentials",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "This is a sample OpenAPI description.",
    "title": "Sample OpenAPI description",
    "version": "1.0.0"
  },
  "openapi": "3.0.3",
  "paths": {
    "/api/sample/users": {
      "get": {
        "operationId": "getUsersSample",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "properties": {
                      "name": {
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "fetched users"
          }
        },
        "summary": "Get users",
        "tags": [
          "users"
        ]
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "servers": [
    {
      "url": "https://localhost:8080"
    }
  ],
  "x-tyk-api-gateway": {
    "info": {
      "name": "user",
      "state": {
        "active": true
      }
    },
    "server": {
      "listenPath": {
        "strip": true,
        "value": "/user-test-three/"
      }
    },
    "upstream": {
      "url": "https://localhost:8080"
    }
  }
}'
{
  "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 update.

Body

x-tyk-api-gateway
object

Response

Updated API.

ID
string
Message
string
Meta
any
Status
string