Skip to content

Commit 3988e09

Browse files
committed
APPS-11421: Add spec for app templates list API
1 parent a4cd5b7 commit 3988e09

File tree

7 files changed

+112
-0
lines changed

7 files changed

+112
-0
lines changed

specification/DigitalOcean-public.v2.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,10 @@ paths:
648648
get:
649649
$ref: "resources/apps/apps_get_instanceSize.yml"
650650

651+
/v2/apps/templates:
652+
get:
653+
$ref: "resources/apps/apps_list_templates.yml"
654+
651655
/v2/apps/regions:
652656
get:
653657
$ref: "resources/apps/apps_list_regions.yml"
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
operationId: apps_list_templates
2+
3+
summary: Get App Templates
4+
5+
description: Retrieve a list of app templates.
6+
7+
tags:
8+
- Apps
9+
10+
responses:
11+
"200":
12+
$ref: responses/app_templates.yml
13+
14+
"401":
15+
$ref: ../../shared/responses/unauthorized.yml
16+
17+
"404":
18+
$ref: "../../shared/responses/not_found.yml"
19+
20+
"429":
21+
$ref: "../../shared/responses/too_many_requests.yml"
22+
23+
"500":
24+
$ref: ../../shared/responses/server_error.yml
25+
26+
default:
27+
$ref: ../../shared/responses/unexpected_error.yml
28+
29+
x-codeSamples:
30+
- $ref: 'examples/curl/apps_list_templates.yml'
31+
32+
security:
33+
- bearer_auth:
34+
- 'app:read'
35+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
lang: cURL
2+
source: |-
3+
curl -X GET \
4+
-H "Content-Type: application/json" \
5+
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
6+
"https://api.digitalocean.com/v2/apps/templates"
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
type: object
2+
properties:
3+
name:
4+
type: string
5+
repo_url:
6+
type: string
7+
branch:
8+
type: string
9+
repo_owner:
10+
type: string
11+
repo_name:
12+
type: string
13+
environment_slug:
14+
type: string
15+
component_types:
16+
type: array
17+
items:
18+
type: string
19+
product_docs_page:
20+
type: string
21+
description:
22+
type: string
23+
language:
24+
type: string
25+
frameworks:
26+
type: array
27+
items:
28+
type: string
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
properties:
2+
sample-repos:
3+
"$ref": app_template.yml
4+
type: object
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
description: A JSON object with a `sample_repos`.
2+
3+
content:
4+
application/json:
5+
schema:
6+
$ref: ../models/app_templates_response.yml
7+
examples:
8+
app_templates:
9+
$ref: examples.yml#/app_templates
10+
11+
headers:
12+
ratelimit-limit:
13+
$ref: ../../../shared/headers.yml#/ratelimit-limit
14+
ratelimit-remaining:
15+
$ref: ../../../shared/headers.yml#/ratelimit-remaining
16+
ratelimit-reset:
17+
$ref: ../../../shared/headers.yml#/ratelimit-reset

specification/resources/apps/responses/examples.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -922,6 +922,24 @@ app_health:
922922
replicas_desired: 1
923923
replicas_ready: 2
924924
state: HEALTHY
925+
app_templates:
926+
value:
927+
sample_repos:
928+
- name: Flask with Valkey support
929+
description: Build a REST API for session management and real-time data using your own Valkey database.
930+
environment_slug: python
931+
repo_url: https://github.com/digitalocean/template-flask-app.git
932+
branch: main
933+
repo_owner: digitalocean
934+
repo_name: template-flask-app
935+
language: Python
936+
frameworks:
937+
- "Flask"
938+
component_types:
939+
- service
940+
- static_site
941+
- worker
942+
- job
925943
app_instances:
926944
value:
927945
instances:

0 commit comments

Comments
 (0)