{
"name": "测试环境2",
"baseUrls": "{ \"default\": \"http://127.0.0.1:8888\"}",
"visibility": "protected",
"variables": "[{\"name\":\"envVar\",\"value\":\"1\",\"description\":\"envVar desc\",\"isFixedValue\":true}]"
}
curl --location -g --request POST 'https://api.apifox.com/api/v1/projects/2078457/environments?locale=zh-CN' \
--header 'X-Apifox-Version;' \
--header 'Authorization;' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "测试环境2",
"baseUrls": "{ \"default\": \"http://127.0.0.1:8888\"}",
"visibility": "protected",
"variables": "[{\"name\":\"envVar\",\"value\":\"1\",\"description\":\"envVar desc\",\"isFixedValue\":true}]"
}'
{
"data": {
"baseUrl": "http://127.0.0.1:8888",
"baseUrls": {
"default": "http://127.0.0.1:8888"
},
"parameters": {
"cookie": [],
"query": [],
"header": [],
"body": []
},
"variables": [
{
"name": "envVar",
"value": "1",
"description": "envVar desc",
"isFixedValue": true
}
],
"registrationCenters": [],
"tags": [],
"type": "normal",
"id": 18411999,
"projectType": "HTTP",
"name": "测试环境",
"visibility": "protected",
"creatorId": 377134,
"editorId": 377134,
"projectId": 2074249,
"ordering": 30,
"updatedAt": "2024-02-27T03:03:24.329Z",
"createdAt": "2024-02-27T03:03:24.329Z"
},
"success": true
}