Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions specification/DigitalOcean-public.v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,10 @@ paths:
get:
$ref: "resources/apps/apps_get_instanceSize.yml"

/v2/apps/templates:
get:
$ref: "resources/apps/apps_list_templates.yml"

/v2/apps/regions:
get:
$ref: "resources/apps/apps_list_regions.yml"
Expand Down
35 changes: 35 additions & 0 deletions specification/resources/apps/apps_list_templates.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
operationId: apps_list_templates

summary: Get App Templates

description: Retrieve a list of app templates.

tags:
- Apps

responses:
"200":
$ref: responses/app_templates.yml

"401":
$ref: ../../shared/responses/unauthorized.yml

"404":
$ref: "../../shared/responses/not_found.yml"

"429":
$ref: "../../shared/responses/too_many_requests.yml"

"500":
$ref: ../../shared/responses/server_error.yml

default:
$ref: ../../shared/responses/unexpected_error.yml

x-codeSamples:
- $ref: 'examples/curl/apps_list_templates.yml'

security:
- bearer_auth:
- 'app:read'

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
lang: cURL
source: |-
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/apps/templates"
45 changes: 45 additions & 0 deletions specification/resources/apps/models/app_template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
type: object
properties:
name:
type: string
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we add a description for each of the properties ?

example: Flask with Valkey support
repo_url:
type: string
example: https://github.com/digitalocean/template-flask-app.git
branch:
type: string
example: main
repo_owner:
type: string
example: digitalocean
repo_name:
type: string
example: template-flask-app
environment_slug:
type: string
example: python
component_types:
type: array
items:
type: string
example:
- service
- worker
- static_site
- job
product_docs_page:
type: string
example: https://www.digitalocean.com/docs/app-platform/how-to/create-apps/#create-a-new-app
description:
type: string
example: A Flask app with Valkey support
language:
type: string
example: Python
frameworks:
type: array
items:
type: string
example:
- Flask

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
properties:
sample-repos:
"$ref": app_template.yml
type: object
17 changes: 17 additions & 0 deletions specification/resources/apps/responses/app_templates.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
description: A JSON object with a `sample_repos`.

content:
application/json:
schema:
$ref: ../models/app_templates_response.yml
examples:
app_templates:
$ref: examples.yml#/app_templates

headers:
ratelimit-limit:
$ref: ../../../shared/headers.yml#/ratelimit-limit
ratelimit-remaining:
$ref: ../../../shared/headers.yml#/ratelimit-remaining
ratelimit-reset:
$ref: ../../../shared/headers.yml#/ratelimit-reset
18 changes: 18 additions & 0 deletions specification/resources/apps/responses/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -922,6 +922,24 @@ app_health:
replicas_desired: 1
replicas_ready: 2
state: HEALTHY
app_templates:
value:
sample_repos:
- name: Flask with Valkey support
description: Build a REST API for session management and real-time data using your own Valkey database.
environment_slug: python
repo_url: https://github.com/digitalocean/template-flask-app.git
branch: main
repo_owner: digitalocean
repo_name: template-flask-app
language: Python
frameworks:
- "Flask"
component_types:
- service
- static_site
- worker
- job
app_instances:
value:
instances:
Expand Down