导入 Postman Collection 格式数据
POST
https://api.apifox.com/v1/projects/{projectId}/import-postman-collection
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location -g --request POST 'https://api.apifox.com/v1/projects/{{projectId}}/import-postman-collection?locale=zh-CN' \
--header 'X-Apifox-Api-Version;' \
--header 'Authorization;' \
--header 'Content-Type: application/json' \
--data-raw '{
"input":"{\"info\":{\"name\":\"Swagger Petstore\",\"description\":\"This is a sample server Petstore server.\",\"schema\":\"https://schema.getpostman.com/json/collection/v2.1.0/collection.json\"},\"item\":[],\"variable\":[{\"key\":\"baseUrl\",\"value\":\"//petstore.swagger.io/v2\",\"type\":\"string\"}]}",
"options":{
"targetEndpointFolderId":0,
"endpointOverwriteBehavior":"OVERWRITE_EXISTING",
"endpointCaseOverwriteBehavior":"OVERWRITE_EXISTING",
"updateFolderOfChangedEndpoint":false
}
}'
响应示例响应示例
成功示例
{
"data": {
"counters": {
"endpointCreated": 10,
"endpointUpdated": 0,
"endpointFailed": 0,
"endpointIgnored": 0,
"endpointFolderCreated": 0,
"endpointFolderUpdated": 0,
"endpointFolderFailed": 0,
"endpointFolderIgnored": 0,
"endpointCaseCreated": 0,
"endpointCaseUpdated": 0,
"endpointCaseFailed": 0,
"endpointCaseIgnored": 0
}
}
}
请求参数
Path 参数
projectId
string
必需
示例值:
{{projectId}}
Query 参数
locale
string
可选
示例值:
zh-CN
Header 参数
X-Apifox-Api-Version
enum<string>
必需
枚举值:
2024-03-28
Body 参数application/json
返回响应
修改于 2024-12-04 04:31:41