curl --location -g --request POST 'https://api.apifox.com/v1/projects/{{projectId}}/import-openapi?locale=zh-CN' \
--header 'X-Apifox-Api-Version: 2024-03-28' \
--header 'Authorization: Bearer {{access_token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"input": {
"url": "https://petstore.swagger.io/v2/swagger.json"
},
"options": {
"targetEndpointFolderId": 76,
"targetSchemaFolderId": 60,
"endpointOverwriteBehavior": "deleteUnmatchedResources",
"schemaOverwriteBehavior": "KEEP_EXISTING",
"updateFolderOfChangedEndpoint": true,
"prependBasePath": true
}
}'{
"data": {
"counters": {
"endpointCreated": 10,
"endpointUpdated": 0,
"endpointFailed": 0,
"endpointIgnored": 0,
"schemaCreated": 10,
"schemaUpdated": 0,
"schemaFailed": 0,
"schemaIgnored": 0,
"endpointFolderCreated": 0,
"endpointFolderUpdated": 0,
"endpointFolderFailed": 0,
"endpointFolderIgnored": 0,
"schemaFolderCreated": 0,
"schemaFolderUpdated": 0,
"schemaFolderFailed": 0,
"schemaFolderIgnored": 0
}
}
}