App Template
API for listing and retrieving app templates (used to create container apps from a template)
Version: 0.1.0
Server
- URL:
https://api.kopernik.us/v0- Kopernik.us API server
Paths
/apps/template
GET
List app templates
List available app templates. Templates define a Docker image, required environment properties, port mappings, and optional volume mount targets. Use a template when creating a container app to get a form based on the template’s properties instead of raw env vars and ports.
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| nextToken | query | string | ❌ | Token for the next page of templates, if there are more items to fetch |
| maxResults | query | integer | ❌ | Maximum number of templates to fetch |
| jq | query | string | ❌ | JQ filter expression to filter the results. Only templates where the expression evaluates to a truthy value are included. The expression is applied to each template’s JSON representation. Uses jq 1.7 syntax. |
Responses:
-
200: App templates list
- Content Type:
application/json- Schema: AppTemplateListResponse
- Content Type:
-
400: Argument validation error
- Content Type:
application/json- Schema: ErrorResponse
- Content Type:
/apps/template/{templateId}
GET
Get app template
Get details of a single app template by ID.
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| templateId | path | string | ✅ | Unique identifier of the app template |
Responses:
-
200: App template details
- Content Type:
application/json- Schema: AppTemplateResponse
- Content Type:
-
400: Argument validation error
- Content Type:
application/json- Schema: ErrorResponse
- Content Type:
-
404: App template not found
- Content Type:
application/json- Schema: ErrorResponse
- Content Type:
Schemas
AppTemplateEnvProperty
Defines one environment property that the user must (or may) provide when creating an app from this template.
Type: object
Properties:
| Name | Type | Required | Description |
|---|---|---|---|
| envVar | string | ✅ | Container environment variable name (e.g. MYSQL_ROOT_PASSWORD) |
| label | string | ✅ | Human-readable label for the UI (e.g. Admin password) |
| constant | boolean | ❌ | If true, the value is not configurable, and “default” value must be provided |
| secret | boolean | ❌ | If true, the value should be masked in the UI and not logged |
| required | boolean | ❌ | Whether the user must provide a value when creating from this template |
| default | string | ❌ | Optional default value when the user does not provide one |
AppTemplatePort
Port to expose for the container (used when creating an app from this template).
Type: object
Properties:
| Name | Type | Required | Description |
|---|---|---|---|
| port | integer | ✅ | Container port number |
| protocol | string enum | ❌ | Network protocol |
AppTemplate
App template. Not a Resource; follows similar list/get and pagination patterns. Templates are read-only and used to create container apps with a simplified form.
Type: object
Properties:
| Name | Type | Required | Description |
|---|---|---|---|
| uid | string | ✅ | Unique identifier of the app template (stable for API use) |
| name | string | ✅ | Display name of the template (e.g. MySQL 8) |
| description | string | ❌ | Optional short description of the template |
| image | ContainerImage | ✅ | Docker image used when creating an app from this template |
| env | array<AppTemplateEnvProperty> | ❌ | Environment property definitions; the UI renders a form from these, and values are mapped to container env vars |
| ports | array<AppTemplatePort> | ❌ | Port mappings applied when creating an app from this template |
| volumeMountTargets | array |
❌ | Optional. Container paths for attached volumes, in order. The i-th attached volume is bound to the i-th entry here. If the list is shorter than the number of volumes, remaining volumes use default paths (/disk1, /disk2, …). E.g. [“/var/lib/mysql”] for MySQL data. When specified, the machine must provide exactly the given number of data disks. If unset, the machine must have no data disks at all. This is required to prevent creation of unused data disks. |
| tags | array |
❌ | Optional tags for search and filtering (e.g. database, web, etc.) |
AppTemplateListResponse
Response with a list of app templates (paginated)
Composition: allOf
Type: object
Properties:
| Name | Type | Required | Description |
|---|---|---|---|
| nextToken | string | ❌ | Token for the next page of templates, if there are more items |
| templates | array<AppTemplate> | ✅ | List of app templates |
AppTemplateResponse
Response with a single app template
Composition: allOf
Type: object
Properties:
| Name | Type | Required | Description |
|---|---|---|---|
| template | AppTemplate | ✅ |