Skip to main content
POST
/
api
/
apis
/
migrate
Migrate APIs from Tyk Classic to Tyk OAS format.
curl --request POST \
  --url https://{tenant}/api/apis/migrate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "mode": "dryRun",
  "apiIDs": [
    "api123",
    "api456"
  ],
  "abortOnFailure": true
}'
{
  "success": {
    "count": 123,
    "apiIDs": [
      "<string>"
    ],
    "stagedAPIs": [
      {
        "classicAPIID": "<string>",
        "oasAPIID": "<string>"
      }
    ],
    "definitions": [
      {
        "apiID": "<string>",
        "baseAPI": {},
        "versions": [
          {}
        ]
      }
    ]
  },
  "failure": {
    "count": 123,
    "errors": [
      {
        "apiID": "<string>",
        "message": [
          "<string>"
        ]
      }
    ]
  },
  "skipped": {
    "count": 123,
    "apis": [
      {
        "apiID": "<string>",
        "message": "<string>",
        "key": "already_migrated"
      }
    ]
  },
  "abortedOnFailure": true
}

Authorizations

Authorization
string
header
required

Body

application/json
mode
enum<string>
required
Available options:
dryRun,
stage,
promote,
direct
apiIDs
string[]
all
boolean
abortOnFailure
boolean
overrideStaged
boolean

Response

success
object
failure
object
skipped
object
abortedOnFailure
boolean