Skip to content

Commit 5be67c6

Browse files
author
Matt McNeeney
committed
add x-api-info-location header to profile
1 parent e7dc9b4 commit 5be67c6

4 files changed

Lines changed: 61 additions & 0 deletions

File tree

openapi.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ paths:
4949
parameters:
5050
- $ref: '#/components/parameters/APIVersion'
5151
- $ref: '#/components/parameters/OriginatingIdentity'
52+
- $ref: '#/components/parameters/InfoLocation'
5253
- name: instance_id
5354
in: path
5455
description: instance id of instance to provision
@@ -112,6 +113,7 @@ paths:
112113
parameters:
113114
- $ref: '#/components/parameters/APIVersion'
114115
- $ref: '#/components/parameters/OriginatingIdentity'
116+
- $ref: '#/components/parameters/InfoLocation'
115117
- name: instance_id
116118
in: path
117119
description: instance id of instance to update
@@ -163,6 +165,7 @@ paths:
163165
parameters:
164166
- $ref: '#/components/parameters/APIVersion'
165167
- $ref: '#/components/parameters/OriginatingIdentity'
168+
- $ref: '#/components/parameters/InfoLocation'
166169
- name: instance_id
167170
in: path
168171
description: id of instance being deleted
@@ -225,6 +228,7 @@ paths:
225228
parameters:
226229
- $ref: '#/components/parameters/APIVersion'
227230
- $ref: '#/components/parameters/OriginatingIdentity'
231+
- $ref: '#/components/parameters/InfoLocation'
228232
- name: instance_id
229233
in: path
230234
description: instance id of instance to fetch
@@ -370,6 +374,7 @@ paths:
370374
parameters:
371375
- $ref: '#/components/parameters/APIVersion'
372376
- $ref: '#/components/parameters/OriginatingIdentity'
377+
- $ref: '#/components/parameters/InfoLocation'
373378
- name: instance_id
374379
in: path
375380
description: instance id of instance to create a binding on
@@ -439,6 +444,7 @@ paths:
439444
parameters:
440445
- $ref: '#/components/parameters/APIVersion'
441446
- $ref: '#/components/parameters/OriginatingIdentity'
447+
- $ref: '#/components/parameters/InfoLocation'
442448
- name: instance_id
443449
in: path
444450
description: id of the instance associated with the binding being deleted
@@ -501,6 +507,7 @@ paths:
501507
parameters:
502508
- $ref: '#/components/parameters/APIVersion'
503509
- $ref: '#/components/parameters/OriginatingIdentity'
510+
- $ref: '#/components/parameters/InfoLocation'
504511
- name: instance_id
505512
in: path
506513
description: instance id of instance associated with the binding
@@ -545,6 +552,13 @@ components:
545552
schema:
546553
type: string
547554

555+
InfoLocation:
556+
name: X-Api-Info-Location
557+
in: header
558+
description: endpoint for fetching additional information about the Platform
559+
schema:
560+
type: string
561+
548562
schemas:
549563
Catalog:
550564
type: object

