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

The Tyk Dashboard API Access Credentials

Body

application/json
mode
enum<string>
required

Migration mode to use

Available options:
dryRun,
stage,
promote,
direct
apiIDs
string[]

List of API IDs to migrate. Cannot be used together with 'all'

all
boolean

Migrate all APIs. Cannot be used together with 'apiIDs'

abortOnFailure
boolean

Stop migration process on first failure

overrideStaged
boolean

When mode is staged and overrideStaged is set to true, migration process will overwrite already existing staged API with the same staged ID

Response

Migration completed

migration API response object

success
object

reports details of APIs migrated successfully

failure
object

reports the details of failed API migrations

skipped
object

reports the details of skipped APIs

abortedOnFailure
boolean

reports whether migration process aborted on first failure