Skip to content

Commit 7b4a6a3

Browse files
Add Nexus-Link header spec (#8)
Co-authored-by: Roey Berman <[email protected]>
1 parent 30ebcf5 commit 7b4a6a3

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

Diff for: SPEC.md

+13-1
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ Headers that start with the `Nexus-Callback-` prefix are expected to be attached
9797
the handler. The callback request must strip away the `Nexus-Callback-` prefix. E.g if a Start Operation request
9898
includes a `Nexus-Callback-Token: some-token` header, the callback request would include a `Token: some-token` header.
9999

100+
The `Nexus-Link` header field can be added to associate resources with the start request. A handler may attach these
101+
links as metadata to underlying resources to provide end-to-end observabililty. See the [`Nexus-Link`](#nexus-link)
102+
section for more information.
103+
100104
#### Request Body
101105

102106
The body may contain arbitrary data. Headers should specify content type and encoding.
@@ -111,7 +115,8 @@ The body may contain arbitrary data. Headers should specify content type and enc
111115

112116
**Body**: Arbitrary data conveying the operation's result. Headers should specify content type and encoding.
113117

114-
- `201 Created`: Operation was started and will complete asynchronously.
118+
- `201 Created`: Operation was started and will complete asynchronously. It may return `Nexus-Link` headers to associate
119+
resources to this operation.
115120

116121
**Headers**:
117122

@@ -266,6 +271,13 @@ following predefined error codes.
266271

267272
## General Purpose Headers
268273

274+
### `Nexus-Link`
275+
276+
The `Nexus-Link` header field provides a means for serializing one or more links in HTTP headers. This header is encoded
277+
the same way as the HTTP header `Link` described [here](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Link).
278+
279+
Handlers and callers can specify links in different Nexus requests to associate an operation with arbitrary resources.
280+
269281
### `Request-Timeout`
270282

271283
Callers may specify the `Request-Timeout` header on all APIs to inform the handler how long they're willing to wait for

0 commit comments

Comments
 (0)