Create File
Create a configuration file to inject into applications.
Endpoint
POST /{envId}/file
Authentication
Required: Yes (Session or Bearer Token with 2FA)
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
envId | string (UUID) | Yes | Environment ID |
Request Body
{
"name": "app-config.json",
"envIdRef": "your-environment-id",
"fileString": "{\"port\": 8080, \"debug\": true}",
"mountPath": "/app/config",
"attachedAppsRefs": []
}
Request Fields
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | File name |
envIdRef | string | Yes | Environment ID (UUID) |
fileString | string | Yes | File content as string |
mountPath | string | Yes | Absolute path where file will be mounted |
attachedAppsRefs | array | No | Array of application IDs to attach file to |
Response
Success Response (201 Created)
{
"id": "file-550e8400-e29b-41d4-a716-446655440000",
"name": "app-config.json",
"envIdRef": "660e8400-e29b-41d4-a716-446655440001",
"companyIdRef": "770e8400-e29b-41d4-a716-446655440002",
"content": "{\"port\": 8080, \"debug\": true}",
"mountPath": "/app/config",
"isDeleted": false,
"version": 1
}
Example
curl -X POST "https://api.thevenin.cloud/environments/{envId}/file" \
-H "Authorization: Bearer tvn_your_api_token_here" \
-H "Content-Type: application/json" \
-d '{
"name": "app-config.json",
"envIdRef": "{envId}",
"fileString": "{\"port\": 8080}",
"mountPath": "/app/config",
"attachedAppsRefs": []
}'