Skip to content

Commit d22812d

Browse files
committed
docs: document path parameters in source-http-ingest
1 parent 552f6c0 commit d22812d

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

site/docs/reference/Connectors/capture-connectors/http-ingest.md

+26-2
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ The connector is available for use in the Flow web application. For local develo
1010

1111
## Usage
1212

13-
This connector is distinct from all other capture connectors in that it's not designed to pull data from a specific
13+
This connector is different from most other capture connectors in that it's not designed to pull data from a specific
1414
system or endpoint. It requires no endpoint-specific configuration, and can accept any and all valid JSON objects from any source.
1515

16-
This is useful primarily if you want to test out Flow or see how your webhook data will come over.
16+
This is especially useful if you want to test out Flow or see how your webhook data will come over.
1717

1818
To begin, use the web app to create a capture. Once published, the confirmation dialog displays
1919
a unique URL for your public endpoint. By default, this will accept webhook requests at `https://<your-public-endpoint>/webhook-data`, but you can customize the path, or even capture from multiple URL paths if you like.
@@ -52,6 +52,30 @@ Any URL query parameters that are sent on the request will be captured and seria
5252
}
5353
```
5454

55+
### Path parameters
56+
57+
Paths are allowed to contain parameter placeholders, which will be captured and serialized under `/_meta/pathParams/*` in the documents. For example, if you configure a path for `/foo/{fooId}` a webhook request that's sent to `/foo/123` would result in a document like:
58+
59+
```
60+
{
61+
"_meta": {
62+
"webhookId": "...",
63+
"pathParams": {
64+
"fooId": "123"
65+
},
66+
"reqPath": "/foo/{fooId}",
67+
...
68+
}
69+
...
70+
}
71+
```
72+
73+
Multiple parameters are allowed, for example `/foo/{fooId}/bar/{barId}`. Each parameter corresponds to exactly one path segment in the request URL. Capturing multiple segments in a single parameter is not supported. The syntax and semantics of the path specification follow the [OpenAPI specification](https://swagger.io/docs/specification/v3_0/paths-and-operations/#path-templating) (a.k.a Swagger).
74+
75+
Path parameters are automatically added to the collection write schema as required properties, so they can be used as part of the collection key by editing the collection during capture creation.
76+
77+
Care must be taken when specifying multiple paths, to ensure they don't conflict with each other. For example, you may not specify both `/{paramA}` and `/{paramB}`, because it would be impossible to determine which path to use for a request to `/123`.
78+
5579
### Webhook IDs
5680

5781
Webhook delivery is typically "at least once". This means that webhooks from common services such as Github, Segment, Shopify, etc. may sometimes be sent multiple times.

0 commit comments

Comments
 (0)