Skip to content
This repository was archived by the owner on Jun 2, 2021. It is now read-only.

Commit 72f2de6

Browse files
committed
Add API docs for / and /v3 endpoints
Authored-by: Greg Cobb <gcobb@pivotal.io>
1 parent 933f78d commit 72f2de6

5 files changed

Lines changed: 220 additions & 0 deletions

File tree

Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
<% content_for :v3_root do %>
2+
{
3+
"links": {
4+
"self": {
5+
"href": "https://api.example.org/v3"
6+
},
7+
"app_usage_events": {
8+
"href": "https://api.example.org/v3/app_usage_events"
9+
},
10+
"apps": {
11+
"href": "https://api.example.org/v3/apps"
12+
},
13+
"audit_events": {
14+
"href": "https://api.example.org/v3/audit_events"
15+
},
16+
"buildpacks": {
17+
"href": "https://api.example.org/v3/buildpacks"
18+
},
19+
"builds": {
20+
"href": "https://api.example.org/v3/builds"
21+
},
22+
"deployments": {
23+
"href": "https://api.example.org/v3/deployments"
24+
},
25+
"domains": {
26+
"href": "https://api.example.org/v3/domains"
27+
},
28+
"droplets": {
29+
"href": "https://api.example.org/v3/droplets"
30+
},
31+
"environment_variable_groups": {
32+
"href": "https://api.example.org/v3/environment_variable_groups"
33+
},
34+
"feature_flags": {
35+
"href": "https://api.example.org/v3/feature_flags"
36+
},
37+
"info": {
38+
"href": "https://api.example.org/v3/info"
39+
},
40+
"isolation_segments": {
41+
"href": "https://api.example.org/v3/isolation_segments"
42+
},
43+
"organizations": {
44+
"href": "https://api.example.org/v3/organizations"
45+
},
46+
"organization_quotas": {
47+
"href": "https://api.example.org/v3/organization_quotas"
48+
},
49+
"packages": {
50+
"href": "https://api.example.org/v3/packages"
51+
},
52+
"processes": {
53+
"href": "https://api.example.org/v3/processes"
54+
},
55+
"resource_matches": {
56+
"href": "https://api.example.org/v3/resource_matches"
57+
},
58+
"roles": {
59+
"href": "https://api.example.org/v3/roles"
60+
},
61+
"routes": {
62+
"href": "https://api.example.org/v3/routes"
63+
},
64+
"security_groups": {
65+
"href": "https://api.example.org/v3/security_groups"
66+
},
67+
"service_brokers": {
68+
"href": "https://api.example.org/v3/service_brokers"
69+
},
70+
"service_instances": {
71+
"href": "https://api.example.org/v3/service_instances",
72+
"experimental": true
73+
},
74+
"service_offerings": {
75+
"href": "https://api.example.org/v3/service_offerings"
76+
},
77+
"service_plans": {
78+
"href": "https://api.example.org/v3/service_plans"
79+
},
80+
"service_usage_events": {
81+
"href": "https://api.example.org/v3/service_usage_events"
82+
},
83+
"spaces": {
84+
"href": "https://api.example.org/v3/spaces"
85+
},
86+
"space_quotas": {
87+
"href": "https://api.example.org/v3/space_quotas"
88+
},
89+
"stacks": {
90+
"href": "https://api.example.org/v3/stacks"
91+
},
92+
"tasks": {
93+
"href": "https://api.example.org/v3/tasks"
94+
},
95+
"users": {
96+
"href": "https://api.example.org/v3/users"
97+
}
98+
}
99+
}
100+
<% end %>
101+
102+
<% content_for :global_root do %>
103+
{
104+
"links": {
105+
"self": {
106+
"href": "https://api.example.org"
107+
},
108+
"bits_service": null,
109+
"cloud_controller_v2": {
110+
"href": "https://api.example.org/v2",
111+
"meta": {
112+
"version": "2.155.0"
113+
}
114+
},
115+
"cloud_controller_v3": {
116+
"href": "https://api.example.org/v3",
117+
"meta": {
118+
"version": "3.90.0"
119+
}
120+
},
121+
"network_policy_v0": {
122+
"href": "https://api.example.org/networking/v0/external"
123+
},
124+
"network_policy_v1": {
125+
"href": "https://api.example.org/networking/v1/external"
126+
},
127+
"login": {
128+
"href": "https://login.example.org"
129+
},
130+
"uaa": {
131+
"href": "https://uaa.example.org"
132+
},
133+
"credhub": null,
134+
"routing": {
135+
"href": "https://api.example.org/routing"
136+
},
137+
"logging": {
138+
"href": "wss://doppler.example.org:443"
139+
},
140+
"log_cache": {
141+
"href": "https://log-cache.example.org"
142+
},
143+
"log_stream": {
144+
"href": "https://log-stream.example.org"
145+
},
146+
"app_ssh": {
147+
"href": "ssh.example.org:2222",
148+
"meta": {
149+
"host_key_fingerprint": "Y411oivJwZCUQnXHq83mdM5SKCK4ftyoSXI31RRe4Zs",
150+
"oauth_client": "ssh-proxy"
151+
}
152+
}
153+
}
154+
}
155+
<% end %>
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
### Global API Root
2+
3+
```
4+
Example Request
5+
```
6+
7+
```shell
8+
curl "https://api.example.org"
9+
```
10+
11+
```
12+
Example Response
13+
```
14+
15+
```http
16+
HTTP/1.1 200 OK
17+
Content-Type: application/json
18+
19+
<%= yield_content :global_root %>
20+
```
21+
22+
This endpoint returns links to the APIs available on a given Cloud Foundry deployment.
23+
24+
#### Definition
25+
`GET /`
26+
27+
#### Authentication
28+
29+
No authentication required.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## Root
2+
3+
These endpoints link to other resources, endpoints, and external services that are relevant to API clients.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
### V3 API Root
2+
3+
```
4+
Example Request
5+
```
6+
7+
```shell
8+
curl "https://api.example.org/v3"
9+
```
10+
11+
```
12+
Example Response
13+
```
14+
15+
```http
16+
HTTP/1.1 200 OK
17+
Content-Type: application/json
18+
19+
<%= yield_content :v3_root %>
20+
```
21+
22+
This endpoint returns links to all the resources available on the v3 API.
23+
24+
#### Definition
25+
`GET /v3`
26+
27+
#### Authentication
28+
29+
No authentication required.

docs/v3/source/index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ includes:
2424
- api_resources/resource_matches
2525
- api_resources/revisions
2626
- api_resources/roles
27+
- api_resources/root
2728
- api_resources/routes
2829
- api_resources/security_groups
2930
- api_resources/service_bindings
@@ -224,6 +225,9 @@ includes:
224225
- resources/roles/get
225226
- resources/roles/list
226227
- resources/roles/delete
228+
- resources/root/header
229+
- resources/root/global_root
230+
- resources/root/v3_root
227231
- resources/routes/header
228232
- resources/routes/object
229233
- resources/routes/destination_object

0 commit comments

Comments
 (0)