curl -sS -X POST "$BMA_BASE_URL/v1/environments" \
-H "x-api-key: $BMA_API_KEY" \
-H "bma-workspace-id: $BMA_PROJECT_ID" \
-H "content-type: application/json" \
-d '{}'{
"id": "<string>",
"archived_at": "<string>",
"config": {
"networking": {
"type": "unrestricted"
},
"packages": {
"apt": [
"<string>"
],
"cargo": [
"<string>"
],
"gem": [
"<string>"
],
"go": [
"<string>"
],
"npm": [
"<string>"
],
"pip": [
"<string>"
],
"type": "packages"
},
"type": "cloud"
},
"created_at": "<string>",
"description": "<string>",
"metadata": {},
"name": "<string>",
"type": "environment",
"updated_at": "<string>",
"scope": "organization"
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>"
},
"request_id": "<string>"
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>"
},
"request_id": "<string>"
}environments
Create a new environment with the specified configuration.
POST
/
v1
/
environments
curl -sS -X POST "$BMA_BASE_URL/v1/environments" \
-H "x-api-key: $BMA_API_KEY" \
-H "bma-workspace-id: $BMA_PROJECT_ID" \
-H "content-type: application/json" \
-d '{}'{
"id": "<string>",
"archived_at": "<string>",
"config": {
"networking": {
"type": "unrestricted"
},
"packages": {
"apt": [
"<string>"
],
"cargo": [
"<string>"
],
"gem": [
"<string>"
],
"go": [
"<string>"
],
"npm": [
"<string>"
],
"pip": [
"<string>"
],
"type": "packages"
},
"type": "cloud"
},
"created_at": "<string>",
"description": "<string>",
"metadata": {},
"name": "<string>",
"type": "environment",
"updated_at": "<string>",
"scope": "organization"
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>"
},
"request_id": "<string>"
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>"
},
"request_id": "<string>"
}主體
application/json
The visibility scope for this environment. 'organization' makes the environment visible to all accounts. 'account' restricts visibility to the owning account only. API organizations support only 'organization'; 'account' is rejected. If not specified, defaults based on organization type.
可用選項:
organization, account, null 回應
Success.
Unified Environment resource for both cloud and self-hosted environments.