预防自动化测试场景立即同步后报 500 错误
开发中
PUT
https://api.apifox.com/api/v1/api-test/cases/4143310
最后修改时间:2024-04-28 09:30:53
责任人:未设置
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location -g --request PUT 'https://api.apifox.com/api/v1/api-test/cases/4143310?locale=zh-CN&q_on_gp=&query_same_1=query_same_1_gp&q_on_gp_request_off=&glo_qparam_use_glo={{id_glo}}&glo_qparam_use_env={{id_env}}&glo_qparam_use_prior={{priority_env}}' \
--header 'authority: api.apifox.com' \
--header 'accept: application/json' \
--header 'accept-language: zh-CN' \
--header 'access-control-allow-origin: *' \
--header 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6NTYwMjUwLCJ0cyI6IjJhOWFlZGU1ZDUyNWM3MzQiLCJpYXQiOjE3MTQwNDYwNzUwMDh9.F8E3hRCSobCVEQQ90xV6eu3Hp3t11lA3Dj_YCqBbeT0' \
--header 'sec-ch-ua: "Not?A_Brand";v="8", "Chromium";v="108"' \
--header 'sec-ch-ua-mobile: ?0' \
--header 'sec-ch-ua-platform: "Windows"' \
--header 'sec-fetch-dest: empty' \
--header 'sec-fetch-mode: cors' \
--header 'sec-fetch-site: cross-site' \
--header 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) apifox/2.5.23-alpha.1 Chrome/108.0.5359.215 Electron/22.3.5 Safari/537.36' \
--header 'x-branch-id: 4058222' \
--header 'x-client-mode: desktop' \
--header 'x-client-version: 2.5.23-alpha.1' \
--header 'x-device-id: 2a0f1b45a75d143f423537e2cbbced904f5c9ec4a7bcfa7facef2b097f3a83e9' \
--header 'x-project-id: 4413293' \
--header 'h_on_gp;' \
--header 'header_same_1: header_same_1_gp' \
--header 'plat-form: {{header}}' \
--header 'h_on_gp_request_off;' \
--header 'glo_hparam_use_glo: {{id_glo}}' \
--header 'glo_hparam_use_env: {{id_env}}' \
--header 'glo_hparam_use_prior: {{priority_env}}' \
--header 'header_long: l=eBO-G2Fng9CH5uxF2Ofahurza77OSIOYYuPzaNbMiOCP_Xfp5gxlW6pndVL9C31Vh6DWR3-82bJHBeYBcIfEiOp2AJ-YF8Mmnl=eBO-G2Fng9CH5uxF2Ofahurza77OSIOYYuPzaNbMiOCP_Xfp5gxlW6pndVL9C31Vh6DWR3-82bJHBeYBcIfEiOp2AJ-YF8Mmn=end' \
--header 'Cookie: c_on_gp=;c_on_gp_request_off=;c_on_gp=c_on_gp_value;cookie_same_1=cookie_same_1_gp;cookie_long=l=eBO-G2Fng9CH5uxF2Ofahurza77OSIOYYuPzaNbMiOCP_Xfp5gxlW6pndVL9C31Vh6DWR3-82bJHBeYBcIfEiOp2AJ-YF8Mmn;c1=cookieInGlobalCookie;c_on_gp_request_off=c_on_gp_request_off_value;glo_cparam_use_glo={{id_glo}};glo_cparam_use_env={{id_env}};glo_cparam_use_prior={{priority_env}};c1=cookieInGlobalHeader' \
--header 'content-type: application/json;charset=UTF-8' \
--data-raw '{"name":"测试宠物新建/修改/删除流程","description":"","priority":2,"steps":[{"id":"cfbfc850-3d61-47c1-83c7-86f99e263c44","type":"http","bind":false,"relatedId":156575459,"bindId":169680829,"bindType":"API","syncMode":"MANUAL","name":"新建宠物信息 (新建在售宠物)","number":1,"httpApiCase":{"createdAt":"2024-04-28T09:18:36.000Z","updatedAt":"2024-04-28T09:18:36.000Z","deletedAt":null,"path":"/pet","name":"新建在售宠物","type":"http","method":"post","testSuiteId":4143310,"ordering":0,"commonParameters":{},"responseId":441950951,"projectId":4413293,"creatorId":560250,"editorId":560250,"inheritPreProcessors":{},"inheritPostProcessors":{},"inheritPreProcessorsSnapshot":[],"inheritPostProcessorsSnapshot":[],"auth":{},"advancedSettings":{"disabledSystemHeaders":{}},"options":{},"requestResult":null,"id":156575459,"apiDetailId":169680829,"preProcessors":[],"postProcessors":[],"parameters":{},"requestBody":{"parameters":[{"id":"ybPpcZ1dgw","relatedId":"ybPpcZ1dgw","relatedName":"name","name":"name","value":"Hello Kitty","enable":true,"description":"宠物名","type":"string"},{"id":"fDkEuKyzG4","relatedId":"fDkEuKyzG4","relatedName":"status","name":"status","value":"sold","enable":true,"description":"宠物销售状态","type":"string"}],"type":"application/x-www-form-urlencoded"}}},{"id":"0c7dce15-aba1-45c8-bcda-64f6dd588616","type":"http","bind":false,"relatedId":156575458,"bindId":169680828,"bindType":"API","syncMode":"MANUAL","name":"查询宠物详情 (查询刚刚建的宠物)","number":2,"httpApiCase":{"createdAt":"2024-04-28T09:18:36.000Z","updatedAt":"2024-04-28T09:18:36.000Z","deletedAt":null,"path":"/pet/{petId}","name":"查询刚刚建的宠物","type":"http","method":"get","testSuiteId":4143310,"ordering":0,"commonParameters":{},"responseId":441950950,"projectId":4413293,"creatorId":560250,"editorId":560250,"inheritPreProcessors":{},"inheritPostProcessors":{},"inheritPreProcessorsSnapshot":[],"inheritPostProcessorsSnapshot":[{"type":"assertion","data":{"name":"状态为 available","subject":"responseJson","comparison":"equal","value":"available","path":"$.data.status","multipleValue":[],"extractSettings":{"expression":"$.data.status","continueExtractorSettings":{"isContinueExtractValue":false,"JsonArrayValueIndexValue":""}}},"defaultEnable":false,"enable":false,"id":"ZAXIoDsswrSUYkhQ6aanwmvUv1Dj0RAu","targetName":"查询宠物详情","targetId":169680828,"targetType":"apiDetail","apiMethod":"get","isInheritDefaultEnable":false}],"auth":{},"advancedSettings":{"disabledSystemHeaders":{}},"options":{},"requestResult":null,"id":156575458,"apiDetailId":169680828,"preProcessors":[],"postProcessors":[],"parameters":{"path":[{"id":"petId#0","relatedId":"petId#0","name":"petId","value":"{{petId}}","enable":true,"description":"宠物 ID"}]},"requestBody":{"parameters":[],"type":"none"}}},{"id":"5a077ff1-ee98-44ef-9c27-016107044ced","type":"http","bind":false,"relatedId":156575457,"bindId":169680830,"bindType":"API","syncMode":"MANUAL","name":"修改宠物信息 (修改宠物状态为 sold)","number":3,"httpApiCase":{"createdAt":"2024-04-28T09:18:36.000Z","updatedAt":"2024-04-28T09:18:36.000Z","deletedAt":null,"path":"/pet","name":"修改宠物状态为 sold","type":"http","method":"put","testSuiteId":4143310,"ordering":0,"commonParameters":{},"responseId":441950953,"projectId":4413293,"creatorId":560250,"editorId":560250,"inheritPreProcessors":{},"inheritPostProcessors":{},"inheritPreProcessorsSnapshot":[],"inheritPostProcessorsSnapshot":[],"auth":{},"advancedSettings":{"disabledSystemHeaders":{}},"options":{},"requestResult":null,"id":156575457,"apiDetailId":169680830,"preProcessors":[],"postProcessors":[],"parameters":{},"requestBody":{"parameters":[],"type":"application/json","data":"{}"}}},{"id":"82568be2-cf6e-426b-b5ff-4eb13dd7f4b5","type":"http","bind":false,"relatedId":156575456,"bindId":169680828,"bindType":"API","syncMode":"MANUAL","name":"查询宠物详情 (查询宠物状态是否修改成功)","number":4,"httpApiCase":{"createdAt":"2024-04-28T09:18:36.000Z","updatedAt":"2024-04-28T09:18:36.000Z","deletedAt":null,"path":"/pet/{petId}","name":"查询宠物状态是否修改成功","type":"http","method":"get","testSuiteId":4143310,"ordering":0,"commonParameters":{},"responseId":441950950,"projectId":4413293,"creatorId":560250,"editorId":560250,"inheritPreProcessors":{},"inheritPostProcessors":{},"inheritPreProcessorsSnapshot":[],"inheritPostProcessorsSnapshot":[{"type":"assertion","data":{"name":"状态为 available","subject":"responseJson","comparison":"equal","value":"available","path":"$.data.status","multipleValue":[],"extractSettings":{"expression":"$.data.status","continueExtractorSettings":{"isContinueExtractValue":false,"JsonArrayValueIndexValue":""}}},"defaultEnable":false,"enable":false,"id":"ZAXIoDsswrSUYkhQ6aanwmvUv1Dj0RAu","targetName":"查询宠物详情","targetId":169680828,"targetType":"apiDetail","apiMethod":"get","isInheritDefaultEnable":false}],"auth":{},"advancedSettings":{"disabledSystemHeaders":{}},"options":{},"requestResult":null,"id":156575456,"apiDetailId":169680828,"preProcessors":[],"postProcessors":[],"parameters":{"path":[{"id":"petId#0","relatedId":"petId#0","name":"petId","value":"2","enable":true,"description":"宠物 ID"}]},"requestBody":{"parameters":[],"type":"none"}}},{"id":"c64161a7-0873-4560-8899-8edd37e80e77","type":"http","bind":false,"relatedId":156575455,"bindId":169680831,"bindType":"API","syncMode":"MANUAL","name":"删除宠物信息 (删除该宠物)","number":5,"httpApiCase":{"createdAt":"2024-04-28T09:18:36.000Z","updatedAt":"2024-04-28T09:18:36.000Z","deletedAt":null,"path":"/pet/{petId}","name":"删除该宠物","type":"http","method":"delete","testSuiteId":4143310,"ordering":0,"commonParameters":{},"responseId":441950955,"projectId":4413293,"creatorId":560250,"editorId":560250,"inheritPreProcessors":{},"inheritPostProcessors":{},"inheritPreProcessorsSnapshot":[],"inheritPostProcessorsSnapshot":[],"auth":{},"advancedSettings":{"disabledSystemHeaders":{}},"options":{},"requestResult":null,"id":156575455,"apiDetailId":169680831,"preProcessors":[],"postProcessors":[],"parameters":{"header":[{"id":"tnoT7O2PBd","relatedId":"tnoT7O2PBd","name":"api_key","enable":true,"type":"string"}],"path":[{"id":"petId#0","relatedId":"petId#0","name":"petId","value":"","enable":true,"description":"Pet id to delete"}]},"requestBody":{"parameters":[],"type":"none"}}},{"id":"b42515a9-8f00-4b26-997f-d8943c89d745","type":"http","bind":false,"relatedId":156575454,"bindId":169680828,"bindType":"API","syncMode":"MANUAL","name":"查询宠物详情 (检查删除是否成功)","number":6,"httpApiCase":{"createdAt":"2024-04-28T09:18:36.000Z","updatedAt":"2024-04-28T09:18:36.000Z","deletedAt":null,"path":"/pet/{petId}","name":"检查删除是否成功","type":"http","method":"get","testSuiteId":4143310,"ordering":0,"commonParameters":{},"responseId":339157461,"projectId":4413293,"creatorId":560250,"editorId":560250,"inheritPreProcessors":{},"inheritPostProcessors":{},"inheritPreProcessorsSnapshot":[],"inheritPostProcessorsSnapshot":[{"type":"assertion","data":{"name":"状态为 available","subject":"responseJson","comparison":"equal","value":"available","path":"$.data.status","multipleValue":[],"extractSettings":{"expression":"$.data.status","continueExtractorSettings":{"isContinueExtractValue":false,"JsonArrayValueIndexValue":""}}},"defaultEnable":false,"enable":false,"id":"ZAXIoDsswrSUYkhQ6aanwmvUv1Dj0RAu","targetName":"查询宠物详情","targetId":169680828,"targetType":"apiDetail","apiMethod":"get","isInheritDefaultEnable":false}],"auth":{},"advancedSettings":{"disabledSystemHeaders":{}},"options":{},"requestResult":null,"id":156575454,"apiDetailId":169680828,"preProcessors":[],"postProcessors":[],"parameters":{"path":[{"id":"petId#0","relatedId":"petId#0","name":"petId","value":"1645646","enable":true,"description":"宠物 ID"}]},"requestBody":{"parameters":[],"type":"none"}}},{"id":"10af0cd8-73ad-41f5-b23c-afdc6f9851fb","type":"http","disable":false,"parameters":{},"name":"根据状态查找宠物列表","bindId":169680832,"bindType":"API","syncMode":"MANUAL","number":7,"relatedId":156576010,"httpApiCase":{"createdAt":"2024-04-28T09:19:41.000Z","updatedAt":"2024-04-28T09:19:45.000Z","deletedAt":null,"path":"/pet/findByStatus","name":"根据状态查找宠物列表","type":"http","method":"get","testSuiteId":4143310,"ordering":0,"commonParameters":{"query":[],"body":[],"header":[],"cookie":[]},"responseId":441950956,"projectId":4413293,"creatorId":560250,"editorId":560250,"inheritPreProcessors":{},"inheritPostProcessors":{},"inheritPreProcessorsSnapshot":[],"inheritPostProcessorsSnapshot":[],"auth":{"type":"noauth"},"advancedSettings":{"isDefaultUrlEncoding":1,"disabledSystemHeaders":{}},"options":{},"requestResult":null,"id":156576010,"apiDetailId":169680832,"preProcessors":[{"type":"placeholder","renderType":"dynamicValueDivider","defaultEnable":false,"enable":false}],"postProcessors":[],"parameters":{"query":[{"id":"CuZFVqhzrz","relatedName":"status","name":"status","type":"string","description":"Status values that need to be considered for filter","enable":true,"isDelete":false}],"header":[],"cookie":[],"path":[]},"requestBody":{"parameters":[],"type":"none","data":"","generateMode":"normal"},"updateFlag":true,"tempId":"83916d10-7edb-4e14-b25b-3e0100a9c8f7"}}],"id":4143310}'
响应示例响应示例
{
"success": false,
"errorCode": "500",
"errorMessage": "Internal Error"
}
请求参数
Query 参数
locale
string
必需
示例值:
zh-CN
q_on_gp
string
必需
默认值:
q_on_gp_value
query_same_1
string
可选
默认值:
query_same_1_gp
q_on_gp_request_off
string
必需
默认值:
q_on_gp_request_off_value
glo_qparam_use_glo
string
可选
默认值:
{{id_glo}}
glo_qparam_use_env
string
可选
默认值:
{{id_env}}
glo_qparam_use_prior
string
可选
默认值:
{{priority_env}}
Header 参数
authority
string
必需
示例值:
api.apifox.com
accept
string
必需
示例值:
application/json
accept-language
string
必需
示例值:
zh-CN
access-control-allow-origin
string
必需
示例值:
*
authorization
string
必需
示例值:
Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6NTYwMjUwLCJ0cyI6IjJhOWFlZGU1ZDUyNWM3MzQiLCJpYXQiOjE3MTQwNDYwNzUwMDh9.F8E3hRCSobCVEQQ90xV6eu3Hp3t11lA3Dj_YCqBbeT0
content-type
string
必需
示例值:
application/json;charset=UTF-8
sec-ch-ua
string
必需
示例值:
"Not?A_Brand";v="8", "Chromium";v="108"
sec-ch-ua-mobile
string
必需
示例值:
?0
sec-ch-ua-platform
string
必需
示例值:
"Windows"
sec-fetch-dest
string
必需
示例值:
empty
sec-fetch-mode
string
必需
示例值:
cors
sec-fetch-site
string
必需
示例值:
cross-site
user-agent
string
必需
示例值:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) apifox/2.5.23-alpha.1 Chrome/108.0.5359.215 Electron/22.3.5 Safari/537.36
x-branch-id
string
必需
示例值:
4058222
x-client-mode
string
必需
示例值:
desktop
x-client-version
string
必需
示例值:
2.5.23-alpha.1
x-device-id
string
必需
示例值:
2a0f1b45a75d143f423537e2cbbced904f5c9ec4a7bcfa7facef2b097f3a83e9
x-project-id
string
必需
示例值:
4413293
h_on_gp
string
必需
默认值:
h_on_gp_value
header_same_1
string
可选
默认值:
header_same_1_gp
plat-form
string
可选
默认值:
{{header}}
Cookie
string
可选
默认值:
c1=cookieInGlobalHeader
h_on_gp_request_off
string
必需
默认值:
h_on_gp_case_off_value
glo_hparam_use_glo
string
可选
默认值:
{{id_glo}}
glo_hparam_use_env
string
可选
默认值:
{{id_env}}
glo_hparam_use_prior
string
可选
默认值:
{{priority_env}}
header_long
string
可选
默认值:
l=eBO-G2Fng9CH5uxF2Ofahurza77OSIOYYuPzaNbMiOCP_Xfp5gxlW6pndVL9C31Vh6DWR3-82bJHBeYBcIfEiOp2AJ-YF8Mmnl=eBO-G2Fng9CH5uxF2Ofahurza77OSIOYYuPzaNbMiOCP_Xfp5gxlW6pndVL9C31Vh6DWR3-82bJHBeYBcIfEiOp2AJ-YF8Mmn=end
Cookie 参数
c_on_gp
string
必需
默认值:
c_on_gp_value
cookie_same_1
string
可选
默认值:
cookie_same_1_gp
cookie_long
string
可选
默认值:
l=eBO-G2Fng9CH5uxF2Ofahurza77OSIOYYuPzaNbMiOCP_Xfp5gxlW6pndVL9C31Vh6DWR3-82bJHBeYBcIfEiOp2AJ-YF8Mmn
c1
string
勿改-测试
默认值:
cookieInGlobalCookie
c_on_gp_request_off
string
必需
默认值:
c_on_gp_request_off_value
glo_cparam_use_glo
string
可选
默认值:
{{id_glo}}
glo_cparam_use_env
string
可选
默认值:
{{id_env}}
glo_cparam_use_prior
string
可选
默认值:
{{priority_env}}
Body 参数application/json
返回响应

修改于 2024-04-28 09:30:53