profile.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ or REQUIRED level requirements defined herein.
1515
- [Notations and Terminology](#notations-and-terminology)
1616
- [Notational Conventions](#notational-conventions)
1717
- [Terminology](#terminology)
18+
- [Additional Headers](#additional-headers)
19+
- [Cloud Foundry Info Location Header](#cloud-foundry-info-location-header)
1820
- [Originating Identity Header](#originating-identity-header)
1921
- [Cloud Foundry Originating Identity Header](#cloud-foundry-originating-identity-header)
2022
- [Kubernetes Originating Identity Header](#kubernetes-originating-identity-header)
@@ -42,6 +44,38 @@ be interpreted as described in [RFC 2119]( https://tools.ietf.org/html/rfc2119).
4244
Please refer to terminology defined by the
4345
[Open Service Broker API specification](spec.md#terminology).
4446

47+
48+
## Additional Headers
49+
50+
### Cloud Foundry Info Location Header
51+
52+
The `X-API-Info-Location` header is used to provide Service Brokers with an
53+
endpoint that can be used to fetch information about the specific Cloud Foundry
54+
deployment from which the request originated.
55+
56+
The header consists of a `value` string, where the `value` is a Base64 encoded
57+
serialized JSON object.
58+
59+
The following properties MUST appear within the JSON encoded `value`:
60+
61+
| Property | Type | Description |
62+
| --- | --- | --- |
63+
| info_location_url | string | The URL of an endpoint that can be used to fetch information about the Cloud Foundry deployment from which the request originated. |
64+
65+
Platforms MAY include additional properties.
66+
67+
For example, a `value` of:
68+
```json
69+
{
70+
"info_location_url": "https://api.platform.example.com/v2/info"
71+
}
72+
```
73+
would appear in the HTTP Header as:
74+
```
75+
X-API-Info-Location: ewogICJpbmZvX2xvY2F0aW9uX3VybCI6ICJodHRwczovL2FwaS5wbGF0Zm9ybS5leGFtcGxlLmNvbS92Mi9pbmZvIgp9
76+
```
77+
78+
4579
## Originating Identity Header
4680

4781
In the [Open Service Broker API specification](spec.md) it defines an

spec.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,9 @@ The following HTTP Headers are defined for the operations detailed in this spec:
157157

158158
\* Headers with an asterisk are REQUIRED.
159159

160+
Additional headers for specific Platforms are detailed in the
161+
[profile](profile.md#additional-headers) document.
162+
160163
### API Version Header
161164

162165
Requests from the Platform to the Service Broker MUST contain a header that

swagger.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ paths:
3535
- $ref: '#/parameters/APIVersion'
3636
- $ref: '#/parameters/OriginatingIdentity'
3737
- $ref: '#/parameters/RequestIdentity'
38+
- $ref: '#/parameters/InfoLocation'
3839
get:
3940
summary: get the catalog of services that the service broker offers
4041
tags:
@@ -56,6 +57,7 @@ paths:
5657
- $ref: '#/parameters/APIVersion'
5758
- $ref: '#/parameters/OriginatingIdentity'
5859
- $ref: '#/parameters/RequestIdentity'
60+
- $ref: '#/parameters/InfoLocation'
5961
- name: instance_id
6062
in: path
6163
description: instance id of instance to provision
@@ -184,6 +186,7 @@ paths:
184186
- $ref: '#/parameters/APIVersion'
185187
- $ref: '#/parameters/OriginatingIdentity'
186188
- $ref: '#/parameters/RequestIdentity'
189+
- $ref: '#/parameters/InfoLocation'
187190
- name: instance_id
188191
in: path
189192
description: instance id of instance to provision
@@ -231,6 +234,7 @@ paths:
231234
- $ref: '#/parameters/APIVersion'
232235
- $ref: '#/parameters/OriginatingIdentity'
233236
- $ref: '#/parameters/RequestIdentity'
237+
- $ref: '#/parameters/InfoLocation'
234238
- name: instance_id
235239
in: path
236240
description: instance id of instance to provision
@@ -283,6 +287,7 @@ paths:
283287
- $ref: '#/parameters/APIVersion'
284288
- $ref: '#/parameters/OriginatingIdentity'
285289
- $ref: '#/parameters/RequestIdentity'
290+
- $ref: '#/parameters/InfoLocation'
286291
- name: instance_id
287292
in: path
288293
description: instance id of instance to provision
@@ -399,6 +404,11 @@ parameters:
399404
in: header
400405
description: idenity of the request from the Platform
401406
type: string
407+
InfoLocation:
408+
name: X-Api-Info-Location
409+
in: header
410+
description: endpoint for fetching additional information about the Platform
411+
type: string
402412
accepts_incomplete:
403413
name: accepts_incomplete
404414
in: query

0 commit comments

Comments
 (0)